diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 1b2c99e2df..5209d946dd 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -876,7 +876,13 @@ return; } - await loadChat(); + const pendingTaskIds = await getTaskIdsByChatId(localStorage.token, $chatId) + .then((res) => res?.task_ids ?? []) + .catch(() => null); + + if (pendingTaskIds?.length === 0) { + await loadChat(); + } }; onMount(() => {