tui

package
v1.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains the main application model and layout logic.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains the chat panel component with scrollable viewport.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains the context budget bar that displays token usage.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file implements an interactive code graph browser for the code graph.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains the input component with command history.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains logging functionality for debugging skill calls.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains the MCP server status panel, accessed via /mcp command.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains message types used for communication between components.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains the permission prompt dialog for tool execution approval.

Package tui provides the interactive selector component.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains the simulated streaming/typing effect with corruption.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains Lip Gloss styles using the corrupted-theme color palette.

Package tui provides the Bubble Tea-based terminal UI for Celeste CLI. This file contains the tool progress component that tracks active tool executions.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Primary accent colors - magenta/pink corruption
	ColorAccent     = lipgloss.Color("#d94f90") // Pink (signature)
	ColorAccentGlow = lipgloss.Color("#ff4da6") // Bright pink glow

	// Purple gradient - abyss/void aesthetic
	ColorPurple     = lipgloss.Color("#8b5cf6") // Primary purple
	ColorPurpleNeon = lipgloss.Color("#c084fc") // Neon purple
	ColorPurpleDeep = lipgloss.Color("#6b21a8") // Deep void purple

	// Cyan/blue accents - digital/glitch
	ColorCyan      = lipgloss.Color("#00d4ff") // Bright cyan
	ColorCyanLight = lipgloss.Color("#67e8f9") // Light cyan

	// Background colors - deep void
	ColorBg         = lipgloss.Color("#0a0a0a") // Main background
	ColorBgTertiary = lipgloss.Color("#1a1a2e") // Tertiary bg
	ColorBgGlass    = lipgloss.Color("#1a1a2e") // Glassmorphic layer

	// Text colors - high contrast
	ColorText          = lipgloss.Color("#f5f1f8") // Primary text (bright)
	ColorTextSecondary = lipgloss.Color("#b8afc8") // Secondary text
	ColorTextMuted     = lipgloss.Color("#7a7085") // Muted text
	ColorTextGlow      = lipgloss.Color("#ffffff") // Glowing text

	// Border colors - glassmorphic gradients
	ColorBorder       = lipgloss.Color("#3a2555") // Primary border
	ColorBorderLight  = lipgloss.Color("#5a4575") // Light border
	ColorBorderGlow   = lipgloss.Color("#d94f90") // Glowing border
	ColorBorderPurple = lipgloss.Color("#8b5cf6") // Purple border
	ColorBorderCyan   = lipgloss.Color("#00d4ff") // Cyan border

	// Status colors
	ColorSuccess = lipgloss.Color("#22c55e") // Green
	ColorError   = lipgloss.Color("#ef4444") // Red
	ColorWarning = lipgloss.Color("#eab308") // Yellow
	ColorInfo    = lipgloss.Color("#06b6d4") // Cyan

	// Corruption/glitch colors
	ColorCorrupt1 = lipgloss.Color("#ff4757") // Red corruption
	ColorCorrupt2 = lipgloss.Color("#ff6b9d") // Pink corruption
	ColorCorrupt3 = lipgloss.Color("#c084fc") // Purple corruption
	ColorCorrupt4 = lipgloss.Color("#00d4ff") // Cyan glitch
)

Corrupted Theme Colors - Celeste Brand Identity Aligned with whykusanagi.xyz corrupted voidpunk aesthetic

View Source
var (
	// Base container style
	BaseStyle = lipgloss.NewStyle().
				Background(ColorBg)

	// Border styles
	BorderStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(ColorBorder)

	// Text styles
	TextStyle = lipgloss.NewStyle().
				Foreground(ColorText)

	TextMutedStyle = lipgloss.NewStyle().
					Foreground(ColorTextMuted)

	TextSecondaryStyle = lipgloss.NewStyle().
						Foreground(ColorTextSecondary)

	// Accent text
	AccentStyle = lipgloss.NewStyle().
				Foreground(ColorAccent).
				Bold(true)

	PurpleStyle = lipgloss.NewStyle().
				Foreground(ColorPurple)
)

Base styles - reusable building blocks

View Source
var (
	// Header styles - glassmorphic bar with gradient accent
	HeaderStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(ColorText).
				Background(ColorBgGlass).
				BorderStyle(lipgloss.NormalBorder()).
				BorderBottom(true).
				BorderForeground(ColorBorderGlow).
				Padding(0, 1)

	HeaderTitleStyle = lipgloss.NewStyle().
						Foreground(ColorAccentGlow).
						Bold(true)

	HeaderInfoStyle = lipgloss.NewStyle().
					Foreground(ColorTextSecondary)

	// Chat panel styles - no border, just padding
	ChatPanelStyle = lipgloss.NewStyle().
					Padding(0, 1)

	// Message styles - enhanced with glow effects
	UserMessageStyle = lipgloss.NewStyle().
						Foreground(ColorCyanLight).
						Bold(false)

	AssistantMessageStyle = lipgloss.NewStyle().
							Foreground(ColorAccentGlow)

	SystemMessageStyle = lipgloss.NewStyle().
						Foreground(ColorPurpleNeon).
						Italic(true)

	TimestampStyle = lipgloss.NewStyle().
					Foreground(ColorTextMuted).
					Width(6)

	// Input panel styles - glassmorphic with gradient border
	InputPanelStyle = lipgloss.NewStyle().
					Foreground(ColorText).
					Background(ColorBgGlass).
					BorderStyle(lipgloss.NormalBorder()).
					BorderTop(true).
					BorderForeground(ColorBorderPurple).
					Padding(0, 1)

	InputPromptStyle = lipgloss.NewStyle().
						Foreground(ColorAccentGlow).
						Bold(true)

	InputTextStyle = lipgloss.NewStyle().
					Foreground(ColorTextGlow)

	InputPlaceholderStyle = lipgloss.NewStyle().
							Foreground(ColorTextMuted).
							Italic(true)

	// Skills panel styles - enhanced with glassmorphism
	SkillsPanelStyle = lipgloss.NewStyle().
						Foreground(ColorTextMuted).
						Background(ColorBgGlass).
						BorderStyle(lipgloss.RoundedBorder()).
						BorderForeground(ColorBorderLight).
						Padding(1, 2).
						MarginTop(1)

	SkillNameStyle = lipgloss.NewStyle().
					Foreground(ColorAccentGlow).
					Bold(true)

	SkillDescStyle = lipgloss.NewStyle().
					Foreground(ColorTextSecondary)

	SkillExecutingStyle = lipgloss.NewStyle().
						Foreground(ColorWarning).
						Bold(true)

	SkillCompletedStyle = lipgloss.NewStyle().
						Foreground(ColorSuccess).
						Bold(true)

	SkillErrorStyle = lipgloss.NewStyle().
					Foreground(ColorError).
					Bold(true)

	// Status bar styles - minimal
	StatusBarStyle = lipgloss.NewStyle().
					Foreground(ColorTextMuted)

	StatusActiveStyle = lipgloss.NewStyle().
						Foreground(ColorSuccess)

	StatusStreamingStyle = lipgloss.NewStyle().
							Foreground(ColorWarning)

	// NSFW indicator - bold glowing effect
	NSFWStyle = lipgloss.NewStyle().
				Foreground(ColorCorrupt1).
				Background(ColorBgTertiary).
				Bold(true).
				Padding(0, 1)

	// Endpoint indicator - purple neon
	EndpointStyle = lipgloss.NewStyle().
					Foreground(ColorPurpleNeon).
					Bold(true)

	// Model indicator - cyan glow
	ModelStyle = lipgloss.NewStyle().
				Foreground(ColorCyanLight)

	// Function call display - minimal
	FunctionCallStyle = lipgloss.NewStyle().
						Foreground(ColorPurple).
						MarginLeft(2)

	FunctionNameStyle = lipgloss.NewStyle().
						Foreground(ColorPurple).
						Bold(true)

	FunctionArgsStyle = lipgloss.NewStyle().
						Foreground(ColorTextMuted)

	FunctionResultStyle = lipgloss.NewStyle().
						Foreground(ColorTextSecondary)

	// Corruption/glitch effect styles (for streaming)
	CorruptedStyle = lipgloss.NewStyle().
					Foreground(ColorAccent)

	GlitchStyle = lipgloss.NewStyle().
				Foreground(ColorPurple)
)

