ui

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: AGPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev" // renderVixBanner returns the VIX ASCII art with a vertical gradient

cmd/vix/main.go at startup from the ldflags-provided build version.

Functions

func ApplyTheme

func ApplyTheme(tc config.ThemeConfig)

ApplyTheme updates brand colors from user/project config. Must be called before NewModel(). Empty fields keep defaults.

func DisplayNameForProvider added in v0.4.0

func DisplayNameForProvider(name string) string

DisplayNameForProvider returns the human-readable label for a provider name, falling back to the raw name when it isn't a known provider.

func IsLocalProvider added in v0.5.0

func IsLocalProvider(name string) bool

IsLocalProvider reports whether a provider id is backed by a user-run local server (Ollama, llama.cpp).

func ProviderOf

func ProviderOf(spec string) string

ProviderOf returns the provider name embedded in a model spec. For "openrouter/anthropic/claude-..." the answer is "openrouter" — the provider WE talk to, not the upstream routed-through service. Returns "" when the spec has no prefix.

func ProviderSupportsLogin added in v0.4.0

func ProviderSupportsLogin(uiProvider string) bool

ProviderSupportsLogin reports whether a UI provider offers OAuth login.

func SetProgram

func SetProgram(p *tea.Program)

SetProgram stores the tea.Program reference. Call before p.Run().

Types

type AppState

type AppState int

AppState represents the current state of the application.

const (
	StateWaitingForInput AppState = iota
	StateStreaming
	StateToolExecuting
	StateConfirmPending
	StatePlanReview
	StatePlanExecuting
	StateUserQuestion
	StateQuitConfirm
	StateTrimConfirm
	StateSessionCloseConfirm
	StateKeyDeleteConfirm
)

type AttachmentPanel

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

AttachmentPanel manages a list of image attachments shown above the input box.

func (*AttachmentPanel) Add

func (p *AttachmentPanel) Add(att protocol.Attachment)

Add appends an attachment and selects it.

func (*AttachmentPanel) Clear

func (p *AttachmentPanel) Clear() []protocol.Attachment

Clear drains and returns all attachments.

func (*AttachmentPanel) Count

func (p *AttachmentPanel) Count() int

Count returns the number of attachments.

func (*AttachmentPanel) Focus

func (p *AttachmentPanel) Focus()

Focus gives keyboard focus to the panel.

func (*AttachmentPanel) IsFocused

func (p *AttachmentPanel) IsFocused() bool

IsFocused returns whether the panel currently intercepts keys.

func (*AttachmentPanel) IsVisible

func (p *AttachmentPanel) IsVisible() bool

IsVisible returns true when there are attachments.

func (*AttachmentPanel) MoveDown

func (p *AttachmentPanel) MoveDown()

MoveDown moves selection toward later attachments.

func (*AttachmentPanel) MoveUp

func (p *AttachmentPanel) MoveUp()

MoveUp moves selection toward earlier attachments.

func (*AttachmentPanel) Remove

func (p *AttachmentPanel) Remove(idx int)

Remove removes the attachment at idx and adjusts selection.

func (*AttachmentPanel) Unfocus

func (p *AttachmentPanel) Unfocus()

Unfocus returns keyboard focus to the input.

type ChatMessage

type ChatMessage struct {
	Type       ChatMessageType
	Text       string    // raw text
	Rendered   string    // cached lipgloss/glamour output
	Timestamp  time.Time // when the message was created
	ToolName   string
	IsError    bool
	Detail     string // optional rich detail (e.g. edit diff)
	FilePath   string // for grouping file operations
	IsGrouped  bool   // true if this is part of a file group
	GroupIndex int    // index within the group (0 = header, >0 = sub-items)

	// Re-render metadata: fields needed to re-render at a different width.
	ShowToolName bool          // mirrors the showToolName arg of renderToolResultWithContext
	TurnModel    string        // model name passed to renderTurnInfo
	TurnElapsed  time.Duration // elapsed duration passed to renderTurnInfo
	TurnCost     float64       // cost value passed to renderTurnInfo
	TurnNum      int           // 1-based turn number passed to renderTurnInfo
}

ChatMessage represents a single rendered message in the chat.

type ChatMessageType

type ChatMessageType int

ChatMessageType identifies the kind of chat message.

