Skip to content

Commit c56c32b

Browse files
committed
filter to the current task
1 parent fb24258 commit c56c32b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
11231123
task = await this.initClineWithHistoryItem(historyItem)
11241124
}
11251125
await task.condenseContext()
1126-
await this.postMessageToWebview({ type: "condenseTaskContextResponse" })
1126+
await this.postMessageToWebview({ type: "condenseTaskContextResponse", text: task.taskId })
11271127
}
11281128

11291129
// this function deletes a task from task hidtory, and deletes it's checkpoints and delete the task folder

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
6464
const modeShortcutText = `${isMac ? "⌘" : "Ctrl"} + . ${t("chat:forNextMode")}`
6565
const {
6666
clineMessages: messages,
67+
currentTaskItem,
6768
taskHistory,
6869
apiConfiguration,
6970
mcpServers,
@@ -584,6 +585,9 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
584585
}
585586
break
586587
case "condenseTaskContextResponse":
588+
if (!message.text || message.text !== currentTaskItem?.id) {
589+
return
590+
}
587591
if (isCondensing && sendingDisabled) {
588592
setSendingDisabled(false)
589593
}
@@ -599,6 +603,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
599603
isHidden,
600604
sendingDisabled,
601605
enableButtons,
606+
currentTaskItem,
602607
handleChatReset,
603608
handleSendMessage,
604609
handleSetChatBoxMessage,

0 commit comments

Comments
 (0)