diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts index 2f7eb0bc07a..d5d02b4de2e 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -91,6 +91,7 @@ import { AudioCue, IAudioCueService, Sound } from 'vs/platform/audioCues/browser import { LogService } from 'vs/platform/log/common/logService'; import { getEditorFeatures } from 'vs/editor/common/editorFeatures'; import { onUnexpectedError } from 'vs/base/common/errors'; +import { ExtensionKind, IEnvironmentService, IExtensionHostDebugParams } from 'vs/platform/environment/common/environment'; class SimpleModel implements IResolvedTextEditorModel { @@ -201,6 +202,39 @@ class StandaloneProgressService implements IProgressService { } } +class StandaloneEnvironmentService implements IEnvironmentService { + + declare readonly _serviceBrand: undefined; + + readonly stateResource: URI = URI.from({ scheme: 'monaco', authority: 'stateResource' }); + readonly userRoamingDataHome: URI = URI.from({ scheme: 'monaco', authority: 'userRoamingDataHome' }); + readonly keyboardLayoutResource: URI = URI.from({ scheme: 'monaco', authority: 'keyboardLayoutResource' }); + readonly argvResource: URI = URI.from({ scheme: 'monaco', authority: 'argvResource' }); + readonly untitledWorkspacesHome: URI = URI.from({ scheme: 'monaco', authority: 'untitledWorkspacesHome' }); + readonly workspaceStorageHome: URI = URI.from({ scheme: 'monaco', authority: 'workspaceStorageHome' }); + readonly localHistoryHome: URI = URI.from({ scheme: 'monaco', authority: 'localHistoryHome' }); + readonly cacheHome: URI = URI.from({ scheme: 'monaco', authority: 'cacheHome' }); + readonly userDataSyncHome: URI = URI.from({ scheme: 'monaco', authority: 'userDataSyncHome' }); + readonly sync: 'on' | 'off' | undefined = undefined; + readonly continueOn?: string | undefined = undefined; + readonly editSessionId?: string | undefined = undefined; + readonly debugExtensionHost: IExtensionHostDebugParams = { port: null, break: false }; + readonly isExtensionDevelopment: boolean = false; + readonly disableExtensions: boolean | string[] = false; + readonly enableExtensions?: readonly string[] | undefined = undefined; + readonly extensionDevelopmentLocationURI?: URI[] | undefined = undefined; + readonly extensionDevelopmentKind?: ExtensionKind[] | undefined = undefined; + readonly extensionTestsLocationURI?: URI | undefined = undefined; + readonly logsHome: URI = URI.from({ scheme: 'monaco', authority: 'logsHome' }); + readonly logLevel?: string | undefined = undefined; + readonly extensionLogLevel?: [string, string][] | undefined = undefined; + readonly verbose: boolean = false; + readonly isBuilt: boolean = false; + readonly disableTelemetry: boolean = false; + readonly serviceMachineIdResource: URI = URI.from({ scheme: 'monaco', authority: 'serviceMachineIdResource' }); + readonly policyFile?: URI | undefined = undefined; +} + class StandaloneDialogService implements IDialogService { _serviceBrand: undefined; @@ -1029,6 +1063,7 @@ registerSingleton(IWorkspaceContextService, StandaloneWorkspaceContextService, I registerSingleton(ILabelService, StandaloneUriLabelService, InstantiationType.Eager); registerSingleton(ITelemetryService, StandaloneTelemetryService, InstantiationType.Eager); registerSingleton(IDialogService, StandaloneDialogService, InstantiationType.Eager); +registerSingleton(IEnvironmentService, StandaloneEnvironmentService, InstantiationType.Eager); registerSingleton(INotificationService, StandaloneNotificationService, InstantiationType.Eager); registerSingleton(IMarkerService, MarkerService, InstantiationType.Eager); registerSingleton(ILanguageService, StandaloneLanguageService, InstantiationType.Eager);