Component-specific styles with glassmorphism

Functions

func ApplyCodeBlockCorruption

func ApplyCodeBlockCorruption(content string, typingPos int, corruptionIntensity float64) string

ApplyCodeBlockCorruption detects code blocks (```) and applies corruption styling Used during typing animation to give code blocks a corrupted-typing effect

func CloseLogging

func CloseLogging()

CloseLogging closes the log file.

func CorruptCodeLine

func CorruptCodeLine(codeLine string, intensity float64) string

CorruptCodeLine applies corruption effects specifically for code Uses block characters and glitch symbols for a "corrupted terminal" aesthetic

func CorruptText

func CorruptText(text string, intensity float64) string

CorruptText adds block character corruption effects to a string. Used for loading states and other animated text. For character-level Japanese mixing, use CorruptTextJapanese instead.

func CorruptTextJapanese

func CorruptTextJapanese(text string, intensity float64) string

CorruptTextJapanese mixes Japanese characters INTO English words This creates the classic translation-failure aesthetic: "loaディング", "pro理cessing" Use this for dashboard titles and headers where you want readable corruption.

func DetectDump

func DetectDump(firstChunkSize, totalSize int, elapsed time.Duration) bool

DetectDump checks if response appears to be a "dump" (all at once) rather than true streaming. Used to decide if simulation is needed.

func GetCodeBlockStyle

func GetCodeBlockStyle() lipgloss.Style

GetCodeBlockStyle returns a lipgloss style for code blocks in corrupted theme

func GetLogPath

func GetLogPath() string

GetLogPath returns the current log file path.

func GetRandomCorruption

func GetRandomCorruption() string

GetRandomCorruption returns a random colored corruption string.

func GetRandomCorruptionPlain

func GetRandomCorruptionPlain() string

GetRandomCorruptionPlain returns corruption without color (for status bar).

func InitLogging

func InitLogging() error

InitLogging initializes the skill call log file.

func LogInfo

func LogInfo(msg string)

LogInfo logs an informational message.

func LogLLMRequest

func LogLLMRequest(messageCount int, toolCount int)

LogLLMRequest logs an LLM request.

func LogLLMResponse

func LogLLMResponse(contentLen int, hasToolCalls bool)

LogLLMResponse logs an LLM response.

func LogSkillCall

func LogSkillCall(name string, args map[string]any)

LogSkillCall logs when a skill/function is called by the LLM.

func LogSkillResult

func LogSkillResult(name string, result string, err error)

LogSkillResult logs the result of a skill execution.

func MessageRoleStyle

func MessageRoleStyle(role string) lipgloss.Style

MessageRoleStyle returns the appropriate style for a message role.

func RenderCodeGraphConstellation added in v1.8.3

func RenderCodeGraphConstellation(indexer *codegraph.Indexer, width int) string

RenderCodeGraphConstellation produces a structured dependency tree visualization of the code graph using the corrupted theme palette.

func Run

func Run(llmClient LLMClient) error

Run starts the TUI application.

func SendMessage

func SendMessage(content string) tea.Cmd

SendMessage returns a command that sends a message to the LLM.

func SkillStatusStyle

func SkillStatusStyle(status string) lipgloss.Style

SkillStatusStyle returns the appropriate style for a skill execution status.

func StreamingSpinner

func StreamingSpinner(frame int) string

StreamingSpinner returns an animated spinner for streaming.

func ThinkingAnimation

func ThinkingAnimation(frame int) string

ThinkingAnimation returns animated "thinking" text with corruption.

func Tick

func Tick(d time.Duration) tea.Cmd

Tick returns a command that sends a tick message after a delay.

func TypingTickCmd

func TypingTickCmd() tea.Cmd

TickCmd returns a command that sends a typing tick.

Types

type AgentCommandResultMsg added in v1.7.0

type AgentCommandResultMsg struct {
	Output string
	Err    error
}

AgentCommandResultMsg is sent when a TUI /agent command completes.

type AgentCommandRunner added in v1.7.0

type AgentCommandRunner interface {
	RunAgentCommand(args []string) tea.Cmd
}

AgentCommandRunner is an optional extension for handling /agent from TUI.

type AgentProgressKind added in v1.7.0

type AgentProgressKind int

AgentProgressKind identifies the type of an AgentProgressMsg.

const (
	AgentProgressTurnStart AgentProgressKind = iota // a new turn has started
	AgentProgressToolCall                           // agent called a tool
	AgentProgressStepDone                           // a plan step was marked done
	AgentProgressResponse                           // final assistant response text
	AgentProgressComplete                           // run finished successfully
	AgentProgressError                              // run failed
)

type AgentProgressMsg added in v1.7.0

type AgentProgressMsg struct {
	RunID    string
	Kind     AgentProgressKind
	Text     string
	Turn     int
	MaxTurns int
	// Per-turn stats — populated on ProgressResponse and ProgressComplete kinds.
	InputTokens  int
	OutputTokens int
	Duration     time.Duration
	Ch           <-chan AgentProgressMsg
}

AgentProgressMsg is sent incrementally during an agent run. Ch is a channel of further progress messages; nil on terminal kinds (Complete/Error).

func (AgentProgressMsg) ReadNext added in v1.7.0

func (m AgentProgressMsg) ReadNext() tea.Cmd

ReadNext returns a tea.Cmd that reads the next AgentProgressMsg from Ch. Returns nil when Ch is nil or closed — no command to schedule.

type AppModel

type AppModel struct {
	// contains filtered or unexported fields
}

AppModel is the root model for the Celeste TUI application.

func NewApp

func NewApp(llmClient LLMClient) AppModel

NewApp creates a new TUI application model.

func (AppModel) Init

func (m AppModel) Init() tea.Cmd

Init implements tea.Model.

func (AppModel) SetConfig

func (m AppModel) SetConfig(cfg *config.Config) AppModel

func (AppModel) SetLLMClient

func (m AppModel) SetLLMClient(client LLMClient) AppModel

SetLLMClient sets the LLM client.

func (AppModel) SetSessionManager

func (m AppModel) SetSessionManager(sm SessionManager, session Session) AppModel

SetSessionManager sets the session manager for persistence.

func (AppModel) SetVersion

func (m AppModel) SetVersion(version, build string) AppModel

SetVersion sets the application version and build information.

func (AppModel) Update

func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (AppModel) View

func (m AppModel) View() string

View implements tea.Model.

func (AppModel) WithCodeGraphIndexer added in v1.8.3

func (m AppModel) WithCodeGraphIndexer(indexer *codegraph.Indexer) AppModel

WithCodeGraphIndexer sets the code graph indexer for /graph visualization.

func (AppModel) WithCodeGraphSummary added in v1.8.3

func (m AppModel) WithCodeGraphSummary(summary string) AppModel

WithCodeGraphSummary sets the code graph summary for /index display.

func (AppModel) WithCommandHistory added in v1.7.0

func (m AppModel) WithCommandHistory(history []string) AppModel

WithCommandHistory restores the command history from a saved session.

func (AppModel) WithEndpoint

func (m AppModel) WithEndpoint(endpoint string) AppModel

WithEndpoint restores the endpoint/provider from a loaded session.

func (AppModel) WithGrimoireContent added in v1.8.3

func (m AppModel) WithGrimoireContent(content string) AppModel

SetConfig sets the configuration for accessing context limits and other settings. WithGrimoireContent sets the grimoire content for /grimoire display.

func (AppModel) WithMessages

func (m AppModel) WithMessages(messages []ChatMessage) AppModel

WithMessages restores chat history from session messages.

type ChatMessage

type ChatMessage struct {
	Role       string         // "user", "assistant", "system", "tool"
	Content    string         // Message content
	ToolCallID string         // For tool messages, the tool call ID
	Name       string         // For tool messages, the function name
	ToolCalls  []ToolCallInfo // For assistant messages, the tool calls that were made
	Timestamp  time.Time      // When the message was created
	Metadata   map[string]any // Optional metadata (e.g. image data from tool results)
}

ChatMessage represents a message in the conversation.

type ChatModel

type ChatModel struct {
	// contains filtered or unexported fields
}

ChatModel represents the chat panel with scrollable messages.

func NewChatModel

func NewChatModel() ChatModel

NewChatModel creates a new chat model.

func (ChatModel) AddAssistantMessage

func (m ChatModel) AddAssistantMessage(content string) ChatModel

AddAssistantMessage adds an assistant message to the chat.

func (ChatModel) AddAssistantMessageWithToolCalls

func (m ChatModel) AddAssistantMessageWithToolCalls(content string, toolCalls []ToolCallInfo) ChatModel

AddAssistantMessageWithToolCalls adds an assistant message with tool calls to the chat.

func (ChatModel) AddFunctionCall

func (m ChatModel) AddFunctionCall(call FunctionCall) ChatModel

AddFunctionCall adds a function call display to the chat.

func (ChatModel) AddSystemMessage

func (m ChatModel) AddSystemMessage(content string) ChatModel

AddSystemMessage adds a system message to the chat.

func (ChatModel) AddToolResult

func (m ChatModel) AddToolResult(toolCallID, name, result string, metadata ...map[string]any) ChatModel

AddToolResult adds a tool result message to the chat. Optional metadata maps can be passed to attach extra data (e.g. image base64).

func (ChatModel) AddUserMessage

func (m ChatModel) AddUserMessage(content string) ChatModel

AddUserMessage adds a user message to the chat.

func (ChatModel) AppendToLastAssistant

func (m ChatModel) AppendToLastAssistant(content string) ChatModel

AppendToLastAssistant appends content to the last assistant message.

func (ChatModel) Clear

func (m ChatModel) Clear() ChatModel

Clear clears all messages and function calls.

func (ChatModel) GetLLMMessages added in v1.5.2

func (m ChatModel) GetLLMMessages() []ChatMessage

GetLLMMessages returns only messages that should be sent to the LLM, filtering out UI-only system messages (notifications, command results, etc.).

func (ChatModel) GetMessages

func (m ChatModel) GetMessages() []ChatMessage

GetMessages returns all chat messages (including UI-only system messages).

func (ChatModel) Init

func (m ChatModel) Init() tea.Cmd

Init implements the Init method for ChatModel (partial tea.Model).

func (ChatModel) SetLastAssistantContent

func (m ChatModel) SetLastAssistantContent(content string) ChatModel

SetLastAssistantContent sets the content of the last assistant message.

func (ChatModel) SetSize

func (m ChatModel) SetSize(width, height int) ChatModel

SetSize sets the chat panel size.

func (ChatModel) ToggleSkillCalls

func (m ChatModel) ToggleSkillCalls() ChatModel

ToggleSkillCalls toggles the visibility of skill call logs.

func (ChatModel) Update

func (m ChatModel) Update(msg tea.Msg) (ChatModel, tea.Cmd)

Update handles messages for the chat panel.

func (ChatModel) UpdateFunctionResult

func (m ChatModel) UpdateFunctionResult(name, result string) ChatModel

UpdateFunctionResult updates the result of a function call.

func (ChatModel) View

func (m ChatModel) View() string

View renders the chat panel.

type CollectionsModel

type CollectionsModel struct {
	// contains filtered or unexported fields
}

CollectionsModel is the TUI model for collections management

func NewCollectionsModel

func NewCollectionsModel(manager *collections.Manager) CollectionsModel

NewCollectionsModel creates a new collections model

func (CollectionsModel) Init

func (m CollectionsModel) Init() tea.Cmd

Init initializes the model

func (CollectionsModel) Update

func (m CollectionsModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (CollectionsModel) View

func (m CollectionsModel) View() string

View renders the model

type ContextBarModel added in v1.7.0

type ContextBarModel struct {
	// contains filtered or unexported fields
}

ContextBarModel renders a thin status bar showing token budget usage.

func NewContextBarModel added in v1.7.0

func NewContextBarModel() ContextBarModel

NewContextBarModel creates a new context bar model.

func (ContextBarModel) Init added in v1.7.0

func (m ContextBarModel) Init() tea.Cmd

Init initializes the model (no-op).

func (*ContextBarModel) SetSize added in v1.7.0

func (m *ContextBarModel) SetSize(width, _ int)

SetSize updates the component width.

func (ContextBarModel) Update added in v1.7.0

func (m ContextBarModel) Update(msg tea.Msg) (ContextBarModel, tea.Cmd)

Update handles messages for the context bar.

func (ContextBarModel) View added in v1.7.0

func (m ContextBarModel) View() string

View renders the context budget bar.

type ContextBudgetMsg added in v1.7.0

type ContextBudgetMsg struct {
	UsedTokens   int
	MaxTokens    int
	UsagePercent float64
	CompactCount int
	TurnCount    int
}

ContextBudgetMsg updates the context budget display.

type ContextIndicator

type ContextIndicator struct {
	// contains filtered or unexported fields
}

ContextIndicator displays token usage with visual progress bar and color coding

func NewContextIndicator

func NewContextIndicator() ContextIndicator

NewContextIndicator creates a new context indicator

func (ContextIndicator) GetUsageInfo

func (ci ContextIndicator) GetUsageInfo() string

GetUsageInfo returns formatted usage information

func (ContextIndicator) GetWarningLevel

func (ci ContextIndicator) GetWarningLevel() string

GetWarningLevel returns the current warning level

func (ContextIndicator) GetWarningMessage

func (ci ContextIndicator) GetWarningMessage() string

GetWarningMessage returns a user-friendly warning message

func (ContextIndicator) SetShowPercentage

func (ci ContextIndicator) SetShowPercentage(show bool) ContextIndicator

SetShowPercentage controls percentage display

func (ContextIndicator) SetShowProgressBar

func (ci ContextIndicator) SetShowProgressBar(show bool) ContextIndicator

SetShowProgressBar controls progress bar display

func (ContextIndicator) SetUsage

func (ci ContextIndicator) SetUsage(current, max int) ContextIndicator

SetUsage updates the current token usage

func (ContextIndicator) SetWarningLevel

func (ci ContextIndicator) SetWarningLevel(level string) ContextIndicator

SetWarningLevel explicitly sets the warning level

func (ContextIndicator) SetWidth

func (ci ContextIndicator) SetWidth(width int) ContextIndicator

SetWidth sets the indicator width

func (ContextIndicator) ShouldShowWarning

func (ci ContextIndicator) ShouldShowWarning() bool

ShouldShowWarning returns true if a warning should be displayed

func (ContextIndicator) View

func (ci ContextIndicator) View() string

View renders the context indicator

func (ContextIndicator) ViewCompact

func (ci ContextIndicator) ViewCompact() string

ViewCompact renders a compact version (for header use)

type EndpointSwitcher

type EndpointSwitcher interface {
	SwitchEndpoint(endpoint string) error
	ChangeModel(model string) error
}

EndpointSwitcher interface for clients that support dynamic endpoint switching.

type ErrorMsg

type ErrorMsg struct {
	Err error
}

ErrorMsg is sent when an error occurs.

type FunctionCall

type FunctionCall struct {
	Name      string         // Function name
	Arguments map[string]any // Arguments passed to the function
	Result    string         // Result of the function call
	Status    string         // "executing", "completed", "error"
	Timestamp time.Time      // When the call was initiated
}

FunctionCall represents a tool/function call from the LLM.

type GenerateMediaMsg

type GenerateMediaMsg struct {
	MediaType  string
	Prompt     string
	Params     map[string]interface{}
	ImageModel string // Override image model (if set)
}

GenerateMediaMsg is sent to generate media (image/video/etc) via Venice.ai.

type GraphModel added in v1.8.3

type GraphModel struct {
	// contains filtered or unexported fields
}

GraphModel is the TUI model for the interactive code graph viewer.

func NewGraphModel added in v1.8.3

func NewGraphModel(indexer *codegraph.Indexer) GraphModel

NewGraphModel creates a graph view from the code graph indexer.

func (GraphModel) Init added in v1.8.3

func (m GraphModel) Init() tea.Cmd

Init initializes the graph model.

func (GraphModel) Update added in v1.8.3

func (m GraphModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles input for the graph view.

func (GraphModel) View added in v1.8.3

func (m GraphModel) View() string

View renders the graph visualization.

type HeaderModel

type HeaderModel struct {
	// contains filtered or unexported fields
}

HeaderModel represents the header bar.

func NewHeaderModel

func NewHeaderModel() HeaderModel

NewHeaderModel creates a new header model.

func (HeaderModel) GetContextWarningLevel

func (m HeaderModel) GetContextWarningLevel() string

GetContextWarningLevel returns the current context warning level.

func (HeaderModel) SetAutoRouted

func (m HeaderModel) SetAutoRouted(routed bool) HeaderModel

SetAutoRouted sets whether auto-routing occurred.

func (HeaderModel) SetContextUsage

func (m HeaderModel) SetContextUsage(current, max int) HeaderModel

SetContextUsage updates the context usage display.

func (HeaderModel) SetEndpoint

func (m HeaderModel) SetEndpoint(endpoint string) HeaderModel

SetEndpoint sets the current endpoint.

func (HeaderModel) SetImageModel

func (m HeaderModel) SetImageModel(model string) HeaderModel

SetImageModel sets the current image generation model.

func (HeaderModel) SetModel

func (m HeaderModel) SetModel(model string) HeaderModel

SetModel sets the current model.

func (HeaderModel) SetNSFWMode

func (m HeaderModel) SetNSFWMode(enabled bool) HeaderModel

SetNSFWMode sets the NSFW mode indicator.

func (HeaderModel) SetShowContext

func (m HeaderModel) SetShowContext(show bool) HeaderModel

SetShowContext controls whether context usage is displayed.

func (HeaderModel) SetSkillsEnabled

func (m HeaderModel) SetSkillsEnabled(enabled bool) HeaderModel

SetSkillsEnabled sets whether skills/function calling is available.

func (HeaderModel) SetWidth

func (m HeaderModel) SetWidth(width int) HeaderModel

SetWidth sets the header width.

func (HeaderModel) View

func (m HeaderModel) View() string

View renders the header.

type InputModel

type InputModel struct {
	// contains filtered or unexported fields
}

InputModel wraps a textarea for multi-line input with word wrap, command history, and slash-command typeahead.

func NewInputModel

func NewInputModel() InputModel

NewInputModel creates a new input model using textarea for word-wrap support.

func (InputModel) Focus

func (m InputModel) Focus() InputModel

Focus gives focus to the input.

func (InputModel) GetHistory

func (m InputModel) GetHistory() []string

GetHistory returns the command history.

func (InputModel) Init

func (m InputModel) Init() tea.Cmd

Init implements the init method for InputModel.

func (InputModel) SetHistory

func (m InputModel) SetHistory(history []string) InputModel

SetHistory sets the command history.

func (InputModel) SetValue

func (m InputModel) SetValue(s string) InputModel

SetValue sets the input text.

func (InputModel) SetWidth

func (m InputModel) SetWidth(width int) InputModel

SetWidth sets the input width.

func (InputModel) Update

func (m InputModel) Update(msg tea.Msg) (InputModel, tea.Cmd)

Update handles messages for the input component.

func (InputModel) Value

func (m InputModel) Value() string

Value returns the current input value.

func (InputModel) View

func (m InputModel) View() string

View renders the input component.

type LLMClient

type LLMClient interface {
	SendMessage(messages []ChatMessage, tools []SkillDefinition) tea.Cmd
	GetSkills() []SkillDefinition
	ExecuteSkill(name string, args map[string]any, toolCallID string) tea.Cmd
}

LLMClient interface for sending messages to the LLM.

type MCPPanelModel added in v1.7.0

type MCPPanelModel struct {
	// contains filtered or unexported fields
}

MCPPanelModel displays MCP server connection status and tool counts.

func NewMCPPanelModel added in v1.7.0

func NewMCPPanelModel() MCPPanelModel

NewMCPPanelModel creates a new MCP panel model.

func (MCPPanelModel) Active added in v1.7.0

func (m MCPPanelModel) Active() bool

Active returns whether the MCP panel is currently displayed.

func (MCPPanelModel) Init added in v1.7.0

func (m MCPPanelModel) Init() tea.Cmd

Init initializes the model (no-op).

func (*MCPPanelModel) SetSize added in v1.7.0

func (m *MCPPanelModel) SetSize(width, height int)

SetSize updates the component dimensions.

func (*MCPPanelModel) Show added in v1.7.0

func (m *MCPPanelModel) Show()

Show activates the MCP panel.

func (MCPPanelModel) Update added in v1.7.0

func (m MCPPanelModel) Update(msg tea.Msg) (MCPPanelModel, tea.Cmd)

Update handles messages for the MCP panel.

func (MCPPanelModel) View added in v1.7.0

func (m MCPPanelModel) View() string

View renders the MCP panel.

type MCPServerInfo added in v1.7.0

type MCPServerInfo struct {
	Name      string
	Transport string
	Connected bool
	ToolCount int
}

MCPServerInfo describes the status of a single MCP server.

type MCPStatusMsg added in v1.7.0

type MCPStatusMsg struct {
	Servers []MCPServerInfo
}

MCPStatusMsg updates the MCP server status display.

type MediaResultMsg

type MediaResultMsg struct {
	Success   bool
	URL       string
	Path      string
	Error     string
	MediaType string
}

MediaResultMsg is sent when media generation completes.

type MemoryManagerModel added in v1.8.3

type MemoryManagerModel struct {
	// contains filtered or unexported fields
}

MemoryManagerModel is the interactive TUI for managing project memories.

func NewMemoryManagerModel added in v1.8.3

func NewMemoryManagerModel(workspace string) MemoryManagerModel

NewMemoryManagerModel creates a memory manager for the current project.

func (MemoryManagerModel) Init added in v1.8.3

func (m MemoryManagerModel) Init() tea.Cmd

func (MemoryManagerModel) Update added in v1.8.3

func (m MemoryManagerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (MemoryManagerModel) View added in v1.8.3

func (m MemoryManagerModel) View() string
type MenuItem struct {
	Name        string
	Description string
}

MenuItem represents a command in the menu

type MenuModel struct {
	// contains filtered or unexported fields
}

MenuModel is the TUI model for interactive command menu

func NewMenuModel

func NewMenuModel() MenuModel

NewMenuModel creates a new menu model

func (m MenuModel) Init() tea.Cmd

Init initializes the model

func (m MenuModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (m MenuModel) View() string

View renders the model

type NSFWToggleMsg

type NSFWToggleMsg struct {
	Enabled bool
}

NSFWToggleMsg is sent when NSFW mode is toggled.

type OrchestratorCommandRunner added in v1.7.0

type OrchestratorCommandRunner interface {
	RunOrchestratorCommand(goal string) tea.Cmd
}

OrchestratorCommandRunner is an optional extension for handling /orchestrate from TUI.

type OrchestratorEventMsg added in v1.7.0

type OrchestratorEventMsg struct {
	Kind         int    // cast from orchestrator.EventKind
	Lane         string // cast from orchestrator.TaskLane
	Text         string
	Model        string // model name where role matters (primary/reviewer)
	Duration     time.Duration
	InputTokens  int
	OutputTokens int
	Response     string // full assistant response text for live code output panel
	FilePath     string
	Diff         string
	Score        float64
	Ch           <-chan OrchestratorEventMsg // nil on terminal events
}

OrchestratorEventMsg wraps an orchestrator.OrchestratorEvent for delivery to the TUI. Defined here to avoid an import cycle (tui → orchestrator is fine; orchestrator must not → tui).

func (OrchestratorEventMsg) ReadNext added in v1.7.0

func (m OrchestratorEventMsg) ReadNext() tea.Cmd

ReadNext returns a cmd to read the next OrchestratorEventMsg.

type PermissionPromptModel added in v1.7.0

type PermissionPromptModel struct {
	// contains filtered or unexported fields
}

PermissionPromptModel renders an inline permission dialog.

func NewPermissionPromptModel added in v1.7.0

func NewPermissionPromptModel() PermissionPromptModel

NewPermissionPromptModel creates a new permission prompt model.

func (PermissionPromptModel) Active added in v1.7.0

func (m PermissionPromptModel) Active() bool

Active returns whether the permission prompt is currently displayed.

func (PermissionPromptModel) Init added in v1.7.0

func (m PermissionPromptModel) Init() tea.Cmd

Init initializes the model (no-op).

func (*PermissionPromptModel) SetSize added in v1.7.0

func (m *PermissionPromptModel) SetSize(width, _ int)

SetSize updates the component width.

func (PermissionPromptModel) Update added in v1.7.0

Update handles messages for the permission prompt.

func (PermissionPromptModel) View added in v1.7.0

func (m PermissionPromptModel) View() string

View renders the permission prompt dialog.

type PermissionRequestMsg added in v1.7.0

type PermissionRequestMsg struct {
	ToolCallID   string
	ToolName     string
	InputSummary string // short description of what the tool wants to do
	RiskLevel    string // "read", "write", "destructive"
	Response     chan PermissionResponse
}

PermissionRequestMsg asks the user for permission to run a tool.

type PermissionResponse added in v1.7.0

type PermissionResponse struct {
	Decision string // "allow_once", "always_allow", "deny", "always_deny"
	Pattern  string // rule pattern for "always" decisions
}

PermissionResponse is the user's answer to a permission request.

type SelectorItem

type SelectorItem struct {
	ID          string // Model ID or config name
	DisplayName string // Human-readable name
	Description string // Additional info
	Badge       string // Optional badge (✓ for tool support, etc.)
}

SelectorItem represents an item in the selector.

type SelectorModel

type SelectorModel struct {
	// contains filtered or unexported fields
}

SelectorModel is a Bubble Tea component for arrow-key navigation.

func NewSelectorModel

func NewSelectorModel(title string, items []SelectorItem) SelectorModel

NewSelectorModel creates a new selector component.

func (SelectorModel) GetSelected

func (m SelectorModel) GetSelected() *SelectorItem

GetSelected returns the currently selected item (nil if none).

func (SelectorModel) Init

func (m SelectorModel) Init() tea.Cmd

Init implements tea.Model.

func (SelectorModel) IsActive

func (m SelectorModel) IsActive() bool

IsActive returns whether the selector is currently active.

func (SelectorModel) SetHeight

func (m SelectorModel) SetHeight(height int) SelectorModel

SetHeight sets the visible height of the selector.

func (SelectorModel) SetWidth

func (m SelectorModel) SetWidth(width int) SelectorModel

SetWidth sets the width of the selector.

func (SelectorModel) Update

func (m SelectorModel) Update(msg tea.Msg) (SelectorModel, tea.Cmd)

Update implements tea.Model.

func (SelectorModel) View

func (m SelectorModel) View() string

View implements tea.Model.

type SelectorResultMsg

type SelectorResultMsg struct {
	Selected  *SelectorItem // nil if cancelled
	Cancelled bool
}

SelectorResultMsg is sent when the selector completes.

type SendMessageMsg

type SendMessageMsg struct {
	Content string
}

SendMessageMsg is sent when the user submits a message.

type Session

type Session interface {
	SetEndpoint(endpoint string)
	GetEndpoint() string
	SetModel(model string)
	GetModel() string
	SetNSFWMode(enabled bool)
	GetNSFWMode() bool
	SetName(name string)
	ClearMessages()
	GetMessagesRaw() interface{}     // Returns []SessionMessage
	SetMessagesRaw(msgs interface{}) // Accepts []SessionMessage
	SummarizeRaw() interface{}       // Returns SessionSummary
	SetCommandHistory(history []string)
	GetCommandHistory() []string
}

Session interface for session data (avoid circular import). Uses interface{} for complex types to avoid circular dependencies.

type SessionManager

type SessionManager interface {
	NewSession() interface{}
	Save(session interface{}) error
	Load(id string) (interface{}, error)
	List() ([]interface{}, error)
	Delete(id string) error
	MergeSessions(session1, session2 interface{}) interface{}
}

SessionManager interface for session persistence (avoid circular import). Uses interface{} for return types to avoid circular dependencies.

type SessionMessage

type SessionMessage struct {
	Role      string
	Content   string
	Timestamp time.Time
}

SessionMessage represents a message stored in session (matches config.SessionMessage).

type SessionSummary

type SessionSummary struct {
	ID           string
	Name         string
	MessageCount int
	CreatedAt    time.Time
	UpdatedAt    time.Time
	FirstMessage string
	Metadata     map[string]interface{}
}

SessionSummary represents session metadata (matches config.SessionSummary). Duplicated here to avoid circular import with config package.

type ShowSelectorMsg

type ShowSelectorMsg struct {
	Title string
	Items []SelectorItem
}

ShowSelectorMsg triggers the interactive selector.

type SimulateTypingMsg

type SimulateTypingMsg struct {
	Content     string // Full content to simulate typing
	CharsToShow int    // How many characters to show now
}

SimulateTypingMsg is sent to simulate typing effect.

type SimulatedTyping

type SimulatedTyping struct {
	// contains filtered or unexported fields
}

SimulatedTyping handles simulated typing effect for non-streaming responses.

func NewSimulatedTyping

func NewSimulatedTyping(content string, typingSpeed int, glitchChance float64) *SimulatedTyping

NewSimulatedTyping creates a new simulated typing effect.

func (*SimulatedTyping) Advance

func (s *SimulatedTyping) Advance() int

Advance advances the typing simulation by one tick. Returns the number of characters advanced.

func (*SimulatedTyping) Extend added in v1.8.3

func (s *SimulatedTyping) Extend(additional string)

Extend appends new content to the typing buffer without resetting position. Used for real streaming: new chunks extend the content while the typing animation continues revealing characters at the current position.

func (*SimulatedTyping) GetDisplayed

func (s *SimulatedTyping) GetDisplayed() string

GetDisplayed returns the currently displayed content.

func (*SimulatedTyping) GetDisplayedWithCorruption

func (s *SimulatedTyping) GetDisplayedWithCorruption() string

GetDisplayedWithCorruption returns displayed content with potential corruption.

func (*SimulatedTyping) IsDone

func (s *SimulatedTyping) IsDone() bool

IsDone returns whether typing simulation is complete.

func (*SimulatedTyping) IsEnabled

func (s *SimulatedTyping) IsEnabled() bool

IsEnabled returns whether simulated typing is enabled.

func (*SimulatedTyping) Reset

func (s *SimulatedTyping) Reset(content string)

Reset resets the typing simulation.

func (*SimulatedTyping) SetEnabled

func (s *SimulatedTyping) SetEnabled(enabled bool)

SetEnabled enables or disables simulated typing.

type SkillCallBatchMsg added in v1.7.0

type SkillCallBatchMsg struct {
	Calls            []SkillCallRequest
	AssistantContent string         // Assistant message content (may be empty if only tool calls)
	ToolCalls        []ToolCallInfo // Raw tool call payloads from assistant message
}

SkillCallBatchMsg is sent when the LLM requests one or more skill/function calls.

type SkillCallMsg

type SkillCallMsg struct {
	Call             FunctionCall
	ToolCallID       string         // OpenAI tool call ID for sending result back
	AssistantContent string         // The assistant message content (may be empty if only tool calls)
	ToolCalls        []ToolCallInfo // All tool calls from the assistant message
}

SkillCallMsg is sent when the LLM wants to call a skill/function.

type SkillCallRequest added in v1.7.0

type SkillCallRequest struct {
	Call       FunctionCall
	ToolCallID string // OpenAI tool call ID for sending result back
	ParseError string // Non-empty when arguments failed to parse
}

SkillCallRequest represents one tool call request in a batch.

type SkillDefinition

type SkillDefinition struct {
	Name        string         `json:"name"`
	Description string         `json:"description"`
	Parameters  map[string]any `json:"parameters"`
}

SkillDefinition represents a skill/function that can be called.

type SkillResultMsg

type SkillResultMsg struct {
	Name       string
	Result     string
	Err        error
	ToolCallID string         // OpenAI tool call ID for sending result back
	Metadata   map[string]any // Optional metadata (e.g. image base64 from read_file)
}

SkillResultMsg is sent when a skill execution completes.

type SkillsBrowserModel

type SkillsBrowserModel struct {
	// contains filtered or unexported fields
}

SkillsBrowserModel is the TUI model for interactive skills browser

func NewSkillsBrowserModel

func NewSkillsBrowserModel(skillsList []SkillDefinition) SkillsBrowserModel

NewSkillsBrowserModel creates a new skills model

func (SkillsBrowserModel) Init

func (m SkillsBrowserModel) Init() tea.Cmd

Init initializes the model

func (SkillsBrowserModel) Update

func (m SkillsBrowserModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (SkillsBrowserModel) View

func (m SkillsBrowserModel) View() string

View renders the model

type SkillsModel

type SkillsModel struct {
	// contains filtered or unexported fields
}

SkillsModel renders lightweight runtime status for skill/tool usage in chat view.

func NewSkillsModel

func NewSkillsModel() SkillsModel

func (SkillsModel) SetCompleted

func (s SkillsModel) SetCompleted(name string) SkillsModel

func (SkillsModel) SetConfig

func (s SkillsModel) SetConfig(endpoint, model string, enabled bool, nsfw bool, count int, reason string) SkillsModel

func (SkillsModel) SetCurrentInput

func (s SkillsModel) SetCurrentInput(input string) SkillsModel

func (SkillsModel) SetError

func (s SkillsModel) SetError(name string, err error) SkillsModel

func (SkillsModel) SetExecuting

func (s SkillsModel) SetExecuting(name string) SkillsModel

func (SkillsModel) SetMenuState

func (s SkillsModel) SetMenuState(state string) SkillsModel

func (SkillsModel) SetSize

func (s SkillsModel) SetSize(width, height int) SkillsModel

func (SkillsModel) View

func (s SkillsModel) View() string

type SplitPanel added in v1.7.0

type SplitPanel struct {
	// contains filtered or unexported fields
}

SplitPanel renders a two-column layout:

Left  — agent action feed (scrollable log)
Right — live code output / file diff / verdict

func NewSplitPanel added in v1.7.0

func NewSplitPanel(width, height int) *SplitPanel

NewSplitPanel creates a SplitPanel sized to the given terminal dimensions.

func (*SplitPanel) Actions added in v1.7.0

func (s *SplitPanel) Actions() []string

Actions returns the current action feed entries.

func (*SplitPanel) AddAction added in v1.7.0

func (s *SplitPanel) AddAction(text string)

AddAction appends an entry to the left action feed. When the user has scrolled up (scrollOffset > 0), the view is pinned by incrementing the offset so the same lines stay visible.

func (*SplitPanel) AppendOutput added in v1.7.0

func (s *SplitPanel) AppendOutput(text string)

AppendOutput appends text to the right panel without resetting scroll. Used for incremental updates (e.g., tool calls building up during review).

func (*SplitPanel) AtBottom added in v1.7.0

func (s *SplitPanel) AtBottom() bool

AtBottom reports whether the left panel is auto-following the latest entry.

func (*SplitPanel) DiffContent added in v1.7.0

func (s *SplitPanel) DiffContent() string

DiffContent returns the diff currently shown in the right panel.

func (*SplitPanel) DiffFile added in v1.7.0

func (s *SplitPanel) DiffFile() string

DiffFile returns the file name currently shown in the right panel.

func (*SplitPanel) Resize added in v1.7.0

func (s *SplitPanel) Resize(width, height int)

Resize updates the panel dimensions (call on tea.WindowSizeMsg).

func (*SplitPanel) ScrollDown added in v1.7.0

func (s *SplitPanel) ScrollDown(lines int)

ScrollDown scrolls toward the latest entries. Reaching 0 resumes auto-follow.

func (*SplitPanel) ScrollRightDown added in v1.7.0

func (s *SplitPanel) ScrollRightDown(lines int)

ScrollRightDown scrolls the right artifact panel down.

func (*SplitPanel) ScrollRightUp added in v1.7.0

func (s *SplitPanel) ScrollRightUp(lines int)

ScrollRightUp scrolls the right artifact panel up.

func (*SplitPanel) ScrollUp added in v1.7.0

func (s *SplitPanel) ScrollUp(lines int)

ScrollUp scrolls the left action feed toward older entries (up = back in time).

func (*SplitPanel) SetDiff added in v1.7.0

func (s *SplitPanel) SetDiff(file, diff string)

SetDiff updates the right panel with a file diff.

func (*SplitPanel) SetOutput added in v1.7.0

func (s *SplitPanel) SetOutput(text string)

SetOutput updates the live response text shown in the right panel. Called after each agent turn to display what the model responded.

func (*SplitPanel) SetVerdict added in v1.7.0

func (s *SplitPanel) SetVerdict(text string)

SetVerdict replaces the right panel with a verdict report.

func (*SplitPanel) View added in v1.7.0

func (s *SplitPanel) View() string

View renders the split panel as a string for Bubble Tea.

type StatusModel

type StatusModel struct {
	// contains filtered or unexported fields
}

StatusModel represents the status bar.

func NewStatusModel

func NewStatusModel() StatusModel

NewStatusModel creates a new status model.

func (StatusModel) ClearContextWarning

func (m StatusModel) ClearContextWarning() StatusModel

ClearContextWarning clears the context warning.

func (StatusModel) SetStreaming

func (m StatusModel) SetStreaming(streaming bool) StatusModel

SetStreaming sets the streaming indicator.

func (StatusModel) SetText

func (m StatusModel) SetText(text string) StatusModel

SetText sets the status text.

func (StatusModel) SetWidth

func (m StatusModel) SetWidth(width int) StatusModel

SetWidth sets the status bar width.

func (StatusModel) ShowContextWarning

func (m StatusModel) ShowContextWarning(level string, message string) StatusModel

ShowContextWarning displays a context warning message.

func (StatusModel) Update

func (m StatusModel) Update(msg tea.Msg) (StatusModel, tea.Cmd)

Update handles tick messages for animation.

func (StatusModel) View

func (m StatusModel) View() string

View renders the status bar.

type StreamChunk

type StreamChunk struct {
	Content      string // Content delta
	IsFirst      bool   // Is this the first chunk?
	IsFinal      bool   // Is this the last chunk?
	FinishReason string // Reason for finishing (if final)
}

StreamChunk represents a piece of streamed response.

type StreamChunkMsg

type StreamChunkMsg struct {
	Chunk StreamChunk
	Next  tea.Cmd // Cmd that reads the next chunk from the stream channel
}

StreamChunkMsg is sent when a new stream chunk arrives from the LLM. Next is the Cmd to call to get the next chunk (channel read pattern).

type StreamDoneMsg

type StreamDoneMsg struct {
	FullContent  string
	FinishReason string
	Usage        *TokenUsage // Token usage from API (if available)
}

StreamDoneMsg is sent when streaming is complete.

type StreamErrorMsg

type StreamErrorMsg struct {
	Err error
}

StreamErrorMsg is sent when streaming encounters an error.

type StreamStartMsg added in v1.8.0

type StreamStartMsg struct {
	Cancel context.CancelFunc
}

StreamStartMsg carries the context cancel function so the TUI can cancel an in-progress LLM request on Ctrl+C.

type ThinkingConfigSetter added in v1.8.0

type ThinkingConfigSetter interface {
	SetThinkingLevel(level string)
}

ThinkingConfigSetter interface for clients that support extended thinking / reasoning effort.

type TickMsg

type TickMsg struct {
	Time time.Time
}

TickMsg is sent for timer-based updates (animations, etc).

type TokenUsage

type TokenUsage struct {
	PromptTokens     int
	CompletionTokens int
	TotalTokens      int
}

TokenUsage holds token usage information from API response

type ToolCallInfo

type ToolCallInfo struct {
	ID        string
	Name      string
	Arguments string
}

ToolCallInfo represents a tool call in an assistant message.

type ToolProgressModel added in v1.7.0

type ToolProgressModel struct {
	// contains filtered or unexported fields
}

ToolProgressModel displays stacked tool execution cards. Entries auto-clear when the user sends a new message.

func NewToolProgressModel added in v1.7.0

func NewToolProgressModel() ToolProgressModel

NewToolProgressModel creates a new tool progress model.

func (*ToolProgressModel) ClearCompleted added in v1.8.3

func (m *ToolProgressModel) ClearCompleted()

ClearCompleted removes all non-executing entries. Called when the user sends a new message so old results don't accumulate.

func (ToolProgressModel) HasActive added in v1.7.0

func (m ToolProgressModel) HasActive() bool

HasActive returns true if there are any entries to display.

func (ToolProgressModel) Init added in v1.7.0

func (m ToolProgressModel) Init() tea.Cmd

Init initializes the model (no-op).

func (*ToolProgressModel) SetSize added in v1.7.0

func (m *ToolProgressModel) SetSize(width, _ int)

SetSize updates the component width.

func (ToolProgressModel) Update added in v1.7.0

func (m ToolProgressModel) Update(msg tea.Msg) (ToolProgressModel, tea.Cmd)

Update handles messages for the tool progress component.

func (ToolProgressModel) View added in v1.7.0

func (m ToolProgressModel) View() string

View renders the tool progress cards.

type ToolProgressMsg added in v1.7.0

type ToolProgressMsg struct {
	ToolCallID string
	ToolName   string
	State      string // "executing", "done", "failed", "aborted"
	Message    string // progress message
	Elapsed    time.Duration
}

ToolProgressMsg reports real-time tool execution status.

type TypingTickMsg

type TypingTickMsg struct{}

TypingTickMsg is sent for typing animation ticks.

type VeniceConfigData

type VeniceConfigData struct {
	APIKey     string
	BaseURL    string
	Model      string // Chat model
	ImageModel string // Image generation model
}

VeniceConfigData holds Venice.ai configuration from skills.json.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL