From 878c90eaaa493f47bd67de84c80cb73e374d29ef Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 5 Oct 2026 09:15:42 +0200 Subject: [PATCH] fix: terminal and file browser jump back to the top folder after every command (#31878) The terminal runs commands in whatever folder the file browser panel is showing. When the file browser is limited to a top folder (OPEN_TERMINAL_FILE_BROWSER_ROOT, set to the home folder by default), every time the agent ran a command in the terminal the panel jumped back to that top folder and closed the open file, so the next command ran there too. Now the panel stays in the folder you picked and just reloads its contents after each command, keeping the open file in view. Fixes #30051 --- src/lib/components/chat/FileNav.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/components/chat/FileNav.svelte b/src/lib/components/chat/FileNav.svelte index e2d9aed0af..a81c3a3785 100644 --- a/src/lib/components/chat/FileNav.svelte +++ b/src/lib/components/chat/FileNav.svelte @@ -1441,8 +1441,7 @@ showFileNavDir.set(null); filePath = normalizePath(filePath); if (!isInsideFileRoot(filePath)) { - await loadDir(fileRoot?.path ?? '/'); - return; + filePath = fileRoot?.path ?? '/'; } const lastSlash = filePath.lastIndexOf('/');