From 3901c405181a98e2cc0f4a05633ac65f5bcef9c0 Mon Sep 17 00:00:00 2001 From: xintaofei Date: Sat, 11 Apr 2026 11:20:28 +0800 Subject: [PATCH] fix(chat): stop plan in-progress spinner when agent is not streaming Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/chat/agent-plan-overlay.tsx | 14 +++++++++++--- src/components/message/message-list-view.tsx | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/chat/agent-plan-overlay.tsx b/src/components/chat/agent-plan-overlay.tsx index ff72849..89aa537 100644 --- a/src/components/chat/agent-plan-overlay.tsx +++ b/src/components/chat/agent-plan-overlay.tsx @@ -22,6 +22,7 @@ interface AgentPlanOverlayProps { planKey?: string | null visible?: boolean defaultExpanded?: boolean + isStreaming?: boolean } function getLatestPlanEntries(message: LiveMessage | null): PlanEntryInfo[] { @@ -88,12 +89,18 @@ function getPriorityClassName(priority: string): string { } } -function StatusIcon({ status }: { status: string }) { +function StatusIcon({ + status, + isStreaming, +}: { + status: string + isStreaming: boolean +}) { if (status === "completed") { return } - if (status === "in_progress") { + if (status === "in_progress" && isStreaming) { return } @@ -106,6 +113,7 @@ export const AgentPlanOverlay = memo(function AgentPlanOverlay({ planKey, visible = true, defaultExpanded = true, + isStreaming = false, }: AgentPlanOverlayProps) { const t = useTranslations("Folder.chat.agentPlanOverlay") const liveEntries = useMemo( @@ -207,7 +215,7 @@ export const AgentPlanOverlay = memo(function AgentPlanOverlay({ className="rounded-lg border bg-transparent px-2.5 py-2" >
- +

)