From b7ff3af445a2ae17c62b4157d87211545ff8ff26 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 14 Dec 2023 17:29:08 -0800 Subject: [PATCH] fix: new chat settings issue --- src/routes/(app)/+page.svelte | 1 - src/routes/(app)/c/[id]/+page.svelte | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index 5d4291d7..c1d3035d 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -84,7 +84,6 @@ let _settings = JSON.parse(localStorage.getItem('settings') ?? '{}'); console.log(_settings); settings.set({ - ...$settings, ..._settings }); }; diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index b164a4b4..873ed1b8 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -82,10 +82,11 @@ : convertMessagesToHistory(chat.messages); title = chat.title; + let _settings = JSON.parse(localStorage.getItem('settings') ?? '{}'); await settings.set({ - ...$settings, - system: chat.system ?? $settings.system, - options: chat.options ?? $settings.options + ..._settings, + system: chat.system ?? _settings.system, + options: chat.options ?? _settings.options }); autoScroll = true;