Don't revive URI before sending from ext to main

Fixes #235331
This commit is contained in:
Daniel Imms
2025-06-12 12:58:58 -07:00
parent 086501e7d7
commit 2f7cd441c0
2 changed files with 8 additions and 8 deletions
@@ -148,13 +148,13 @@ export async function activate(context: vscode.ExtensionContext) {
}
if (terminal.shellIntegration?.cwd && (result.filesRequested || result.foldersRequested)) {
let cwd;
if (vscode.env.remoteName) {
cwd = vscode.Uri.file((result.cwd ?? terminal.shellIntegration.cwd).path).with({ authority: vscode.env.remoteName, scheme: 'vscode-remote' });
} else {
cwd = vscode.Uri.file((result.cwd ?? terminal.shellIntegration.cwd).fsPath);
}
return new vscode.TerminalCompletionList(result.items, { filesRequested: result.filesRequested, foldersRequested: result.foldersRequested, fileExtensions: result.fileExtensions, cwd, env: terminal.shellIntegration?.env?.value, });
return new vscode.TerminalCompletionList(result.items, {
filesRequested: result.filesRequested,
foldersRequested: result.foldersRequested,
fileExtensions: result.fileExtensions,
cwd: result.cwd ?? terminal.shellIntegration.cwd,
env: terminal.shellIntegration?.env?.value,
});
}
return result.items;
}
@@ -3205,7 +3205,7 @@ export namespace TerminalResourceRequestConfig {
return {
...resourceRequestConfig,
pathSeparator,
cwd: resourceRequestConfig.cwd ? URI.revive(resourceRequestConfig.cwd) : undefined,
cwd: resourceRequestConfig.cwd,
};
}
}