From 40df1542ce3e526288310513420ede232e1d3e3c Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 12 Oct 2026 09:57:30 +0200 Subject: [PATCH] fix: tools picked in a new chat are dropped after switching away and back (#32235) A tool picked from the Integrations menu before the first message of a new chat stayed on only until the user left that chat. Coming back, the chat fell back to the model's default tools, so the tool was no longer offered to the model and the changed tool list broke prompt caching. The Web Search toggle was dropped the same way, and a picked skill was lost on reload. The picks are now kept for the chat from its first message on, like picks made later in the chat. --- src/lib/components/chat/Chat.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 31ec1cc15d..8e179f98bd 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -4243,6 +4243,8 @@ }); await chatId.set(res.chat_id); if (!$temporaryChatEnabled && !embedded) { + // Carry the picks made on the new-chat page over to this chat + saveDraft(getChatInputDraft(), res.chat_id, false); window.history.replaceState(window.history.state, '', `/c/${res.chat_id}`); await refreshChatList(localStorage.token); @@ -4505,6 +4507,7 @@ await chatId.set(_chatId); if (!embedded) { + saveDraft(getChatInputDraft(), _chatId, false); window.history.replaceState(window.history.state, '', `/c/${_chatId}`); }