internal

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 NewDisplay

func NewDisplay(id string, w io.Writer) *Display

func (*Display) Display added in v0.2.0

func (d *Display) Display(content *proto.Content)

Display prints a content block according to its type.

func (*Display) DisplayHeader

func (d *Display) DisplayHeader()

func (*Display) DisplayInput

func (d *Display) DisplayInput(text string)

DisplayInput displays the user input.

func (*Display) FinishOutput

func (d *Display) FinishOutput(info string)

FinishOutput completes the streaming output and shows info if provided

func (*Display) PromptForApproval

func (d *Display) PromptForApproval(question string) (bool, error)

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

func (d *Display) PromptForConfigAction() (string, error)

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

func (d *Display) PromptForConfigEdit(current string) (string, error)

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

func (d *Display) PromptForConfigFile() (string, error)

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

func (d *Display) PromptForInput() (string, error)

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

func (d *Display) ShowNotice(text string)

ShowNotice prints an informational message (e.g. the current harness config or a validation error) on its own line.

func (*Display) ShowResumption

func (d *Display) ShowResumption(id string, server string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL