From 6a0c5359057860f82d6dccea4a79cb26c35c157e Mon Sep 17 00:00:00 2001 From: Anton Kosyakov Date: Wed, 4 Aug 2021 08:37:21 +0000 Subject: [PATCH] =?UTF-8?q?[vscode-ext-api]=C2=A0fix=20#111371:=20expose?= =?UTF-8?q?=20remote=20authority?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vs/vscode.d.ts | 11 +++++++++++ src/vs/workbench/api/common/extHost.api.impl.ts | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 4c57fa7fcc08c..1c6b3d9e7447c 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -8235,6 +8235,17 @@ declare module 'vscode' { */ export const remoteName: string | undefined; + /** + * The authority part of the current opened `vscode-remote://` URI. + * Defined by extensions, e.g. `ssh-remote+${host}` for remotes using a secure shell. + * + * *Note* that the value is `undefined` when there is no remote extension host but that the + * value is defined in all extension hosts (local and remote) in case a remote extension host + * exists. Use {@link Extension.extensionKind} to know if + * a specific extension runs remote or not. + */ + export const remoteAuthority: string | undefined; + /** * The detected default shell for the extension host, this is overridden by the * `terminal.integrated.shell` setting for the extension host's platform. Note that in diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index bad876b57ffe6..d48bb45c917f3 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -331,6 +331,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I get remoteName() { return getRemoteName(initData.remote.authority); }, + get remoteAuthority() { + return initData.remote.authority; + }, get uiKind() { return initData.uiKind; }