From 05f284d4a60ab1f66c091bb34b59fb3e708e0cf8 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Fri, 16 May 2025 23:41:51 +0400 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 5 ----- src/routes/(app)/+layout.svelte | 9 +++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index e1a30ea8e..e47a9fd19 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -224,11 +224,6 @@ if (selectedModels.length !== 1 && !atSelectedModel) { selectedFilterIds = []; } - - const model = atSelectedModel ?? $models.find((m) => m.id === selectedModels[0]); - if (model) { - selectedFilterIds = model?.info?.meta?.filterIds ?? []; - } }; const showMessage = async (message) => { diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index a09afd4ce..58dabbc68 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -77,6 +77,15 @@ // IndexedDB Not Found } + const chatInputKeys = Object.keys(localStorage).filter((key) => + key.startsWith('chat-input-') + ); + if (chatInputKeys.length > 0) { + chatInputKeys.forEach((key) => { + localStorage.removeItem(key); + }); + } + const userSettings = await getUserSettings(localStorage.token).catch((error) => { console.error(error); return null;