Skip to content

Commit 8451f05

Browse files
committed
fix: preserve chat controls on chat remount
1 parent 9997b75 commit 8451f05

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/lib/components/chat/Chat.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,10 +2837,11 @@
28372837
}
28382838
};
28392839
2840+
28402841
const saveControls = async () => {
2841-
if (!$chatId || $temporaryChatEnabled) return;
2842-
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch(
2843-
(err) => console.error('[controls autosave]', err)
2842+
if (loading || -60chatId || $temporaryChatEnabled) return;
2843+
await updateChatById(localStorage.token, $chatId, { params, files: chatFiles }).catch((err) =>
2844+
console.error("[controls autosave]", err)
28442845
);
28452846
};
28462847

0 commit comments

Comments
 (0)