From a0be6c8cb28c5d3b0619d8a25240b5d02344e672 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 13 Mar 2025 16:11:44 -0400 Subject: [PATCH] assistant2: Consider tool use as part of the "streaming" state (#26723) This PR updates the `Thread::is_streaming` method so that it includes tool use in the "streaming" state. This will prevent the streaming indicator from disappearing when we're doing tool use. Release Notes: - N/A --- crates/assistant2/src/thread.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/assistant2/src/thread.rs b/crates/assistant2/src/thread.rs index 2cad563ab525c485ee6dd7a7592db701b08564c9..7aa9040dce4815d7c6cc65cc1c22155aff657020 100644 --- a/crates/assistant2/src/thread.rs +++ b/crates/assistant2/src/thread.rs @@ -200,7 +200,7 @@ impl Thread { } pub fn is_streaming(&self) -> bool { - !self.pending_completions.is_empty() + !self.pending_completions.is_empty() || !self.all_tools_finished() } pub fn tools(&self) -> &Arc {