Skip to main content

vtcode_config/constants/
diff.rs

1/// Maximum number of bytes allowed in diff preview inputs
2pub const MAX_PREVIEW_BYTES: usize = 200_000;
3
4/// Number of context lines to include around changes in unified diff output
5pub const CONTEXT_RADIUS: usize = 3;
6
7/// Maximum number of diff lines to keep in a bounded preview before condensation
8pub const MAX_PREVIEW_LINES: usize = 160;
9
10/// Number of leading diff lines to retain when condensing previews
11pub const HEAD_LINE_COUNT: usize = 96;
12
13/// Number of trailing diff lines to retain when condensing previews
14pub const TAIL_LINE_COUNT: usize = 32;
15
16/// Legacy compatibility threshold for the suppression-check API.
17pub const MAX_INLINE_DIFF_FILES: usize = 10;
18
19/// Legacy compatibility threshold for the suppression-check API.
20pub const MAX_TOTAL_DIFF_LINES: usize = 500;
21
22/// Legacy compatibility threshold for the suppression-check API.
23pub const MAX_SINGLE_FILE_CHANGES: usize = 200;
24
25/// Maximum number of files to list in suppression summary
26pub const MAX_FILES_IN_SUMMARY: usize = 20;
27
28/// Message shown when inline diffs are suppressed
29pub const SUPPRESSION_MESSAGE: &str =
30    "Inline diffs have been suppressed for recent changes because there are too many to display.";
31
32/// Hint message shown with suppressed diffs
33pub const SUPPRESSION_HINT: &str = "Tip: Use `git diff` to view the full changes.";