From ce4973becb904d491d775c21ea30a702cb6ee9a2 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 28 Oct 2023 20:18:48 -0700 Subject: [PATCH] fix: unfinished chat load error --- src/routes/+page.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 396c259f9..42e08c384 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -236,6 +236,9 @@ const loadChat = async (id) => { const chat = await db.get('chats', id); if (chatId !== chat.id) { + if (chat.messages.length > 0) { + chat.messages.at(-1).done = true; + } messages = chat.messages; title = chat.title; chatId = chat.id;