vtcode_config/constants/
ui.rs1pub const TOOL_OUTPUT_MODE_COMPACT: &str = "compact";
2pub const TOOL_OUTPUT_MODE_FULL: &str = "full";
3pub const DEFAULT_INLINE_VIEWPORT_ROWS: u16 = 16;
4pub const DEFAULT_REASONING_VISIBLE: bool = false;
5pub const SLASH_SUGGESTION_LIMIT: usize = 50; pub const SLASH_PALETTE_MIN_WIDTH: u16 = 40;
7pub const SLASH_PALETTE_MIN_HEIGHT: u16 = 9;
8pub const SLASH_PALETTE_HORIZONTAL_MARGIN: u16 = 8;
9pub const SLASH_PALETTE_TOP_OFFSET: u16 = 3;
10pub const SLASH_PALETTE_CONTENT_PADDING: u16 = 6;
11pub const SLASH_PALETTE_HINT_PRIMARY: &str = "Type to filter slash commands.";
12pub const SLASH_PALETTE_HINT_SECONDARY: &str = "Press Enter to apply • Esc to dismiss.";
13pub const MODAL_MIN_WIDTH: u16 = 36;
14pub const MODAL_MIN_HEIGHT: u16 = 9;
15pub const MODAL_LIST_MIN_HEIGHT: u16 = 12;
16pub const MODAL_WIDTH_RATIO: f32 = 0.6;
17pub const MODAL_HEIGHT_RATIO: f32 = 0.6;
18pub const MODAL_MAX_WIDTH_RATIO: f32 = 0.9;
19pub const MODAL_MAX_HEIGHT_RATIO: f32 = 0.8;
20pub const MODAL_CONTENT_HORIZONTAL_PADDING: u16 = 8;
21pub const MODAL_CONTENT_VERTICAL_PADDING: u16 = 6;
22pub const MODAL_INSTRUCTIONS_TITLE: &str = "";
23pub const MODAL_INSTRUCTIONS_BULLET: &str = "•";
24pub const INLINE_HEADER_HEIGHT: u16 = 3;
25pub const INLINE_INPUT_HEIGHT: u16 = 4;
26pub const INLINE_INPUT_PADDING_HORIZONTAL: u16 = 1;
27pub const INLINE_INPUT_PADDING_VERTICAL: u16 = 1;
28pub const INLINE_INPUT_MAX_LINES: usize = 10;
29pub const INLINE_NAVIGATION_PERCENT: u16 = 28;
30pub const INLINE_NAVIGATION_MIN_WIDTH: u16 = 24;
31pub const INLINE_CONTENT_MIN_WIDTH: u16 = 48;
32pub const INLINE_STACKED_NAVIGATION_PERCENT: u16 = INLINE_NAVIGATION_PERCENT;
33pub const INLINE_SCROLLBAR_EDGE_PADDING: u16 = 1;
34pub const INLINE_TRANSCRIPT_BOTTOM_PADDING: u16 = 4;
35pub const INLINE_PREVIEW_MAX_CHARS: usize = 56;
36pub const INLINE_PREVIEW_ELLIPSIS: &str = "…";
37pub const INLINE_PASTE_COLLAPSE_LINE_THRESHOLD: usize = 10;
38pub const HEADER_HIGHLIGHT_PREVIEW_MAX_CHARS: usize = 48;
39pub const INLINE_AGENT_MESSAGE_LEFT_PADDING: &str = " ";
40pub const INLINE_AGENT_QUOTE_PREFIX: &str = " •";
41pub const INLINE_USER_MESSAGE_DIVIDER_SYMBOL: &str = "─";
42
43pub const SCROLL_INDICATOR_FORMAT: &str = "↕";
45pub const SCROLL_INDICATOR_ENABLED: bool = true;
47
48pub const INLINE_BLOCK_TOP_LEFT: &str = "╭";
49pub const INLINE_BLOCK_TOP_RIGHT: &str = "╮";
50pub const INLINE_BLOCK_BODY_LEFT: &str = "│";
51pub const INLINE_BLOCK_BODY_RIGHT: &str = "│";
52pub const INLINE_BLOCK_BOTTOM_LEFT: &str = "╰";
53pub const INLINE_BLOCK_BOTTOM_RIGHT: &str = "╯";
54pub const INLINE_BLOCK_HORIZONTAL: &str = "─";
55pub const INLINE_TOOL_HEADER_LABEL: &str = "Tool";
56pub const INLINE_TOOL_ACTION_PREFIX: &str = "→";
57pub const INLINE_TOOL_DETAIL_PREFIX: &str = "↳";
58pub const INLINE_PTY_HEADER_LABEL: &str = "Terminal";
59pub const INLINE_PTY_RUNNING_LABEL: &str = "running";
60pub const INLINE_PTY_STATUS_LIVE: &str = "LIVE";
61pub const INLINE_PTY_STATUS_DONE: &str = "DONE";
62pub const INLINE_PTY_PLACEHOLDER: &str = "Terminal output";
63pub const MODAL_LIST_HIGHLIGHT_SYMBOL: &str = "✦";
64pub const MODAL_LIST_HIGHLIGHT_FULL: &str = "✦ ";
65pub const MODAL_LIST_SUMMARY_FILTER_LABEL: &str = "Filter";
66pub const MODAL_LIST_SUMMARY_SEPARATOR: &str = " • ";
67pub const MODAL_LIST_SUMMARY_MATCHES_LABEL: &str = "Matches";
68pub const MODAL_LIST_SUMMARY_TOTAL_LABEL: &str = "of";
69pub const MODAL_LIST_SUMMARY_NO_MATCHES: &str = "No matches";
70pub const MODAL_LIST_SUMMARY_RESET_HINT: &str = "Press Esc to reset";
71pub const MODAL_LIST_NO_RESULTS_MESSAGE: &str = "No matching options";
72pub const HEADER_VERSION_PROMPT: &str = "> ";
73pub const HEADER_VERSION_PREFIX: &str = "VT Code";
74pub const HEADER_VERSION_LEFT_DELIMITER: &str = "(";
75pub const HEADER_VERSION_RIGHT_DELIMITER: &str = ")";
76pub const HEADER_MODE_INLINE: &str = "Inline session";
77pub const HEADER_MODE_ALTERNATE: &str = "Alternate session";
78pub const HEADER_MODE_AUTO: &str = "Auto session";
79pub const HEADER_MODE_FULL_AUTO_SUFFIX: &str = " (full)";
80pub const HEADER_MODE_PRIMARY_SEPARATOR: &str = " | ";
81pub const HEADER_MODE_SECONDARY_SEPARATOR: &str = " | ";
82pub const HEADER_PROVIDER_PREFIX: &str = "Provider: ";
83pub const HEADER_MODEL_PREFIX: &str = "Model: ";
84pub const HEADER_REASONING_PREFIX: &str = "Reasoning effort: ";
85pub const HEADER_TRUST_PREFIX: &str = "Trust: ";
86pub const HEADER_TOOLS_PREFIX: &str = "Tools: ";
87pub const HEADER_MCP_PREFIX: &str = "MCP: ";
88pub const HEADER_GIT_PREFIX: &str = "git: ";
89pub const HEADER_GIT_CLEAN_SUFFIX: &str = "✓";
90pub const HEADER_GIT_DIRTY_SUFFIX: &str = "*";
91pub const HEADER_UNKNOWN_PLACEHOLDER: &str = "unavailable";
92pub const HEADER_STATUS_LABEL: &str = "Status";
93pub const HEADER_STATUS_ACTIVE: &str = "Active";
94pub const HEADER_STATUS_PAUSED: &str = "Paused";
95pub const HEADER_MESSAGES_LABEL: &str = "Messages";
96pub const HEADER_INPUT_LABEL: &str = "Input";
97pub const HEADER_INPUT_ENABLED: &str = "Enabled";
98pub const HEADER_INPUT_DISABLED: &str = "Disabled";
99pub const INLINE_USER_PREFIX: &str = " ";
100pub const CHAT_INPUT_PLACEHOLDER_BOOTSTRAP: &str = "Type your message (@files, /commands, ctrl+r: search, Shift+Tab: mode, escape: cancel, tab: queue)";
101pub const CHAT_INPUT_PLACEHOLDER_FOLLOW_UP: &str =
102 "Continue (@files, /commands, ctrl+r: search, Shift+Tab mode, escape: cancel, tab: queue)";
103pub const HEADER_SHORTCUT_HINT: &str = "Shortcuts: Enter send • Shift+Enter newline • Esc cancel • Ctrl+C interrupt • @ files • / commands";
104pub const HEADER_META_SEPARATOR: &str = " ";
105pub const WELCOME_TEXT_WIDTH: usize = 80;
106pub const WELCOME_SHORTCUT_SECTION_TITLE: &str = "Keyboard Shortcuts";
107pub const WELCOME_SHORTCUT_HINT_PREFIX: &str = "Shortcuts:";
108pub const WELCOME_SHORTCUT_SEPARATOR: &str = "•";
109pub const WELCOME_SHORTCUT_INDENT: &str = " ";
110pub const WELCOME_SLASH_COMMAND_SECTION_TITLE: &str = "Slash Commands";
111pub const WELCOME_SLASH_COMMAND_LIMIT: usize = 6;
112pub const WELCOME_SLASH_COMMAND_PREFIX: &str = "/";
113pub const WELCOME_SLASH_COMMAND_INTRO: &str = "";
114pub const WELCOME_SLASH_COMMAND_INDENT: &str = " ";
115pub const NAVIGATION_BLOCK_TITLE: &str = "Timeline";
116pub const NAVIGATION_BLOCK_SHORTCUT_NOTE: &str = "Ctrl+T";
117pub const NAVIGATION_EMPTY_LABEL: &str = "Waiting for activity";
118pub const NAVIGATION_INDEX_PREFIX: &str = "#";
119pub const NAVIGATION_LABEL_AGENT: &str = "Agent";
120pub const NAVIGATION_LABEL_ERROR: &str = "Error";
121pub const NAVIGATION_LABEL_INFO: &str = "Info";
122pub const NAVIGATION_LABEL_POLICY: &str = "Policy";
123pub const NAVIGATION_LABEL_TOOL: &str = "Tool";
124pub const NAVIGATION_LABEL_USER: &str = "User";
125pub const NAVIGATION_LABEL_PTY: &str = "PTY";
126pub const PLAN_BLOCK_TITLE: &str = "TODOs";
127pub const PLAN_STATUS_EMPTY: &str = "No TODOs";
128pub const PLAN_STATUS_IN_PROGRESS: &str = "In progress";
129pub const PLAN_STATUS_DONE: &str = "Done";
130pub const PLAN_IN_PROGRESS_NOTE: &str = "in progress";
131pub const SUGGESTION_BLOCK_TITLE: &str = "Slash Commands";
132pub const STATUS_LINE_MODE: &str = "auto";
133pub const STATUS_LINE_REFRESH_INTERVAL_MS: u64 = 1000;
134pub const STATUS_LINE_COMMAND_TIMEOUT_MS: u64 = 200;
135
136pub const TUI_ACTIVE_TICK_RATE_HZ: f64 = 60.0;
139pub const TUI_IDLE_TICK_RATE_HZ: f64 = 4.0;
141pub const TUI_ACTIVE_TIMEOUT_MS: u64 = 500;
143pub const TUI_SHIMMER_FRAME_INTERVAL_MS: u64 = 33;
145pub const TUI_SHIMMER_SWEEP_DURATION_MS: u64 = 2000;
147pub const TUI_SCROLL_CURSOR_STEADY_MS: u64 = 250;
149
150pub const TUI_MAX_VIEWPORT_WIDTH: u16 = 500;
155pub const TUI_MAX_VIEWPORT_HEIGHT: u16 = 200;
157
158pub const THEME_MIN_CONTRAST_RATIO: f64 = 4.5;
160pub const THEME_FOREGROUND_LIGHTEN_RATIO: f64 = 0.25;
161pub const THEME_SECONDARY_LIGHTEN_RATIO: f64 = 0.2;
162pub const THEME_MIX_RATIO: f64 = 0.35;
163pub const THEME_TOOL_BODY_MIX_RATIO: f64 = 0.35;
164pub const THEME_TOOL_BODY_LIGHTEN_RATIO: f64 = 0.2;
165pub const THEME_RESPONSE_COLOR_LIGHTEN_RATIO: f64 = 0.15;
166pub const THEME_REASONING_COLOR_LIGHTEN_RATIO: f64 = 0.3;
167pub const THEME_INPUT_BACKGROUND_MIX_RATIO: f64 = 0.08;
168pub const THEME_USER_COLOR_LIGHTEN_RATIO: f64 = 0.2;
169pub const THEME_SECONDARY_USER_COLOR_LIGHTEN_RATIO: f64 = 0.4;
170pub const THEME_PRIMARY_STATUS_LIGHTEN_RATIO: f64 = 0.35;
171pub const THEME_PRIMARY_STATUS_SECONDARY_LIGHTEN_RATIO: f64 = 0.5;
172pub const THEME_LOGO_ACCENT_BANNER_LIGHTEN_RATIO: f64 = 0.35;
173pub const THEME_LOGO_ACCENT_BANNER_SECONDARY_LIGHTEN_RATIO: f64 = 0.25;
174
175pub const THEME_COLOR_WHITE_RED: u8 = 0xFF;
177pub const THEME_COLOR_WHITE_GREEN: u8 = 0xFF;
178pub const THEME_COLOR_WHITE_BLUE: u8 = 0xFF;
179pub const THEME_MIX_RATIO_MIN: f64 = 0.0;
180pub const THEME_MIX_RATIO_MAX: f64 = 1.0;
181pub const THEME_BLEND_CLAMP_MIN: f64 = 0.0;
182pub const THEME_BLEND_CLAMP_MAX: f64 = 255.0;
183
184pub const THEME_RELATIVE_LUMINANCE_CUTOFF: f64 = 0.03928;
186pub const THEME_RELATIVE_LUMINANCE_LOW_FACTOR: f64 = 12.92;
187pub const THEME_RELATIVE_LUMINANCE_OFFSET: f64 = 0.055;
188pub const THEME_RELATIVE_LUMINANCE_EXPONENT: f64 = 2.4;
189pub const THEME_CONTRAST_RATIO_OFFSET: f64 = 0.05;
190pub const THEME_RED_LUMINANCE_COEFFICIENT: f64 = 0.2126;
191pub const THEME_GREEN_LUMINANCE_COEFFICIENT: f64 = 0.7152;
192pub const THEME_BLUE_LUMINANCE_COEFFICIENT: f64 = 0.0722;
193pub const THEME_LUMINANCE_LIGHTEN_RATIO: f64 = 0.2;
194
195pub const WCAG_AA_CONTRAST_RATIO: f64 = 4.5;
202
203pub const WCAG_AAA_CONTRAST_RATIO: f64 = 7.0;
205
206pub const WCAG_LARGE_TEXT_CONTRAST_RATIO: f64 = 3.0;
208
209pub const SAFE_ANSI_RED: u8 = 1;
215pub const SAFE_ANSI_GREEN: u8 = 2;
216pub const SAFE_ANSI_YELLOW: u8 = 3;
217pub const SAFE_ANSI_BLUE: u8 = 4;
218pub const SAFE_ANSI_MAGENTA: u8 = 5;
219pub const SAFE_ANSI_CYAN: u8 = 6;
220
221pub const SAFE_ANSI_BRIGHT_RED: u8 = 9;
225pub const SAFE_ANSI_BRIGHT_GREEN: u8 = 10;
226pub const SAFE_ANSI_BRIGHT_MAGENTA: u8 = 13;
227pub const SAFE_ANSI_BRIGHT_CYAN: u8 = 14;
228
229pub const SAFE_ANSI_COLORS: [u8; 10] = [
232 SAFE_ANSI_RED,
233 SAFE_ANSI_GREEN,
234 SAFE_ANSI_YELLOW,
235 SAFE_ANSI_BLUE,
236 SAFE_ANSI_MAGENTA,
237 SAFE_ANSI_CYAN,
238 SAFE_ANSI_BRIGHT_RED,
239 SAFE_ANSI_BRIGHT_GREEN,
240 SAFE_ANSI_BRIGHT_MAGENTA,
241 SAFE_ANSI_BRIGHT_CYAN,
242];
243
244pub const PROBLEMATIC_ANSI_COLORS: [u8; 6] = [0, 7, 8, 11, 12, 15];