diff --git a/ui/src/components/IssueChatThread.test.tsx b/ui/src/components/IssueChatThread.test.tsx index 653379802ce..1f94f0344be 100644 --- a/ui/src/components/IssueChatThread.test.tsx +++ b/ui/src/components/IssueChatThread.test.tsx @@ -1460,6 +1460,66 @@ describe("IssueChatThread", () => { }); }); + it("keeps a running chain-of-thought in the Working state between commands", () => { + const root = createRoot(container); + + act(() => { + root.render( + + {}} + enableLiveTranscriptPolling={false} + /> + , + ); + }); + + expect(container.textContent).toContain("Working"); + expect(container.textContent).not.toContain("Worked"); + + act(() => { + root.unmount(); + }); + }); + it("folds chain-of-thought when the same message transitions from running to complete", () => { expect(resolveAssistantMessageFoldedState({ messageId: "message-1", diff --git a/ui/src/components/IssueChatThread.tsx b/ui/src/components/IssueChatThread.tsx index e10b8cc33bc..f4bdaa8ab1a 100644 --- a/ui/src/components/IssueChatThread.tsx +++ b/ui/src/components/IssueChatThread.tsx @@ -768,8 +768,7 @@ function IssueChatChainOfThought({ (p): p is ToolCallMessagePart => p.type === "tool-call", ); - const hasActiveTool = toolParts.some((t) => t.result === undefined); - const isActive = isMessageRunning && hasActiveTool; + const isActive = isMessageRunning; const [expanded, setExpanded] = useState(isActive); const rawSegments = Array.isArray(custom.chainOfThoughtSegments)