Skip to main content

vtcode_core/ui/
mod.rs

1//! User interface utilities and shared UI components
2//!
3//! This module contains shared UI functionality including loading indicators,
4//! markdown rendering, and terminal utilities.
5
6/// Unified diff rendering with ANSI styling and bounded excerpts.
7pub mod diff_renderer;
8/// Git color configuration parsing.
9pub mod git_config;
10/// Markdown-to-ANSI rendering for chat output.
11pub mod markdown;
12/// Fuzzy search utilities.
13pub mod search;
14/// Slash command discovery and suggestion.
15pub mod slash;
16/// Streaming text buffer for incremental output.
17pub mod stream_buffer;
18/// Styled text helpers.
19pub mod styled;
20/// Syntax highlighting integration.
21pub mod syntax_highlight;
22/// Table formatting utilities.
23pub mod table_formatter;
24/// Terminal capability detection.
25pub mod terminal;
26/// Built-in theme definitions and active style accessors.
27pub mod theme;
28/// Theme configuration file parsing (`.vtcode/theme.toml`).
29pub mod theme_config;
30/// Theme manager for loading and applying custom themes.
31pub mod theme_manager;
32/// TUI module re-exports.
33pub mod tui;
34/// Compatibility layer between core config types and TUI types.
35pub mod tui_compat;
36/// Global TUI mode flag.
37pub mod tui_mode;
38/// User confirmation dialogs.
39pub mod user_confirmation;
40
41pub use git_config::GitColorConfig;
42pub use markdown::*;
43pub use search::*;
44pub use slash::*;
45pub use styled::*;
46pub use terminal::*;
47pub use theme::*;
48pub use theme_config::ThemeConfig;
49pub use theme_manager::ThemeManager;
50pub use tui::*;
51pub use tui_compat::*;
52pub use tui_mode::*;
53pub use vtcode_ui::tui::ui::FileColorizer;
54
55#[cfg(test)]
56mod tests {
57    use super::*;
58
59    #[test]
60    fn test_render_markdown() {
61        let markdown_text = r#"
62# Welcome to VT Code
63
64This is a **bold** statement and this is *italic*.
65
66## Features
67
68- Advanced code analysis
69- Multi-language support
70- Real-time collaboration
71"#;
72
73        // This should not panic
74        render_markdown(markdown_text);
75    }
76}