Skip to main content

vtcode_tui/core_tui/widgets/
mod.rs

1/// Custom widget implementations following Ratatui best practices
2///
3/// This module contains reusable widget components that implement the Widget and WidgetRef traits.
4/// These widgets enable better composition, testability, and separation of concerns.
5///
6/// ## Layout System
7///
8/// The UI is organized into a responsive panel-based layout:
9/// - **Header**: Session identity and status (model, git, tokens)
10/// - **Main**: Transcript area with optional sidebar (wide mode)
11/// - **Footer**: Status line and contextual hints
12///
13/// The `LayoutMode` enum determines the layout variant based on terminal size:
14/// - `Compact`: Minimal chrome for small terminals (< 80 cols)
15/// - `Standard`: Default layout with borders and titles
16/// - `Wide`: Enhanced layout with sidebar (>= 120 cols)
17///
18/// ## Visual Hierarchy
19///
20/// Panels use consistent styling via the `Panel` wrapper:
21/// - Active panels have highlighted borders
22/// - Inactive panels have dimmed borders
23/// - Titles are shown in Standard/Wide modes only
24pub mod footer;
25pub mod header;
26pub mod input;
27pub mod layout_mode;
28pub mod panel;
29pub mod session;
30pub mod sidebar;
31pub mod transcript;
32
33pub use footer::{FooterWidget, hints as footer_hints};
34pub use header::HeaderWidget;
35pub use input::InputWidget;
36pub use layout_mode::LayoutMode;
37pub use panel::{Panel, PanelStyles};
38pub use session::SessionWidget;
39pub use sidebar::{SidebarSection, SidebarWidget};
40pub use transcript::TranscriptWidget;