diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 8010b442641..953cfb92259 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4674,6 +4674,23 @@ declare module 'vscode' { dispose(): void; } + /** + * In a remote window the extension kind describes if an extension + * runs where the UI (window) runs or if an extension runs remotely. + */ + export enum ExtensionKind { + + /** + * Extension runs where the UI runs. + */ + UI = 1, + + /** + * Extension runs where the remote extension host runs. + */ + Workspace = 2 + } + /** * Represents an extension. * @@ -4701,6 +4718,15 @@ declare module 'vscode' { */ readonly packageJSON: any; + /** + * The extension kind describes if an extension runs where the UI runs + * or if an extension runs where the remote extension host runs. The extension kind + * if defined in the `package.json` file of extensions but can also be refined + * via the the `remote.extensionKind`-setting. When no remote extension host exists, + * the value is [`ExtensionKind.UI`](#ExtensionKind.UI). + */ + extensionKind: ExtensionKind; + /** * The public API exported by this extension. It is an invalid action * to access this field before this extension has been activated. @@ -6042,6 +6068,17 @@ declare module 'vscode' { */ export const sessionId: string; + /** + * The name of a remote. Defined by extensions, popular samples are `wsl` for the Windows + * Subsystem for Linux or `ssh-remote` 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 [`Extension#extensionKind`](#Extension.extensionKind) to know if + * a specific extension runs remote or not. + */ + export const remoteName: string | undefined; + /** * Opens an *external* item, e.g. a http(s) or mailto-link, using the * default application. diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 272d73f6709..86d4ae370b6 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -27,53 +27,6 @@ declare module 'vscode' { } //#endregion - //#region Joh - ExtensionKind, vscode.env.remoteKind - - /** - * In a remote window the extension kind describes if an extension - * runs where the UI (window) runs or if an extension runs remotely. - */ - export enum ExtensionKind { - - /** - * Extension runs where the UI runs. - */ - UI = 1, - - /** - * Extension runs where the remote extension host runs. - */ - Workspace = 2 - } - - export interface Extension { - - /** - * The extension kind describes if an extension runs where the UI runs - * or if an extension runs where the remote extension host runs. The extension kind - * if defined in the `package.json` file of extensions but can also be refined - * via the the `remote.extensionKind`-setting. When no remote extension host exists, - * the value is [`ExtensionKind.UI`](#ExtensionKind.UI). - */ - extensionKind: ExtensionKind; - } - - export namespace env { - /** - * The name of a remote. Defined by extensions, popular samples are `wsl` for the Windows - * Subsystem for Linux or `ssh-remote` 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 [`Extension#extensionKind`](#Extension.extensionKind) to know if - * a specific extension runs remote or not. - */ - export const remoteName: string | undefined; - } - - //#endregion - - //#region Joh - call hierarchy export enum CallHierarchyDirection { diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 104c034e3ff..9cff724bc75 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -267,7 +267,6 @@ export function createApiFactory( return initData.environment.webviewResourceRoot; }, get remoteName() { - checkProposedApiEnabled(extension); if (!initData.remote.authority) { return undefined; }