Documentation
¶
Overview ¶
Package tui style tokens: the single source of truth for the TUI's visual language. Colour lives here and nowhere else, so call sites never write hex, every colour is a role rather than a pigment, and all of it is AdaptiveColor because a TUI is not assumed to run on a dark terminal.
Direction: cool chrome, warm content — anything the agent did is amber or red, so colour alone tells you whether you are looking at UI or at output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModelPicker ¶ added in v0.2.0
NewModelPicker creates and configures the bubbles/list model picker. Its caller frames it with modalOverlayStyle, so it draws no border of its own.
func Run ¶
func Run( ctx context.Context, registry *provider.Registry, session *agent.Session, toolRegistry *tools.Registry, approval *tools.ApprovalGate, version string, workspaceRoot string, guardCfg agent.LoopGuardConfig, ) error
Run starts the Bubble Tea interface over the shared agent engine.
All agent behaviour — streaming, tool execution, approval, context truncation and the loop guard — lives in agent.AgentLoop. This file only translates engine events into tea messages and routes user input back in.
Types ¶
type ApprovalBridge ¶
type ApprovalBridge struct {
RequestCh chan ApprovalRequest
}
func NewApprovalBridge ¶
func NewApprovalBridge() *ApprovalBridge
func (*ApprovalBridge) RequestApproval ¶
func (b *ApprovalBridge) RequestApproval(toolName string, args json.RawMessage, preview string) (bool, error)
type ApprovalRequest ¶
type ApprovalRequest struct {
ToolName string
Args json.RawMessage
Preview string
ReplyCh chan bool
}
type ChatMessage ¶
type ModelItem ¶ added in v0.2.0
ModelItem represents a selectable model item in the fuzzy picker.