From 4df13e9771a749df8417beaf58fcf16f6752e8e8 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri, 29 Mar 2024 06:13:17 -0700 Subject: [PATCH] Adjust scheme and authority of URIs in remote terminals Fixes #208572 --- .../terminalContrib/links/browser/terminalLinkResolver.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkResolver.ts b/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkResolver.ts index 6090c628f8a..4739592fc0d 100644 --- a/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkResolver.ts +++ b/src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkResolver.ts @@ -25,6 +25,14 @@ export class TerminalLinkResolver implements ITerminalLinkResolver { } async resolveLink(processManager: Pick & { backend?: Pick }, link: string, uri?: URI): Promise { + // 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) {