|
@@ -434,9 +434,12 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|
|
}, [messages.length])
|
|
}, [messages.length])
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
|
|
+ // Reset UI states
|
|
|
setExpandedRows({})
|
|
setExpandedRows({})
|
|
|
everVisibleMessagesTsRef.current.clear() // Clear for new task
|
|
everVisibleMessagesTsRef.current.clear() // Clear for new task
|
|
|
setCurrentFollowUpTs(null) // Clear follow-up answered state 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
|
|
// Clear any pending auto-approval timeout from previous task
|
|
|
if (autoApproveTimeoutRef.current) {
|
|
if (autoApproveTimeoutRef.current) {
|