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/// Styled text helpers.
17pub mod styled;
18/// Syntax highlighting integration.
19pub mod syntax_highlight;
20/// Terminal capability detection.
21pub mod terminal;
22/// Built-in theme definitions and active style accessors.
23pub mod theme;
24/// Theme configuration file parsing (`.vtcode/theme.toml`).
25pub mod theme_config;
26/// Theme manager for loading and applying custom themes.
27pub mod theme_manager;
28/// TUI module re-exports.
29pub mod tui;
30/// Compatibility layer between core config types and TUI types.
31pub mod tui_compat;
32/// Global TUI mode flag.
33pub mod tui_mode;
34/// User confirmation dialogs.
35pub mod user_confirmation;
36
37pub use git_config::GitColorConfig;
38pub use markdown::*;
39pub use search::*;
40pub use slash::*;
41pub use styled::*;
42pub use terminal::*;
43pub use theme::*;
44pub use theme_config::ThemeConfig;
45pub use theme_manager::ThemeManager;
46pub use tui::*;
47pub use tui_compat::*;
48pub use tui_mode::*;
49pub use vtcode_ui::tui::ui::FileColorizer;
50
51#[cfg(test)]
52mod tests {
53    use super::*;
54
55    #[test]
56    fn test_render_markdown() {
57        let markdown_text = r#"
58# Welcome to VT Code
59
60This is a **bold** statement and this is *italic*.
61
62## Features
63
64- Advanced code analysis
65- Multi-language support
66- Real-time collaboration
67"#;
68
69        // This should not panic
70        render_markdown(markdown_text);
71    }
72}