Documentation
¶
Index ¶
- Variables
- type Display
- func (d *Display) Display(content *proto.Content)
- func (d *Display) DisplayHeader()
- func (d *Display) DisplayInput(text string)
- func (d *Display) FinishOutput(info string)
- func (d *Display) PromptForApproval(question string) (bool, error)
- func (d *Display) PromptForConfigAction() (string, error)
- func (d *Display) PromptForConfigEdit(current string) (string, error)
- func (d *Display) PromptForConfigFile() (string, error)
- func (d *Display) PromptForInput() (string, error)
- func (d *Display) ShowNotice(text string)
- func (d *Display) ShowResumption(id string, server string)
Constants ¶
This section is empty.
Variables ¶
var ErrUserAborted = huh.ErrUserAborted
ErrUserAborted is returned when the user aborts a prompt.
Functions ¶
This section is empty.
Types ¶
type Display ¶
type Display struct {
// contains filtered or unexported fields
}
func (*Display) DisplayHeader ¶
func (d *Display) DisplayHeader()
func (*Display) DisplayInput ¶
DisplayInput displays the user input.
func (*Display) FinishOutput ¶
FinishOutput completes the streaming output and shows info if provided
func (*Display) PromptForApproval ¶
PromptForApproval shows an accept/reject dialog Returns true if accepted, false if rejected, and an error if cancelled (Ctrl+C)
func (*Display) PromptForConfigAction ¶ added in v0.2.0
PromptForConfigAction shows the /config menu and returns the chosen action, one of "edit", "load", or "cancel". It returns an error if the user cancelled (Ctrl+C or Esc).
func (*Display) PromptForConfigEdit ¶ added in v0.2.0
PromptForConfigEdit shows a multi-line editor pre-filled with current and returns the edited text. It returns an error if the user cancelled (Ctrl+C or Esc).
func (*Display) PromptForConfigFile ¶ added in v0.2.0
PromptForConfigFile shows a file browser for selecting a JSON config file and returns the chosen path. It returns an error if the user cancelled (Ctrl+C or Esc).
func (*Display) PromptForInput ¶
PromptForInput shows the input box and returns the user input Returns the input string and an error if the user cancelled (Ctrl+C)
func (*Display) ShowNotice ¶ added in v0.2.0
ShowNotice prints an informational message (e.g. the current harness config or a validation error) on its own line.