From 975484cc2bbf3202df473f8b456869337ea3e025 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Tue, 28 Apr 2026 08:53:57 -0600 Subject: [PATCH] fix: Accidental shadow of temp_file function for Windows function calling --- src/function/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/function/mod.rs b/src/function/mod.rs index 98e31b6..b169dd8 100644 --- a/src/function/mod.rs +++ b/src/function/mod.rs @@ -1177,8 +1177,8 @@ pub fn run_llm_function( .join(""); envs.insert("PATH".into(), format!("{prepend_path}{current_path}")); - let temp_file = temp_file("-eval-", ""); - envs.insert("LLM_OUTPUT".into(), temp_file.display().to_string()); + let tmp_file = temp_file("-eval-", ""); + envs.insert("LLM_OUTPUT".into(), tmp_file.display().to_string()); #[cfg(windows)] let cmd_name = polyfill_cmd_name(&cmd_name, &bin_dirs); @@ -1263,9 +1263,9 @@ pub fn run_llm_function( return Ok(Some(error_json.to_string())); } let mut output = None; - if temp_file.exists() { + if tmp_file.exists() { let contents = - fs::read_to_string(temp_file).context("Failed to retrieve tool call output")?; + fs::read_to_string(tmp_file).context("Failed to retrieve tool call output")?; if !contents.is_empty() { debug!("Tool {command_name} output: {}", contents); output = Some(contents);