Compare commits

...

1 Commits

Author SHA1 Message Date
Jiayuan
771203edc1 fix(chat): invalidate workspace pending tasks cache on manual stop
When user manually stops a chat, only the per-session pending task cache
was cleared. The sidebar reads the workspace-level aggregate pending
tasks query, which remained stale — causing the loading spinner to keep
spinning. Now invalidate the aggregate cache too.

Closes MUL-1384
2026-04-24 16:57:43 +08:00

View File

@@ -179,7 +179,10 @@ export function ChatPage() {
qc.setQueryData(chatKeys.pendingTask(activeSessionId), {});
qc.invalidateQueries({ queryKey: chatKeys.messages(activeSessionId) });
}
}, [pendingTaskId, activeSessionId, qc]);
if (wsId) {
qc.invalidateQueries({ queryKey: chatKeys.pendingTasks(wsId) });
}
}, [pendingTaskId, activeSessionId, wsId, qc]);
const handleSelectAgent = useCallback(
(agent: Agent) => {