Skip to main content

Module widgets

Module widgets 

Source
Expand description

Stateless TUI widgets.

Each widget takes explicit props; the compose function in render::mod pulls those props from State per frame. No widget holds a reference to any god-object.

Structs§

AgentPanelRow
One row of the live agent panel: a running (or backgrounded) subagent’s stable identity + activity. Built by the render layer from TurnState::ExecutingTools + live_tool_status (+ the background-agent registry); this widget only formats.
ApprovalModalWidget
ChatState
State for the chat widget
ChatWidget
Props for ChatWidget
ConversationListWidget
FilePickerWidget
ImageClickTarget
Entry in the click map: maps a content line to an image in chat history
InputState
State for the input widget
InputWidget
Props for InputWidget. The slash-command palette is rendered separately as SlashPaletteWidget in the bottom region (see render.rs); this widget just draws the bordered input box.
PlanConfigWidget
QuestionModalWidget
RewindPickerWidget
SlashPaletteWidget
StatusWidget
Props for StatusWidget (stateless widget)

Enums§

GenerationStatus
Local-to-render-layer generation phase enum. The compose function converts from domain::TurnState + domain::GenPhase into one of these four states; widgets render off this local view so they don’t need to pattern-match the full domain enum.

Constants§

PLAN_CONFIG_HEIGHT
Pane height: rows + border(2) + hint line.
PLAN_CONFIG_ROWS
Row count (kept in sync with plan_config_rows and the reducer’s key handler). Rows: preset, builds, web, memory, tasks, model, reasoning, auto_approve, post_approve.

Functions§

build_status_lines
Build the status-line rows: a generation/tool spinner followed by one row per queued message.
build_task_lines
Build the checklist rows for the reserved zone. collapsed is the Ctrl+T one-line form. attached means the status zone renders above, so the first row carries the connector; detached rows sit flush-left. width is the zone’s inner width in cells.
plan_config_rows
The (label, value) pairs the picker shows, derived from the live config. Shared with the reducer tests so row indices can’t drift.
question_modal_height
Total rendered height including the border, so render::mod can size the bottom zone to fit the modal — the taller of the option list and its preview.
tasks_height
Height the layout should reserve for the checklist zone.
tasks_visible
Whether the checklist band renders at all: there must be something to show, and a fully-green list retires once the run goes idle (finished work stays visible only while unfinished work remains). Collapsed with no status widget above (attached false) renders nothing — the state persists and the one-liner reappears when the next run starts.