Merge pull request #209103 from microsoft/tyriar/208572

Adjust scheme and authority of URIs in remote terminals
This commit is contained in:
Daniel Imms 2024-03-29 07:08:55 -07:00 committed by GitHub
commit 1a2b9b528c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,14 @@ export class TerminalLinkResolver implements ITerminalLinkResolver {
}
async resolveLink(processManager: Pick<ITerminalProcessManager, 'initialCwd' | 'os' | 'remoteAuthority' | 'userHome'> & { backend?: Pick<ITerminalBackend, 'getWslPath'> }, link: string, uri?: URI): Promise<ResolvedLink> {
// Correct scheme and authority for remote terminals
if (uri && uri.scheme === Schemas.file && processManager.remoteAuthority) {
uri = uri.with({
scheme: Schemas.vscodeRemote,
authority: processManager.remoteAuthority
});
}
// Get the link cache
let cache = this._resolvedLinkCaches.get(processManager.remoteAuthority ?? '');
if (!cache) {