Browse Source

enh: submit searchParam

Timothy Jaeryang Baek 3 months ago
parent
commit
1b237c7f60
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/lib/components/chat/Chat.svelte

+ 4 - 2
src/lib/components/chat/Chat.svelte

@@ -836,8 +836,10 @@
 			prompt = $page.url.searchParams.get('q') ?? '';
 
 			if (prompt) {
-				await tick();
-				submitPrompt(prompt);
+				if (($page.url.searchParams.get('submit') ?? 'true') === 'true') {
+					await tick();
+					submitPrompt(prompt);
+				}
 			}
 		}