const (
	MsgUser ChatMessageType = iota
	MsgAssistant
	MsgThinking
	MsgToolCall
	MsgToolResult
	MsgError
	MsgSystem
	MsgPlanProposal
	MsgPlanTaskStart
	MsgPlanTaskDone
	MsgPlanSummary
	MsgWorkflowStart
	MsgWorkflowStepStart
	MsgWorkflowStepDone
	MsgWorkflowComplete
)

type Command

type Command struct {
	Name        string
	Description string
	Action      string // identifier returned when selected
	Group       string // display section; "" sorts into a default group
}

Command represents an action in the command palette.

type CommandPalette

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

CommandPalette is a filterable overlay triggered by Ctrl+P.

func NewCommandPalette

func NewCommandPalette() CommandPalette

NewCommandPalette creates a command palette with default commands.

func (*CommandPalette) BaseCommands

func (c *CommandPalette) BaseCommands() []Command

BaseCommands returns the static command list (excluding ephemeral extraCommands).

func (*CommandPalette) Close

func (c *CommandPalette) Close()

Close hides the command palette.

func (*CommandPalette) IsVisible

func (c *CommandPalette) IsVisible() bool

IsVisible returns whether the palette is showing.

func (*CommandPalette) Open

func (c *CommandPalette) Open()

Open shows the command palette and focuses the filter input.

func (*CommandPalette) SetExtraCommands

func (c *CommandPalette) SetExtraCommands(cmds []Command)

SetExtraCommands injects dynamic commands (e.g. tab-switch entries) into the palette. Call this before Open() so they are included in filtering.

func (*CommandPalette) Update

func (c *CommandPalette) Update(msg tea.KeyPressMsg) (action string, consumed bool)

Update handles a key press and returns the selected action (if any) and whether the key was consumed.

func (*CommandPalette) View

func (c *CommandPalette) View(width, height int, s Styles) string

View renders the command palette overlay.

type DaemonStatusMsg

type DaemonStatusMsg struct{ Connected bool }

DaemonStatusMsg carries the daemon connection status.

type FileCompleter

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

FileCompleter is a popup that lists filesystem entries matching a typed @-query.

func (*FileCompleter) Close

func (f *FileCompleter) Close()

Close hides the completer.

func (*FileCompleter) Descend

func (f *FileCompleter) Descend(entry os.DirEntry)

Descend navigates into a directory entry, resetting the query and reloading.

func (*FileCompleter) IsVisible

func (f *FileCompleter) IsVisible() bool

IsVisible returns whether the popup is showing.

func (*FileCompleter) MoveDown

func (f *FileCompleter) MoveDown()

MoveDown moves the selection toward later entries.

func (*FileCompleter) MoveUp

func (f *FileCompleter) MoveUp()

MoveUp moves the selection toward earlier entries.

func (*FileCompleter) Open

func (f *FileCompleter) Open(dir, query string)

Open shows the completer for the given directory and filter prefix.

func (*FileCompleter) Refresh

func (f *FileCompleter) Refresh(query string)

Refresh updates the filter query and reloads entries without changing the directory.

func (*FileCompleter) SelectedEntry

func (f *FileCompleter) SelectedEntry() os.DirEntry

SelectedEntry returns the currently highlighted DirEntry, or nil if the list is empty.

func (*FileCompleter) SelectedPath

func (f *FileCompleter) SelectedPath() string

SelectedPath returns the absolute path of the currently highlighted entry.

func (*FileCompleter) View

func (f *FileCompleter) View(width, maxHeight int, s Styles) string

View renders the file completer popup. Returns an empty string when not visible.

type FocusState

type FocusState int

FocusState tracks which UI component currently has keyboard focus.

const (
	FocusEditor     FocusState = iota // textarea input has focus
	FocusChat                         // chat viewport has focus (scrollable)
	FocusRightPanel                   // right panel has focus (when open)
)

type History

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

History manages input history with file persistence.

func NewHistory

func NewHistory(baseDir string) *History

NewHistory creates a new history manager, loading from <baseDir>/history.txt. baseDir should be the session's primary .vix directory (cfg.Paths.Primary()).

func (*History) Next

func (h *History) Next() (string, bool)

Next returns the next history entry (down arrow).

func (*History) Previous

func (h *History) Previous(currentInput string) (string, bool)

Previous returns the previous history entry (up arrow).

func (*History) Reset

func (h *History) Reset()

Reset resets the history index to the end.

func (*History) Save

func (h *History) Save(text string)

