From e5d93f2bca22577dc7e7bd23c53bf4f5b5435d2e Mon Sep 17 00:00:00 2001 From: f14XuanLv <121799454+f14XuanLv@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:21:31 +0800 Subject: [PATCH] fix: reset condensing state when switching tasks (#6922) Previously, when users initiated context condensing and switched to another task before completion, the 'condensing context' indicator would persist on the new task. This fix ensures the condensing state is properly reset in the task switching effect, preventing the indicator from appearing incorrectly on different tasks. --- webview-ui/src/components/chat/ChatView.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 64f761574a..3b77bbdb7d 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -434,9 +434,12 @@ const ChatViewComponent: React.ForwardRefRenderFunction { + // Reset UI states setExpandedRows({}) everVisibleMessagesTsRef.current.clear() // Clear for new task setCurrentFollowUpTs(null) // Clear follow-up answered state for new task + setIsCondensing(false) // Reset condensing state when switching tasks + // Note: sendingDisabled is not reset here as it's managed by message effects // Clear any pending auto-approval timeout from previous task if (autoApproveTimeoutRef.current) {