Browse Source

enh: enable tools with url search param

Timothy J. Baek 9 tháng trước cách đây
mục cha
commit
67efd0dd39
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      src/lib/components/chat/Chat.svelte

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

@@ -282,6 +282,10 @@
 
 		if ($page.url.searchParams.get('q')) {
 			prompt = $page.url.searchParams.get('q') ?? '';
+			selectedToolIds = ($page.url.searchParams.get('tool_ids') ?? '')
+				.split(',')
+				.map((id) => id.trim())
+				.filter((id) => id);
 
 			if (prompt) {
 				await tick();