Save adds an entry to history (in memory and on disk).

type HistoryPanel

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

HistoryPanel manages the inline history browser panel state.

func (*HistoryPanel) Close

func (p *HistoryPanel) Close()

Close hides the panel.

func (*HistoryPanel) Height

func (p *HistoryPanel) Height() int

Height returns the total height consumed by the panel (entries + separator).

func (*HistoryPanel) IsVisible

func (p *HistoryPanel) IsVisible() bool

IsVisible returns whether the panel is showing.

func (*HistoryPanel) MoveDown

func (p *HistoryPanel) MoveDown(entryCount int)

MoveDown moves the selection toward more recent entries.

func (*HistoryPanel) MoveUp

func (p *HistoryPanel) MoveUp()

MoveUp moves the selection toward older entries.

func (*HistoryPanel) Open

func (p *HistoryPanel) Open(entryCount, termHeight int)

Open shows the panel and selects the most recent entry (bottom).

type Layout

type Layout struct {
	Width           int
	ChatHeight      int
	InputHeight     int
	StatusBarHeight int
	TabBarHeight    int
	PanelHeight     int
	ChatWidth       int // same as Width; kept for call-site compatibility
}

Layout holds the computed vertical and horizontal dimensions for the UI.

type LocalProviderUI added in v0.5.0

type LocalProviderUI struct {
	BaseURL   string      // resolved server endpoint, for display
	Reachable bool        // the server answered the probe
	Fetched   bool        // a probe result (success or failure) has arrived
	Models    []ModelInfo // live-discovered models, specs prefixed
}

LocalProviderUI is the Models-tab view state for one local provider, built from the daemon's providers.local_status probe. Until the first probe result arrives Fetched is false and the provider renders as "probing".

type MarkdownRenderer

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

MarkdownRenderer wraps Glamour for rendering markdown to styled terminal output.

func NewMarkdownRenderer

func NewMarkdownRenderer(width int, hasDarkBG bool, codeBoxBorder lipgloss.Style) *MarkdownRenderer

NewMarkdownRenderer creates a new markdown renderer with the given width.

func (*MarkdownRenderer) Render

func (m *MarkdownRenderer) Render(md string) string

Render renders markdown text to styled terminal output.

func (*MarkdownRenderer) UpdateWidth

func (m *MarkdownRenderer) UpdateWidth(width int)

UpdateWidth recreates the renderer with a new width.

type Model

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

Model is the root Bubble Tea model.

func NewModel

func NewModel(cfg *config.Config, client *daemon.SessionClient, testMode bool, authToken string, enableWrite, enableDir bool) Model

NewModel creates a new root Model.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (*Model) SetInitialAwaitingReplay added in v0.4.2

func (m *Model) SetInitialAwaitingReplay(awaiting bool)

SetInitialAwaitingReplay marks the initial session as one that was attached (restored) on launch and is still waiting for its event.replay. While true the chat area shows a "Restoring conversation…" placeholder instead of the welcome screen. Called once by main before the program starts.

func (*Model) SetRestoreSessions added in v0.4.2

func (m *Model) SetRestoreSessions(s []protocol.SessionSummary)

SetRestoreSessions records the persisted open sessions the TUI should reopen on launch (attached lazily from Init). Called once by main before the program starts.

func (Model) Update

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

Update implements tea.Model. Update is the central tea.Model update entry point. It delegates to updateInner (the real message handler) and then reconciles the panel-aware chat width on the resulting model, so panel open/close, session switches, and resizes all re-flow width-cached content without each transition remembering to do so.

func (Model) View

func (m Model) View() tea.View

View implements tea.Model — builds all content fresh each frame.

type ModelInfo

type ModelInfo struct {
	Spec        string // full prefixed identifier, e.g. "anthropic/claude-opus-4-8"
	Provider    string // "anthropic" | "openai" | "openrouter" | "minimax" | "mimo"
	DisplayName string // human-readable label shown in the UI
}

ModelInfo describes a single LLM model available for selection in the Settings tab. Spec is the prefixed identifier that gets sent on session.set_model — the picker never sends a bare model name.

func AvailableModels

func AvailableModels() []ModelInfo

AvailableModels returns the curated catalogue of selectable models, sourced from the providers registry (embedded providers.json plus any ~/.vix and ./.vix overlays). There is no runtime fetch of provider model lists. OpenRouter can route to anything; the catalogue entries are popular routes — users with other targets set them via agent frontmatter.

