This commit is contained in:
Timothy Jaeryang Baek
2026-06-29 12:12:23 -05:00
parent d6cda4a04b
commit 2856def6c0

View File

@@ -1591,9 +1591,13 @@
// Reconcile active tasks with message state:
// If the response is already done, remaining tasks are just background
// work (follow-ups, title gen) that shouldn't block the input.
const activeTaskIds = taskIds;
const pendingTaskIds = await getTaskIdsByChatId(localStorage.token, $chatId)
.then((res) => res?.task_ids ?? [])
.catch(() => []);
if (taskIds !== activeTaskIds) {
return;
}
const currentMessage = history.currentId ? history.messages[history.currentId] : null;
const responseComplete = currentMessage?.role === 'assistant' && currentMessage?.done;