From b78ac5410fb1601a25862011fc124c6ed6614acc Mon Sep 17 00:00:00 2001 From: Agus Zubiaga Date: Sat, 5 Apr 2025 10:16:24 -0300 Subject: [PATCH] agent: Fix tool use output rendering (#28146) Tool use output wouldn't get rendered in some states. Release Notes: - N/A --- crates/agent/src/active_thread.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/agent/src/active_thread.rs b/crates/agent/src/active_thread.rs index fed075bc440e5cd8824da32e5023e269692acf6f..f463a23b41c8c7b8ae1d69bdc946c01c7985cb60 100644 --- a/crates/agent/src/active_thread.rs +++ b/crates/agent/src/active_thread.rs @@ -706,7 +706,11 @@ impl ActiveThread { tool_use.id.clone(), tool_use.ui_text.clone(), &tool_use.input, - "".into(), + self.thread + .read(cx) + .tool_result(&tool_use.id) + .map(|result| result.content.clone().into()) + .unwrap_or("".into()), window, cx, );