Documentation
¶
Overview ¶
Package dash implements the persistent TUI dashboard.
Index ¶
- func Run(cmds []command.Descriptor) error
- type Model
- type Output
- func (o *Output) AppendLine(line string)
- func (o *Output) AppendRun(r RunRecord)
- func (o Output) AtBottom() bool
- func (o *Output) Clear()
- func (o *Output) FinishRun(exitCode int, duration time.Duration)
- func (o *Output) GotoBottom()
- func (o *Output) ScrollDown(n int)
- func (o *Output) ScrollUp(n int)
- func (o *Output) SetSize(w, h int)
- func (o *Output) StartRun(r RunRecord)
- func (o Output) Update(msg tea.Msg) (Output, tea.Cmd)
- func (o Output) View() string
- type Picker
- type Prompt
- type PromptState
- type RunRecord
- type RunRequestedMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(cmds []command.Descriptor) error
Run starts the dashboard TUI with the given commands. It blocks until the user quits.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the top-level bubbletea model for the dashboard.
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output is the scrollable run buffer.
func (*Output) AppendLine ¶
AppendLine appends a line to the most recent run (which must be in-flight). If there's no in-flight run, the line is dropped.
func (*Output) AppendRun ¶
AppendRun adds a fully-finished run in one shot. Kept for cases where we don't need streaming (e.g., synthetic test runs).
func (*Output) FinishRun ¶
FinishRun finalizes the most recent in-flight run with its exit code and duration. Writes the footer.
func (*Output) GotoBottom ¶
func (o *Output) GotoBottom()
func (*Output) ScrollDown ¶
func (*Output) StartRun ¶
StartRun begins a new in-flight run. It renders the header immediately; the footer appears on FinishRun.
type Picker ¶
type Picker struct {
// contains filtered or unexported fields
}
Picker owns the search box and filtered result list.
func NewPicker ¶
func NewPicker(cmds []command.Descriptor) Picker
NewPicker builds a picker over the given commands.
func (Picker) Selected ¶
func (p Picker) Selected() (command.Descriptor, int, bool)
Selected returns the currently highlighted descriptor, if any.
type Prompt ¶
type Prompt struct {
// contains filtered or unexported fields
}
Prompt is the widget for one placeholder. It supports three kinds: plain text input, fuzzy-filtered source, and a file picker.
type PromptState ¶
type PromptState struct {
// contains filtered or unexported fields
}
PromptState tracks a chain of placeholder resolutions for a single command.
type RunRecord ¶
type RunRecord struct {
Descriptor command.Descriptor
Args []string // resolved args
Lines []string // stdout/stderr lines in arrival order
StartedAt time.Time
Duration time.Duration
ExitCode int
Finished bool
}
RunRecord is a single command execution rendered in the output pane. It may be in-flight (Finished=false, lines accumulating) or completed.
type RunRequestedMsg ¶
type RunRequestedMsg struct {
Index int // index into the full commands slice
}
RunRequestedMsg is emitted when the user picks a command with Enter.