From f317aa1359013797ab275c9f73bc720d72115298 Mon Sep 17 00:00:00 2001 From: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com> Date: Fri, 16 Jan 2026 12:27:10 +0100 Subject: [PATCH] Chat - background sessions should not use the editing sessions file list --- .../contrib/chat/browser/widget/input/chatInputPart.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts b/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts index c170b7da1a58f..b4c5502a75930 100644 --- a/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts +++ b/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts @@ -2302,6 +2302,12 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge } const modifiedEntries = derivedOpts({ equalsFn: arraysEqual }, r => { + // Background chat sessions render the working set based on the session files, and not the editing session + const sessionResource = chatEditingSession?.chatSessionResource ?? this._widget?.viewModel?.model.sessionResource; + if (sessionResource && getChatSessionType(sessionResource) !== localChatSessionType) { + return []; + } + return chatEditingSession?.entries.read(r).filter(entry => entry.state.read(r) === ModifiedFileEntryState.Modified) || []; });