Adjust scheme and authority of URIs in remote terminals

Fixes #208572
This commit is contained in:
Daniel Imms 2024-03-29 06:13:17 -07:00
parent 960217faf7
commit 4df13e9771
No known key found for this signature in database
GPG key ID: E5CF412B63651C69

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 && processManager.remoteAuthority) {
uri = uri.with({
scheme: Schemas.vscodeRemote,
authority: processManager.remoteAuthority
});
}
// Get the link cache
let cache = this._resolvedLinkCaches.get(processManager.remoteAuthority ?? '');
if (!cache) {