Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vscode-ext-api] expose remote authority #130090

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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