Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NimbusCloudSpinner = spinner.Spinner{ Frames: []string{ "☁ ✦", "☁ ✧", "☁ ˖", "☁ ⁺", "☁ ⋆", "☁ ⁺", "☁ ˖", "☁ ✧", "☁ ✦", "☁ ✧", }, FPS: time.Second / 10, }
NimbusCloudSpinner provides an animated cloud icon with shimmering particles.
var WordBank = []string{
"Pondering",
"Noodling",
"Percolating",
"Marinating",
"Ruminating",
"Brewing",
"Cogitating",
"Simmering",
"Brainstorming",
"Contemplating",
"Meditating",
"Mulling",
"Deliberating",
"Daydreaming",
"Envisioning",
"Incubating",
"Conjuring",
"Weaving",
"Cooking",
"Fermenting",
"Stewing",
"Musing",
"Formulating",
"Scheming",
"Ideating",
"Compiling",
"Refactoring",
"Untangling",
"Scaffolding",
"Synthesizing",
"Architecting",
"Parsing",
"Optimizing",
"Indexing",
"Wiring",
"Inspecting",
"Analyzing",
"Structuring",
"Composing",
"Crafting",
"Benchmarking",
"Validating",
"Assembling",
"Decoupling",
"Vectorizing",
"Generating",
"Calibrating",
"Tracing",
"Transforming",
"Polishing",
"Resolving",
"Orchestrating",
"Refining",
"Linting",
"Provisioning",
"Connecting",
"Formatting",
}
WordBank contains ~50 present-participle verbs mixing coding-flavored actions with whimsical generic thinking states.
Functions ¶
func EstimateDeltaTokens ¶
EstimateDeltaTokens approximates token count for a stream delta string.
func NextRandomVerb ¶
NextRandomVerb returns a random verb from WordBank that does not match lastVerb.
func RenderColorizedDiff ¶
RenderColorizedDiff formats unified diff strings with clean addition and deletion styling.
func RenderMarkdown ¶
RenderMarkdown parses basic markdown constructs and converts them into Lipgloss styled strings.
func RenderThinkingStatus ¶
RenderThinkingStatus formats the Claude-Code-style animated thinking indicator. Example: "☁ Percolating… (12s · 340 tokens)" or "☁ Percolating… (12s)"
Types ¶
type ChatItem ¶
type ChatItem struct {
Role string // "user" | "assistant" | "system" | "tool"
Content string
Timestamp time.Time
Plan *ai.PlanSummary
Diffs []string
ToolName string
ToolArgs map[string]any
IsError bool
}
ChatItem represents a structured entry in the chat history.
type Model ¶
type Model struct {
Agent *ai.Agent
Mode Mode
Viewport viewport.Model
TextInput textinput.Model
StepInput textinput.Model
CustomInput textinput.Model
Spinner spinner.Model
SelectedStep int
IsEditingStep bool
StreamBuffer *strings.Builder
Messages []ChatItem
CurrentDiffs []string
History []string
HistoryIndex int
Width int
Height int
StatusText string
ErrorMessage string
OneShot bool
Ready bool
OriginalPrompt string
ClarificationPlan *ai.PlanSummary
CurrentQuestionIdx int
SelectedOptionIdx int
ClarificationAnswers map[string]string
IsCustomInput bool
ExecChan chan tea.Msg
// Claude-Code-style thinking indicator state
IsThinking bool
ThinkingStartTime time.Time
ThinkingVerb string
LastThinkingVerb string
ThinkingTokens int
LastVerbChange time.Time
}