Skip to content

Commit e5d93f2

Browse files
authored
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.
1 parent 48af73d commit e5d93f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,12 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
434434
}, [messages.length])
435435

436436
useEffect(() => {
437+
// Reset UI states
437438
setExpandedRows({})
438439
everVisibleMessagesTsRef.current.clear() // Clear for new task
439440
setCurrentFollowUpTs(null) // Clear follow-up answered state for new task
441+
setIsCondensing(false) // Reset condensing state when switching tasks
442+
// Note: sendingDisabled is not reset here as it's managed by message effects
440443

441444
// Clear any pending auto-approval timeout from previous task
442445
if (autoApproveTimeoutRef.current) {

0 commit comments

Comments
 (0)