From aa851d93c63e7da6e94292d0b7586674339d47e5 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 29 Jun 2026 05:18:12 -0500 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(() => {