Versions in this module Expand all Collapse all v1 v1.40.2 Nov 16, 2026 v1.40.1 Oct 22, 2026 v1.40.0 Oct 17, 2026 Changes in this version + const ColorBlue + const ColorBold + const ColorCyan + const ColorDim + const ColorGreen + const ColorMagenta + const ColorRed + const ColorReset + const ColorYellow + var SpinnerFrames = []string + var ThemeIsDark = true + func AnimateMax(mood MaxMood, speech string) + func AnimateMaxTransition(from, to MaxMood, speech string) + func ApplyTheme(t Theme) + func ClearBrowserAnimation() + func DiffStat(ops []DiffLine) (added, removed int) + func DisplayImage(path string, maxWidth int) error + func DisplayImageFromBase64(data string, maxWidth int) error + func EnsureTTYNewlines() — darwin/amd64, linux/amd64, windows/amd64 + func FormatScreenshotCompact(label string, url string) string + func GetMaxArt(mood MaxMood, speech string) string + func GetMaxError() string + func GetMaxGreeting() string + func GetMaxSuccess() string + func GetMaxThought() string + func IsImagePath(path string) bool + func IsLargePastedText(text string, pasted bool) bool + func PasteTextFromClipboard() (string, error) + func PastedFilePrompt(path string, size int) string + func RenderFileDiff(path, oldContent, newContent string) string + func RenderScreenshotCompact(label string, url string) + func RestoreTermMode(state *TermState) — darwin/amd64, linux/amd64, windows/amd64 + func SavePastedTextFile(text string) (string, error) + func SaveTheme(c *api.Config, theme string) error + func ShowBrowserAnimation(frame int) + func ShowCloudSyncPicker(current *bool) (bool, bool) + func ShowLiveFeedPicker(current bool) (bool, bool) + func ShowSessionPicker(sessions []SessionPickerItem, activeID string) (string, bool) + func ShowThemePicker(currentTheme string) (string, bool) + func ThemeNames() []string + func TruncateStr(s string, maxLen int) string + type DiffLine struct + S string + T string + func ComputeDiff(oldContent, newContent string) []DiffLine + type ImageAttachment struct + Data string + FileName string + MediaType string + func CaptureScreenshot() (*ImageAttachment, error) + func DetectAndLoadImages(input string) (string, []ImageAttachment) + func LoadImageFromFile(path string) (*ImageAttachment, error) + func PasteImageFromClipboard() (*ImageAttachment, error) + type InputResult struct + CtrlC bool + OutputToggle bool + Pasted bool + Text string + func ReadInput(prompt string, history []string, outputVerbose bool, status *StatusInfo) InputResult + type MaxFrame struct + Art string + Speech string + type MaxMood int + const MoodAlert + const MoodConfused + const MoodExcited + const MoodHappy + const MoodNeutral + const MoodProud + const MoodSad + const MoodSleeping + const MoodThinking + const MoodWaving + type ModelPickerOpts struct + AgyInstalled bool + CCInstalled bool + CerebrasKeySet bool + CodexInstalled bool + CurrentBackend string + CurrentModelID string + Effort string + OllamaModel string + OllamaURL string + OpenCodeInstalled bool + OpenCodeModels []OpenCodeModelEntry + type ModelPickerResult struct + Backend string + Confirmed bool + Effort string + ModelID string + func ShowModelPicker(opts ModelPickerOpts) ModelPickerResult + type OpenCodeModelEntry struct + Label string + ModelID string + ProviderID string + ProviderName string + type PlanStep struct + Status string + Title string + type ProgressBar struct + func NewProgressBar(label string, width int) *ProgressBar + func (p *ProgressBar) Finish(success bool, message string) + func (p *ProgressBar) Update(percent int, message string) + type ProviderPickerItem struct + Allowed bool + DisplayName string + Enabled bool + ID string + Status string + type ProviderPickerResult struct + Confirmed bool + ID string + func ShowProviderPicker(items []ProviderPickerItem) ProviderPickerResult + type SessionPickerItem struct + ID string + Model string + ProjectID int + Tokens int + Turns int + UpdatedAt time.Time + type SettingsPickerResult struct + Changes map[string]string + Confirmed bool + func ShowSettingsPicker(rows []SettingsRow) SettingsPickerResult + type SettingsRow struct + Display func(value string) string + Hint string + Key string + Kind SettingsRowKind + Label string + Options []string + Value string + type SettingsRowKind int + const SettingsCycle + const SettingsText + const SettingsToggle + type SlashMenuItem struct + Cmd string + Desc string + type StatusInfo struct + Backend string + ContextUsed int + ContextWindow int + Effort string + LastTurnDur time.Duration + Model string + OutputVerbose bool + PermissionMode string + PlanActive bool + PlanExhausted bool + PlanRemaining time.Duration + PlanTurns int + SessionStarted time.Time + Task string + TokensIn int + TokensOut int + type TermState struct — darwin/amd64, linux/amd64, windows/amd64 + func EnableRawMode() (*TermState, error) + type Terminal struct + func NewTerminal() *Terminal + func (t *Terminal) Close() + func (t *Terminal) EndLine() + func (t *Terminal) FinishMarkdown(fullText string) + func (t *Terminal) PrintAssistant(text string) + func (t *Terminal) PrintBanner(version string, ctx *api.SessionContext) + func (t *Terminal) PrintCostSummary(usage api.TokenUsage, model string, plan *api.PlanWindow) + func (t *Terminal) PrintError(msg string) + func (t *Terminal) PrintFileDiff(path, oldContent, newContent string) + func (t *Terminal) PrintPlan(steps []PlanStep) + func (t *Terminal) PrintPlanWindow(plan *api.PlanWindow) + func (t *Terminal) PrintStatusInfo(ctx *api.SessionContext, usage api.TokenUsage, model string, ...) + func (t *Terminal) PrintSystem(msg string) + func (t *Terminal) PrintTestResults(results []TestResult) + func (t *Terminal) PrintTokenUsage(usage api.TokenUsage) + func (t *Terminal) PrintToolIcon(name string) + func (t *Terminal) PrintToolResult(name string, output string) + func (t *Terminal) PrintToolStart(name string, input interface{}) + func (t *Terminal) Prompt() string + func (t *Terminal) ReadConsent() (string, error) + func (t *Terminal) ReadLine() (string, error) + func (t *Terminal) SetSessionPrompt(sessionID string) + func (t *Terminal) SetTurnActivity(text string) bool + func (t *Terminal) SetUserTyping(v bool) + func (t *Terminal) StartThinking() + func (t *Terminal) Stderr() io.Writer + func (t *Terminal) StopThinking() + func (t *Terminal) StreamText(text string) + func (t *Terminal) Write(p []byte) (int, error) + type TestResult struct + Duration float64 + Error string + Name string + Passed bool + type Theme struct + ANSIBanner string + ANSICatArt string + ANSIPromptArrow string + ANSIPromptName string + ANSIStatus string + Accent string + Brand string + Dark bool + Error string + IconAPI string + IconCodex string + MenuItem string + Name string + Success string + SurfaceBorder string + SurfaceDark string + SurfaceSelect string + SurfaceSep string + TextBright string + TextDim string + TextNormal string + TextSubtle string + func ThemeByName(name string) Theme + type TurnInputResult struct + Canceled bool + Pasted bool + Text string + func RunTurnViewport(term *Terminal, prompt string, status *StatusInfo, cancelFn func(), run func()) TurnInputResult