Documentation
¶
Index ¶
- Variables
- type IconSet
- type Spinner
- type SubagentGroup
- func (g *SubagentGroup) AddPanel(p *SubagentPanel)
- func (g *SubagentGroup) Blur()
- func (g *SubagentGroup) CompletedCount() int
- func (g *SubagentGroup) Focus()
- func (g *SubagentGroup) FocusPanel(index int)
- func (g *SubagentGroup) Focused() bool
- func (g *SubagentGroup) GetPanels() []*SubagentPanel
- func (g *SubagentGroup) Init() tea.Cmd
- func (g *SubagentGroup) IsAllCompleted() bool
- func (g *SubagentGroup) PanelCount() int
- func (g *SubagentGroup) SetPanels(panels []*SubagentPanel)
- func (g *SubagentGroup) SetWidth(w int)
- func (g *SubagentGroup) Update(msg tea.Msg) (tui.Component, tea.Cmd)
- func (g *SubagentGroup) View() string
- type SubagentGroupOption
- func WithSubagentGroupDesignTokens(tokens *design.DesignTokens) SubagentGroupOption
- func WithSubagentGroupFocusHint(hint string) SubagentGroupOption
- func WithSubagentGroupGap(gap int) SubagentGroupOption
- func WithSubagentGroupMaxPerRow(n int) SubagentGroupOption
- func WithSubagentGroupTheme(theme string) SubagentGroupOption
- func WithSubagentGroupWidth(w int) SubagentGroupOption
- type SubagentPanel
- func (p *SubagentPanel) AddTool(tool SubagentTool)
- func (p *SubagentPanel) AdvanceSpinner()
- func (p *SubagentPanel) Blur()
- func (p *SubagentPanel) BottomPinnedLines() int
- func (p *SubagentPanel) Focus()
- func (p *SubagentPanel) Focused() bool
- func (p *SubagentPanel) GetStatus() SubagentStatus
- func (p *SubagentPanel) Init() tea.Cmd
- func (p *SubagentPanel) SetCost(s string)
- func (p *SubagentPanel) SetElapsed(d time.Duration)
- func (p *SubagentPanel) SetStatus(status SubagentStatus)
- func (p *SubagentPanel) SetThinking(text string)
- func (p *SubagentPanel) SetTokenCount(s string)
- func (p *SubagentPanel) SetTools(tools []SubagentTool)
- func (p *SubagentPanel) Update(msg tea.Msg) (tui.Component, tea.Cmd)
- func (p *SubagentPanel) View() string
- type SubagentPanelOption
- func WithShimmerColors(baseHex, highlightHex string) SubagentPanelOption
- func WithSubagentDesignTokens(tokens *design.DesignTokens) SubagentPanelOption
- func WithSubagentModel(model string) SubagentPanelOption
- func WithSubagentSpinner(s spinner.Spinner) SubagentPanelOption
- func WithSubagentTheme(theme string) SubagentPanelOption
- func WithSubagentThinking(text string) SubagentPanelOption
- func WithSubagentTitle(title string) SubagentPanelOption
- func WithSubagentVisibleTools(n int) SubagentPanelOption
- func WithSubagentWidth(width int) SubagentPanelOption
- type SubagentStatus
- type SubagentTool
- type ThreadEntry
- type ThreadProgress
- func (tp *ThreadProgress) AddThread(id, label string)
- func (tp *ThreadProgress) AppendOutput(id string, line string)
- func (tp *ThreadProgress) Blur()
- func (tp *ThreadProgress) Focus()
- func (tp *ThreadProgress) Focused() bool
- func (tp *ThreadProgress) GetThread(id string) *ThreadEntry
- func (tp *ThreadProgress) Init() tea.Cmd
- func (tp *ThreadProgress) RemoveThread(id string)
- func (tp *ThreadProgress) SetThreadExpanded(id string, expanded bool)
- func (tp *ThreadProgress) StartThread(id string) tea.Cmd
- func (tp *ThreadProgress) Update(msg tea.Msg) (tui.Component, tea.Cmd)
- func (tp *ThreadProgress) UpdateThread(id string, status ThreadStatus)
- func (tp *ThreadProgress) View() string
- type ThreadProgressOption
- func WithMaxOutputLines(n int) ThreadProgressOption
- func WithShowElapsed(show bool) ThreadProgressOption
- func WithThreadIconSet(is IconSet) ThreadProgressOption
- func WithThreadProgressDesignTokens(tokens *design.DesignTokens) ThreadProgressOption
- func WithThreadProgressTheme(theme string) ThreadProgressOption
- func WithThreadSpinner(s Spinner) ThreadProgressOption
- type ThreadStatus
- type ToolStatus
Constants ¶
This section is empty.
Variables ¶
var ( // SpinnerDots - Braille dots spinner (smooth). SpinnerDots = Spinner{ Frames: []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}, } // SpinnerCircleQuarters - Circle with quarters. SpinnerCircleQuarters = Spinner{ Frames: []string{"◐", "◓", "◑", "◒"}, } )
var ( // IconSetCodex - Codex CLI style. IconSetCodex = IconSet{ Running: "⏺", Success: "✓", Error: "✗", Warning: "⚠", Info: "⏺", None: "⏺", } )
Functions ¶
This section is empty.
Types ¶
type IconSet ¶
type IconSet struct {
Running string
Success string
Error string
Warning string
Info string
None string
}
IconSet defines icons for different statuses.
type Spinner ¶
type Spinner struct {
Frames []string
}
Spinner defines an animation sequence.
func (Spinner) FrameCount ¶
FrameCount returns the number of frames in the spinner.
type SubagentGroup ¶
type SubagentGroup struct {
// contains filtered or unexported fields
}
SubagentGroup renders multiple SubagentPanels in one horizontal row.
func NewSubagentGroup ¶
func NewSubagentGroup(opts ...SubagentGroupOption) *SubagentGroup
NewSubagentGroup creates a new SubagentGroup.
func (*SubagentGroup) AddPanel ¶
func (g *SubagentGroup) AddPanel(p *SubagentPanel)
AddPanel appends one panel to the group.
func (*SubagentGroup) CompletedCount ¶
func (g *SubagentGroup) CompletedCount() int
CompletedCount returns how many panels are completed.
func (*SubagentGroup) FocusPanel ¶
func (g *SubagentGroup) FocusPanel(index int)
FocusPanel focuses a specific panel by index.
func (*SubagentGroup) Focused ¶
func (g *SubagentGroup) Focused() bool
Focused returns whether the group is focused.
func (*SubagentGroup) GetPanels ¶
func (g *SubagentGroup) GetPanels() []*SubagentPanel
GetPanels returns the current panel slice.
func (*SubagentGroup) Init ¶
func (g *SubagentGroup) Init() tea.Cmd
Init initializes all child panels.
func (*SubagentGroup) IsAllCompleted ¶
func (g *SubagentGroup) IsAllCompleted() bool
IsAllCompleted reports whether all panels are completed.
func (*SubagentGroup) PanelCount ¶
func (g *SubagentGroup) PanelCount() int
PanelCount returns the number of panels.
func (*SubagentGroup) SetPanels ¶
func (g *SubagentGroup) SetPanels(panels []*SubagentPanel)
SetPanels replaces all panels in the group.
func (*SubagentGroup) SetWidth ¶ added in v2.9.0
func (g *SubagentGroup) SetWidth(w int)
SetWidth updates the group's total rendering width.
func (*SubagentGroup) View ¶
func (g *SubagentGroup) View() string
View renders header, panel row, and optional completion footer.
type SubagentGroupOption ¶
type SubagentGroupOption func(*SubagentGroup)
SubagentGroupOption configures a SubagentGroup.
func WithSubagentGroupDesignTokens ¶
func WithSubagentGroupDesignTokens(tokens *design.DesignTokens) SubagentGroupOption
WithSubagentGroupDesignTokens applies design-system tokens.
func WithSubagentGroupFocusHint ¶
func WithSubagentGroupFocusHint(hint string) SubagentGroupOption
WithSubagentGroupFocusHint sets the optional header hint text.
func WithSubagentGroupGap ¶
func WithSubagentGroupGap(gap int) SubagentGroupOption
WithSubagentGroupGap sets horizontal spacing between panels.
func WithSubagentGroupMaxPerRow ¶ added in v2.4.0
func WithSubagentGroupMaxPerRow(n int) SubagentGroupOption
WithSubagentGroupMaxPerRow sets the max number of panels per row.
func WithSubagentGroupTheme ¶
func WithSubagentGroupTheme(theme string) SubagentGroupOption
WithSubagentGroupTheme applies a named theme.
func WithSubagentGroupWidth ¶ added in v2.9.0
func WithSubagentGroupWidth(w int) SubagentGroupOption
WithSubagentGroupWidth sets the total width for the group.
type SubagentPanel ¶
type SubagentPanel struct {
// contains filtered or unexported fields
}
SubagentPanel renders a single subagent panel.
func NewSubagentPanel ¶
func NewSubagentPanel(opts ...SubagentPanelOption) *SubagentPanel
NewSubagentPanel creates a new SubagentPanel.
func (*SubagentPanel) AddTool ¶
func (p *SubagentPanel) AddTool(tool SubagentTool)
AddTool appends a tool and recomputes hidden count.
func (*SubagentPanel) AdvanceSpinner ¶ added in v2.4.2
func (p *SubagentPanel) AdvanceSpinner()
AdvanceSpinner manually advances the spinner frame. Use this when rendering outside of Bubble Tea's Update loop.
func (*SubagentPanel) BottomPinnedLines ¶ added in v2.9.4
func (p *SubagentPanel) BottomPinnedLines() int
BottomPinnedLines returns the number of lines at the bottom of View() that must stay pinned together (footer + change chips + bottom border).
func (*SubagentPanel) Focused ¶
func (p *SubagentPanel) Focused() bool
Focused reports whether the panel is focused.
func (*SubagentPanel) GetStatus ¶
func (p *SubagentPanel) GetStatus() SubagentStatus
GetStatus returns the current panel status.
func (*SubagentPanel) Init ¶
func (p *SubagentPanel) Init() tea.Cmd
Init starts animation ticks when running.
func (*SubagentPanel) SetElapsed ¶
func (p *SubagentPanel) SetElapsed(d time.Duration)
SetElapsed sets elapsed duration.
func (*SubagentPanel) SetStatus ¶
func (p *SubagentPanel) SetStatus(status SubagentStatus)
SetStatus updates panel status.
func (*SubagentPanel) SetThinking ¶ added in v2.4.0
func (p *SubagentPanel) SetThinking(text string)
SetThinking sets prose/thinking text rendered under the header.
func (*SubagentPanel) SetTokenCount ¶
func (p *SubagentPanel) SetTokenCount(s string)
SetTokenCount sets token count text.
func (*SubagentPanel) SetTools ¶
func (p *SubagentPanel) SetTools(tools []SubagentTool)
SetTools replaces tools and recomputes hidden count.
type SubagentPanelOption ¶
type SubagentPanelOption func(*SubagentPanel)
SubagentPanelOption configures a SubagentPanel.
func WithShimmerColors ¶ added in v2.10.0
func WithShimmerColors(baseHex, highlightHex string) SubagentPanelOption
WithShimmerColors configures the shimmer base and highlight hex colors.
func WithSubagentDesignTokens ¶
func WithSubagentDesignTokens(tokens *design.DesignTokens) SubagentPanelOption
WithSubagentDesignTokens applies design-system tokens.
func WithSubagentModel ¶
func WithSubagentModel(model string) SubagentPanelOption
WithSubagentModel sets the model name for footer rendering.
func WithSubagentSpinner ¶ added in v2.5.0
func WithSubagentSpinner(s spinner.Spinner) SubagentPanelOption
WithSubagentSpinner sets the spinner animation.
func WithSubagentTheme ¶
func WithSubagentTheme(theme string) SubagentPanelOption
WithSubagentTheme applies a named design-system theme.
func WithSubagentThinking ¶ added in v2.4.0
func WithSubagentThinking(text string) SubagentPanelOption
WithSubagentThinking sets prose/thinking text rendered under the header.
func WithSubagentTitle ¶
func WithSubagentTitle(title string) SubagentPanelOption
WithSubagentTitle sets the panel title.
func WithSubagentVisibleTools ¶
func WithSubagentVisibleTools(n int) SubagentPanelOption
WithSubagentVisibleTools sets how many recent tools are shown.
func WithSubagentWidth ¶
func WithSubagentWidth(width int) SubagentPanelOption
WithSubagentWidth sets the render width.
type SubagentStatus ¶
type SubagentStatus int
SubagentStatus represents the subagent execution state.
const ( SubagentRunning SubagentStatus = iota SubagentCompleted SubagentFailed SubagentAborted )
type SubagentTool ¶
type SubagentTool struct {
Name string
Status ToolStatus
LinesAdded int
LinesRemoved int
}
SubagentTool represents one tool operation rendered in the panel.
type ThreadEntry ¶
type ThreadEntry struct {
ID string
Label string
Status ThreadStatus
Output []string
StartTime time.Time
EndTime time.Time
Expanded bool
Spinner Spinner
// contains filtered or unexported fields
}
ThreadEntry represents a single thread row and its output.
type ThreadProgress ¶
type ThreadProgress struct {
// contains filtered or unexported fields
}
ThreadProgress displays concurrent thread/task progress.
func NewThreadProgress ¶
func NewThreadProgress(opts ...ThreadProgressOption) *ThreadProgress
NewThreadProgress creates a new ThreadProgress component.
func (*ThreadProgress) AddThread ¶
func (tp *ThreadProgress) AddThread(id, label string)
AddThread adds (or replaces) a thread by ID.
func (*ThreadProgress) AppendOutput ¶
func (tp *ThreadProgress) AppendOutput(id string, line string)
AppendOutput appends one output line to a thread.
func (*ThreadProgress) Blur ¶
func (tp *ThreadProgress) Blur()
Blur marks the component as unfocused.
func (*ThreadProgress) Focus ¶
func (tp *ThreadProgress) Focus()
Focus marks the component as focused.
func (*ThreadProgress) Focused ¶
func (tp *ThreadProgress) Focused() bool
Focused returns whether the component has focus.
func (*ThreadProgress) GetThread ¶
func (tp *ThreadProgress) GetThread(id string) *ThreadEntry
GetThread returns a thread entry pointer by ID.
func (*ThreadProgress) Init ¶
func (tp *ThreadProgress) Init() tea.Cmd
Init initializes the component.
func (*ThreadProgress) RemoveThread ¶
func (tp *ThreadProgress) RemoveThread(id string)
RemoveThread removes a thread by ID.
func (*ThreadProgress) SetThreadExpanded ¶
func (tp *ThreadProgress) SetThreadExpanded(id string, expanded bool)
SetThreadExpanded sets one thread's expanded state.
func (*ThreadProgress) StartThread ¶
func (tp *ThreadProgress) StartThread(id string) tea.Cmd
StartThread marks a thread as running and returns animation cmd.
func (*ThreadProgress) UpdateThread ¶
func (tp *ThreadProgress) UpdateThread(id string, status ThreadStatus)
UpdateThread updates thread status and timestamps.
func (*ThreadProgress) View ¶
func (tp *ThreadProgress) View() string
View renders the thread progress UI.
type ThreadProgressOption ¶
type ThreadProgressOption func(*ThreadProgress)
ThreadProgressOption configures a ThreadProgress component.
func WithMaxOutputLines ¶
func WithMaxOutputLines(n int) ThreadProgressOption
WithMaxOutputLines sets max output lines shown when expanded (0 = show all).
func WithShowElapsed ¶
func WithShowElapsed(show bool) ThreadProgressOption
WithShowElapsed toggles elapsed-time rendering.
func WithThreadIconSet ¶
func WithThreadIconSet(is IconSet) ThreadProgressOption
WithThreadIconSet sets icons used for thread statuses.
func WithThreadProgressDesignTokens ¶
func WithThreadProgressDesignTokens(tokens *design.DesignTokens) ThreadProgressOption
WithThreadProgressDesignTokens applies design-system colors.
func WithThreadProgressTheme ¶
func WithThreadProgressTheme(theme string) ThreadProgressOption
WithThreadProgressTheme applies a named design-system theme.
func WithThreadSpinner ¶
func WithThreadSpinner(s Spinner) ThreadProgressOption
WithThreadSpinner sets the default spinner used by running threads.
type ThreadStatus ¶
type ThreadStatus int
ThreadStatus represents a thread execution state.
const ( ThreadRunning ThreadStatus = iota ThreadCompleted ThreadFailed ThreadEscalated )
type ToolStatus ¶
type ToolStatus int
ToolStatus represents an individual tool execution state.
const ( ToolRunning ToolStatus = iota ToolCompleted ToolFailed )