This commit is contained in:
puzhen 2025-10-22 22:43:15 +01:00
parent b22fda4d18
commit 0b243a18eb
2 changed files with 6 additions and 5 deletions

View file

@ -333,14 +333,15 @@ export function TaskCard({
if (task.agent) {
// Switch to the chatStore that owns this task card (for multi-turn conversations)
if (chatId && projectStore.activeProjectId) {
const activeProjectId = projectStore.activeProjectId;
const activeChatStore = projectStore.getActiveChatStore();
const currentChatId = activeChatStore ? Object.keys(projectStore.projects[projectStore.activeProjectId].chatStores).find(
id => projectStore.projects[projectStore.activeProjectId].chatStores[id] === activeChatStore
const currentChatId = activeChatStore ? Object.keys(projectStore.projects[activeProjectId].chatStores).find(
id => projectStore.projects[activeProjectId].chatStores[id] === activeChatStore
) : null;
// Only switch if this is a different chat
if (currentChatId !== chatId) {
projectStore.setActiveChatStore(projectStore.activeProjectId, chatId);
projectStore.setActiveChatStore(activeProjectId, chatId);
}
}

View file

@ -272,7 +272,7 @@ export default function Browser() {
</Button>
{cookieDomains.length > 0 && (
<Button
variant="destructive"
variant="warning"
size="sm"
onClick={handleDeleteAll}
disabled={deletingAll}