Expand description
ratatui widgets that render crate::app::ReplApp state.
Why: DOC-50 §3.1 groups the actual Frame-drawing functions under
widgets/ (as distinct from crate::render, whose functions take
plain strings and never see ReplApp) so “reads app state and draws a
Rect” has one obvious home. Each submodule here is a
behavior-preserving, generalized port of one tagent repl/tui/*.rs file
(see each submodule’s doc comment for its specific source).
What: scrollback (chat pane, from tagent’s chat.rs),
input_composer (the prompt row, also from chat.rs), banner
(startup splash, from banner.rs), and status_line (the engine-
supplied statusline, new in this slice — tagent’s status.rs equivalent
is NOT ported, since it hardcodes an OpenRouter cost formula the shared
crate must never contain; see DOC-50 §3.2 and Q9). tool_card renders
one tool call and its result as a scrollback card (#4596), and
permission_prompt renders the modal prompt a suspended tool call
raises (#3422).
§Spec References
SPEC-TTUI-03~draft— §3.1 module layout (widgets/).SPEC-TTUI-05~draft— Slice 4 deliverable (§5, Slice 4).
Modules§
- banner
- The startup banner — generalized port of tagent’s
repl/tui/banner.rs. - input_
composer - The input composer row — generalized port of tagent’s
chat.rs::draw_input. - permission_
prompt - The modal permission prompt (#3422).
- scrollback
- The chat scrollback pane — generalized port of tagent’s
repl/tui/chat.rs(build_chat_lines/chat_line_count/draw_chat). - status_
line - The bottom statusline — new in this slice, rendering
crate::model::StatuslineSegmentinstead of tagent’s hardcoded, cost-formula-laden statusline. - tool_
card - Tool-call cards in the chat scrollback (#4596).