From b3591e60b18bf2cdc57a57c215f70065882dbf60 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Fri, 28 Aug 2026 01:24:19 +0200 Subject: [PATCH] fix: apply the selected model's tools and skills when starting a chat from the sidebar (#29058) Clicking a pinned model in the sidebar started a new chat with that model but sent the previous model's tool_ids and skill_ids, and they stayed until the page was reloaded. The model dropdown was unaffected, and so was temporary chat. A pinned entry links to /?model=, which runs the new-chat path. That path applied the model's defaults and then restored the composer draft over the top, and the draft still held the selection from whichever model was active when it was written. The draft save is debounced, so the stale value was reliably the one read back. The draft is now restored before the defaults are applied, so the model always decides which tools and skills are active while the unsent prompt, files and approval mode are still kept. Starting a new chat with several models selected now clears the selection instead of carrying the draft's over, since there are no per-model defaults to apply in that case. Co-authored-by: Claude --- src/lib/components/chat/Chat.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 9aa7ad720b..a58f53d3ff 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2113,8 +2113,9 @@ autoScroll = true; - await resetInput(); + // resetInput() must stay last: the selected model's defaults override the draft's selection. await restoreChatInput(sessionStorage.getItem('chat-input')); + await resetInput(); await chatId.set(''); await chatTitle.set('');