func DisplayModelsForProvider added in v0.4.0

func DisplayModelsForProvider(provider string) []ModelInfo

DisplayModelsForProvider returns the models shown in the Settings grid for a provider. Both the renderer and the cursor navigation use this so selection indices stay consistent.

func FilterModels added in v0.4.0

func FilterModels(models []ModelInfo, query string) []ModelInfo

FilterModels returns the entries whose DisplayName contains query (case-insensitive). An empty query returns models unchanged. The Spec is not matched: its provider prefix (e.g. "openai/") would match common query letters and surface unrelated models.

func ModelsForProvider

func ModelsForProvider(provider string) []ModelInfo

ModelsForProvider returns the catalogue entries for the given provider id, in registry order. Returns nil for an unknown provider.

type ProviderInfo

type ProviderInfo struct {
	Name        string // matches ModelInfo.Provider; also config.ProviderKey.Provider
	DisplayName string // human-readable label shown in the UI
	Local       bool   // user-run local server (Ollama, llama.cpp): grouped separately, models discovered live
}

ProviderInfo describes one provider for the Settings tab provider column.

func AvailableProviders

func AvailableProviders() []ProviderInfo

AvailableProviders returns the providers shown in the left column of the Settings tab Model section, in registry (providers.json) order. The order is what users see.

type QAPair

type QAPair struct {
	Category string
	Question string
	Answer   string
}

QAPair holds a question and its answer for rendering in chat history.

type QuestionPanel

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

QuestionPanel is a dedicated input panel for answering questions with selectable options.

func NewQuestionPanel

func NewQuestionPanel() QuestionPanel

NewQuestionPanel returns a QuestionPanel with its inline textarea fully initialized. Call this once at Model construction so SetWidth and other panel operations never see a zero-valued textarea (whose embedded viewport nil-derefs on SetWidth). Open / OpenConfirm only mutate panel state; the textarea is configured exactly once, here.

func (*QuestionPanel) Close

func (qp *QuestionPanel) Close()

Close hides the panel and resets state.

func (*QuestionPanel) CurrentAnswerText

func (qp *QuestionPanel) CurrentAnswerText() string

CurrentAnswerText returns the answerText of the current tab (for has_user_input options).

func (*QuestionPanel) CurrentTab

func (qp *QuestionPanel) CurrentTab() QAPair

CurrentTab returns the current tab's category and question as a QAPair (without answer).

func (*QuestionPanel) GetAnsweredPairs

func (qp *QuestionPanel) GetAnsweredPairs() []QAPair

GetAnsweredPairs returns the Q&A pairs from the current tabs (call before Close).

func (*QuestionPanel) HandleKey

HandleKey processes a key event and returns (result, singleAnswer, batchAnswers).

func (*QuestionPanel) Height

func (qp *QuestionPanel) Height() int

Height returns the total rendered height of the panel.

func (*QuestionPanel) IsVisible

func (qp *QuestionPanel) IsVisible() bool

IsVisible returns whether the panel is showing.

func (*QuestionPanel) Open

func (qp *QuestionPanel) Open(event protocol.EventUserQuestion, width int, md *MarkdownRenderer)

Open initializes the panel from a question event.

func (*QuestionPanel) OpenConfirm

func (qp *QuestionPanel) OpenConfirm(toolName string, params map[string]any, requestedDirs []string, width int, md *MarkdownRenderer)

OpenConfirm initializes the panel for a tool permission prompt. It shows a preview of what the tool will do and offers only Accept/Deny options.

func (*QuestionPanel) Render

func (qp *QuestionPanel) Render(s Styles, focused bool, md *MarkdownRenderer) string

Render produces the styled panel content.

func (*QuestionPanel) SetWidth

func (qp *QuestionPanel) SetWidth(width int)

SetWidth updates the panel width on terminal resize.

type QuestionPanelResult

type QuestionPanelResult int

QuestionPanelResult describes the outcome of a key event in the question panel.

const (
	QPNoop      QuestionPanelResult = iota // key consumed, no action
	QPSubmitted                            // user submitted answer(s)
	QPCancelled                            // user cancelled
)

type RightPanel

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

RightPanel is a full-height sidebar on the right side of the screen that shows live workflow-step progress or the pending todo list. API keys are managed in the Models tab (F3), not here.

func (*RightPanel) Close

