From bc62ecfef5519c3dd1ddd4b49cd80fbbc2a0dce5 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 4 Dec 2025 18:05:28 -0800 Subject: [PATCH] fix #281147 (#2418) --- .../vscode-node/copilotCLIChatSessionsContribution.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts b/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts index 2079c18c0ac..de5513dbcda 100644 --- a/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts +++ b/extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts @@ -347,8 +347,13 @@ export class CopilotCLIChatSessionContentProvider extends Disposable implements const worktreeRelativePath = this.worktreeManager.getWorktreeRelativePath(copilotcliSessionId); if (worktreeRelativePath) { options[ISOLATION_OPTION_ID] = getLockedIsolationOption(worktreeRelativePath); + } else { + options[ISOLATION_OPTION_ID] = disabledIsolationLocked; } + } else if (existingSession) { + options[ISOLATION_OPTION_ID] = disabledIsolationLocked; } + const history = existingSession?.object?.getChatHistory() || []; existingSession?.dispose(); // Always keep track of this in memory.