提交 e35db87c 编写于 作者: J Johannes Rieken

move API to stable, #74188

上级 0de5cef5
......@@ -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.
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册