func (rp *RightPanel) Close()

Close hides the panel.

func (*RightPanel) HandleKey

func (rp *RightPanel) HandleKey(msg tea.KeyPressMsg) RightPanelAction

HandleKey processes a key press and returns the resulting action. The panel is read-only (workflow progress / todos); only ESC is actionable, which closes it.

func (*RightPanel) IsVisible

func (rp *RightPanel) IsVisible() bool

IsVisible returns true when the panel is open.

func (*RightPanel) OpenTodos

func (rp *RightPanel) OpenTodos(height int)

OpenTodos opens the panel in todo-list mode.

func (*RightPanel) OpenWorkflow

func (rp *RightPanel) OpenWorkflow(height int)

OpenWorkflow opens the panel in workflow-progress mode.

func (*RightPanel) PanelWidth

func (rp *RightPanel) PanelWidth() int

PanelWidth returns the fixed width of the right panel.

func (*RightPanel) View

func (rp *RightPanel) View(height int, s Styles, focused bool, wfp *WorkflowGraphPanel, todos []protocol.TodoItem) string

View renders the right panel as a bordered, full-height string. focused controls whether the panel border uses the focus color. wfp is the workflow graph panel (used when mode is rpModeWorkflow). todos is the current todo list (used in rpModeTodos and appended below steps in rpModeWorkflow).

type RightPanelAction

type RightPanelAction int

RightPanelAction is the action returned by HandleKey.

type SessionState

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

SessionState holds all accumulated UI state for a single agent session. Sessions are independent objects — the Chat tab renders whichever session is currently selected. Messages accumulate continuously from daemon events regardless of which tab is visible.

type SlashMenu

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

SlashMenu is a popup that lists available slash commands matching the typed /query.

func (*SlashMenu) Close

func (s *SlashMenu) Close()

Close hides the menu.

func (*SlashMenu) IsVisible

func (s *SlashMenu) IsVisible() bool

IsVisible returns whether the menu is showing.

func (*SlashMenu) MoveDown

func (s *SlashMenu) MoveDown()

MoveDown moves the selection toward later entries.

func (*SlashMenu) MoveUp

func (s *SlashMenu) MoveUp()

MoveUp moves the selection toward earlier entries.

func (*SlashMenu) Open

func (s *SlashMenu) Open(commands []Command, query string)

Open shows the menu with the given commands filtered by query.

func (*SlashMenu) Refresh

func (s *SlashMenu) Refresh(query string)

Refresh updates the filter query without changing the command list.

func (*SlashMenu) SelectedAction

func (s *SlashMenu) SelectedAction() string

SelectedAction returns the Action of the currently highlighted command, or "" if empty.

func (*SlashMenu) View

func (s *SlashMenu) View(width, maxHeight int, styles Styles) string

type StatusMessage

type StatusMessage struct {
	Text string
	Kind StatusMsgKind
	// contains filtered or unexported fields
}

StatusMessage is a transient message shown on the second line of the status bar.

type StatusMsgKind

type StatusMsgKind int

StatusMsgKind identifies the visual style of a transient status bar message.

const (
	StatusMsgWarning StatusMsgKind = iota
	StatusMsgInfo
	StatusMsgError
)

type Styles

type Styles struct {
	// Adaptive colors for inline use
	ColorWhite      color.Color
	ColorDimGray    color.Color
	ColorBlurBorder color.Color

	// Styles using colorWhite
	ToolResultStyle            lipgloss.Style
	QuestionTextStyle          lipgloss.Style
	PlanDescStyle              lipgloss.Style
	HistorySelectedStyle       lipgloss.Style
	QuestionPanelSelectedStyle lipgloss.Style

	// Styles using colorDimGray
	ToolCallReasonStyle          lipgloss.Style
	SystemStyle                  lipgloss.Style
	ThinkingStyle                lipgloss.Style
	StatusBarStyle               lipgloss.Style
	PlanBulletStyle              lipgloss.Style
	PlanPromptDimStyle           lipgloss.Style
	HistoryPanelStyle            lipgloss.Style
	QuestionPanelUnselectedStyle lipgloss.Style
	QuestionPanelDescStyle       lipgloss.Style
	QuestionPanelDividerStyle    lipgloss.Style
	QuestionPanelHelpStyle       lipgloss.Style
	QuestionPanelTabStyle        lipgloss.Style
	CodeBoxBorderStyle           lipgloss.Style

	// Viewport border (focus-aware)
	ViewportFocusedStyle lipgloss.Style
	ViewportBlurredStyle lipgloss.Style

	// Command palette
	CommandPaletteStyle         lipgloss.Style
	CommandPaletteSelectedStyle lipgloss.Style
	CommandPaletteSepStyle      lipgloss.Style

	// File completer popup
	FileCompleterStyle lipgloss.Style

	// Right panel
	RightPanelStyle lipgloss.Style

	// Tab bar
	TabActiveStyle   lipgloss.Style
	TabInactiveStyle lipgloss.Style
	TabAlertStyle    lipgloss.Style
}

