@codingame/monaco-vscode-api 6.0.3 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -117
- package/api.js +1 -1
- package/debugProtocol.d.ts +10 -1
- package/extensions.d.ts +2 -0
- package/missing-services.js +21 -2
- package/package.json +9 -9
- package/service-override/extensions.d.ts +1 -2
- package/services.js +4 -2
- package/vscode/src/vs/base/browser/dnd.js +1 -1
- package/vscode/src/vs/base/browser/dom.js +116 -5
- package/vscode/src/vs/base/browser/domObservable.js +16 -0
- package/vscode/src/vs/base/browser/markdownRenderer.js +5 -3
- package/vscode/src/vs/base/browser/trustedTypes.js +1 -2
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +1 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +1 -1
- package/vscode/src/vs/base/browser/ui/button/button.js +2 -2
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -4
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +1 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -1
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hover.d.ts +32 -16
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +2 -2
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +2 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +1 -1
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/list/listView.js +3 -5
- package/vscode/src/vs/base/browser/ui/list/rowCache.js +1 -8
- package/vscode/src/vs/base/browser/ui/sash/sash.js +1 -1
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +7 -11
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/splitview.js +1 -1
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +1 -1
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +1 -1
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +8 -1
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +2 -3
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +0 -3
- package/vscode/src/vs/base/common/assert.js +1 -1
- package/vscode/src/vs/base/common/collections.js +49 -1
- package/vscode/src/vs/base/common/equals.js +55 -5
- package/vscode/src/vs/base/common/errors.js +14 -1
- package/vscode/src/vs/base/common/event.js +2 -1
- package/vscode/src/vs/base/common/history.js +7 -4
- package/vscode/src/vs/base/common/iterator.js +9 -1
- package/vscode/src/vs/base/common/map.d.ts +41 -0
- package/vscode/src/vs/base/common/numbers.js +18 -1
- package/vscode/src/vs/base/common/observableInternal/api.js +11 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.js +18 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +8 -1
- package/vscode/src/vs/base/common/observableInternal/base.js +2 -5
- package/vscode/src/vs/base/common/observableInternal/derived.js +13 -3
- package/vscode/src/vs/base/common/observableInternal/lazyObservableValue.js +109 -0
- package/vscode/src/vs/base/common/observableInternal/promise.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/utils.d.ts +7 -0
- package/vscode/src/vs/base/common/observableInternal/utils.js +64 -12
- package/vscode/src/vs/base/common/prefixTree.d.ts +52 -0
- package/vscode/src/vs/base/common/product.d.ts +1 -0
- package/vscode/src/vs/base/parts/ipc/common/ipc.js +1 -1
- package/vscode/src/vs/editor/browser/config/charWidthReader.js +1 -1
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +1 -1
- package/vscode/src/vs/editor/browser/coreCommands.js +2 -1
- package/vscode/src/vs/editor/browser/observableCodeEditor.js +230 -0
- package/vscode/src/vs/editor/browser/services/abstractCodeEditorService.js +1 -1
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +26 -26
- package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +2 -2
- package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
- package/vscode/src/vs/editor/browser/view/viewLayer.js +4 -12
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +15 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +8 -8
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +4 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +14 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +3 -3
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +2 -2
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/colors.js +1 -1
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +5 -0
- package/vscode/src/vs/editor/common/config/editorOptions.js +83 -65
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +43 -43
- package/vscode/src/vs/editor/common/cursor/cursor.js +3 -2
- package/vscode/src/vs/editor/common/cursor/cursorTypeEditOperations.js +911 -0
- package/vscode/src/vs/editor/common/cursor/cursorTypeOperations.js +36 -799
- package/vscode/src/vs/editor/common/cursor/cursorWordOperations.js +6 -5
- package/vscode/src/vs/editor/common/languageFeatureRegistry.d.ts +1 -0
- package/vscode/src/vs/editor/common/languageFeatureRegistry.js +3 -0
- package/vscode/src/vs/editor/common/languages/autoIndent.js +23 -1
- package/vscode/src/vs/editor/common/languages.d.ts +20 -3
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js +6 -6
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +19 -0
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js +3 -0
- package/vscode/src/vs/editor/common/model/textModel.js +6 -2
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +5 -5
- package/vscode/src/vs/editor/common/model.d.ts +4 -0
- package/vscode/src/vs/editor/common/services/getIconClasses.js +1 -1
- package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +2 -15
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +63 -62
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +11 -8
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +2 -17
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +18 -5
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +55 -27
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +7 -4
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +103 -47
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +18 -10
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +2 -4
- package/vscode/src/vs/editor/contrib/folding/browser/folding.css.js +1 -1
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +33 -13
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +12 -7
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +161 -185
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +321 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverStatusBar.js +4 -1
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +6 -21
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +39 -40
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +55 -46
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +12 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverController.js +15 -9
- package/vscode/src/vs/editor/contrib/hover/browser/hoverTypes.js +11 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +141 -93
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +24 -7
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +36 -1
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +5 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +25 -12
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +88 -118
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +34 -33
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions.js +11 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +10 -19
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +45 -27
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +4 -4
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/commands.js +126 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/consts.js +9 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEdits.contribution.js +9 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsController.js +82 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsModel.js +240 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.js +322 -0
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgress.js +8 -4
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +3 -2
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +2 -2
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +60 -0
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.css.js +4 -0
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +38 -20
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +3 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetStatus.js +10 -32
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +23 -138
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +3 -0
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +5 -5
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +13 -12
- package/vscode/src/vs/editor/contrib/wordPartOperations/browser/wordPartOperations.js +3 -3
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +21 -0
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +5 -6
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +1 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +27 -6
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +33 -3
- package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -1
- package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -0
- package/vscode/src/vs/platform/actions/common/actions.js +3 -0
- package/vscode/src/vs/platform/actions/common/menuService.js +3 -2
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +1 -1
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.d.ts +7 -5
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +109 -13
- package/vscode/src/vs/platform/diagnostics/common/diagnostics.d.ts +2 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +12 -6
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +20 -10
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +46 -8
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1 -1
- package/vscode/src/vs/platform/extensions/common/extensions.js +12 -3
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +368 -0
- package/vscode/src/vs/platform/files/common/watcher.js +21 -24
- package/vscode/src/vs/platform/list/browser/listService.js +2 -1
- package/vscode/src/vs/platform/observable/common/platformObservableUtils.js +2 -2
- package/vscode/src/vs/platform/opener/browser/link.js +1 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +1 -1
- package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.service.d.ts +0 -2
- package/vscode/src/vs/platform/request/common/request.js +18 -8
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +2 -6
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +8 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.d.ts +1 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.js +25 -5
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +1 -1
- package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +6 -6
- package/vscode/src/vs/platform/theme/common/colors/editorColors.js +35 -35
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +9 -9
- package/vscode/src/vs/platform/theme/common/colors/listColors.js +11 -11
- package/vscode/src/vs/platform/theme/common/colors/menuColors.js +4 -4
- package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +5 -5
- package/vscode/src/vs/platform/theme/common/colors/miscColors.js +1 -1
- package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +5 -5
- package/vscode/src/vs/platform/tunnel/common/tunnel.js +4 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +75 -19
- package/vscode/src/vs/platform/window/common/window.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +32 -25
- package/vscode/src/vs/workbench/api/common/extHost.common.services.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +5 -11
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +5 -15
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +2 -5
- package/vscode/src/vs/workbench/api/common/extHostComments.js +9 -3
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +32 -22
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +109 -40
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +46 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +84 -35
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +50 -41
- package/vscode/src/vs/workbench/api/common/extHostSearch.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSecrets.js +11 -8
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +7 -6
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +63 -70
- package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +5 -3
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +75 -16
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +29 -4
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +127 -107
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +33 -21
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +23 -6
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +3 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/vscode/src/vs/workbench/browser/web.api.js +8 -0
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +199 -194
- package/vscode/src/vs/workbench/common/configuration.js +1 -1
- package/vscode/src/vs/workbench/common/contributions.js +8 -1
- package/vscode/src/vs/workbench/common/editor.js +5 -1
- package/vscode/src/vs/workbench/common/theme.js +79 -454
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +221 -239
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatConfirmationWidget.js → chatContentParts/chatConfirmationWidget.js} +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +131 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatWarningContentPart.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatContentParts/media}/chatConfirmationWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +91 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +292 -1019
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +22 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +61 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +23 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +43 -16
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +1 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +7 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +8 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +1 -1
- package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +14 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +8 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +19 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +13 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +19 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +9 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +10 -5
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +235 -173
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +2 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +17 -5
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +62 -44
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +114 -107
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +33 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +71 -101
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +38 -43
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -33
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +3 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +49 -86
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +60 -71
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +116 -113
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +6 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +1 -0
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +12 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +7 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +88 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +1 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +39 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +12 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +40 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +27 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +14 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +43 -46
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +12 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +19 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +16 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +11 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +12 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +9 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +37 -36
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +18 -8
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +14 -5
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +17 -22
- package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +7 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +7 -27
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +3 -4
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +4 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +13 -37
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.d.ts +88 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +48 -31
- package/vscode/src/vs/workbench/contrib/testing/common/testId.d.ts +115 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.d.ts +226 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.d.ts +319 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +2 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +21 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +7 -8
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +3 -3
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +10 -5
- package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +54 -21
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +1 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -4
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +5 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +3 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +59 -41
- package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +1 -1
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -2
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/language/common/languageService.js +7 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +1 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +2 -2
- package/vscode/src/vs/workbench/services/search/common/search.js +2 -1
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +2 -2
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +2 -2
- package/vscode/src/vs/workbench/services/textfile/common/encoding.js +69 -26
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +23 -4
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +5 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +12 -5
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +38 -19
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.service.d.ts +2 -1
- package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +0 -196
- package/vscode-dts/vscode.proposed.attributableCoverage.d.ts +28 -10
- package/vscode-dts/vscode.proposed.authGetSessions.d.ts +30 -22
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +17 -8
- package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +0 -9
- package/vscode-dts/vscode.proposed.commentReveal.d.ts +32 -0
- package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +10 -0
- package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +1 -1
- package/vscode-dts/vscode.proposed.fileComments.d.ts +12 -53
- package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +6 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +6 -0
- package/vscode-dts/vscode.proposed.lmTools.d.ts +91 -0
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +1 -1
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +10 -6
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +38 -13
- package/vscode/src/vs/editor/browser/observableUtilities.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service.js +0 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +0 -122
package/README.md
CHANGED
|
@@ -14,82 +14,11 @@ npm install -D @types/vscode
|
|
|
14
14
|
|
|
15
15
|
`@codingame/monaco-vscode-editor-api` is installed as an alias to `monaco-editor` because it provides the same api as the official `monaco-editor`
|
|
16
16
|
|
|
17
|
-
## Troubleshooting
|
|
18
|
-
|
|
19
|
-
### If you use Webpack
|
|
20
|
-
|
|
21
|
-
Starting from v2, [monaco-editor-webpack-plugin](https://www.npmjs.com/package/monaco-editor-webpack-plugin) can't be used
|
|
22
|
-
|
|
23
|
-
Here's the alternative for each options:
|
|
24
|
-
|
|
25
|
-
- `filename`: it can be configured at the webpack level directly
|
|
26
|
-
- `publicPath`: it can be configured at the webpack level or by hands when redistering the worker in `window.MonacoEnvironment`.
|
|
27
|
-
- `languages`: Import vscode language extensions (`@codingame/monaco-vscode-xxx-default-extension`) or (`@codingame/@codingame/monaco-vscode-standalone-*`). Please obey: VSCode extensions can only be used if `themes` and `textmate` service overrides are configured and monaco languages can only be used if those two services are not configured (see [here](#monaco-standalone-services) for further details).
|
|
28
|
-
- `features`: With this lib, you can't remove editor features.
|
|
29
|
-
- `globalAPI`: you can set `window.MonacoEnvironment.globalAPI` to true
|
|
30
|
-
|
|
31
|
-
### If you use Vite
|
|
32
|
-
|
|
33
|
-
This library uses a lot the `new URL('asset.extension', import.meta.url)` syntax which [is supported by vite](https://vitejs.dev/guide/assets.html#new-url-url-import-meta-url)
|
|
34
|
-
|
|
35
|
-
While it works great in `build` mode (because rollup is used), there is some issues in `watch` mode:
|
|
36
|
-
|
|
37
|
-
- import.meta.url is not replaced while creating bundles, it is an issue when the syntax is used inside a dependency
|
|
38
|
-
- vite is still trying to inject/transform javascript assets files, breaking the code by injecting ESM imports in commonjs files
|
|
39
|
-
|
|
40
|
-
There are workarounds for both:
|
|
41
|
-
|
|
42
|
-
- We can help vite by replacing `import.meta.url` by the original module path:
|
|
43
|
-
|
|
44
|
-
```typescript
|
|
45
|
-
import importMetaUrlPlugin from '@codingame/esbuild-import-meta-url-plugin'
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
...
|
|
49
|
-
optimizeDeps: {
|
|
50
|
-
esbuildOptions: {
|
|
51
|
-
plugins: [importMetaUrlPlugin]
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### If using Angular and getting `Not allowed to load local resource:` errors
|
|
58
|
-
|
|
59
|
-
*The short version*: set up and use a custom webpack config file and add this under `module`:
|
|
60
|
-
|
|
61
|
-
```typescript
|
|
62
|
-
parser: {
|
|
63
|
-
javascript: {
|
|
64
|
-
url: true,
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
See [this issue](https://github.com/CodinGame/monaco-vscode-api/issues/186) or this [StackOverflow answer](https://stackoverflow.com/a/75252098) for more details, and [this discussion](https://github.com/angular/angular-cli/issues/24617) for more context.
|
|
70
|
-
|
|
71
|
-
### The typescript language features extension is not providing project-wide intellisense
|
|
72
|
-
|
|
73
|
-
The typescript language features extensions requires [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) to enable project wide intellisense or only a per-file intellisense is provided.
|
|
74
|
-
|
|
75
|
-
It requires [crossOriginIsolated](https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated) to be true, which requires assets files to be servers with some specific headers:
|
|
76
|
-
|
|
77
|
-
- [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy): `same-origin`
|
|
78
|
-
- [Cross-Origin-Embedder-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy): `require-corp` or `credentialless`
|
|
79
|
-
|
|
80
|
-
At least thoses files should have the headers:
|
|
81
|
-
|
|
82
|
-
- the main page html
|
|
83
|
-
- the worker extension host iframe html: `webWorkerExtensionHostIframe.html`
|
|
84
|
-
- the worker extension host worker javascript: `extensionHost.worker.js`
|
|
85
|
-
|
|
86
|
-
If adding those headers is not an options, you can have a look at <https://github.com/gzuidhof/coi-serviceworker>, but only if you are not using webviews as it introduces problems then.
|
|
87
|
-
|
|
88
17
|
# Usage
|
|
89
18
|
|
|
90
19
|
## Monaco standalone services
|
|
91
20
|
|
|
92
|
-
`monaco-editor`, as well as this library by default, uses `standalone` version or the
|
|
21
|
+
`monaco-editor`, as well as this library by default, uses `standalone` version or the VSCode services, which are much simpler than the one used in VSCode.
|
|
93
22
|
|
|
94
23
|
You may want to provide your custom implementations of them. To do so, you can use the `initialize` method from `vscode/services`.
|
|
95
24
|
Also, monaco-editor doesn't provide types for them, so this library exports them.
|
|
@@ -118,86 +47,88 @@ Additionally, several packages that include the VSCode version of some services
|
|
|
118
47
|
- **Extensions** (included by default): `@codingame/monaco-vscode-extensions-service-override`
|
|
119
48
|
- Support for VSCode extensions.
|
|
120
49
|
- A worker configuration can be provided to it:
|
|
121
|
-
- Then,
|
|
50
|
+
- Then, the webworker extension host will be available, allowing to run extensions in a worker which runs in an iframe
|
|
122
51
|
- **Files** (included by default): `@codingame/monaco-vscode-files-service-override`
|
|
123
|
-
- It adds the overlay filesystem for `file://` files, but also adds the support for lazy loaded extension files. It adds separate memory user files (e.g. config, keybindings), cache files and log files
|
|
52
|
+
- It adds the overlay filesystem for `file://` files, but also adds the support for lazy loaded extension files. It adds separate memory user files (e.g. config, keybindings), cache files and log files
|
|
124
53
|
- It supports adding overlay filesystems for `file://` files
|
|
125
54
|
- **QuickAccess** (included by default): `@codingame/monaco-vscode-quickaccess-service-override`
|
|
126
55
|
- Enables the quickaccess menu in the editor (press F1 or ctrl+shift+p)
|
|
127
56
|
- **Notifications**: `@codingame/monaco-vscode-notifications-service-override`
|
|
128
|
-
- This services enables vscode notifications you usually find in the bottom right corner
|
|
57
|
+
- This services enables vscode notifications you usually find in the bottom right corner
|
|
129
58
|
- **Dialogs**: `@codingame/monaco-vscode-dialogs-service-override`
|
|
130
|
-
- Enable
|
|
59
|
+
- Enable VSCode modal dialogs. It allows users to select an action to do. Those actions are exposed to the VSCode API. Additionally, this service can be used by the language client to delegate questions to the user
|
|
131
60
|
- **Model**: `@codingame/monaco-vscode-model-service-override`
|
|
132
61
|
- This service creates and takes care of model references. For example:
|
|
133
62
|
- Create model from filesystem if content is unknown
|
|
134
63
|
- Count references
|
|
135
64
|
- Destroy models when they are no longer used
|
|
136
65
|
- **Editor**: `@codingame/monaco-vscode-editor-service-override`
|
|
137
|
-
- Enable editor support. This is usually needed when working with the language server protocol. Without enabling the editor service, it will only be able to resolve the currently open model (only internal file
|
|
66
|
+
- Enable editor support. This is usually needed when working with the language server protocol. Without enabling the editor service, it will only be able to resolve the currently open model (only internal file references will work)
|
|
67
|
+
- Is exclusive with the `views` and `workbench` services. Do not use more than 1 services at the same time
|
|
138
68
|
- **Views**: `@codingame/monaco-vscode-views-service-override`
|
|
139
|
-
- Enable full views support
|
|
69
|
+
- Enable full views support
|
|
70
|
+
- Is exclusive with the `editor` and `workbench` services. Do not use more than 1 service at the same time
|
|
140
71
|
- **Configuration**: `@codingame/monaco-vscode-configuration-service-override`
|
|
141
|
-
- Allows to change the configuration of not only the editors, but every part of
|
|
72
|
+
- Allows to change the configuration of not only the editors, but every part of VSCode. The language client for instance uses it to send the requested configuration to the server. The default configuration service already allows to change the configuration. This service overrides makes it rely on a user configuration file (with json schema, overridable by language including all VSCode features)
|
|
142
73
|
- **Keybindings**: `@codingame/monaco-vscode-keybindings-service-override`
|
|
143
|
-
- Enables platform specific keybindings and make it rely on a user definded keybindings configuration (if available)
|
|
74
|
+
- Enables platform specific keybindings and make it rely on a user definded keybindings configuration (if available)
|
|
144
75
|
- **Languages**: `@codingame/monaco-vscode-languages-service-override`
|
|
145
76
|
- Enable language support. It's like the standalone service with 2 differences:
|
|
146
|
-
- It handle the language extension point (getting languages from
|
|
147
|
-
- It triggers the `onLanguage:${language}` event (to load
|
|
77
|
+
- It handle the language extension point (getting languages from VSCode extensions)
|
|
78
|
+
- It triggers the `onLanguage:${language}` event (to load VSCode extension listening to those events)
|
|
148
79
|
- **Textmate**: `@codingame/monaco-vscode-textmate-service-override`
|
|
149
|
-
- Allows to use textmate grammars. Depends on *themes* service.
|
|
80
|
+
- Allows to use textmate grammars. Depends on *themes* service. VSCode extensions use textmate grammars exclusively for highlighting. Once this is enabled monarch grammars can no longer be loaded by monaco-editor
|
|
150
81
|
- **Themes**: `@codingame/monaco-vscode-theme-service-override`
|
|
151
|
-
- Allows to use VSCode themes
|
|
82
|
+
- Allows to use VSCode themes
|
|
152
83
|
- **Snippets**: `@codingame/monaco-vscode-snippets-service-override`
|
|
153
|
-
- Add snippet extension point (register
|
|
84
|
+
- Add snippet extension point (register VSCode extension snippets)
|
|
154
85
|
- **Debug**: `@codingame/monaco-vscode-debug-service-override`
|
|
155
86
|
- Activate debugging support
|
|
156
87
|
- **Preferences**: `@codingame/monaco-vscode-preferences-service-override`
|
|
157
88
|
- Allow to read and write preferences
|
|
158
89
|
- **Output**: `@codingame/monaco-vscode-output-service-override`
|
|
159
|
-
- Output panel support. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
90
|
+
- Output panel support. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
160
91
|
- **Terminal**: `@codingame/monaco-vscode-terminal-service-override`
|
|
161
|
-
- Terminal panel support. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
92
|
+
- Terminal panel support. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
162
93
|
- **Search**: `@codingame/monaco-vscode-search-service-override`
|
|
163
|
-
- search panel support. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
94
|
+
- search panel support. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
164
95
|
- **Markers**: `@codingame/monaco-vscode-markers-service-override`
|
|
165
|
-
- It adds the problems panel tab. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
96
|
+
- It adds the problems panel tab. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
166
97
|
- **SCM**: `@codingame/monaco-vscode-scm-service-override`
|
|
167
|
-
- It adds the SCM API that can be used to implement source control. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
98
|
+
- It adds the SCM API that can be used to implement source control. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
168
99
|
- **Testing**: `@codingame/monaco-vscode-testing-service-override`
|
|
169
|
-
- It adds the Tests API. *Hint*: It makes more sense to enable it when *Views* service
|
|
100
|
+
- It adds the Tests API. *Hint*: It makes more sense to enable it when *Views* or *Workbench* service are used
|
|
170
101
|
- **Language detection worker**: `@codingame/monaco-vscode-language-detection-worker-service-override`
|
|
171
|
-
- When opening an untitled model or a file without extension or if
|
|
102
|
+
- When opening an untitled model or a file without extension or if VSCode is unable to guess the language simply by the file extension or by reading the first line. Then it will use tensorflow in a worker to try to guess the most probable language (only the open source model can be used)
|
|
172
103
|
- **Storage**: `@codingame/monaco-vscode-storage-service-override`
|
|
173
104
|
- Define your own storage or use the default BrowserStorageService. The storage service is used in many places either as a cache or as a user preference store. For instance:
|
|
174
|
-
- Current loaded theme is stored in there to be loaded faster on start
|
|
175
|
-
- Every panel/view positions are stored in there
|
|
105
|
+
- Current loaded theme is stored in there to be loaded faster on start
|
|
106
|
+
- Every panel/view positions are stored in there
|
|
176
107
|
- **LifeCycle**: `@codingame/monaco-vscode-lifecycle-service-override`
|
|
177
108
|
- Allow other services to veto a page reload (for instance when not all open files are saved)
|
|
178
109
|
- **Remote agent**: `@codingame/monaco-vscode-remote-agent-service-override`
|
|
179
|
-
- Connect to a remote
|
|
110
|
+
- Connect to a remote VSCode agent and have access to:
|
|
180
111
|
- The remote filesystem
|
|
181
112
|
- The remote file search
|
|
182
113
|
- Running terminals
|
|
183
|
-
- Running
|
|
114
|
+
- Running VSCode extensions (not web-compatible)
|
|
184
115
|
- and probably more?
|
|
185
116
|
|
|
186
|
-
|
|
117
|
+
Refer to [vscode_server.md](./docs/vscode_server.md) for the server part
|
|
187
118
|
- **Accessibility**: `@codingame/monaco-vscode-accessibility-service-override`
|
|
188
119
|
- Register accessibility helpers and signals
|
|
189
120
|
- **Workspace trust**: `@codingame/monaco-vscode-workspace-trust-service-override`
|
|
190
121
|
- Ask user it they trust the current workspace, disable some features if not
|
|
191
122
|
- **Extension Gallery**: `@codingame/monaco-vscode-extension-gallery-service-override`
|
|
192
|
-
- Support for the VSCode marketplace, it allows to install extensions from the marketplace
|
|
123
|
+
- Support for the VSCode marketplace, it allows to install extensions from the marketplace
|
|
193
124
|
- **Chat**: `@codingame/monaco-vscode-chat-service-override`
|
|
194
125
|
- Support for chat and inline chat features
|
|
195
126
|
- **Notebook**: `@codingame/monaco-vscode-notebook-service-override`
|
|
196
127
|
- Support for Jupyter notebooks
|
|
197
128
|
- **Welcome**: `@codingame/monaco-vscode-welcome-service-override`
|
|
198
|
-
- Support for [viewsWelcome contribution point](https://code.visualstudio.com/api/references/contribution-points#contributes.viewsWelcome). *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
129
|
+
- Support for [viewsWelcome contribution point](https://code.visualstudio.com/api/references/contribution-points#contributes.viewsWelcome). *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
199
130
|
- **Walkthrough**: `@codingame/monaco-vscode-walkthrough-service-override`
|
|
200
|
-
- Getting Started page and support for [walkthrough contribution point](https://code.visualstudio.com/api/references/contribution-points#contributes.walkthroughs). *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
131
|
+
- Getting Started page and support for [walkthrough contribution point](https://code.visualstudio.com/api/references/contribution-points#contributes.walkthroughs). *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
201
132
|
- **User data profile**: `@codingame/monaco-vscode-user-data-profile-service-override`
|
|
202
133
|
- User profiles support
|
|
203
134
|
- **User data sync**: `@codingame/monaco-vscode-user-data-sync-service-override`
|
|
@@ -207,11 +138,11 @@ Additionally, several packages that include the VSCode version of some services
|
|
|
207
138
|
- **Task**: `@codingame/monaco-vscode-task-service-override`
|
|
208
139
|
- Task management
|
|
209
140
|
- **Outline**: `@codingame/monaco-vscode-outline-service-override`
|
|
210
|
-
- Support for the outline view. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
141
|
+
- Support for the outline view. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
211
142
|
- **Timeline**: `@codingame/monaco-vscode-timeline-service-override`
|
|
212
|
-
- Support for the timeline view. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
143
|
+
- Support for the timeline view. *Hint*: It only makes sense to enable it when *Views* or *Workbench* service are used
|
|
213
144
|
- **Workbench**: `@codingame/monaco-vscode-workbench-service-override`
|
|
214
|
-
- Allows to render the full workbench layout. Is exclusive with the `views` service. Do not use
|
|
145
|
+
- Allows to render the full workbench layout. Is exclusive with the `editor` and `views` service. Do not use more than 1 service at the same time
|
|
215
146
|
- **Comments**
|
|
216
147
|
- Enables comments extension api
|
|
217
148
|
- **Edit-sessions**
|
|
@@ -219,7 +150,7 @@ Additionally, several packages that include the VSCode version of some services
|
|
|
219
150
|
- **Emmet**
|
|
220
151
|
- Enables the `triggerExpansionOnTab` command for the emmet default extension
|
|
221
152
|
- **Interactive**
|
|
222
|
-
- Interactive
|
|
153
|
+
- Interactive notebooks
|
|
223
154
|
- **Issue**
|
|
224
155
|
- Issue reporting
|
|
225
156
|
- **Multi diff editor**
|
|
@@ -237,7 +168,7 @@ Additionally, several packages that include the VSCode version of some services
|
|
|
237
168
|
- **Localization**
|
|
238
169
|
- Register callbacks to update the display language from the VSCode UI (either from the `Set Display Language` command or from the extension gallery extension packs)
|
|
239
170
|
- **Secret Storage**
|
|
240
|
-
- Storage of secrets for extensions, will store by default in-memory. You can pass a custom implementation as part of the workbench construction options when initializing monaco services (under `secretStorageProvider`)
|
|
171
|
+
- Storage of secrets for extensions, will store by default in-memory. You can pass a custom implementation as part of the workbench construction options when initializing monaco services (under `secretStorageProvider`)
|
|
241
172
|
|
|
242
173
|
Usage:
|
|
243
174
|
|
|
@@ -248,7 +179,7 @@ import getEditorServiceOverride from '@codingame/monaco-vscode-editor-service-ov
|
|
|
248
179
|
import getConfigurationServiceOverride, { updateUserConfiguration, configurationRegistry } from '@codingame/monaco-vscode-configuration-service-override'
|
|
249
180
|
|
|
250
181
|
await initialize({
|
|
251
|
-
...
|
|
182
|
+
...getEditorServiceOverride((model, input, sideBySide) => {
|
|
252
183
|
// Open a new editor here and return it
|
|
253
184
|
// It will be called when for instance the user ctrl+click on an import
|
|
254
185
|
}),
|
|
@@ -264,7 +195,6 @@ updateUserConfiguration(`{
|
|
|
264
195
|
```
|
|
265
196
|
|
|
266
197
|
### Troubleshoot
|
|
267
|
-
|
|
268
198
|
`initialize` can only be called once ( and it should be called BEFORE creating your first editor).
|
|
269
199
|
|
|
270
200
|
## Model creation
|
|
@@ -281,7 +211,9 @@ It has some pros:
|
|
|
281
211
|
- The returned model is bound to a filesystem file, and you have access to methods allowing to control the file lifecycle (saving the file, accessing the dirty state...)
|
|
282
212
|
- It is possible to call the method multiple times on the same file to get multiple references. The model is disposed when there is no reference left
|
|
283
213
|
|
|
284
|
-
|
|
214
|
+
To work, it needs the file to exist on the virtual filesystem. It can be achieved either by:
|
|
215
|
+
- using the `registerFileSystemOverlay` from the files service override, which can be cleaned when not needed anymore (recommended)
|
|
216
|
+
- by using the second argument of the `createModelReference` function, which writes the file content to the virtual filesystem before creating the model
|
|
285
217
|
|
|
286
218
|
before:
|
|
287
219
|
|
|
@@ -301,8 +233,15 @@ after:
|
|
|
301
233
|
|
|
302
234
|
```typescript
|
|
303
235
|
import * as monaco from 'monaco-editor'
|
|
236
|
+
import { RegisteredFileSystemProvider, RegisteredMemoryFile, registerFileSystemOverlay } from '@codingame/monaco-vscode-files-service-override'
|
|
237
|
+
|
|
238
|
+
const fileUri = monaco.Uri.file(<file uri>);
|
|
239
|
+
|
|
240
|
+
const fileSystemProvider = new RegisteredFileSystemProvider(false)
|
|
241
|
+
fileSystemProvider.registerFile(new RegisteredMemoryFile(fileUri, <file content>))
|
|
242
|
+
const overlayDisposable = registerFileSystemOverlay(1, fileSystemProvider)
|
|
304
243
|
|
|
305
|
-
const modelRef = await monaco.editor.createModelReference(
|
|
244
|
+
const modelRef = await monaco.editor.createModelReference(fileUri)
|
|
306
245
|
|
|
307
246
|
const editor = monaco.editor.create({ model: modelRef.object.textEditorModel })
|
|
308
247
|
|
|
@@ -314,16 +253,16 @@ await modelRef.object.save()
|
|
|
314
253
|
|
|
315
254
|
modelRef.dispose()
|
|
316
255
|
editor.dispose()
|
|
317
|
-
|
|
256
|
+
overlayDisposable.dispose()
|
|
318
257
|
|
|
319
258
|
```
|
|
320
259
|
|
|
321
|
-
`createModelReference` return a reference to a model. The value is fetched from the memory filesystem
|
|
260
|
+
`createModelReference` return a reference to a model. The value is fetched from the memory filesystem.
|
|
322
261
|
The reference can then be disposed, the model will only be disposed if there is no remaining references.
|
|
323
262
|
|
|
324
263
|
## VSCode api usage
|
|
325
264
|
|
|
326
|
-
To be able to use the VSCode api directly from your code, you need to import `vscode/localExtensionHost` and the services to be initialized.
|
|
265
|
+
To be able to use the VSCode api directly from your code, you need to import `vscode/localExtensionHost` and wait for the services to be initialized.
|
|
327
266
|
|
|
328
267
|
You will then be able to import it as if you were in a VSCode extension:
|
|
329
268
|
|
|
@@ -363,7 +302,7 @@ vscode.languages.registerCompletionItemProvider(...)
|
|
|
363
302
|
|
|
364
303
|
### Default vscode extensions
|
|
365
304
|
|
|
366
|
-
VSCode uses a bunch of default extensions. Most of them are used to load the default languages and grammars (see <
|
|
305
|
+
VSCode uses a bunch of default extensions. Most of them are used to load the default languages and grammars (see <https://github.com/microsoft/vscode/tree/main/extensions>).
|
|
367
306
|
|
|
368
307
|
This library bundles and publishes them and allows to import the ones you want:
|
|
369
308
|
|
|
@@ -373,6 +312,8 @@ import '@codingame/monaco-vscode-json-default-extension'
|
|
|
373
312
|
...
|
|
374
313
|
```
|
|
375
314
|
|
|
315
|
+
See [the full list](https://www.npmjs.com/search?q=%40codingame%2Fmonaco-vscode-*-default-extension)
|
|
316
|
+
|
|
376
317
|
### Loading vsix file
|
|
377
318
|
|
|
378
319
|
VSCode extensions are bundled as vsix files.
|
|
@@ -414,18 +355,18 @@ This library also offers the possibility to localize vscode and the extensions i
|
|
|
414
355
|
- `@codingame/monaco-vscode-language-pack-zh-hans`
|
|
415
356
|
- `@codingame/monaco-vscode-language-pack-zh-hant`
|
|
416
357
|
|
|
417
|
-
⚠️ The language pack should be imported and loaded BEFORE anything else from
|
|
358
|
+
⚠️ The language pack should be imported and loaded BEFORE anything else from this library is loaded. Otherwise, some translations would be missing and an error would be displayed in the console. ⚠️
|
|
418
359
|
|
|
419
360
|
### Demo
|
|
420
361
|
|
|
421
362
|
Try it out on <https://monaco-vscode-api.netlify.app/>
|
|
422
363
|
|
|
423
|
-
There is a demo that showcases the service-override features.
|
|
364
|
+
There is a demo that showcases the service-override features.
|
|
424
365
|
It includes:
|
|
425
366
|
|
|
426
367
|
- Languages
|
|
427
368
|
- VSCode themes
|
|
428
|
-
- Textmate grammars (requires
|
|
369
|
+
- Textmate grammars (requires VSCode themes)
|
|
429
370
|
- Notifications/Dialogs
|
|
430
371
|
- Model/Editor services
|
|
431
372
|
- Configuration service, with user configuration editor
|
|
@@ -460,7 +401,99 @@ npm run start:debugServer
|
|
|
460
401
|
|
|
461
402
|
[See vscode_server.md](./docs/vscode_server.md)
|
|
462
403
|
|
|
463
|
-
|
|
404
|
+
## Troubleshooting
|
|
405
|
+
|
|
406
|
+
### Duplicate versions
|
|
407
|
+
|
|
408
|
+
Many packages are published with the same version, and almost all of them depend on the `@codingame/monaco-vscode-api` main package (with strict version range).
|
|
409
|
+
|
|
410
|
+
It is VERY important that only a single version of ALL the packages is installed, otherwise weird things can happen.
|
|
411
|
+
|
|
412
|
+
You can check that `npm list vscode` only lists a single version.
|
|
413
|
+
|
|
414
|
+
### If you use Webpack
|
|
415
|
+
|
|
416
|
+
#### monaco-editor-webpack-plugin
|
|
417
|
+
|
|
418
|
+
Starting from v2, [monaco-editor-webpack-plugin](https://www.npmjs.com/package/monaco-editor-webpack-plugin) can't be used
|
|
419
|
+
|
|
420
|
+
Here's the alternative for each options:
|
|
421
|
+
|
|
422
|
+
- `filename`: it can be configured at the webpack level directly
|
|
423
|
+
- `publicPath`: it can be configured at the webpack level or by hands when redistering the worker in `window.MonacoEnvironment`.
|
|
424
|
+
- `languages`: Import VSCode language extensions (`@codingame/monaco-vscode-xxx-default-extension`) or (`@codingame/@codingame/monaco-vscode-standalone-*`). Please obey: VSCode extensions can only be used if `themes` and `textmate` service overrides are configured and monaco languages can only be used if those two services are not configured (see [here](#monaco-standalone-services) for further details).
|
|
425
|
+
- `features`: With this lib, you can't remove editor features.
|
|
426
|
+
- `globalAPI`: you can set `window.MonacoEnvironment.globalAPI` to true
|
|
427
|
+
|
|
428
|
+
#### exclude assets from loaders
|
|
429
|
+
|
|
430
|
+
Webpack makes all file go through all matching loaders. This libraries need to load a lot of internals resources, including HTML, svg and javascript files (for default extension codes).
|
|
431
|
+
|
|
432
|
+
We need webpack to let those file untouched:
|
|
433
|
+
- the babel loader shouldn't transform extension javascript files
|
|
434
|
+
- the html loader shouldn't transform the worker extension host iframe html
|
|
435
|
+
- ...
|
|
436
|
+
|
|
437
|
+
Fortunately, all the assets are loaded via the `new URL('asset.extension', import.meta.url)` syntax, and webpack provide a way to exclude the file loaded that way: `dependency: { not: ['url'] }` see https://webpack.js.org/guides/asset-modules/
|
|
438
|
+
|
|
439
|
+
### If you use Vite
|
|
440
|
+
|
|
441
|
+
This library uses a lot the `new URL('asset.extension', import.meta.url)` syntax which [is supported by vite](https://vitejs.dev/guide/assets.html#new-url-url-import-meta-url)
|
|
442
|
+
|
|
443
|
+
While it works great in `build` mode (because rollup is used), there is some issues in `watch` mode:
|
|
444
|
+
|
|
445
|
+
- `import.meta.url` is not replaced while creating bundles, it is an issue when the syntax is used inside a dependency
|
|
446
|
+
- Vite is still trying to inject/transform javascript assets files, breaking the code by injecting ESM imports in commonjs files
|
|
447
|
+
|
|
448
|
+
There are workarounds for both:
|
|
449
|
+
|
|
450
|
+
- We can help vite by replacing `import.meta.url` by the original module path:
|
|
451
|
+
|
|
452
|
+
```typescript
|
|
453
|
+
import importMetaUrlPlugin from '@codingame/esbuild-import-meta-url-plugin'
|
|
454
|
+
|
|
455
|
+
{
|
|
456
|
+
...
|
|
457
|
+
optimizeDeps: {
|
|
458
|
+
esbuildOptions: {
|
|
459
|
+
plugins: [importMetaUrlPlugin]
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
### If using Angular and getting `Not allowed to load local resource:` errors
|
|
466
|
+
|
|
467
|
+
*The short version*: set up and use a custom webpack config file and add this under `module`:
|
|
468
|
+
|
|
469
|
+
```typescript
|
|
470
|
+
parser: {
|
|
471
|
+
javascript: {
|
|
472
|
+
url: true,
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
See [this issue](https://github.com/CodinGame/monaco-vscode-api/issues/186) or this [StackOverflow answer](https://stackoverflow.com/a/75252098) for more details, and [this discussion](https://github.com/angular/angular-cli/issues/24617) for more context.
|
|
478
|
+
|
|
479
|
+
### The typescript language features extension is not providing project-wide intellisense
|
|
480
|
+
|
|
481
|
+
The typescript language features extensions requires [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) to enable project wide intellisense or only a per-file intellisense is provided.
|
|
482
|
+
|
|
483
|
+
It requires [crossOriginIsolated](https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated) to be true, which requires assets files to be servers with some specific headers:
|
|
484
|
+
|
|
485
|
+
- [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy): `same-origin`
|
|
486
|
+
- [Cross-Origin-Embedder-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy): `require-corp` or `credentialless`
|
|
487
|
+
|
|
488
|
+
At least thoses files should have the headers:
|
|
489
|
+
|
|
490
|
+
- the main page html
|
|
491
|
+
- the worker extension host iframe html: `webWorkerExtensionHostIframe.html`
|
|
492
|
+
- the worker extension host worker javascript: `extensionHost.worker.js`
|
|
493
|
+
|
|
494
|
+
If adding those headers is not an options, you can have a look at <https://github.com/gzuidhof/coi-serviceworker>, but only if you are not using webviews as it introduces problems then.
|
|
495
|
+
|
|
496
|
+
## History
|
|
464
497
|
|
|
465
498
|
This project was mainly created to make the implementation of [monaco-languageclient](https://github.com/TypeFox/monaco-languageclient) more robust and maintainable.
|
|
466
499
|
|
package/api.js
CHANGED
package/debugProtocol.d.ts
CHANGED
|
@@ -1377,6 +1377,15 @@ declare module DebugProtocol {
|
|
|
1377
1377
|
expression: string;
|
|
1378
1378
|
/** Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. */
|
|
1379
1379
|
frameId?: number;
|
|
1380
|
+
/** The contextual line where the expression should be evaluated. In the 'hover' context, this should be set to the start of the expression being hovered. */
|
|
1381
|
+
line?: number;
|
|
1382
|
+
/** The contextual column where the expression should be evaluated. This may be provided if `line` is also provided.
|
|
1383
|
+
|
|
1384
|
+
It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.
|
|
1385
|
+
*/
|
|
1386
|
+
column?: number;
|
|
1387
|
+
/** The contextual source in which the `line` is found. This must be provided if `line` is provided. */
|
|
1388
|
+
source?: Source;
|
|
1380
1389
|
/** The context in which the evaluate request is used.
|
|
1381
1390
|
Values:
|
|
1382
1391
|
'watch': evaluate is called from a watch view context.
|
|
@@ -2401,7 +2410,7 @@ declare module DebugProtocol {
|
|
|
2401
2410
|
Values:
|
|
2402
2411
|
'source': In `SourceBreakpoint`s
|
|
2403
2412
|
'exception': In exception breakpoints applied in the `ExceptionFilterOptions`
|
|
2404
|
-
'data': In data breakpoints requested in the
|
|
2413
|
+
'data': In data breakpoints requested in the `DataBreakpointInfo` request
|
|
2405
2414
|
'instruction': In `InstructionBreakpoint`s
|
|
2406
2415
|
etc.
|
|
2407
2416
|
*/
|
package/extensions.d.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
/// <reference path="./vscode-dts/vscode.proposed.codeActionRanges.d.ts" />
|
|
16
16
|
/// <reference path="./vscode-dts/vscode.proposed.codiconDecoration.d.ts" />
|
|
17
17
|
/// <reference path="./vscode-dts/vscode.proposed.commentReactor.d.ts" />
|
|
18
|
+
/// <reference path="./vscode-dts/vscode.proposed.commentReveal.d.ts" />
|
|
18
19
|
/// <reference path="./vscode-dts/vscode.proposed.commentThreadApplicability.d.ts" />
|
|
19
20
|
/// <reference path="./vscode-dts/vscode.proposed.commentingRangeHint.d.ts" />
|
|
20
21
|
/// <reference path="./vscode-dts/vscode.proposed.commentsDraftState.d.ts" />
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
/// <reference path="./vscode-dts/vscode.proposed.ipc.d.ts" />
|
|
47
48
|
/// <reference path="./vscode-dts/vscode.proposed.languageModelSystem.d.ts" />
|
|
48
49
|
/// <reference path="./vscode-dts/vscode.proposed.languageStatusText.d.ts" />
|
|
50
|
+
/// <reference path="./vscode-dts/vscode.proposed.lmTools.d.ts" />
|
|
49
51
|
/// <reference path="./vscode-dts/vscode.proposed.mappedEditsProvider.d.ts" />
|
|
50
52
|
/// <reference path="./vscode-dts/vscode.proposed.multiDocumentHighlightProvider.d.ts" />
|
|
51
53
|
/// <reference path="./vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts" />
|
package/missing-services.js
CHANGED
|
@@ -208,6 +208,7 @@ import { IUserDataProfileStorageService } from './vscode/src/vs/platform/userDat
|
|
|
208
208
|
import { IIssueMainService } from './vscode/src/vs/platform/issue/common/issue.service.js';
|
|
209
209
|
import { IIntegrityService } from './vscode/src/vs/workbench/services/integrity/common/integrity.service.js';
|
|
210
210
|
import { ITrustedDomainService } from './vscode/src/vs/workbench/contrib/url/browser/trustedDomainService.service.js';
|
|
211
|
+
import { ILanguageModelToolsService } from './vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.js';
|
|
211
212
|
import { getExtensionIdProvidingCurrentLocale, getBuiltInExtensionTranslationsUris } from './l10n.js';
|
|
212
213
|
import { unsupported } from './tools.js';
|
|
213
214
|
var _a;
|
|
@@ -580,8 +581,8 @@ registerSingleton(IPathService, class PathService {
|
|
|
580
581
|
registerSingleton(IProductService, class ProductService {
|
|
581
582
|
constructor() {
|
|
582
583
|
this._serviceBrand = undefined;
|
|
583
|
-
this.version = "1.
|
|
584
|
-
this.commit = "
|
|
584
|
+
this.version = "1.91.0";
|
|
585
|
+
this.commit = "ea1445cc7016315d0f5728f8e8b12a45dc0a7286";
|
|
585
586
|
this.quality = 'oss';
|
|
586
587
|
this.nameShort = 'Code - OSS Dev';
|
|
587
588
|
this.nameLong = 'Code - OSS Dev';
|
|
@@ -611,6 +612,7 @@ registerSingleton(ILanguageStatusService, class LanguageStatusService {
|
|
|
611
612
|
}, 1 );
|
|
612
613
|
registerSingleton(IHostService, class HostService {
|
|
613
614
|
constructor() {
|
|
615
|
+
this.getPathForFile = () => undefined;
|
|
614
616
|
this.onDidChangeFullScreen = Event.None;
|
|
615
617
|
this.onDidChangeFocus = Event.None;
|
|
616
618
|
this.hasFocus = false;
|
|
@@ -1928,6 +1930,7 @@ registerSingleton(IPreferencesSearchService, class PreferencesSearchService {
|
|
|
1928
1930
|
}, 1 );
|
|
1929
1931
|
registerSingleton(INotebookService, class NotebookService {
|
|
1930
1932
|
constructor() {
|
|
1933
|
+
this.tryGetDataProviderSync = () => undefined;
|
|
1931
1934
|
this.canResolve = async () => false;
|
|
1932
1935
|
this.onAddViewType = Event.None;
|
|
1933
1936
|
this.onWillRemoveViewType = Event.None;
|
|
@@ -2095,6 +2098,7 @@ registerSingleton(IQuickChatService, class QuickChatService {
|
|
|
2095
2098
|
registerSingleton(IChatAgentService, class QuickChatService {
|
|
2096
2099
|
constructor() {
|
|
2097
2100
|
this._serviceBrand = undefined;
|
|
2101
|
+
this.agentHasDupeName = () => false;
|
|
2098
2102
|
this.registerAgentCompletionProvider = unsupported;
|
|
2099
2103
|
this.getAgentCompletionItems = unsupported;
|
|
2100
2104
|
this.getAgentByFullyQualifiedId = unsupported;
|
|
@@ -2605,6 +2609,7 @@ registerSingleton(IShareService, class ShareService {
|
|
|
2605
2609
|
}, 1 );
|
|
2606
2610
|
registerSingleton(IUserDataProfileImportExportService, class UserDataProfileImportExportService {
|
|
2607
2611
|
constructor() {
|
|
2612
|
+
this.createProfileFromTemplate = async () => undefined;
|
|
2608
2613
|
this.resolveProfileTemplate = unsupported;
|
|
2609
2614
|
this.exportProfile2 = unsupported;
|
|
2610
2615
|
this.createFromProfile = unsupported;
|
|
@@ -2747,6 +2752,7 @@ registerSingleton(INotebookSearchService, class NotebookSearchService {
|
|
|
2747
2752
|
}, 1 );
|
|
2748
2753
|
registerSingleton(ILanguageModelsService, class LanguageModelsService {
|
|
2749
2754
|
constructor() {
|
|
2755
|
+
this.sendChatRequest = unsupported;
|
|
2750
2756
|
this.selectLanguageModels = unsupported;
|
|
2751
2757
|
this.computeTokenLength = unsupported;
|
|
2752
2758
|
this.onDidChangeLanguageModels = Event.None;
|
|
@@ -2882,6 +2888,9 @@ registerSingleton(ITestCoverageService, class TestCoverageService {
|
|
|
2882
2888
|
this.openCoverage = unsupported;
|
|
2883
2889
|
this.closeCoverage = unsupported;
|
|
2884
2890
|
}
|
|
2891
|
+
get showInline() {
|
|
2892
|
+
return unsupported();
|
|
2893
|
+
}
|
|
2885
2894
|
get filterToTest() {
|
|
2886
2895
|
return unsupported();
|
|
2887
2896
|
}
|
|
@@ -3078,6 +3087,7 @@ registerSingleton(IUserDataSyncUtilService, class UserDataSyncUtilService {
|
|
|
3078
3087
|
}, 1 );
|
|
3079
3088
|
registerSingleton(IUserDataProfileManagementService, class UserDataProfileManagementService {
|
|
3080
3089
|
constructor() {
|
|
3090
|
+
this.createProfile = unsupported;
|
|
3081
3091
|
this.createAndEnterProfile = unsupported;
|
|
3082
3092
|
this.createAndEnterTransientProfile = unsupported;
|
|
3083
3093
|
this.removeProfile = unsupported;
|
|
@@ -3223,3 +3233,12 @@ registerSingleton(ITrustedDomainService, class TrustedDomainService {
|
|
|
3223
3233
|
return false;
|
|
3224
3234
|
}
|
|
3225
3235
|
}, 1 );
|
|
3236
|
+
registerSingleton(ILanguageModelToolsService, class LanguageModelToolsService {
|
|
3237
|
+
constructor() {
|
|
3238
|
+
this.onDidChangeTools = Event.None;
|
|
3239
|
+
this.registerToolData = unsupported;
|
|
3240
|
+
this.registerToolImplementation = unsupported;
|
|
3241
|
+
this.getTools = () => [];
|
|
3242
|
+
this.invokeTool = unsupported;
|
|
3243
|
+
}
|
|
3244
|
+
}, 1 );
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "VSCode public API plugged on the monaco editor",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": {
|
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"@vscode/iconv-lite-umd": "0.7.0",
|
|
101
|
-
"jschardet": "3.
|
|
102
|
-
"@codingame/monaco-vscode-extensions-service-override": "
|
|
103
|
-
"@codingame/monaco-vscode-files-service-override": "
|
|
104
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "
|
|
105
|
-
"@codingame/monaco-vscode-environment-service-override": "
|
|
106
|
-
"@codingame/monaco-vscode-layout-service-override": "
|
|
107
|
-
"@codingame/monaco-vscode-host-service-override": "
|
|
108
|
-
"@codingame/monaco-vscode-base-service-override": "
|
|
101
|
+
"jschardet": "3.1.2",
|
|
102
|
+
"@codingame/monaco-vscode-extensions-service-override": "7.0.1",
|
|
103
|
+
"@codingame/monaco-vscode-files-service-override": "7.0.1",
|
|
104
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "7.0.1",
|
|
105
|
+
"@codingame/monaco-vscode-environment-service-override": "7.0.1",
|
|
106
|
+
"@codingame/monaco-vscode-layout-service-override": "7.0.1",
|
|
107
|
+
"@codingame/monaco-vscode-host-service-override": "7.0.1",
|
|
108
|
+
"@codingame/monaco-vscode-base-service-override": "7.0.1"
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -2,7 +2,7 @@ import { IFileService } from '../vscode/src/vs/platform/files/common/files.servi
|
|
|
2
2
|
import { ILifecycleService } from '../vscode/src/vs/workbench/services/lifecycle/common/lifecycle.service.js';
|
|
3
3
|
import { IExtensionService } from '../vscode/src/vs/workbench/services/extensions/common/extensions.service.js';
|
|
4
4
|
import { ILogService } from '../vscode/src/vs/platform/log/common/log.service.js';
|
|
5
|
-
import { IExtension
|
|
5
|
+
import { IExtension } from '../vscode/src/vs/platform/extensions/common/extensions.js';
|
|
6
6
|
import { IWorkspaceContextService } from '../vscode/src/vs/platform/workspace/common/workspace.service.js';
|
|
7
7
|
import { IInstantiationService } from '../vscode/src/vs/platform/instantiation/common/instantiation.js';
|
|
8
8
|
import { INotificationService } from '../vscode/src/vs/platform/notification/common/notification.service.js';
|
|
@@ -36,7 +36,6 @@ interface IExtensionWithExtHostKind extends IExtension {
|
|
|
36
36
|
declare class ExtensionServiceOverride extends ExtensionService implements IExtensionService {
|
|
37
37
|
constructor(workerConfig: WorkerConfig | undefined, instantiationService: IInstantiationService, notificationService: INotificationService, browserEnvironmentService: IBrowserWorkbenchEnvironmentService, telemetryService: ITelemetryService, extensionEnablementService: IWorkbenchExtensionEnablementService, fileService: IFileService, productService: IProductService, extensionManagementService: IWorkbenchExtensionManagementService, contextService: IWorkspaceContextService, configurationService: IConfigurationService, extensionManifestPropertiesService: IExtensionManifestPropertiesService, webExtensionsScannerService: IWebExtensionsScannerService, logService: ILogService, remoteAgentService: IRemoteAgentService, remoteExtensionsScannerService: IRemoteExtensionsScannerService, lifecycleService: ILifecycleService, remoteAuthorityResolverService: IRemoteAuthorityResolverService, userDataInitializationService: IUserDataInitializationService, userDataProfileService: IUserDataProfileService, workspaceTrustManagementService: IWorkspaceTrustManagementService, remoteExplorerService: IRemoteExplorerService, dialogService: IDialogService);
|
|
38
38
|
deltaExtensions(toAdd: IExtensionWithExtHostKind[], toRemove: IExtension[]): Promise<void>;
|
|
39
|
-
protected _scanSingleExtension(extension: IExtension): Promise<Readonly<IRelaxedExtensionDescription> | null>;
|
|
40
39
|
}
|
|
41
40
|
declare function getServiceOverride(workerConfig?: WorkerConfig, _iframeAlternateDomains?: string): IEditorOverrideServices;
|
|
42
41
|
|