From 96c1cfca6e255da8dedeae710671353bffb27992 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sun, 1 Nov 2026 01:06:33 +0100 Subject: [PATCH] fix: Temporary Chat toggle on a folder page drops the folder (#33456) Turning Temporary Chat on or off on a folder's page, with the button at the top or with /temporary, sent you to the home page. The next chat was then not saved in the folder and did not get the folder's system prompt, default model or knowledge. You now stay on the folder page and only Temporary Chat switches. Fixes #33448 --- src/lib/components/chat/MessageInput.svelte | 2 +- src/lib/components/chat/Navbar.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index eaac2b59e0..948dcc87b0 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -608,7 +608,7 @@ await temporaryChatEnabled.set(!$temporaryChatEnabled); } - if (location.pathname !== '/') { + if (location.pathname !== '/' && !location.pathname.startsWith('/folders/')) { await goto('/'); } diff --git a/src/lib/components/chat/Navbar.svelte b/src/lib/components/chat/Navbar.svelte index 7ed4518f42..c37cb512f7 100644 --- a/src/lib/components/chat/Navbar.svelte +++ b/src/lib/components/chat/Navbar.svelte @@ -280,7 +280,7 @@ await temporaryChatEnabled.set(!$temporaryChatEnabled); } - if ($page.url.pathname !== '/') { + if ($page.url.pathname !== '/' && !$page.url.pathname.startsWith('/folders/')) { await goto('/'); }