Skip to main content

vtcode_commons/
lib.rs

1//! Shared traits and helper types reused across the component extraction
2//! crates. The goal is to keep thin prototypes like `vtcode-llm` and
3//! `vtcode-tools` decoupled from VT Code's internal configuration and
4//! telemetry wiring while still sharing common contracts.
5//!
6//! See `docs/vtcode_commons_reference.md` for ready-to-use adapters that
7//! demonstrate how downstream consumers can wire these traits into their own
8//! applications or tests.
9
10pub mod ansi;
11pub mod ansi_capabilities;
12pub mod ansi_codes;
13pub mod anstyle_utils;
14pub mod async_utils;
15pub mod at_pattern;
16pub mod colors;
17pub mod diff;
18pub mod errors;
19pub mod formatting;
20pub mod fs;
21pub mod http;
22pub mod image;
23pub mod llm;
24pub mod paths;
25pub mod project;
26pub mod reference;
27pub mod serde_helpers;
28pub mod slug;
29pub mod styling;
30pub mod telemetry;
31pub mod tokens;
32pub mod unicode;
33pub mod utils;
34pub mod validation;
35pub mod vtcodegitignore;
36
37pub use colors::{blend_colors, color_from_hex, contrasting_color, is_light_color, style};
38pub use errors::{DisplayErrorFormatter, ErrorFormatter, ErrorReporter, NoopErrorReporter};
39pub use paths::{
40    PathResolver, PathScope, WorkspacePaths, file_name_from_path, is_safe_relative_path,
41};
42pub use project::{ProjectOverview, build_project_overview};
43pub use reference::{MemoryErrorReporter, MemoryTelemetry, StaticWorkspacePaths};
44pub use styling::{ColorPalette, DiffColorPalette, render_styled};
45pub use telemetry::{NoopTelemetry, TelemetrySink};
46pub use tokens::{estimate_tokens, truncate_to_tokens};
47pub use unicode::{UNICODE_MONITOR, UnicodeMonitor, UnicodeValidationContext};