Documentation
¶
Index ¶
- func RenderMarkdown(content string, width int, dark bool) string
- type AutocompleteModel
- func (m AutocompleteModel) SetFilter(input string) AutocompleteModel
- func (m AutocompleteModel) SetHeight(h int) AutocompleteModel
- func (m AutocompleteModel) Update(msg tea.Msg) (AutocompleteModel, tea.Cmd)
- func (m AutocompleteModel) View(t theme.Theme, width int) string
- func (m AutocompleteModel) Visible() bool
- type AutocompleteSelectedMsg
- type CommandEntry
- type FleetPanel
- type FleetStatusUpdatedMsg
- type FleetWorkerKillMsg
- type InputModel
- func (m InputModel) Focused() bool
- func (m InputModel) Height() int
- func (m InputModel) Init() tea.Cmd
- func (m *InputModel) SetValue(s string)
- func (m *InputModel) SetWidth(w int)
- func (m InputModel) Update(msg tea.Msg) (InputModel, tea.Cmd)
- func (m InputModel) Value() string
- func (m InputModel) View(t theme.Theme, width int) string
- type InputResizedMsg
- type JobKillMsg
- type JobListRefreshedMsg
- type JobPanel
- type JobPauseMsg
- type JobTickMsg
- type Message
- type MessageRole
- type PermissionPrompt
- type PermissionResponse
- type PlanApproveMsg
- type PlanRejectMsg
- type PlanView
- type SessionKillMsg
- type SessionSelectedMsg
- type SidebarModel
- type StatusBar
- type SubmitMsg
- type ThinkingPanel
- func (p ThinkingPanel) AppendContent(text string) ThinkingPanel
- func (p ThinkingPanel) Collapsed() bool
- func (p ThinkingPanel) HasContent() bool
- func (p ThinkingPanel) Reset() ThinkingPanel
- func (p ThinkingPanel) SetCollapsed(collapsed bool) ThinkingPanel
- func (p ThinkingPanel) SetWidth(w int) ThinkingPanel
- func (p ThinkingPanel) ToggleCollapsed() ThinkingPanel
- func (p ThinkingPanel) View() string
- type ToggleMsg
- type ToolCallCard
- type ToolCallListModel
- type ToolCallStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AutocompleteModel ¶
type AutocompleteModel struct {
// contains filtered or unexported fields
}
AutocompleteModel manages the autocomplete dropdown state.
func NewAutocomplete ¶
func NewAutocomplete() AutocompleteModel
NewAutocomplete creates an autocomplete model with all known commands.
func (AutocompleteModel) SetFilter ¶
func (m AutocompleteModel) SetFilter(input string) AutocompleteModel
SetFilter updates the autocomplete based on current input text.
func (AutocompleteModel) SetHeight ¶
func (m AutocompleteModel) SetHeight(h int) AutocompleteModel
SetHeight sets the available height so View() can cap the dropdown size.
func (AutocompleteModel) Update ¶
func (m AutocompleteModel) Update(msg tea.Msg) (AutocompleteModel, tea.Cmd)
Update handles keyboard input when the autocomplete is visible.
func (AutocompleteModel) View ¶
func (m AutocompleteModel) View(t theme.Theme, width int) string
View renders the autocomplete dropdown, capped at maxVisibleItems rows.
func (AutocompleteModel) Visible ¶
func (m AutocompleteModel) Visible() bool
Visible returns whether the autocomplete dropdown is showing.
type AutocompleteSelectedMsg ¶
type AutocompleteSelectedMsg struct {
Command string
}
AutocompleteSelectedMsg is sent when a command is selected from the dropdown.
type CommandEntry ¶
CommandEntry represents a slash command for autocomplete.
type FleetPanel ¶
type FleetPanel struct {
// contains filtered or unexported fields
}
FleetPanel displays the active fleet workers in a table.
func (FleetPanel) SetFleetStatus ¶
func (f FleetPanel) SetFleetStatus(fs *pb.FleetStatus) FleetPanel
SetFleetStatus replaces the current fleet data.
func (FleetPanel) SetSize ¶
func (f FleetPanel) SetSize(w, h int) FleetPanel
SetSize updates the panel dimensions.
func (FleetPanel) Update ¶
func (f FleetPanel) Update(msg tea.Msg) (FleetPanel, tea.Cmd)
Update handles key events for the fleet panel.
type FleetStatusUpdatedMsg ¶
type FleetStatusUpdatedMsg struct {
Status *pb.FleetStatus
}
FleetStatusUpdatedMsg carries a new FleetStatus from the daemon.
type FleetWorkerKillMsg ¶
FleetWorkerKillMsg is sent when the user kills a fleet worker.
type InputModel ¶
type InputModel struct {
// contains filtered or unexported fields
}
func NewInput ¶
func NewInput(t theme.Theme) InputModel
func (InputModel) Focused ¶
func (m InputModel) Focused() bool
func (InputModel) Height ¶
func (m InputModel) Height() int
Height returns the current content-driven height of the input.
func (InputModel) Init ¶
func (m InputModel) Init() tea.Cmd
func (*InputModel) SetValue ¶
func (m *InputModel) SetValue(s string)
SetValue replaces the input text content.
func (*InputModel) SetWidth ¶
func (m *InputModel) SetWidth(w int)
func (InputModel) Update ¶
func (m InputModel) Update(msg tea.Msg) (InputModel, tea.Cmd)
func (InputModel) Value ¶
func (m InputModel) Value() string
Value returns the current text content of the input.
type InputResizedMsg ¶
type InputResizedMsg struct {
Height int
}
InputResizedMsg is sent when the input height changes due to content.
type JobKillMsg ¶
type JobKillMsg struct{ JobID string }
JobKillMsg is sent when the user requests to kill the selected job.
type JobListRefreshedMsg ¶
JobListRefreshedMsg carries a fresh job list from the daemon.
type JobPanel ¶
type JobPanel struct {
// contains filtered or unexported fields
}
JobPanel displays active jobs from all managers in a table.
func NewJobPanel ¶
NewJobPanel creates a JobPanel backed by the given daemon client.
type JobPauseMsg ¶
type JobPauseMsg struct{ JobID string }
JobPauseMsg is sent when the user requests to pause the selected job.
type Message ¶
type Message struct {
Role MessageRole
Content string
Sender string // model name or "You"
}
type MessageRole ¶
type MessageRole string
const ( RoleUser MessageRole = "user" RoleAssistant MessageRole = "assistant" RoleTool MessageRole = "tool" RoleSystem MessageRole = "system" )
type PermissionPrompt ¶
type PermissionPrompt struct {
RequestID string
ToolName string
ArgsJSON string
Desc string
// contains filtered or unexported fields
}
PermissionPrompt displays an inline permission request, blocking until resolved.
func NewPermissionPrompt ¶
func NewPermissionPrompt(requestID, toolName, argsJSON, desc string) PermissionPrompt
func (PermissionPrompt) Resolved ¶
func (p PermissionPrompt) Resolved() bool
func (PermissionPrompt) Update ¶
func (p PermissionPrompt) Update(msg tea.Msg) (PermissionPrompt, tea.Cmd)
type PermissionResponse ¶
type PermissionResponse struct {
RequestID string
Allowed bool
Scope string // "once", "session", "always"
}
PermissionResponse is sent when the user resolves a permission request.
type PlanApproveMsg ¶
PlanApproveMsg is dispatched when the user approves the plan.
type PlanRejectMsg ¶
type PlanRejectMsg struct {
PlanID string
}
PlanRejectMsg is dispatched when the user rejects the plan.
type PlanView ¶
type PlanView struct {
// contains filtered or unexported fields
}
PlanView renders a proposed plan as a numbered task list with status indicators and keyboard navigation.
Enter → approve (with any toggled skip steps) Esc → reject space → toggle skip on the cursor step ↑/k, ↓/j → navigate steps
func NewPlanView ¶
func NewPlanView() PlanView
type SessionKillMsg ¶
type SessionKillMsg struct{ SessionID string }
SessionKillMsg is sent when the user kills a session from the sidebar.
type SessionSelectedMsg ¶
type SessionSelectedMsg struct{ SessionID string }
SessionSelectedMsg is sent when the user switches to a session.
type SidebarModel ¶
type SidebarModel struct {
// contains filtered or unexported fields
}
SidebarModel displays a list of sessions and allows switching or killing.
func NewSidebar ¶
func NewSidebar(sessions []*pb.Session, currentID string) SidebarModel
func (SidebarModel) SetSize ¶
func (s SidebarModel) SetSize(w, h int) SidebarModel
func (SidebarModel) Update ¶
func (s SidebarModel) Update(msg tea.Msg) (SidebarModel, tea.Cmd)
type StatusBar ¶
type StatusBar struct {
WorkingDir string
Provider string
Model string
SessionStart time.Time
InputTokens int
OutputTokens int
ActiveAgents int
BackgroundTasks int
Width int
}
func NewStatusBar ¶
func NewStatusBar() StatusBar
type SubmitMsg ¶
type SubmitMsg struct {
Content string
}
SubmitMsg is sent when the user submits input.
type ThinkingPanel ¶
type ThinkingPanel struct {
// contains filtered or unexported fields
}
ThinkingPanel displays a collapsible panel for model reasoning traces. It auto-starts expanded and can be toggled with Ctrl+H.
func NewThinkingPanel ¶
func NewThinkingPanel(width int) ThinkingPanel
NewThinkingPanel creates a new thinking panel.
func (ThinkingPanel) AppendContent ¶
func (p ThinkingPanel) AppendContent(text string) ThinkingPanel
AppendContent adds text to the thinking panel.
func (ThinkingPanel) Collapsed ¶
func (p ThinkingPanel) Collapsed() bool
Collapsed returns true if the panel is currently collapsed.
func (ThinkingPanel) HasContent ¶
func (p ThinkingPanel) HasContent() bool
HasContent returns true if the panel has any content.
func (ThinkingPanel) Reset ¶
func (p ThinkingPanel) Reset() ThinkingPanel
Reset clears the content and resets to expanded state.
func (ThinkingPanel) SetCollapsed ¶
func (p ThinkingPanel) SetCollapsed(collapsed bool) ThinkingPanel
SetCollapsed sets the collapsed state.
func (ThinkingPanel) SetWidth ¶
func (p ThinkingPanel) SetWidth(w int) ThinkingPanel
SetWidth updates the panel width.
func (ThinkingPanel) ToggleCollapsed ¶
func (p ThinkingPanel) ToggleCollapsed() ThinkingPanel
ToggleCollapsed flips the collapsed state.
func (ThinkingPanel) View ¶
func (p ThinkingPanel) View() string
View renders the panel. Returns empty string if no content.
type ToggleMsg ¶
type ToggleMsg struct{ CallID string }
ToggleMsg is sent when a tool call card is toggled.
type ToolCallCard ¶
type ToolCallCard struct {
CallID string
ToolName string
ArgsJSON string
ResultJSON string
Status ToolCallStatus
Expanded bool
Summary string // one-line summary set on completion
}
ToolCallCard renders a collapsible tool call with status icon.
func (*ToolCallCard) SetResult ¶
func (tc *ToolCallCard) SetResult(resultJSON string, success bool)
type ToolCallListModel ¶
type ToolCallListModel struct {
// contains filtered or unexported fields
}
ToolCallListModel manages a list of tool call cards.
func NewToolCallList ¶
func NewToolCallList() ToolCallListModel
func (*ToolCallListModel) AddCard ¶
func (m *ToolCallListModel) AddCard(callID, toolName, argsJSON string)
func (ToolCallListModel) Update ¶
func (m ToolCallListModel) Update(msg tea.Msg) (ToolCallListModel, tea.Cmd)
func (*ToolCallListModel) UpdateResult ¶
func (m *ToolCallListModel) UpdateResult(callID, resultJSON string, success bool)
type ToolCallStatus ¶
type ToolCallStatus int
const ( ToolCallPending ToolCallStatus = iota ToolCallRunning ToolCallSuccess ToolCallFailed )