Documentation
¶
Overview ¶
Package statusline renders the permanent status row above the composer: the brand mark in the turn's state, the activity label, and the elapsed time while a turn is in flight, and the row is reserved (and shows the keymap hint) when it is not. The earlier inline-first "no permanent bar" decision was reversed for the cockpit: a fixed row costs nothing that moves and never reflows the transcript when it changes.
Index ¶
- type Model
- func (m Model) Active() bool
- func (m *Model) ClearNotice()
- func (m *Model) Notice(text string)
- func (m *Model) SetCost(costUSD float64)
- func (m *Model) SetDetail(detail string)
- func (m *Model) SetLabel(label string)
- func (m *Model) SetSafetyMode(mode string)
- func (m *Model) SetTheme(t theme.Theme, tier theme.Tier)
- func (m *Model) Start(label string, now time.Time) tea.Cmd
- func (m *Model) Stop()
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View(now time.Time) string
- type TickMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
Model owns no timer of its own beyond the spinner tick, and that tick only runs while a turn is active (Start/Stop bracket it).
func (*Model) Notice ¶
Notice shows a one-line message until the next turn starts.
A clipboard write is the case that needs it. tea.SetClipboard emits OSC 52, which VTE and Terminal.app ignore silently, so the line states what was ATTEMPTED. It never claims the paste buffer now holds the text, because this process cannot find that out.
func (*Model) SetDetail ¶
SetDetail sets the specific activity detail shown beside the label - wireframes-panes.md section 9's "- running <detail> 12s" shape, e.g. a tool's name and arguments. Call it after SetLabel: SetLabel itself clears detail, so a label change with no new detail (back to "thinking" once a tool call ends) never keeps showing the PREVIOUS tool's detail.
func (*Model) SetLabel ¶
SetLabel updates the label of an already-active turn without resetting the elapsed-time clock. The mark follows, restarting its cycle, because a new activity is a new animation even mid-turn.
func (*Model) SetSafetyMode ¶
SetSafetyMode updates the active safety policy label ("safe" | "auto").
func (*Model) Start ¶
Start arms the status line for a new turn with the given state label (e.g. "thinking", "running tool") and returns the Cmd that starts the spinner clock.