Skip to main content

Module widgets

Module widgets 

Source
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

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::StatuslineSegment instead of tagent’s hardcoded, cost-formula-laden statusline.
tool_card
Tool-call cards in the chat scrollback (#4596).