Styles holds all styles that adapt to the terminal background color. On dark backgrounds, "white" text is ANSI 15 and "dim" text is ANSI 8. On light backgrounds, "white" text becomes ANSI 0 (black) and "dim" becomes ANSI 7 (silver).

func NewStyles

func NewStyles(hasDarkBG bool) Styles

NewStyles creates a Styles set appropriate for the terminal background.

type TabKind

type TabKind int

TabKind identifies the type of a tab.

const (
	TabKindSessions TabKind = iota // sessions list overview
	TabKindChat                    // chat display for the selected session
	TabKindModels                  // model + authentication management
	TabKindSettings                // global settings
)

type ThinkingAnim

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

ThinkingAnim renders a spinner row: each character cycles through braille spinner frames with a phase offset so a wave ripples across the bar. Colors follow a gradient across the bar.

func NewThinkingAnim

func NewThinkingAnim() ThinkingAnim

NewThinkingAnim creates a new animation.

func (*ThinkingAnim) Advance

func (a *ThinkingAnim) Advance(msg animStepMsg) tea.Cmd

Advance moves to the next frame if msg belongs to this instance and the current generation, and returns a tick command. Ticks from a different ThinkingAnim (cross-session collision) or a stale generation are dropped.

func (*ThinkingAnim) Resume

func (a *ThinkingAnim) Resume() tea.Cmd

Resume restarts the animation tick loop after a tab switch without resetting the step counter. It bumps the generation so any stale in-flight ticks from before the switch are silently dropped. If the animation is not active it is a no-op.

func (*ThinkingAnim) Start

func (a *ThinkingAnim) Start() tea.Cmd

Start activates the animation and resets timing. If the animation is already running, it is a no-op — this prevents multiple concurrent tick loops from accumulating when Start is called repeatedly (e.g. on each workflow step).

func (*ThinkingAnim) Stop

func (a *ThinkingAnim) Stop()

Stop deactivates the animation and bumps the generation counter so that any animStepMsg already queued in Bubble Tea's message channel is ignored when it eventually arrives.

func (*ThinkingAnim) View

func (a *ThinkingAnim) View() string

View renders the current animation frame with left padding.

type TurnSepInfo

type TurnSepInfo struct {
	LineIdx int // 0-based index in the allLines slice from buildRenderedChat
	MsgIdx  int // index in the original (pre-group) chatMessages slice
	TurnIdx int // 0-based turn number (0 = after first turn)
}

TurnSepInfo describes the position of a turn separator in the rendered chat.

type WorkflowGraphPanel

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

WorkflowGraphPanel renders a persistent step-list panel during workflow execution.

func (*WorkflowGraphPanel) Height

func (p *WorkflowGraphPanel) Height() int

Height returns the number of terminal lines the panel occupies.

func (*WorkflowGraphPanel) IsVisible

func (p *WorkflowGraphPanel) IsVisible() bool

IsVisible returns true when the panel should be shown.

func (*WorkflowGraphPanel) Reset

func (p *WorkflowGraphPanel) Reset()

Reset hides the panel and clears all state.

func (*WorkflowGraphPanel) Start

func (p *WorkflowGraphPanel) Start(name string, totalSteps int, knownSteps []protocol.WorkflowStepInfo)

Start initialises the panel for a new workflow run, pre-populating known steps.

func (*WorkflowGraphPanel) StepDone

func (p *WorkflowGraphPanel) StepDone(id string, success bool, durationMs int64)

StepDone marks a step as completed (success or failure).

func (*WorkflowGraphPanel) StepStart

func (p *WorkflowGraphPanel) StepStart(id string, idx int, explanation string)

StepStart marks the given step as active. If not yet in the list, it is appended.

Jump to

Keyboard shortcuts

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