From 0f2ee1f669f1e3219be9f8764aafb34208f1f586 Mon Sep 17 00:00:00 2001 From: Joyce Er Date: Fri, 20 Dec 2024 10:29:11 -0800 Subject: [PATCH] fix: promote suggested file to working set when opened (#236737) --- .../contrib/chat/browser/chatEditing/chatEditingSession.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts b/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts index 31e9a672a13..8552946891f 100644 --- a/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts +++ b/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts @@ -265,8 +265,8 @@ export class ChatEditingSession extends Disposable implements IChatEditingSessio } if (existingTransientEntries.has(uri)) { existingTransientEntries.delete(uri); - } else if (!this._workingSet.has(uri) && !this._removedTransientEntries.has(uri)) { - // Don't add as a transient entry if it's already part of the working set + } else if ((!this._workingSet.has(uri) || this._workingSet.get(uri)?.state === WorkingSetEntryState.Suggested) && !this._removedTransientEntries.has(uri)) { + // Don't add as a transient entry if it's already a confirmed part of the working set // or if the user has intentionally removed it from the working set activeEditors.add(uri); }