Versions in this module Expand all Collapse all v1 v1.101.0 Jul 7, 2026 v1.100.0 Jul 7, 2026 Changes in this version + const ContextBarWidth + const Continuation + const MaxToolOutputLines + const PromptText + const PromptWidth + func ComposeLine(left, right string, width int) string + func DisplayWidth(s string) int + func EnsureToolDefinition(toolCall tools.ToolCall, toolDef tools.Tool) tools.Tool + func FormatTokens(n int64) string + func KittyImageSequence(pngData []byte, cols, rows int) string + func PadRight(s string, w int) string + func RenderAssistantLines(text string, width int) []string + func RenderBar(pct float64) string + func RenderContext(d StatusModel) string + func RenderInlineImage(img InlineImage, width int) []string + func RenderNoticeLines(prefix, text string, width int, style lipgloss.Style) []string + func RenderPendingUserLines(text string, width int) []string + func RenderReasoningLines(text string, width int) []string + func RenderStatus(d StatusModel, width int) []string + func RenderTool(t ToolView, width int) []string + func RenderToolOutput(output string, width int) []string + func RenderToolWithState(t *ToolView, width, frame int, sessionState service.SessionStateReader) []string + func RenderUserLines(text string, width int) []string + func RenderUserLinesWith(text string, width int, promptStyle, textStyle lipgloss.Style) []string + func RuneWidth(r rune) int + func StAccent() lipgloss.Style + func StBold() lipgloss.Style + func StError() lipgloss.Style + func StMuted() lipgloss.Style + func StPlaceholder() lipgloss.Style + func StPrimary() lipgloss.Style + func StReasoning() lipgloss.Style + func StSecondary() lipgloss.Style + func StSuccess() lipgloss.Style + func StToolBox(width int) lipgloss.Style + func StWarning() lipgloss.Style + func ToolViewID(toolCall tools.ToolCall) string + func Truncate(s string, w int) string + func WrapANSI(s string, w int) []string + type Autocomplete struct + Active bool + func NewAutocomplete() *Autocomplete + func (a *Autocomplete) Current() (Command, bool) + func (a *Autocomplete) Dismiss() + func (a *Autocomplete) MoveDown() + func (a *Autocomplete) MoveUp() + func (a *Autocomplete) Render(width int) []string + func (a *Autocomplete) SetCommands(cmds []Command) + func (a *Autocomplete) Sync(input string) bool + type Command struct + Desc string + Kind CommandKind + Name string + func FilterCommands(all []Command, prefix string) []Command + type CommandKind int + const CmdAgent + const CmdBuiltin + type ConfirmModel struct + Tool string + View ToolView + func (c *ConfirmModel) Render(width int) []string + type Editor struct + func NewEditor(placeholder string) *Editor + func (e *Editor) Backspace() + func (e *Editor) DeleteForward() + func (e *Editor) DeleteToLineEnd() + func (e *Editor) DeleteToLineStart() + func (e *Editor) DeleteWordBack() + func (e *Editor) Down(termWidth int) bool + func (e *Editor) HistoryNext() + func (e *Editor) HistoryPrev() + func (e *Editor) Insert(runes []rune) + func (e *Editor) InsertNewline() + func (e *Editor) IsEmpty() bool + func (e *Editor) Layout(termWidth int) (lines []string, curRow, curCol int) + func (e *Editor) MoveLeft() + func (e *Editor) MoveLineEnd() + func (e *Editor) MoveLineStart() + func (e *Editor) MoveRight() + func (e *Editor) MoveWordLeft() + func (e *Editor) MoveWordRight() + func (e *Editor) RememberHistory(s string) + func (e *Editor) Reset() + func (e *Editor) SetText(s string) + func (e *Editor) Text() string + func (e *Editor) Up(termWidth int) bool + type InlineImage struct + Height int + MIME string + Name string + PNGData []byte + Width int + type InputParser struct + func (p *InputParser) Feed(b []byte) []Key + type Key struct + Runes []rune + Typ KeyType + type KeyType int + const KeyAltEnter + const KeyBackspace + const KeyCtrlC + const KeyCtrlD + const KeyCtrlK + const KeyCtrlL + const KeyCtrlU + const KeyCtrlW + const KeyDelete + const KeyDown + const KeyEnd + const KeyEnter + const KeyEsc + const KeyHome + const KeyLeft + const KeyNone + const KeyPaste + const KeyRight + const KeyRune + const KeyShiftTab + const KeyTab + const KeyUp + const KeyWordLeft + const KeyWordRight + type PendingUserKind int + const PendingUserFollowUp + const PendingUserSteer + type PendingUserMessage struct + Content string + Display string + Kind PendingUserKind + type Renderer struct + func NewRenderer(w *bufio.Writer, width, height int) *Renderer + func (r *Renderer) EraseBelow(line int) + func (r *Renderer) Frame(newLines []string, cursorLine, cursorCol int) + func (r *Renderer) Repaint() + func (r *Renderer) SetSize(width, height int) + func (r *Renderer) ViewportTop() int + type Screen struct + Autocomplete *Autocomplete + Confirm *ConfirmModel + Editor *Editor + Status StatusModel + Transcript *Transcript + func NewScreen(workingDir, branch, editorPlaceholder string) *Screen + func (s *Screen) Frame(width, _, spinnerFrame int, busy bool, sessionState service.SessionStateReader, ...) (lines []string, cursorLine, cursorCol int) + type StatusModel struct + Agent string + Branch string + ContextLength int64 + ContextLimit int64 + Cost float64 + CostKnown bool + Model string + Thinking string + Tokens int64 + WorkingDir string + type Terminal struct + func NewTerminal(in, out *os.File) (*Terminal, error) + func (t *Terminal) Reader() cancelreader.CancelReader + func (t *Terminal) Resized() (w, h int, ok bool) + func (t *Terminal) Restore() + func (t *Terminal) Size() (w, h int) + func (t *Terminal) Writer() *bufio.Writer + type ToolResult struct + AgentName string + Images []InlineImage + Response string + Result *tools.ToolCallResult + ToolDefinition tools.Tool + type ToolTracker struct + func NewToolTracker() *ToolTracker + func (t *ToolTracker) ByIDLen() int + func (t *ToolTracker) Empty() bool + func (t *ToolTracker) Finish(id string, result ToolResult) *ToolView + func (t *ToolTracker) ForEach(fn func(*ToolView)) + func (t *ToolTracker) Get(id string) *ToolView + func (t *ToolTracker) Len() int + func (t *ToolTracker) Remove(id string) + func (t *ToolTracker) Reset() + func (t *ToolTracker) Upsert(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, ...) + type ToolView struct + func NewToolView(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, ...) *ToolView + func (t *ToolView) Message() *tuitypes.Message + func (t *ToolView) SetImages(images []InlineImage) + type Transcript struct + func NewTranscript() *Transcript + func (t *Transcript) AddBlock(render func(width int) []string) + func (t *Transcript) AppendAssistant(content string) + func (t *Transcript) AppendReasoning(content string) + func (t *Transcript) BlockCount() int + func (t *Transcript) BlockLines(index, width int) []string + func (t *Transcript) Clear() + func (t *Transcript) ClearActive() + func (t *Transcript) FinishTool(id string, result ToolResult, sessionState service.SessionStateReader) + func (t *Transcript) FlushPending() + func (t *Transcript) Lines(width, spinnerFrame int, busy bool, sessionState service.SessionStateReader, ...) []string + func (t *Transcript) RemoveTool(id string) + func (t *Transcript) Tool(id string) *ToolView + func (t *Transcript) ToolByIDCount() int + func (t *Transcript) ToolCount() int + func (t *Transcript) UpsertTool(agentName string, toolCall tools.ToolCall, toolDef tools.Tool, ...) + type UsageSnapshot struct + ContextLength int64 + ContextLimit int64 + Cost float64 + Tokens int64 + type UsageTracker struct + func NewUsageTracker() *UsageTracker + func (u *UsageTracker) Active() (UsageSnapshot, bool) + func (u *UsageTracker) Empty() bool + func (u *UsageTracker) Record(sessionID string, snapshot UsageSnapshot) + func (u *UsageTracker) Reset() + func (u *UsageTracker) RootSessionID() string + func (u *UsageTracker) StreamStarted(sessionID string) + func (u *UsageTracker) StreamStopped() + func (u *UsageTracker) TotalCost() float64