Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( PrevAgentKey = key.NewBinding( key.WithKeys("shift+left", "ctrl+p"), key.WithHelp("shift+"+glyphs.ArrowLeft+"/ctrl+p", "prev agent"), ) NextAgentKey = key.NewBinding( key.WithKeys("shift+right", "ctrl+n"), key.WithHelp("shift+"+glyphs.ArrowRight+"/ctrl+n", "next agent"), ) // Additional navigation keys for better UX FirstAgentKey = key.NewBinding( key.WithKeys("home", "ctrl+a"), key.WithHelp("home/ctrl+a", "first agent"), ) LastAgentKey = key.NewBinding( key.WithKeys("end", "ctrl+e"), key.WithHelp("end/ctrl+e", "last agent"), ) )
Enhanced key bindings for cycling agents in the unified TUI model.
var ( LightPalette = Palette{Background: "#FFFFFF", Foreground: "#000000"} DarkPalette = Palette{Background: "#000000", Foreground: "#FFFFFF"} )
Pre-defined palettes for light and dark modes.
CursorUp key.Binding CursorDown key.Binding PrevPage key.Binding NextPage key.Binding GoToStart key.Binding GoToEnd key.Binding Filter key.Binding ClearFilter key.Binding CancelWhileFiltering key.Binding AcceptWhileFiltering key.Binding ShowFullHelp key.Binding CloseFullHelp key.Binding Quit key.Binding ForceQuit key.Binding }{ CursorUp: key.NewBinding(), CursorDown: key.NewBinding(), PrevPage: key.NewBinding(), NextPage: key.NewBinding(), GoToStart: key.NewBinding(), GoToEnd: key.NewBinding(), Filter: key.NewBinding(), ClearFilter: key.NewBinding(), CancelWhileFiltering: key.NewBinding(), AcceptWhileFiltering: key.NewBinding(), ShowFullHelp: key.NewBinding(), CloseFullHelp: key.NewBinding(), Quit: key.NewBinding(), ForceQuit: key.NewBinding(), }
NoNavKeyMap disables all navigation keys for the list.
Functions ¶
This section is empty.
Types ¶
type AgentInfo ¶
type AgentInfo struct {
Agent *core.Agent
History string
Status AgentStatus
LastContentType ContentType // Track what type of content was last added
PendingStatusUpdate string // Track ongoing status update for progressive completion
CurrentTool string
// TokenCount removed - use Agent.Cost.TotalTokens() for accurate token counts
TokenHistory []int
ActivityData []float64 // Activity level per second (0.0 to 1.0)
ActivityTimes []time.Time // Timestamp for each activity data point
LastToken time.Time
LastActivity time.Time
CurrentActivity int // Tokens processed in current second
ModelName string
Scanner *bufio.Scanner
Cancel context.CancelFunc
Spinner spinner.Model
TokenProgress progress.Model // Animated progress bar for token usage
Name string
Role string // Agent role for display (e.g., "System", "Research", "DevOps")
TokensStarted bool // Flag to stop thinking animation when tokens start
StreamingResponse string // Current AI response being streamed (unformatted)
StreamingTokenCount int // Live token count during streaming (reconciled on completion)
// Debug and trace fields
DebugTrace []DebugTraceEvent // Debug trace events
CurrentStep int // Current step number
DebugStreamingResponse string // Debug streaming response
// contains filtered or unexported fields
}
type AgentStatus ¶
type AgentStatus int
const ( StatusIdle AgentStatus = iota StatusRunning StatusError StatusStopped )
type ContentType ¶
type ContentType int
ContentType represents the type of content last added to history
const ( ContentTypeEmpty ContentType = iota ContentTypeUserInput ContentTypeAIResponse ContentTypeStatusMessage ContentTypeLogo )
type DebugTraceEvent ¶
type Keybinds ¶
type Keybinds struct {
Quit string `json:"quit"`
ToggleTab string `json:"toggleTab"`
Submit string `json:"submit"`
NextPane string `json:"nextPane"`
PrevPane string `json:"prevPane"`
Pause string `json:"pause"`
Diagnostics string `json:"diagnostics"`
}
Keybinds define keyboard shortcuts for the TUI actions.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the root TUI model.
func NewWithConfig ¶
NewWithConfig creates a new TUI model bound to an Agent with optional config.
func (*Model) Cleanup ¶
func (m *Model) Cleanup()
Cleanup cancels all running agents and performs necessary cleanup. This should be called when the application is shutting down.
func (Model) RenderMarkdownIfNeeded ¶
renderMarkdownIfNeeded applies markdown rendering to AI responses
type Palette ¶
Theme holds colour settings and keybinds. Palette defines a set of base colours for the UI panels.
type RobotFace ¶
type RobotFace struct {
// contains filtered or unexported fields
}
RobotFace represents our cute little robot companion
func (*RobotFace) GetMoodText ¶
GetMoodText returns a cute status text based on the robot's state
func (*RobotFace) GetStyledFace ¶
GetStyledFace returns the robot face with appropriate styling
func (*RobotFace) GetStyledMoodText ¶
GetStyledMoodText returns the mood text with appropriate styling
func (*RobotFace) SetState ¶
func (r *RobotFace) SetState(state RobotState)
SetState changes the robot's emotional state
type RobotState ¶
type RobotState int
RobotState represents different emotional/activity states of the robot
const ( RobotIdle RobotState = iota RobotActive RobotThinking RobotError RobotSleeping RobotBlinking )
type Theme ¶
type Theme struct {
Mode string `json:"mode"`
Palette Palette `json:"palette"`
UserBarColor string `json:"userBarColor"`
AIBarColor string `json:"aiBarColor"`
IdleColor string `json:"idleColor"`
RunningColor string `json:"runningColor"`
ErrorColor string `json:"errorColor"`
StoppedColor string `json:"stoppedColor"`
// Advanced agent panel colors
RoleColor string `json:"roleColor"`
ToolColor string `json:"toolColor"`
PanelTitleColor string `json:"panelTitleColor"`
Keybinds Keybinds `json:"keybinds"`
}
Theme holds colour settings and keybinds. Mode selects which built-in palette to use ("light" or "dark").
func DefaultTheme ¶
func DefaultTheme() Theme
DefaultTheme returns built‑in colours and keybindings.