Browse Source

fix: new chat settings issue

Timothy J. Baek 1 year ago
parent
commit
b7ff3af445
2 changed files with 4 additions and 4 deletions
  1. 0 1
      src/routes/(app)/+page.svelte
  2. 4 3
      src/routes/(app)/c/[id]/+page.svelte

+ 0 - 1
src/routes/(app)/+page.svelte

@@ -84,7 +84,6 @@
 		let _settings = JSON.parse(localStorage.getItem('settings') ?? '{}');
 		console.log(_settings);
 		settings.set({
-			...$settings,
 			..._settings
 		});
 	};

+ 4 - 3
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;