//! # Utility Functions and Helpers
//!
//! This module provides various utility functions and helpers used throughout VT Code,
//! including configuration management, safety utilities, and common operations.
//!
//! ## Modules Overview
//!
//! ### Configuration Management (`dot_config`)
//! - **User Preferences**: Theme settings, UI preferences, cache configuration
//! - **Provider Configuration**: LLM provider settings and API keys
//! - **Dotfile Management**: `.vtcode` directory and configuration files
//!
//! ### Safety Utilities (`safety`)
//! - **Path Validation**: Workspace boundary checking
//! - **Command Sanitization**: Safe command execution
//! - **Input Validation**: User input sanitization
//!
//! ### ANSI and Colors (`ansi`, `colors`, `ratatui_styles`)
//! - **Terminal Colors**: ANSI color codes and styling
//! - **Color Management**: Theme support and color schemes
//! - **Cross-platform**: Works on different terminal types
//! - **TUI Integration**: Convert anstyle to ratatui styles seamlessly via anstyle-crossterm
//!
//! ### Git Integration (`vtcodegitignore`)
//! - **Gitignore Management**: Automatic `.vtcodegitignore` creation
//! - **Pattern Matching**: File exclusion patterns
//! - **Workspace Safety**: Prevents accidental file operations
//!
//! ### Path Utilities (`path`)
//! - **Path Normalization**: Resolve `.` and `..` components
//! - **Shared Utilities**: Common path operations
//!
//! ## Basic Usage Examples
//!
//! ### Configuration Management
//! ```rust,no_run
//! use vtcode_core::utils::dot_config::{load_user_config, save_user_config, UserPreferences};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     // Load user configuration
//!     let config = load_user_config().await?;
//!
//!     // Modify preferences
//!     let mut prefs = config.preferences;
//!     prefs.theme = "dark".to_string();
//!
//!     // Save changes
//!     save_user_config(&prefs).await?;
//!
//!     Ok(())
//! }
//! ```
//!
//! ### Path Safety
//! ```rust,no_run
//! use vtcode_core::utils::safety::validate_workspace_path;
//! use std::path::PathBuf;
//!
//! let workspace = PathBuf::from("/home/user/project");
//! let file_path = PathBuf::from("src/main.rs");
//!
//! // Validate path is within workspace
//! match validate_workspace_path(&workspace, &file_path) {
//!     Ok(valid_path) => println!("Safe path: {}", valid_path.display()),
//!     Err(e) => eprintln!("Unsafe path: {}", e),
//! }
//! ```
//!
//! ### ANSI Colors
//! ```rust,no_run
//! use vtcode_core::utils::ansi::{colorize, Color};
//!
//! let message = "Hello, World!";
//! let colored = colorize(message, Color::Green);
//! println!("{}", colored); // Prints green text
//!
//! // Or use styling functions
//! let bold_text = vtcode_core::utils::ansi::bold("Important message");
//! let red_error = colorize("Error occurred", Color::Red);
//! ```
//!
//! ### Git Integration
//! ```rust,no_run
//! use vtcode_core::utils::vtcodegitignore::initialize_vtcode_gitignore;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     let workspace = std::env::current_dir()?;
//!
//!     // Initialize .vtcodegitignore
//!     initialize_vtcode_gitignore(&workspace).await?;
//!
//!     println!("Git integration initialized");
//!     Ok(())
//! }
//! ```

pub mod ansi;
pub mod ansi_capabilities;
pub mod ansi_codes;
pub mod ansi_parser;
pub mod anstyle_utils;
pub mod async_line_writer;
pub mod async_utils;
pub mod at_pattern;
pub mod cached_style_parser;
pub mod color_utils;
pub mod colors;
pub mod common;
pub mod diff;
pub mod diff_styles;
pub mod dot_config;
pub mod error_log_collector;
pub mod error_messages;
pub mod file_input;
pub mod file_utils;
pub mod file_workflow;
pub mod formatting;
pub mod gatekeeper;
pub mod http_client;
pub mod image_processing;
pub mod message_style;
pub mod migration;
pub mod path;
pub mod ratatui_styles;
pub mod safety;
pub mod serde_helpers;
pub mod session_archive;
pub mod session_debug;
pub mod style_helpers;
pub mod terminal_color_probe;
pub mod tokens;
pub mod trace_writer;
pub mod transcript;
pub mod tty;
pub mod unicode_monitor;
pub mod validation;
pub mod vtcodegitignore;

pub use anstyle_utils::*;
pub use cached_style_parser::CachedStyleParser;
pub use color_utils::*;
pub use common::{ProjectOverview, build_project_overview, current_timestamp, merge_env_patterns};
pub use style_helpers::*;
