Skip to content

Commit 04b672b

Browse files
authored
Merge pull request #9016 from uinstinct/pending-tools-text
fix: show the correct number of pending tools
2 parents 10b9513 + 3d7be8a commit 04b672b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gui/src/pages/gui/ToolCallDiv/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ export function ToolCallDiv({
2929

3030
const shouldShowGroupedUI = toolCallStates.length > 1 && isStreamingComplete;
3131
const activeCalls = toolCallStates.filter(
32-
(call) => call.status !== "canceled" && call.status !== "done",
32+
(call) => call.status !== "canceled",
3333
);
34+
const pendingCalls = toolCallStates.filter((call) => call.status !== "done");
3435

3536
const renderToolCall = (toolCallState: ToolCallState) => {
3637
const tool = availableTools.find(
@@ -92,7 +93,7 @@ export function ToolCallDiv({
9293
<div className="border-border rounded-lg border px-4 py-3 pb-0">
9394
<GroupedToolCallHeader
9495
toolCallStates={toolCallStates}
95-
activeCalls={activeCalls}
96+
activeCalls={pendingCalls.length > 0 ? pendingCalls : activeCalls}
9697
open={open}
9798
onToggle={() => setOpen(!open)}
9899
/>

0 commit comments

Comments
 (0)