From a253bf0c3261e6c79ef7fc8dbc5bc9fea24d2025 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Wed, 9 Sep 2026 12:30:32 -0400 Subject: [PATCH] fix: drop tool IDs from the tools and tool-ids URL parameters that do not match a known tool (#29803) --- src/lib/components/chat/Chat.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index f396fc6e56..edaa51c8fa 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2160,13 +2160,13 @@ .get('tools') ?.split(',') .map((id) => id.trim()) - .filter((id) => id); + .filter((id) => id && ($tools ?? []).find((t) => t.id === id)); } else if ($page.url.searchParams.get('tool-ids')) { selectedToolIds = $page.url.searchParams .get('tool-ids') ?.split(',') .map((id) => id.trim()) - .filter((id) => id); + .filter((id) => id && ($tools ?? []).find((t) => t.id === id)); } // Restore tool selection after OAuth redirect