parent
664201582e
commit
d18e54f820
6 changed files with 16 additions and 0 deletions
11
src/vs/vscode.proposed.d.ts
vendored
11
src/vs/vscode.proposed.d.ts
vendored
|
@ -2754,4 +2754,15 @@ 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
|
||||
}
|
||||
|
|
|
@ -292,6 +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 uriScheme() { return initData.environment.appUriScheme; },
|
||||
get clipboard(): vscode.Clipboard { return extHostClipboard.value; },
|
||||
get shell() {
|
||||
|
|
|
@ -72,6 +72,7 @@ import { ILanguageStatus } from 'vs/editor/common/services/languageStatusService
|
|||
export interface IEnvironment {
|
||||
isExtensionDevelopmentDebug: boolean;
|
||||
appName: string;
|
||||
embedderIdentifier: string;
|
||||
appRoot?: URI;
|
||||
appLanguage: string;
|
||||
appUriScheme: string;
|
||||
|
|
|
@ -375,6 +375,7 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost
|
|||
environment: {
|
||||
isExtensionDevelopmentDebug: this._environmentService.debugRenderer,
|
||||
appName: this._productService.nameLong,
|
||||
embedderIdentifier: this._productService.embedderIdentifier || 'web',
|
||||
appUriScheme: this._productService.urlProtocol,
|
||||
appLanguage: platform.language,
|
||||
extensionDevelopmentLocationURI: this._environmentService.extensionDevelopmentLocationURI,
|
||||
|
|
|
@ -230,6 +230,7 @@ export class RemoteExtensionHost extends Disposable implements IExtensionHost {
|
|||
isExtensionDevelopmentDebug,
|
||||
appRoot: remoteInitData.appRoot,
|
||||
appName: this._productService.nameLong,
|
||||
embedderIdentifier: this._productService.embedderIdentifier || 'desktop',
|
||||
appUriScheme: this._productService.urlProtocol,
|
||||
appLanguage: platform.language,
|
||||
extensionDevelopmentLocationURI: this._environmentService.extensionDevelopmentLocationURI,
|
||||
|
|
|
@ -470,6 +470,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',
|
||||
appUriScheme: this._productService.urlProtocol,
|
||||
appLanguage: platform.language,
|
||||
extensionDevelopmentLocationURI: this._environmentService.extensionDevelopmentLocationURI,
|
||||
|
|
Loading…
Reference in a new issue