vtcode_core/cli/args/
config.rs1use clap::{Args, Subcommand};
2use std::path::PathBuf;
3
4#[derive(Debug, Clone, Subcommand)]
6pub enum ConfigCommand {
7 Reset(ConfigResetArgs),
9}
10
11#[derive(Debug, Clone, Args)]
13pub struct ConfigResetArgs {
14 #[arg(long, conflicts_with = "project")]
16 pub global: bool,
17 #[arg(long, conflicts_with = "global")]
19 pub project: bool,
20}
21
22#[derive(Debug)]
24pub struct ConfigFile {
25 pub model: Option<String>,
26 pub provider: Option<String>,
27 pub api_key_env: Option<String>,
28 pub verbose: Option<bool>,
29 pub log_level: Option<String>,
30 pub workspace: Option<PathBuf>,
31 pub tools: Option<ToolConfig>,
32 pub context: Option<ContextConfig>,
33 pub logging: Option<LoggingConfig>,
34 pub performance: Option<PerformanceConfig>,
35 pub security: Option<SecurityConfig>,
36}
37
38#[derive(Debug, serde::Deserialize)]
40pub struct ToolConfig {
41 pub enable_validation: Option<bool>,
42 pub max_execution_time_seconds: Option<u64>,
43 pub allow_file_creation: Option<bool>,
44 pub allow_file_deletion: Option<bool>,
45}
46
47#[derive(Debug, serde::Deserialize)]
49pub struct ContextConfig {
50 pub max_context_length: Option<usize>,
51}
52
53#[derive(Debug, serde::Deserialize)]
55pub struct LoggingConfig {
56 pub file_logging: Option<bool>,
57 pub log_directory: Option<String>,
58 pub max_log_files: Option<usize>,
59 pub max_log_size_mb: Option<usize>,
60}
61
62#[derive(Debug, serde::Deserialize)]
64pub struct PerformanceConfig {
65 pub enabled: Option<bool>,
66 pub track_token_usage: Option<bool>,
67 pub track_api_costs: Option<bool>,
68 pub track_response_times: Option<bool>,
69 pub enable_benchmarking: Option<bool>,
70 pub metrics_retention_days: Option<usize>,
71}
72
73#[derive(Debug, serde::Deserialize)]
75pub struct SecurityConfig {
76 pub level: Option<String>,
77 pub enable_audit_logging: Option<bool>,
78 pub enable_vulnerability_scanning: Option<bool>,
79 pub allow_external_urls: Option<bool>,
80 pub max_file_access_depth: Option<usize>,
81}