Documentation
¶
Index ¶
- func NewProgram(model tea.Model, interactive bool, opts ...tea.ProgramOption) *tea.Program
- func Print(a ...any)
- func PrintDebug(msg string)
- func PrintError(err error) error
- func PrintJSON(data interface{})
- func PrintJSONError(err error) error
- func PrintLn(msg string)
- func PrintRaw(msg string)
- func PrintSuccess(msg string)
- func PrintTOML(data interface{})
- func PrintWarning(msg string)
- func Printf(format string, a ...any)
- func Println(a ...any)
- func SetJSONOutput(v bool)
- type CLIUserError
- type CreateView
- type DeleteView
- type ErrExitCode
- type GetView
- type ListView
- func (v *ListView) Error(err error) error
- func (v *ListView) Print(msg string)
- func (v *ListView) Render(data [][]string)
- func (v *ListView) RenderPaging(data [][]string, offset, limit int, hasMore bool)
- func (v *ListView) RenderPagingWithContext(data [][]string, offset, limit int, hasMore bool, ...)
- func (v *ListView) RenderTotal(data [][]string, total int)
- type SpinnerView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProgram ¶ added in v0.19.807
NewProgram creates a tea.Program for the current environment. When interactive is false, input/rendering are disabled to avoid touching a TTY.
func Print ¶ added in v0.19.1075
func Print(a ...any)
Print mirrors fmt.Print but routes to the mode-aware writer.
func PrintDebug ¶ added in v0.19.800
func PrintDebug(msg string)
func PrintError ¶
PrintError renders an error in the active output mode: agent -> envelope, json -> JSON error object, table -> human-styled text.
func PrintJSONError ¶
PrintJSONError renders an error in the active output mode. It is equivalent to PrintError: agent -> envelope, json -> JSON error object, table -> human text. Both entry points exist for historical call sites; prefer either.
func PrintSuccess ¶
func PrintSuccess(msg string)
func PrintWarning ¶
func PrintWarning(msg string)
func Printf ¶ added in v0.19.1075
Printf writes formatted human output to the mode-aware writer (stderr in agent mode, stdout otherwise), so it never pollutes the agent stdout envelope.
func Println ¶ added in v0.19.1075
func Println(a ...any)
Println mirrors fmt.Println but routes to the mode-aware writer.
func SetJSONOutput ¶ added in v0.19.1075
func SetJSONOutput(v bool)
SetJSONOutput toggles plain JSON output mode. Called once during output resolution. Agent mode is tracked separately via agentmode and takes precedence in every helper.
Types ¶
type CLIUserError ¶
type CLIUserError struct {
Msg string
}
func (*CLIUserError) Error ¶
func (u *CLIUserError) Error() string
type CreateView ¶
type CreateView struct {
SpinnerView
// contains filtered or unexported fields
}
func NewCreateView ¶
func NewCreateView(model string, json, interactive bool) *CreateView
func (*CreateView) Fail ¶
func (v *CreateView) Fail(err error) error
func (*CreateView) Start ¶
func (v *CreateView) Start()
func (*CreateView) Success ¶
func (v *CreateView) Success(id string)
type DeleteView ¶
type DeleteView struct {
SpinnerView
// contains filtered or unexported fields
}
func NewDeleteView ¶
func NewDeleteView(model, id string, interactive bool) *DeleteView
func (*DeleteView) Fail ¶
func (v *DeleteView) Fail(err error) error
func (*DeleteView) Start ¶
func (v *DeleteView) Start()
func (*DeleteView) Success ¶
func (v *DeleteView) Success()
func (*DeleteView) SuccessQueued ¶
func (v *DeleteView) SuccessQueued()
type ErrExitCode ¶ added in v0.19.1049
ErrExitCode wraps an error with a stable machine code for the agent envelope and a custom process exit code, honored by the command wrapper. It lets a command distinguish outcomes beyond the generic exit 1, e.g. "config synced but component builds failed".
func (*ErrExitCode) Error ¶ added in v0.19.1049
func (e *ErrExitCode) Error() string
func (*ErrExitCode) ExitCode ¶ added in v0.19.1049
func (e *ErrExitCode) ExitCode() int
func (*ErrExitCode) Unwrap ¶ added in v0.19.1049
func (e *ErrExitCode) Unwrap() error
type GetView ¶
type GetView struct {
// contains filtered or unexported fields
}
func NewGetView ¶
func NewGetView() *GetView
type ListView ¶
type ListView struct {
// contains filtered or unexported fields
}
func NewListView ¶
func NewListView() *ListView
func (*ListView) RenderPaging ¶
func (*ListView) RenderPagingWithContext ¶ added in v0.19.1006
func (*ListView) RenderTotal ¶ added in v0.19.1006
type SpinnerView ¶
type SpinnerView struct {
// contains filtered or unexported fields
}
func NewSpinnerView ¶
func NewSpinnerView(json, interactive bool) *SpinnerView
func (*SpinnerView) Fail ¶
func (v *SpinnerView) Fail(err error)
func (*SpinnerView) Start ¶
func (v *SpinnerView) Start(text string)
func (*SpinnerView) Success ¶
func (v *SpinnerView) Success(text string)
func (*SpinnerView) Update ¶
func (v *SpinnerView) Update(text string)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bubbles owns the CLI's small reusable terminal-UI primitives.
|
Package bubbles owns the CLI's small reusable terminal-UI primitives. |
|
Package teaprogram is the single constructor every TUI should use, so terminal conventions like ctrl+z backgrounding apply everywhere instead of being reimplemented (or forgotten) per model.
|
Package teaprogram is the single constructor every TUI should use, so terminal conventions like ctrl+z backgrounding apply everywhere instead of being reimplemented (or forgotten) per model. |
|
action/run/steps
This run.go file contains a stub used to render the step component in a standalone way.
|
This run.go file contains a stub used to render the step component in a standalone way. |
|
common
Package common provides utilities for v3 UI components.
|
Package common provides utilities for v3 UI components. |