vtcode-config 0.98.7

Config loader components shared across VT Code and downstream adopters
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! ANSI escape sequence parsing constants
//!
//! These constants prevent infinite loops when parsing malformed ANSI sequences.
//! See: <https://github.com/anthropics/claude-code/issues/22094>

/// Maximum length for OSC/DCS/PM/APC/SOS escape sequences before bailing out.
/// OSC sequences rarely exceed 4KB in practice (e.g., hyperlinks, window titles).
/// This guard prevents CPU spinning on malformed input.
pub const ANSI_MAX_ESCAPE_SEQ_LENGTH: usize = 4096;

/// Maximum parameter length for CSI sequences (e.g., ESC[...m).
/// CSI parameters are typically short numeric values separated by semicolons.
pub const ANSI_MAX_CSI_PARAM_LENGTH: usize = 20;