This commit is contained in:
Logan Ramos 2021-08-23 15:08:33 -04:00
parent eaa6f56c52
commit 2da60a8a4a
No known key found for this signature in database
GPG key ID: D9CCFF14F0B18183
7 changed files with 10 additions and 16 deletions

5
src/vs/vscode.d.ts vendored
View file

@ -8191,6 +8191,11 @@ declare module 'vscode' {
*/
export const appRoot: string;
/**
* The environment in which the app is hosted in. i.e. 'desktop', 'codespaces', 'web'.
*/
export const appHost: string;
/**
* The custom uri scheme the editor registers to in the operating system.
*/

View file

@ -2889,17 +2889,6 @@ declare module 'vscode' {
//#endregion
//#region https://github.com/microsoft/vscode/issues/129053
export namespace env {
/**
* The environment in which the app is embedded in. i.e. 'desktop', 'codespaces', 'web'.
*/
export const embedderIdentifier: string;
}
//#endregion
//#region https://github.com/microsoft/vscode/issues/88716
export interface QuickPickItem {
buttons?: QuickInputButton[];

View file

@ -292,7 +292,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
get language() { return initData.environment.appLanguage; },
get appName() { return initData.environment.appName; },
get appRoot() { return initData.environment.appRoot?.fsPath ?? ''; },
get embedderIdentifier() { return initData.environment.embedderIdentifier; },
get appHost() { return initData.environment.appHost; },
get uriScheme() { return initData.environment.appUriScheme; },
get clipboard(): vscode.Clipboard { return extHostClipboard.value; },
get shell() {

View file

@ -72,7 +72,7 @@ import * as search from 'vs/workbench/services/search/common/search';
export interface IEnvironment {
isExtensionDevelopmentDebug: boolean;
appName: string;
embedderIdentifier: string;
appHost: string;
appRoot?: URI;
appLanguage: string;
appUriScheme: string;

View file

@ -383,7 +383,7 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost
environment: {
isExtensionDevelopmentDebug: this._environmentService.debugRenderer,
appName: this._productService.nameLong,
embedderIdentifier: this._productService.embedderIdentifier || 'web',
appHost: this._productService.embedderIdentifier || 'web',
appUriScheme: this._productService.urlProtocol,
appLanguage: platform.language,
extensionDevelopmentLocationURI: this._environmentService.extensionDevelopmentLocationURI,

View file

@ -231,7 +231,7 @@ export class RemoteExtensionHost extends Disposable implements IExtensionHost {
isExtensionDevelopmentDebug,
appRoot: remoteInitData.appRoot,
appName: this._productService.nameLong,
embedderIdentifier: this._productService.embedderIdentifier || 'desktop',
appHost: this._productService.embedderIdentifier || 'desktop',
appUriScheme: this._productService.urlProtocol,
appLanguage: platform.language,
extensionDevelopmentLocationURI: this._environmentService.extensionDevelopmentLocationURI,

View file

@ -471,7 +471,7 @@ export class LocalProcessExtensionHost implements IExtensionHost {
isExtensionDevelopmentDebug: this._isExtensionDevDebug,
appRoot: this._environmentService.appRoot ? URI.file(this._environmentService.appRoot) : undefined,
appName: this._productService.nameLong,
embedderIdentifier: this._productService.embedderIdentifier || 'desktop',
appHost: this._productService.embedderIdentifier || 'desktop',
appUriScheme: this._productService.urlProtocol,
appLanguage: platform.language,
extensionDevelopmentLocationURI: this._environmentService.extensionDevelopmentLocationURI,