From 4ecd1b5174c0cefbf2cf0f5363d78661e46c4b2e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 13 Mar 2025 11:47:00 +0100 Subject: [PATCH] Fix bad `cd` sometimes used by `BashTool` and set edit model temperature to 0 (#26656) Release Notes: - N/A --- crates/assistant_tools/src/bash_tool.rs | 3 +++ crates/assistant_tools/src/edit_files_tool.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/assistant_tools/src/bash_tool.rs b/crates/assistant_tools/src/bash_tool.rs index fecec02f78..781a5138f2 100644 --- a/crates/assistant_tools/src/bash_tool.rs +++ b/crates/assistant_tools/src/bash_tool.rs @@ -11,6 +11,9 @@ use util::command::new_smol_command; #[derive(Debug, Serialize, Deserialize, JsonSchema)] pub struct BashToolInput { /// The bash command to execute as a one-liner. + /// + /// WARNING: you must not `cd` into the working directory, as that's already + /// taken care of automatically. Doing so will cause the command to fail! command: String, /// Working directory for the command. This must be one of the root directories of the project. working_directory: String, diff --git a/crates/assistant_tools/src/edit_files_tool.rs b/crates/assistant_tools/src/edit_files_tool.rs index 34c664588d..ed222c00ba 100644 --- a/crates/assistant_tools/src/edit_files_tool.rs +++ b/crates/assistant_tools/src/edit_files_tool.rs @@ -151,7 +151,7 @@ impl EditFilesTool { messages, tools: vec![], stop: vec![], - temperature: None, + temperature: Some(0.0), }; let mut parser = EditActionParser::new();