vtcode_core/config/core/
automation.rs1use crate::config::constants::tools;
2use serde::{Deserialize, Serialize};
3use std::path::PathBuf;
4
5#[derive(Debug, Clone, Deserialize, Serialize)]
7pub struct AutomationConfig {
8 #[serde(default)]
10 pub full_auto: FullAutoConfig,
11}
12
13impl Default for AutomationConfig {
14 fn default() -> Self {
15 Self {
16 full_auto: FullAutoConfig::default(),
17 }
18 }
19}
20
21#[derive(Debug, Clone, Deserialize, Serialize)]
23pub struct FullAutoConfig {
24 #[serde(default = "default_full_auto_enabled")]
26 pub enabled: bool,
27
28 #[serde(default = "default_full_auto_allowed_tools")]
30 pub allowed_tools: Vec<String>,
31
32 #[serde(default = "default_require_profile_ack")]
34 pub require_profile_ack: bool,
35
36 #[serde(default)]
38 pub profile_path: Option<PathBuf>,
39}
40
41impl Default for FullAutoConfig {
42 fn default() -> Self {
43 Self {
44 enabled: default_full_auto_enabled(),
45 allowed_tools: default_full_auto_allowed_tools(),
46 require_profile_ack: default_require_profile_ack(),
47 profile_path: None,
48 }
49 }
50}
51
52fn default_full_auto_enabled() -> bool {
53 false
54}
55
56fn default_full_auto_allowed_tools() -> Vec<String> {
57 vec![
58 tools::READ_FILE.to_string(),
59 tools::LIST_FILES.to_string(),
60 tools::GREP_SEARCH.to_string(),
61 tools::SIMPLE_SEARCH.to_string(),
62 ]
63}
64
65fn default_require_profile_ack() -> bool {
66 true
67}