Skip to content

Commit ba0f0d6

Browse files
authored
Merge pull request #138 from GCWing/gcwing/dev
feat(config): enable tool auto-execution by default
2 parents 0ac5df9 + 444198b commit ba0f0d6

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/crates/core/src/agentic/tools/implementations/delete_file_tool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Important notes:
100100
}
101101

102102
fn needs_permissions(&self, _input: Option<&Value>) -> bool {
103-
true
103+
false
104104
}
105105

106106
async fn validate_input(&self, input: &Value, _context: Option<&ToolUseContext>) -> ValidationResult {

src/crates/core/src/agentic/tools/implementations/file_write_tool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Usage:
6161
}
6262

6363
fn needs_permissions(&self, _input: Option<&Value>) -> bool {
64-
true
64+
false
6565
}
6666

6767
async fn validate_input(

src/crates/core/src/service/config/types.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ pub struct AIConfig {
404404
pub tool_confirmation_timeout_secs: Option<u64>,
405405

406406
/// Skip tool execution confirmation (global, applies to all modes).
407-
#[serde(default)]
407+
#[serde(default = "default_skip_tool_confirmation")]
408408
pub skip_tool_confirmation: bool,
409409

410410
/// Debug-mode configuration (log path, language templates, etc.).
@@ -453,6 +453,10 @@ fn default_tool_confirmation_timeout() -> Option<u64> {
453453
None
454454
}
455455

456+
fn default_skip_tool_confirmation() -> bool {
457+
true
458+
}
459+
456460
impl Default for ModeConfig {
457461
fn default() -> Self {
458462
Self {
@@ -1114,7 +1118,7 @@ impl Default for AIConfig {
11141118
proxy: ProxyConfig::default(),
11151119
tool_execution_timeout_secs: default_tool_execution_timeout(),
11161120
tool_confirmation_timeout_secs: default_tool_confirmation_timeout(),
1117-
skip_tool_confirmation: false,
1121+
skip_tool_confirmation: true,
11181122
debug_mode_config: DebugModeConfig::default(),
11191123
known_tools: Vec::new(),
11201124
}

0 commit comments

Comments
 (0)