From 67efd0dd39cd846acb34c7565d007848a42e7f49 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 2 Aug 2024 18:32:51 +0200 Subject: [PATCH] enh: enable tools with url search param --- src/lib/components/chat/Chat.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 53e3b2721..78a22010e 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/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();