move API to stable, #74188
This commit is contained in:
parent
0de5cef5c7
commit
e35db87ce7
3 changed files with 37 additions and 48 deletions
37
src/vs/vscode.d.ts
vendored
37
src/vs/vscode.d.ts
vendored
|
@ -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.
|
||||
|
|
47
src/vs/vscode.proposed.d.ts
vendored
47
src/vs/vscode.proposed.d.ts
vendored
|
@ -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<T> {
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
|
|
|
@ -267,7 +267,6 @@ export function createApiFactory(
|
|||
return initData.environment.webviewResourceRoot;
|
||||
},
|
||||
get remoteName() {
|
||||
checkProposedApiEnabled(extension);
|
||||
if (!initData.remote.authority) {
|
||||
return undefined;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue