Skip to content

Commit

Permalink
[vscode-ext-api] fix microsoft#111371: expose remote authority
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov committed Aug 4, 2021
1 parent f944203 commit 6a0c535
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/vs/workbench/api/common/extHost.api.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6a0c535

Please sign in to comment.