diff --git a/demo/package-lock.json b/demo/package-lock.json index a58128c7..6ee956c5 100644 --- a/demo/package-lock.json +++ b/demo/package-lock.json @@ -121,6 +121,9 @@ "@codingame/monaco-vscode-typescript-basics-default-extension": "file:../dist/default-extension-typescript-basics", "@codingame/monaco-vscode-typescript-language-features-default-extension": "file:../dist/default-extension-typescript-language-features", "@codingame/monaco-vscode-vb-default-extension": "file:../dist/default-extension-vb", + "@codingame/monaco-vscode-view-banner-service-override": "file:../dist/service-override-view-banner", + "@codingame/monaco-vscode-view-status-bar-service-override": "file:../dist/service-override-view-status-bar", + "@codingame/monaco-vscode-view-title-bar-service-override": "file:../dist/service-override-view-title-bar", "@codingame/monaco-vscode-views-service-override": "file:../dist/service-override-views", "@codingame/monaco-vscode-vscode-api-tests-default-extension": "file:../dist/default-extension-vscode-api-tests", "@codingame/monaco-vscode-vscode-colorize-tests-default-extension": "file:../dist/default-extension-vscode-colorize-tests", @@ -1161,6 +1164,30 @@ "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" } }, + "../dist/service-override-view-banner": { + "version": "0.0.0-semantic-release", + "license": "MIT", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + } + }, + "../dist/service-override-view-status-bar": { + "version": "0.0.0-semantic-release", + "license": "MIT", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + } + }, + "../dist/service-override-view-title-bar": { + "version": "0.0.0-semantic-release", + "license": "MIT", + "dependencies": { + "monaco-editor": "0.43.0", + "vscode": "npm:@codingame/monaco-vscode-api@^0.0.0-semantic-release" + } + }, "../dist/service-override-views": { "name": "@codingame/monaco-vscode-views-service-override", "version": "0.0.0-semantic-release", @@ -1636,6 +1663,18 @@ "resolved": "../dist/default-extension-vb", "link": true }, + "node_modules/@codingame/monaco-vscode-view-banner-service-override": { + "resolved": "../dist/service-override-view-banner", + "link": true + }, + "node_modules/@codingame/monaco-vscode-view-status-bar-service-override": { + "resolved": "../dist/service-override-view-status-bar", + "link": true + }, + "node_modules/@codingame/monaco-vscode-view-title-bar-service-override": { + "resolved": "../dist/service-override-view-title-bar", + "link": true + }, "node_modules/@codingame/monaco-vscode-views-service-override": { "resolved": "../dist/service-override-views", "link": true diff --git a/demo/package.json b/demo/package.json index cff39417..b1d32a50 100644 --- a/demo/package.json +++ b/demo/package.json @@ -30,7 +30,6 @@ ], "dependencies": { "@codingame/monaco-vscode-accessibility-service-override": "file:../dist/service-override-accessibility", - "@codingame/monaco-vscode-workspace-trust-service-override": "file:../dist/service-override-workspace-trust", "@codingame/monaco-vscode-audio-cue-service-override": "file:../dist/service-override-audio-cue", "@codingame/monaco-vscode-bat-default-extension": "file:../dist/default-extension-bat", "@codingame/monaco-vscode-bulk-edit-service-override": "file:../dist/service-override-bulk-edit", @@ -142,10 +141,14 @@ "@codingame/monaco-vscode-typescript-basics-default-extension": "file:../dist/default-extension-typescript-basics", "@codingame/monaco-vscode-typescript-language-features-default-extension": "file:../dist/default-extension-typescript-language-features", "@codingame/monaco-vscode-vb-default-extension": "file:../dist/default-extension-vb", + "@codingame/monaco-vscode-view-banner-service-override": "file:../dist/service-override-view-banner", + "@codingame/monaco-vscode-view-status-bar-service-override": "file:../dist/service-override-view-status-bar", + "@codingame/monaco-vscode-view-title-bar-service-override": "file:../dist/service-override-view-title-bar", "@codingame/monaco-vscode-views-service-override": "file:../dist/service-override-views", "@codingame/monaco-vscode-vscode-api-tests-default-extension": "file:../dist/default-extension-vscode-api-tests", "@codingame/monaco-vscode-vscode-colorize-tests-default-extension": "file:../dist/default-extension-vscode-colorize-tests", "@codingame/monaco-vscode-vscode-test-resolver-default-extension": "file:../dist/default-extension-vscode-test-resolver", + "@codingame/monaco-vscode-workspace-trust-service-override": "file:../dist/service-override-workspace-trust", "@codingame/monaco-vscode-xml-default-extension": "file:../dist/default-extension-xml", "@codingame/monaco-vscode-yaml-default-extension": "file:../dist/default-extension-yaml", "ansi-colors": "^4.1.3", diff --git a/demo/src/setup.ts b/demo/src/setup.ts index 192297ea..2a21c79d 100644 --- a/demo/src/setup.ts +++ b/demo/src/setup.ts @@ -16,6 +16,9 @@ import getViewsServiceOverride, { isPartVisibile, attachPart } from '@codingame/monaco-vscode-views-service-override' +import getBannerServiceOverride from '@codingame/monaco-vscode-view-banner-service-override' +import getStatusBarServiceOverride from '@codingame/monaco-vscode-view-status-bar-service-override' +import getTitleBarServiceOverride from '@codingame/monaco-vscode-view-title-bar-service-override' import getDebugServiceOverride from '@codingame/monaco-vscode-debug-service-override' import getPreferencesServiceOverride from '@codingame/monaco-vscode-preferences-service-override' import getSnippetServiceOverride from '@codingame/monaco-vscode-snippets-service-override' @@ -82,6 +85,9 @@ await initializeMonacoService({ ...getDebugServiceOverride(), ...getPreferencesServiceOverride(), ...getViewsServiceOverride(openNewCodeEditor), + ...getBannerServiceOverride(), + ...getStatusBarServiceOverride(), + ...getTitleBarServiceOverride(), ...getSnippetServiceOverride(), ...getQuickAccessServiceOverride({ isKeybindingConfigurationVisible: isEditorPartVisible, diff --git a/demo/vite.config.ts b/demo/vite.config.ts index 2355ffaf..4e97cc68 100644 --- a/demo/vite.config.ts +++ b/demo/vite.config.ts @@ -52,7 +52,8 @@ export default defineConfig({ 'vscode', 'vscode/extensions', 'vscode/services', 'vscode/monaco', '@codingame/monaco-vscode-model-service-override', '@codingame/monaco-vscode-editor-service-override', '@codingame/monaco-vscode-extensions-service-override', '@codingame/monaco-vscode-notifications-service-override', '@codingame/monaco-vscode-bulk-edit-service-override', '@codingame/monaco-vscode-dialogs-service-override', '@codingame/monaco-vscode-configuration-service-override', '@codingame/monaco-vscode-keybindings-service-override', '@codingame/monaco-vscode-textmate-service-override', '@codingame/monaco-vscode-theme-service-override', '@codingame/monaco-vscode-languages-service-override', - '@codingame/monaco-vscode-audio-cue-service-override', '@codingame/monaco-vscode-views-service-override', '@codingame/monaco-vscode-quickaccess-service-override', '@codingame/monaco-vscode-debug-service-override', + '@codingame/monaco-vscode-audio-cue-service-override', '@codingame/monaco-vscode-views-service-override', '@codingame/monaco-vscode-view-banner-service-override', '@codingame/monaco-vscode-view-status-bar-service-override', '@codingame/monaco-vscode-view-title-bar-service-override', + '@codingame/monaco-vscode-quickaccess-service-override', '@codingame/monaco-vscode-debug-service-override', '@codingame/monaco-vscode-preferences-service-override', '@codingame/monaco-vscode-snippets-service-override', '@codingame/monaco-vscode-files-service-override', '@codingame/monaco-vscode-output-service-override', '@codingame/monaco-vscode-terminal-service-override', '@codingame/monaco-vscode-search-service-override', '@codingame/monaco-vscode-markers-service-override', '@codingame/monaco-vscode-accessibility-service-override', '@codingame/monaco-vscode-storage-service-override', '@codingame/monaco-vscode-language-detection-worker-service-override', '@codingame/monaco-vscode-remote-agent-service-override', '@codingame/monaco-vscode-environment-service-override', '@codingame/monaco-vscode-lifecycle-service-override', diff --git a/package-lock.json b/package-lock.json index 27bae26a..e1d63906 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,10 +37,6 @@ "yauzl": "^2.10.0", "yazl": "^2.5.1" }, - "bin": { - "monaco-treemending": "monaco-treemending.js", - "vscode-ext-host-server": "ext-host-server.js" - }, "devDependencies": { "@babel/core": "^7.22.17", "@babel/plugin-proposal-class-properties": "^7.18.6", @@ -66,6 +62,7 @@ "@typescript-eslint/parser": "^5.62.0", "@vscode/iconv-lite-umd": "^0.7.0", "@web/rollup-plugin-import-meta-assets": "^2.1.0", + "change-package-name": "^1.0.5", "css-url-parser": "^1.1.3", "diff": "^5.1.0", "eslint": "^8.49.0", @@ -3793,6 +3790,15 @@ "node": ">=4" } }, + "node_modules/change-package-name": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/change-package-name/-/change-package-name-1.0.5.tgz", + "integrity": "sha512-sONGq/TRZYq2vVoWykD+kRnEwkXJ7oyxKdnli1oktiwbHMXKkYWBcGfJI5ve8GjP0zXz4I+HVM0fynDQA9RXvQ==", + "dev": true, + "bin": { + "change-package-name": "main.js" + } + }, "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", diff --git a/package.json b/package.json index d91dbb9c..edc9fc85 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,14 @@ }, "type": "module", "scripts": { - "build": "npm run clean && npm run generate-types && npm run lint && npm run compile-rollup-plugins && npm run compile-treemending-script && npm run compile && npm run compile-server && npm run compile-default-extensions", + "build": "npm run clean && npm run generate-types && npm run lint && npm run compile-rollup-plugins && npm run compile-treemending-script && npm run compile && npm run compile-server && npm run compile-default-extensions && npm run copy-monaco-editor", "compile": "NODE_OPTIONS=--max_old_space_size=8192 rollup --config rollup/rollup.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config.json`}' --vscode-version ${npm_package_config_vscode_version} --vscode-ref ${npm_package_config_vscode_ref}", "compile-default-extensions": "NODE_OPTIONS=--max_old_space_size=8192 rollup --config rollup/rollup.default-extensions.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-default-extensions.json`}'", "clean": "rm -rf dist/", "compile-server": "rollup --config rollup/rollup.server.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-server.json`, include: [`./rollup/rollup.server.config.ts`, `./rollup/rollup-metadata-plugin.ts`]}'", "compile-treemending-script": "rollup --config rollup/rollup.treemending-script.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-treemending-script.json`, include: [`./rollup/rollup.treemending-script.config.ts`, `./rollup/rollup-metadata-plugin.ts`]}'", "compile-rollup-plugins": "rollup --config rollup/rollup.rollup-plugins.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup-config-plugins.json`, include: [`./rollup/rollup.rollup-plugins.config.ts`, `./rollup/rollup-metadata-plugin.ts`]}'", + "copy-monaco-editor": "cp -R node_modules/monaco-editor dist/ && (cd dist/monaco-editor; change-package-name \"@codingame/monaco-editor-treemended\")", "preprepare": "./scripts/install-vscode && node --loader ts-node/esm src/monaco-treemending.ts && patch-package", "lint": "eslint '{src/**/*.ts,rollup/*.ts,*.ts}'", "generate-types": "./scripts/generate-types", @@ -60,6 +61,7 @@ "@typescript-eslint/parser": "^5.62.0", "@vscode/iconv-lite-umd": "^0.7.0", "@web/rollup-plugin-import-meta-assets": "^2.1.0", + "change-package-name": "^1.0.5", "css-url-parser": "^1.1.3", "diff": "^5.1.0", "eslint": "^8.49.0", @@ -85,9 +87,9 @@ "semver": "^7.5.4", "ts-morph": "^19.0.0", "ts-node": "^10.9.1", - "xterm-headless": "^5.3.0", "type-fest": "^4.3.1", "typescript": "5.2.2", + "xterm-headless": "^5.3.0", "zx": "^7.2.3" }, "dependencies": { @@ -98,14 +100,14 @@ "@vscode/ripgrep": "^1.15.5", "@vscode/spdlog": "^0.13.11", "@vscode/vscode-languagedetection": "^1.0.22", - "monaco-editor": "0.43.0", - "vscode-oniguruma": "^2.0.0", "@vscode/windows-process-tree": "^0.5.0", "cookie": "^0.5.0", "kerberos": "^2.0.2", "keytar": "^7.9.0", "mime-types": "^2.1.35", + "monaco-editor": "0.43.0", "node-pty": "^1.0.0", + "vscode-oniguruma": "^2.0.0", "vscode-regexpp": "^3.1.0", "vscode-textmate": "^9.0.0", "xterm": "5.2.1", diff --git a/src/missing-services.ts b/src/missing-services.ts index e104ac91..e8f6fa3e 100644 --- a/src/missing-services.ts +++ b/src/missing-services.ts @@ -146,7 +146,7 @@ import { INotebookKernelService } from 'vs/workbench/contrib/notebook/common/not import { INotebookRendererMessagingService } from 'vs/workbench/contrib/notebook/common/notebookRendererMessagingService' import { IInteractiveDocumentService } from 'vs/workbench/contrib/interactive/browser/interactiveDocumentService' import { IInlineChatService } from 'vs/workbench/contrib/inlineChat/common/inlineChat' -import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat' +import { IChatWidgetService, IQuickChatService } from 'vs/workbench/contrib/chat/browser/chat' import { IRemoteExplorerService } from 'vs/workbench/services/remote/common/remoteExplorerService' import { IAuthenticationService } from 'vs/workbench/services/authentication/common/authentication' import { ITimelineService } from 'vs/workbench/contrib/timeline/common/timeline' @@ -1147,12 +1147,12 @@ registerSingleton(IStatusbarService, class StatusbarService implements IStatusba }) isEntryVisible = () => false - updateEntryVisibility = unsupported - focus = unsupported - focusNextEntry = unsupported - focusPreviousEntry = unsupported - isEntryFocused = unsupported - overrideStyle = unsupported + updateEntryVisibility = () => { /* ignore */ } + focus = () => { /* ignore */ } + focusNextEntry = () => { /* ignore */ } + focusPreviousEntry = () => { /* ignore */ } + isEntryFocused = () => false + overrideStyle = () => Disposable.None }, InstantiationType.Eager) registerSingleton(IExtensionGalleryService, class ExtensionGalleryService implements IExtensionGalleryService { @@ -1598,6 +1598,17 @@ registerSingleton(IChatService, class ChatService implements IChatService { notifyUserAction = unsupported }, InstantiationType.Delayed) +registerSingleton(IQuickChatService, class QuickChatService implements IQuickChatService { + _serviceBrand: undefined + onDidClose = Event.None + enabled = false + toggle = unsupported + focus = unsupported + open = unsupported + close = unsupported + openInChatView = unsupported +}, InstantiationType.Delayed) + registerSingleton(IEmbedderTerminalService, class EmbedderTerminalService implements IEmbedderTerminalService { _serviceBrand: undefined onDidCreateTerminal = Event.None diff --git a/src/service-override/keybindings.ts b/src/service-override/keybindings.ts index 36915e52..70a137d5 100644 --- a/src/service-override/keybindings.ts +++ b/src/service-override/keybindings.ts @@ -21,10 +21,13 @@ import { IUserDataProfileService } from 'vs/workbench/services/userDataProfile/c import { IHostService } from 'vs/workbench/services/host/browser/host' import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' import { ILogService } from 'vs/platform/log/common/log' +import { WorkbenchContextKeysHandler } from 'vs/workbench/browser/contextkeys' import getFileServiceOverride from './files' import { DynamicKeybindingService } from '../monaco' import 'vs/workbench/browser/workbench.contribution' import 'vs/workbench/contrib/keybindings/browser/keybindings.contribution' +import { onRenderWorkbench } from '../lifecycle' +import { IInstantiationService } from '../services' async function updateUserKeybindings (keybindingsJson: string): Promise { const userDataProfilesService: IUserDataProfilesService = StandaloneServices.get(IUserDataProfilesService) @@ -84,6 +87,10 @@ interface KeybindingsProps { shouldUseGlobalKeybindings?: () => boolean } +onRenderWorkbench((accessor) => { + accessor.get(IInstantiationService).createInstance(WorkbenchContextKeysHandler) +}) + export default function getServiceOverride ({ shouldUseGlobalKeybindings = () => false }: KeybindingsProps = {}): IEditorOverrideServices { return { ...getFileServiceOverride(), diff --git a/src/service-override/viewBanner.ts b/src/service-override/viewBanner.ts new file mode 100644 index 00000000..9ca51ebd --- /dev/null +++ b/src/service-override/viewBanner.ts @@ -0,0 +1,15 @@ +import '../missing-services' +import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices' +import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' +import { BannerPart } from 'vs/workbench/browser/parts/banner/bannerPart' +import { IBannerService } from 'vs/workbench/services/banner/browser/bannerService' + +export default function getServiceOverride (): IEditorOverrideServices { + return { + [IBannerService.toString()]: new SyncDescriptor(BannerPart, [], false) + } +} + +export { + BannerPart +} diff --git a/src/service-override/viewStatusBar.ts b/src/service-override/viewStatusBar.ts new file mode 100644 index 00000000..7b03f744 --- /dev/null +++ b/src/service-override/viewStatusBar.ts @@ -0,0 +1,15 @@ +import '../missing-services' +import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices' +import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' +import { StatusbarPart } from 'vs/workbench/browser/parts/statusbar/statusbarPart' +import { IStatusbarService } from 'vs/workbench/services/statusbar/browser/statusbar' + +export default function getServiceOverride (): IEditorOverrideServices { + return { + [IStatusbarService.toString()]: new SyncDescriptor(StatusbarPart, [], false) + } +} + +export { + StatusbarPart +} diff --git a/src/service-override/viewTitleBar.ts b/src/service-override/viewTitleBar.ts new file mode 100644 index 00000000..ef30f400 --- /dev/null +++ b/src/service-override/viewTitleBar.ts @@ -0,0 +1,15 @@ +import '../missing-services' +import { IEditorOverrideServices } from 'vs/editor/standalone/browser/standaloneServices' +import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors' +import { ITitleService } from 'vs/workbench/services/title/common/titleService' +import { TitlebarPart } from 'vs/workbench/browser/parts/titlebar/titlebarPart' + +export default function getServiceOverride (): IEditorOverrideServices { + return { + [ITitleService.toString()]: new SyncDescriptor(TitlebarPart, [], false) + } +} + +export { + TitlebarPart +} diff --git a/src/service-override/views.ts b/src/service-override/views.ts index 8adceff7..9d98b525 100644 --- a/src/service-override/views.ts +++ b/src/service-override/views.ts @@ -61,7 +61,6 @@ import { IResolvedTextEditorModel } from 'vs/editor/common/services/resolverServ import { ITextEditorService, TextEditorService } from 'vs/workbench/services/textfile/common/textEditorService' import { CodeEditorService } from 'vs/workbench/services/editor/browser/codeEditorService' import { IUntitledTextEditorService, UntitledTextEditorService } from 'vs/workbench/services/untitled/common/untitledTextEditorService' -import { StatusbarPart } from 'vs/workbench/browser/parts/statusbar/statusbarPart' import { IStatusbarService } from 'vs/workbench/services/statusbar/browser/statusbar' import { IHistoryService } from 'vs/workbench/services/history/common/history' import { HistoryService } from 'vs/workbench/services/history/browser/historyService' @@ -88,10 +87,8 @@ import { IStorageService } from 'vs/platform/storage/common/storage' import { IThemeService } from 'vs/platform/theme/common/themeService' import { ConfirmResult } from 'vs/platform/dialogs/common/dialogs' import { ILayoutService } from 'vs/platform/layout/browser/layoutService' -import { BannerPart } from 'vs/workbench/browser/parts/banner/bannerPart' import { IBannerService } from 'vs/workbench/services/banner/browser/bannerService' import { ITitleService } from 'vs/workbench/services/title/common/titleService' -import { TitlebarPart } from 'vs/workbench/browser/parts/titlebar/titlebarPart' import { MonacoDelegateEditorGroupsService, MonacoEditorService, OpenEditor } from './tools/editor' import getBulkEditServiceOverride from './bulkEdit' import getLayoutServiceOverride, { LayoutService } from './layout' @@ -572,9 +569,10 @@ registerServiceInitializePostParticipant(async (accessor) => { const viewDescriptorService = accessor.get(IViewDescriptorService) // force service instantiation - accessor.get(IStatusbarService) - accessor.get(IBannerService) - accessor.get(ITitleService) + const withStatusBar = accessor.get(IStatusbarService) instanceof Part + const withBannerPart = accessor.get(IBannerService) instanceof Part + const withTitlePart = accessor.get(ITitleService) instanceof Part + paneCompositePartService.getPaneComposites(ViewContainerLocation.Panel) const layoutService = accessor.get(ILayoutService) as LayoutService @@ -584,16 +582,20 @@ registerServiceInitializePostParticipant(async (accessor) => { document.body.append(invisibleContainer) // Create Parts - for (const { id, role, classes, options } of [ - { id: Parts.TITLEBAR_PART, role: 'none', classes: ['titlebar'] }, - { id: Parts.BANNER_PART, role: 'banner', classes: ['banner'] }, + for (const { id, role, classes, options, enabled = true } of [ + { id: Parts.TITLEBAR_PART, role: 'none', classes: ['titlebar'], enabled: withTitlePart }, + { id: Parts.BANNER_PART, role: 'banner', classes: ['banner'], enabled: withBannerPart }, { id: Parts.ACTIVITYBAR_PART, role: 'none', classes: ['activitybar', 'left'] }, { id: Parts.SIDEBAR_PART, role: 'none', classes: ['sidebar', 'left'] }, { id: Parts.EDITOR_PART, role: 'main', classes: ['editor'], options: { restorePreviousState: false } }, { id: Parts.PANEL_PART, role: 'none', classes: ['panel', 'basepanel', positionToString(Position.BOTTOM)] }, { id: Parts.AUXILIARYBAR_PART, role: 'none', classes: ['auxiliarybar', 'basepanel', 'right'] }, - { id: Parts.STATUSBAR_PART, role: 'status', classes: ['statusbar'] } + { id: Parts.STATUSBAR_PART, role: 'status', classes: ['statusbar'], enabled: withStatusBar } ]) { + if (!enabled) { + continue + } + const partContainer = createPart(id, role, classes) const part = layoutService.getPart(id) @@ -633,9 +635,6 @@ export default function getServiceOverride (openEditorFallback?: OpenEditor, _we [ICodeEditorService.toString()]: new SyncDescriptor(CodeEditorService, [], true), [ITextEditorService.toString()]: new SyncDescriptor(TextEditorService, [], false), [IEditorGroupsService.toString()]: new SyncDescriptor(MonacoEditorPart, [], false), - [ITitleService.toString()]: new SyncDescriptor(TitlebarPart, [], false), - [IBannerService.toString()]: new SyncDescriptor(BannerPart, [], false), - [IStatusbarService.toString()]: new SyncDescriptor(StatusbarPart, [], false), [IEditorDropService.toString()]: new SyncDescriptor(EditorDropService, [], true), [IEditorService.toString()]: new SyncDescriptor(MonacoEditorService, [openEditorFallback, isEditorPartVisible], false), [IEditorResolverService.toString()]: new SyncDescriptor(EditorResolverService, [], false), @@ -680,7 +679,6 @@ export { HoverService, ActivityService, - StatusbarPart, SidebarPart, ActivitybarPart, PanelPart, diff --git a/src/services.ts b/src/services.ts index 378289c5..c07a1d16 100644 --- a/src/services.ts +++ b/src/services.ts @@ -13,9 +13,9 @@ import getFileServiceOverride from './service-override/files' import getQuickAccessOverride from './service-override/quickaccess' import { serviceInitializedBarrier, startup } from './lifecycle' -export async function initialize (overrides: IEditorOverrideServices): Promise { +export async function initialize (overrides: IEditorOverrideServices, container?: HTMLElement): Promise { const instantiationService = StandaloneServices.initialize({ - ...getLayoutServiceOverride(), // Always override layout service to break cyclic dependency with ICodeEditorService + ...getLayoutServiceOverride(container), // Always override layout service to break cyclic dependency with ICodeEditorService ...getEnvironmentServiceOverride(), ...getExtensionsServiceOverride(), ...getFileServiceOverride(),