Skip to main content

trusty_code_tui/widgets/
mod.rs

1//! ratatui widgets that render [`crate::app::ReplApp`] state.
2//!
3//! Why: DOC-50 §3.1 groups the actual `Frame`-drawing functions under
4//! `widgets/` (as distinct from [`crate::render`], whose functions take
5//! plain strings and never see `ReplApp`) so "reads app state and draws a
6//! `Rect`" has one obvious home. Each submodule here is a
7//! behavior-preserving, generalized port of one tagent `repl/tui/*.rs` file
8//! (see each submodule's doc comment for its specific source).
9//!
10//! What: [`scrollback`] (chat pane, from tagent's `chat.rs`),
11//! [`input_composer`] (the prompt row, also from `chat.rs`), [`banner`]
12//! (startup splash, from `banner.rs`), and [`status_line`] (the engine-
13//! supplied statusline, new in this slice — tagent's `status.rs` equivalent
14//! is NOT ported, since it hardcodes an OpenRouter cost formula the shared
15//! crate must never contain; see DOC-50 §3.2 and Q9). [`tool_card`] renders
16//! one tool call and its result as a scrollback card (#4596), and
17//! [`permission_prompt`] renders the modal prompt a suspended tool call
18//! raises (#3422).
19//!
20//! # Spec References
21//! - [`SPEC-TTUI-03~draft`](docs/specs/DOC-50-tcode-tui-claude-code-clone.md#SPEC-TTUI-03~draft) — §3.1 module layout (`widgets/`).
22//! - [`SPEC-TTUI-05~draft`](docs/specs/DOC-50-tcode-tui-claude-code-clone.md#SPEC-TTUI-05~draft) — Slice 4 deliverable (§5, Slice 4).
23
24pub mod banner;
25pub mod input_composer;
26pub mod permission_prompt;
27pub mod scrollback;
28pub mod status_line;
29pub mod tool_card;