mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-25 00:44:05 +01:00
API: Finalize env.uiKind (fixes #82883)
This commit is contained in:
Vendored
+23
@@ -6177,6 +6177,22 @@ declare module 'vscode' {
|
||||
writeText(value: string): Thenable<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Possible kinds of UI that can use extensions.
|
||||
*/
|
||||
export enum UIKind {
|
||||
|
||||
/**
|
||||
* Extensions are accessed from a desktop application.
|
||||
*/
|
||||
Desktop = 1,
|
||||
|
||||
/**
|
||||
* Extensions are accessed from a web browser.
|
||||
*/
|
||||
Web = 2
|
||||
}
|
||||
|
||||
/**
|
||||
* Namespace describing the environment the editor runs in.
|
||||
*/
|
||||
@@ -6235,6 +6251,13 @@ declare module 'vscode' {
|
||||
*/
|
||||
export const shell: string;
|
||||
|
||||
/**
|
||||
* The UI kind property indicates from which UI extensions
|
||||
* are accessed from. For example, extensions could be accessed
|
||||
* from a desktop application or a web browser.
|
||||
*/
|
||||
export const uiKind: UIKind;
|
||||
|
||||
/**
|
||||
* Opens an *external* item, e.g. a http(s) or mailto-link, using the
|
||||
* default application.
|
||||
|
||||
Vendored
-30
@@ -1039,36 +1039,6 @@ declare module 'vscode' {
|
||||
|
||||
//#endregion
|
||||
|
||||
// #region Ben - UIKind
|
||||
|
||||
/**
|
||||
* Possible kinds of UI that can use extensions.
|
||||
*/
|
||||
export enum UIKind {
|
||||
|
||||
/**
|
||||
* Extensions are accessed from a desktop application.
|
||||
*/
|
||||
Desktop = 1,
|
||||
|
||||
/**
|
||||
* Extensions are accessed from a web browser.
|
||||
*/
|
||||
Web = 2
|
||||
}
|
||||
|
||||
export namespace env {
|
||||
|
||||
/**
|
||||
* The UI kind property indicates from which UI extensions
|
||||
* are accessed from. For example, extensions could be accessed
|
||||
* from a desktop application or a web browser.
|
||||
*/
|
||||
export const uiKind: UIKind;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Custom editors, mjbvz
|
||||
|
||||
export interface WebviewEditor extends WebviewPanel {
|
||||
|
||||
@@ -255,7 +255,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
return getRemoteName(initData.remote.authority);
|
||||
},
|
||||
get uiKind() {
|
||||
checkProposedApiEnabled(extension);
|
||||
return initData.uiKind;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user