Browse Source

enh: submit searchParam

Timothy Jaeryang Baek 3 tháng trước cách đây
mục cha
commit
1b237c7f60
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  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);
+				}
 			}
 		}