From 6ac7d11a3faa1c01ea641c8a6815107ba290230e Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 16 Nov 2026 18:39:47 +0100 Subject: [PATCH] fix: Refresh in Files keeps the old list when the terminal cannot list the folder (#34551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the terminal refused to list the open folder, for example after its API key changed, pressing Refresh above the Files list kept the old entries on screen and said nothing. Refresh now clears the list and any ticked items and shows "Failed to load directory. Check your Terminal connection in Settings → Integrations.", the same as opening the folder does, and the next Refresh lists the folder again once the terminal answers. The list also reads itself again after a sort change, showing hidden files, a file change or a change on the terminal, and those reads show the same message when they fail. Fixes #34550 --- src/lib/components/chat/FileNav.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/components/chat/FileNav.svelte b/src/lib/components/chat/FileNav.svelte index 6ced1848db..6c60dd9a84 100644 --- a/src/lib/components/chat/FileNav.svelte +++ b/src/lib/components/chat/FileNav.svelte @@ -1282,6 +1282,11 @@ error = null; currentWritable = listings[0].writable !== false; entries = normalizeEntries(listings[0].entries); + } else { + error = + 'Failed to load directory. Check your Terminal connection in Settings → Integrations.'; + entries = []; + clearSelection(); } const cache = new Map(treeCache); paths.forEach(