vtcode_core/tools/
constants.rs1pub const ERROR_DETECTION_PATTERNS: &[&str] = &[
9 "error",
10 "failed",
11 "exception",
12 "permission denied",
13 "not found",
14 "no such file",
15 "cannot",
16 "could not",
17 "panic",
18 "crash",
19 "unhandled",
20 "fatal",
21 "timeout",
22 "connection refused",
23 "access denied",
24 "stack trace",
25 "traceback",
26 "abort",
27 "terminate",
28];
29
30pub const NETWORK_ERROR_PATTERNS: &[&str] = &[
32 "connection",
33 "timeout",
34 "network",
35 "http",
36 "ssl",
37 "tls",
38 "dns",
39 "proxy",
40];
41
42pub const RESOURCE_ERROR_PATTERNS: &[&str] = &[
44 "memory",
45 "oom",
46 "out of",
47 "resource",
48 "too large",
49 "disk full",
50 "quota exceeded",
51];
52
53pub const GIT_ERROR_PATTERNS: &[&str] = &[
55 "git error",
56 "git fatal",
57 "merge conflict",
58 "rebase conflict",
59 "detached HEAD",
60];
61
62pub const COMMAND_ERROR_PATTERNS: &[&str] = &[
64 "command not found",
65 "command failed",
66 "exit code",
67 "permission denied",
68 "no such file or directory",
69];
70
71pub const FILESYSTEM_ERROR_PATTERNS: &[&str] = &[
73 "file not found",
74 "no such file",
75 "directory not found",
76 "permission denied",
77 "read-only file system",
78 "disk quota exceeded",
79];
80
81pub const DEFAULT_VEC_CAPACITY: usize = 32;
83pub const DEFAULT_HASHMAP_CAPACITY: usize = 16;
84pub const DEFAULT_STRING_CAPACITY: usize = 256;
85
86pub const MAX_SEARCH_RESULTS: usize = 5;
88pub const MAX_LIST_ITEMS_SUMMARY: usize = 5;
89pub const OVERFLOW_INDICATOR_PREFIX: &str = "[+]";
90pub const OVERFLOW_INDICATOR_SUFFIX: &str = "more items]";
91
92pub const MAX_FILE_SIZE_FOR_PROCESSING: usize = 100 * 1024 * 1024; pub const MAX_CONTEXT_LINES: usize = 20;
95pub const MAX_OUTPUT_TOKENS: usize = 4000;
96
97pub fn empty_object_schema() -> serde_json::Value {
100 serde_json::json!({"type": "object"})
101}