[ide-mode] Support multi-folder workspaces (#6177)

This commit is contained in:
christine betts
2025-08-14 20:12:57 +00:00
committed by GitHub
parent e06d774996
commit 5c5fc89eb1
7 changed files with 427 additions and 39 deletions

View File

@@ -20,11 +20,13 @@ let log: (message: string) => void = () => {};
function updateWorkspacePath(context: vscode.ExtensionContext) {
const workspaceFolders = vscode.workspace.workspaceFolders;
if (workspaceFolders && workspaceFolders.length === 1) {
const workspaceFolder = workspaceFolders[0];
if (workspaceFolders && workspaceFolders.length > 0) {
const workspacePaths = workspaceFolders
.map((folder) => folder.uri.fsPath)
.join(':');
context.environmentVariableCollection.replace(
IDE_WORKSPACE_PATH_ENV_VAR,
workspaceFolder.uri.fsPath,
workspacePaths,
);
} else {
context.environmentVariableCollection.replace(