From 7a54dd7190a2a44c62b9d5eb781a417df6917902 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 2 Apr 2025 17:13:16 +0200 Subject: [PATCH] Avoid requiring confirmation for tools that edit buffers (#27923) It's super easy to undo those changes. In a future PR, we should also avoid requiring confirmation in the batch tool if all the underlying tools don't require confirmation. Release Notes: - N/A --- crates/assistant_tools/src/create_file_tool.rs | 2 +- crates/assistant_tools/src/edit_files_tool.rs | 2 +- crates/assistant_tools/src/find_replace_file_tool.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/assistant_tools/src/create_file_tool.rs b/crates/assistant_tools/src/create_file_tool.rs index 57bff7594c2d954d55bf2cdc14f55253ac0c37ca..b4f72a5f5ab766ff3ea83771dd67952baabf0f97 100644 --- a/crates/assistant_tools/src/create_file_tool.rs +++ b/crates/assistant_tools/src/create_file_tool.rs @@ -41,7 +41,7 @@ impl Tool for CreateFileTool { } fn needs_confirmation(&self) -> bool { - true + false } fn description(&self) -> String { diff --git a/crates/assistant_tools/src/edit_files_tool.rs b/crates/assistant_tools/src/edit_files_tool.rs index 3cf3a2c6a65f61ff7a8093591106f0860e4c0246..6597f8994304061b6c5fa0e7cf41fa7830c32e9f 100644 --- a/crates/assistant_tools/src/edit_files_tool.rs +++ b/crates/assistant_tools/src/edit_files_tool.rs @@ -82,7 +82,7 @@ impl Tool for EditFilesTool { } fn needs_confirmation(&self) -> bool { - true + false } fn description(&self) -> String { diff --git a/crates/assistant_tools/src/find_replace_file_tool.rs b/crates/assistant_tools/src/find_replace_file_tool.rs index db51fe9891302827f3f1b2026092813e96a35509..e18763be208be36247c8c8af4d3a144056c9188c 100644 --- a/crates/assistant_tools/src/find_replace_file_tool.rs +++ b/crates/assistant_tools/src/find_replace_file_tool.rs @@ -130,7 +130,7 @@ impl Tool for FindReplaceFileTool { } fn needs_confirmation(&self) -> bool { - true + false } fn description(&self) -> String {