feat: add write approve mode (#1628)

This commit is contained in:
Yingjie He
2025-03-11 20:52:41 -07:00
committed by GitHub
parent 4aafc49707
commit 6abc336484
5 changed files with 17 additions and 6 deletions
+2 -2
View File
@@ -275,7 +275,7 @@ impl Agent for TruncateAgent {
// Clone goose_mode once before the match to avoid move issues
let mode = goose_mode.clone();
match mode.as_str() {
"approve" => {
"approve" | "write_approve" => {
let mut read_only_tools = Vec::new();
let mut needs_confirmation = Vec::<&ToolRequest>::new();
let mut approved_tools = Vec::new();
@@ -298,7 +298,7 @@ impl Agent for TruncateAgent {
}
// Only check read-only status for tools needing confirmation
if !needs_confirmation.is_empty() {
if !needs_confirmation.is_empty() && mode == "write_approve" {
read_only_tools = detect_read_only_tools(&capabilities, needs_confirmation.clone()).await;
}