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 history_picker;
27pub mod input;
28pub mod layout_mode;
29pub mod modal;
30pub mod palette;
31pub mod panel;
32pub mod session;
33pub mod sidebar;
34pub mod slash;
35pub mod transcript;
36
37pub use footer::{FooterWidget, hints as footer_hints};
38pub use header::HeaderWidget;
39pub use history_picker::HistoryPickerWidget;
40pub use input::InputWidget;
41pub use layout_mode::LayoutMode;
42pub use modal::{ModalType, ModalWidget};
43pub use palette::FilePaletteWidget;
44pub use panel::{Panel, PanelStyles};
45pub use session::SessionWidget;
46pub use sidebar::{SidebarSection, SidebarWidget};
47pub use slash::SlashWidget;
48pub use transcript::TranscriptWidget;