@codingame/monaco-vscode-api 6.0.2 → 7.0.0
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 +93 -73
- package/api.js +1 -1
- package/debugProtocol.d.ts +10 -1
- package/extensions.d.ts +2 -0
- package/missing-services.js +21 -2
- package/monaco.d.ts +1 -1
- package/monaco.js +1 -1
- 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/editor/editor.api.d.ts +31 -5
- 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,77 +14,6 @@ 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
|
|
@@ -264,7 +193,6 @@ updateUserConfiguration(`{
|
|
|
264
193
|
```
|
|
265
194
|
|
|
266
195
|
### Troubleshoot
|
|
267
|
-
|
|
268
196
|
`initialize` can only be called once ( and it should be called BEFORE creating your first editor).
|
|
269
197
|
|
|
270
198
|
## Model creation
|
|
@@ -460,7 +388,99 @@ npm run start:debugServer
|
|
|
460
388
|
|
|
461
389
|
[See vscode_server.md](./docs/vscode_server.md)
|
|
462
390
|
|
|
463
|
-
|
|
391
|
+
## Troubleshooting
|
|
392
|
+
|
|
393
|
+
### Duplicate versions
|
|
394
|
+
|
|
395
|
+
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).
|
|
396
|
+
|
|
397
|
+
It is VERY important that only a single version of ALL the packages is installed, otherwise weird things can happen.
|
|
398
|
+
|
|
399
|
+
You can check that `npm list vscode` only lists a single version.
|
|
400
|
+
|
|
401
|
+
### If you use Webpack
|
|
402
|
+
|
|
403
|
+
#### monaco-editor-webpack-plugin
|
|
404
|
+
|
|
405
|
+
Starting from v2, [monaco-editor-webpack-plugin](https://www.npmjs.com/package/monaco-editor-webpack-plugin) can't be used
|
|
406
|
+
|
|
407
|
+
Here's the alternative for each options:
|
|
408
|
+
|
|
409
|
+
- `filename`: it can be configured at the webpack level directly
|
|
410
|
+
- `publicPath`: it can be configured at the webpack level or by hands when redistering the worker in `window.MonacoEnvironment`.
|
|
411
|
+
- `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).
|
|
412
|
+
- `features`: With this lib, you can't remove editor features.
|
|
413
|
+
- `globalAPI`: you can set `window.MonacoEnvironment.globalAPI` to true
|
|
414
|
+
|
|
415
|
+
#### exclude assets from loaders
|
|
416
|
+
|
|
417
|
+
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).
|
|
418
|
+
|
|
419
|
+
We need webpack to let those file untouched:
|
|
420
|
+
- the babel loader shouldn't transform extension javascript files
|
|
421
|
+
- the html loader shouldn't transform the worker extension host iframe html
|
|
422
|
+
- ...
|
|
423
|
+
|
|
424
|
+
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/
|
|
425
|
+
|
|
426
|
+
### If you use Vite
|
|
427
|
+
|
|
428
|
+
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)
|
|
429
|
+
|
|
430
|
+
While it works great in `build` mode (because rollup is used), there is some issues in `watch` mode:
|
|
431
|
+
|
|
432
|
+
- import.meta.url is not replaced while creating bundles, it is an issue when the syntax is used inside a dependency
|
|
433
|
+
- vite is still trying to inject/transform javascript assets files, breaking the code by injecting ESM imports in commonjs files
|
|
434
|
+
|
|
435
|
+
There are workarounds for both:
|
|
436
|
+
|
|
437
|
+
- We can help vite by replacing `import.meta.url` by the original module path:
|
|
438
|
+
|
|
439
|
+
```typescript
|
|
440
|
+
import importMetaUrlPlugin from '@codingame/esbuild-import-meta-url-plugin'
|
|
441
|
+
|
|
442
|
+
{
|
|
443
|
+
...
|
|
444
|
+
optimizeDeps: {
|
|
445
|
+
esbuildOptions: {
|
|
446
|
+
plugins: [importMetaUrlPlugin]
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### If using Angular and getting `Not allowed to load local resource:` errors
|
|
453
|
+
|
|
454
|
+
*The short version*: set up and use a custom webpack config file and add this under `module`:
|
|
455
|
+
|
|
456
|
+
```typescript
|
|
457
|
+
parser: {
|
|
458
|
+
javascript: {
|
|
459
|
+
url: true,
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
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.
|
|
465
|
+
|
|
466
|
+
### The typescript language features extension is not providing project-wide intellisense
|
|
467
|
+
|
|
468
|
+
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.
|
|
469
|
+
|
|
470
|
+
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:
|
|
471
|
+
|
|
472
|
+
- [Cross-Origin-Opener-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy): `same-origin`
|
|
473
|
+
- [Cross-Origin-Embedder-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy): `require-corp` or `credentialless`
|
|
474
|
+
|
|
475
|
+
At least thoses files should have the headers:
|
|
476
|
+
|
|
477
|
+
- the main page html
|
|
478
|
+
- the worker extension host iframe html: `webWorkerExtensionHostIframe.html`
|
|
479
|
+
- the worker extension host worker javascript: `extensionHost.worker.js`
|
|
480
|
+
|
|
481
|
+
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.
|
|
482
|
+
|
|
483
|
+
## History
|
|
464
484
|
|
|
465
485
|
This project was mainly created to make the implementation of [monaco-languageclient](https://github.com/TypeFox/monaco-languageclient) more robust and maintainable.
|
|
466
486
|
|
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 = unsupported;
|
|
3242
|
+
this.invokeTool = unsupported;
|
|
3243
|
+
}
|
|
3244
|
+
}, 1 );
|
package/monaco.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { KeybindingResolver } from './vscode/src/vs/platform/keybinding/common/k
|
|
|
19
19
|
import { ResolvedKeybindingItem } from './vscode/src/vs/platform/keybinding/common/resolvedKeybindingItem.js';
|
|
20
20
|
import { Event } from './vscode/src/vs/base/common/event.js';
|
|
21
21
|
import { IKeybindingService } from './vscode/src/vs/platform/keybinding/common/keybinding.service.js';
|
|
22
|
-
export { EditorAction, EditorCommand, registerDiffEditorContribution, registerEditorAction, registerEditorContribution, registerMultiEditorAction } from './vscode/src/vs/editor/browser/editorExtensions.js';
|
|
22
|
+
export { EditorAction, EditorCommand, EditorContributionInstantiation, registerDiffEditorContribution, registerEditorAction, registerEditorContribution, registerMultiEditorAction } from './vscode/src/vs/editor/browser/editorExtensions.js';
|
|
23
23
|
export { IDiffEditorContribution, IEditorContribution } from './vscode/src/vs/editor/common/editorCommon.js';
|
|
24
24
|
|
|
25
25
|
declare function writeFile(uri: URI, content: string): Promise<void>;
|
package/monaco.js
CHANGED
|
@@ -45,7 +45,7 @@ import { ILogService } from './vscode/src/vs/platform/log/common/log.service.js'
|
|
|
45
45
|
import { IQuickInputService } from './vscode/src/vs/platform/quickinput/common/quickInput.service.js';
|
|
46
46
|
import { createInjectedClass } from './tools/injection.js';
|
|
47
47
|
import { getService } from './services.js';
|
|
48
|
-
export { EditorAction, EditorCommand, registerDiffEditorContribution, registerEditorAction, registerEditorContribution, registerMultiEditorAction } from './vscode/src/vs/editor/browser/editorExtensions.js';
|
|
48
|
+
export { EditorAction, EditorCommand, EditorContributionInstantiation, registerDiffEditorContribution, registerEditorAction, registerEditorContribution, registerMultiEditorAction } from './vscode/src/vs/editor/browser/editorExtensions.js';
|
|
49
49
|
function computeConfiguration(configuration, overrides) {
|
|
50
50
|
const editorConfiguration = isObject(configuration.editor) ? deepClone(configuration.editor) : Object.create(null);
|
|
51
51
|
Object.assign(editorConfiguration, deepClone(overrides));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
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-
|
|
103
|
-
"@codingame/monaco-vscode-
|
|
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.0",
|
|
103
|
+
"@codingame/monaco-vscode-files-service-override": "7.0.0",
|
|
104
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "7.0.0",
|
|
105
|
+
"@codingame/monaco-vscode-environment-service-override": "7.0.0",
|
|
106
|
+
"@codingame/monaco-vscode-layout-service-override": "7.0.0",
|
|
107
|
+
"@codingame/monaco-vscode-host-service-override": "7.0.0",
|
|
108
|
+
"@codingame/monaco-vscode-base-service-override": "7.0.0"
|
|
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
|
|
package/services.js
CHANGED
|
@@ -66,7 +66,9 @@ import './vscode/src/vs/editor/contrib/links/browser/links.js';
|
|
|
66
66
|
import './vscode/src/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js';
|
|
67
67
|
import './vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js';
|
|
68
68
|
import './vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEdit.contribution.js';
|
|
69
|
+
import './vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEdits.contribution.js';
|
|
69
70
|
import './vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js';
|
|
71
|
+
import './vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js';
|
|
70
72
|
import './vscode/src/vs/editor/contrib/rename/browser/rename.js';
|
|
71
73
|
import './vscode/src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js';
|
|
72
74
|
import './vscode/src/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js';
|
|
@@ -184,9 +186,9 @@ async function initialize(overrides, container = document.body, configuration =
|
|
|
184
186
|
initialize$1(container, configuration, env);
|
|
185
187
|
const instantiationService = StandaloneServices.initialize({
|
|
186
188
|
[( IProductService.toString())]: mixin({
|
|
187
|
-
version: "1.
|
|
189
|
+
version: "1.91.0",
|
|
188
190
|
quality: 'stable',
|
|
189
|
-
commit: "
|
|
191
|
+
commit: "ea1445cc7016315d0f5728f8e8b12a45dc0a7286",
|
|
190
192
|
nameShort: 'Code - OSS',
|
|
191
193
|
nameLong: 'Code - OSS',
|
|
192
194
|
applicationName: 'code-oss',
|
|
@@ -51,7 +51,7 @@ function applyDragImage(event, label, clazz, backgroundColor, foregroundColor) {
|
|
|
51
51
|
const ownerDocument = getWindow(event).document;
|
|
52
52
|
ownerDocument.body.appendChild(dragImage);
|
|
53
53
|
event.dataTransfer.setDragImage(dragImage, -10, -10);
|
|
54
|
-
setTimeout(() =>
|
|
54
|
+
setTimeout(() => dragImage.remove(), 0);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
export { DataTransfers, DelayedDragHandler, applyDragImage };
|
|
@@ -13,6 +13,7 @@ import { isIOS, isMacintosh, isLinux } from '../common/platform.js';
|
|
|
13
13
|
import { URI } from '../common/uri.js';
|
|
14
14
|
import { hash } from '../common/hash.js';
|
|
15
15
|
import { mainWindow, ensureCodeWindow } from './window.js';
|
|
16
|
+
import { isPointWithinTriangle } from '../common/numbers.js';
|
|
16
17
|
const { registerWindow, getWindow, getDocument, getWindows, getWindowsCount, getWindowId, getWindowById, hasWindow, onDidRegisterWindow, onWillUnregisterWindow, onDidUnregisterWindow } = ( (function() {
|
|
17
18
|
const windows = ( new Map());
|
|
18
19
|
ensureCodeWindow(mainWindow, 1);
|
|
@@ -636,7 +637,7 @@ function createStyleSheet(container = mainWindow.document.head, beforeAppend, di
|
|
|
636
637
|
beforeAppend?.(style);
|
|
637
638
|
container.appendChild(style);
|
|
638
639
|
if (disposableStore) {
|
|
639
|
-
disposableStore.add(toDisposable(() =>
|
|
640
|
+
disposableStore.add(toDisposable(() => style.remove()));
|
|
640
641
|
}
|
|
641
642
|
if (container === mainWindow.document.head) {
|
|
642
643
|
const globalStylesheetClones = ( new Set());
|
|
@@ -662,7 +663,7 @@ function cloneGlobalStyleSheet(globalStylesheet, globalStylesheetClones, targetW
|
|
|
662
663
|
const disposables = ( new DisposableStore());
|
|
663
664
|
const clone = globalStylesheet.cloneNode(true);
|
|
664
665
|
targetWindow.document.head.appendChild(clone);
|
|
665
|
-
disposables.add(toDisposable(() =>
|
|
666
|
+
disposables.add(toDisposable(() => clone.remove()));
|
|
666
667
|
for (const rule of getDynamicStyleSheetRules(globalStylesheet)) {
|
|
667
668
|
clone.sheet?.insertRule(rule.cssText, clone.sheet?.cssRules.length);
|
|
668
669
|
}
|
|
@@ -1114,7 +1115,7 @@ function triggerDownload(dataOrUri, name) {
|
|
|
1114
1115
|
anchor.download = name;
|
|
1115
1116
|
anchor.href = url;
|
|
1116
1117
|
anchor.click();
|
|
1117
|
-
setTimeout(() =>
|
|
1118
|
+
setTimeout(() => anchor.remove());
|
|
1118
1119
|
}
|
|
1119
1120
|
function triggerUpload() {
|
|
1120
1121
|
return ( new Promise(resolve => {
|
|
@@ -1127,7 +1128,7 @@ function triggerUpload() {
|
|
|
1127
1128
|
resolve(input.files ?? undefined);
|
|
1128
1129
|
});
|
|
1129
1130
|
input.click();
|
|
1130
|
-
setTimeout(() =>
|
|
1131
|
+
setTimeout(() => input.remove());
|
|
1131
1132
|
}));
|
|
1132
1133
|
}
|
|
1133
1134
|
var DetectedFullscreenMode;
|
|
@@ -1525,6 +1526,81 @@ function h(tag, ...args) {
|
|
|
1525
1526
|
result['root'] = el;
|
|
1526
1527
|
return result;
|
|
1527
1528
|
}
|
|
1529
|
+
function svgElem(tag, ...args) {
|
|
1530
|
+
let attributes;
|
|
1531
|
+
let children;
|
|
1532
|
+
if (Array.isArray(args[0])) {
|
|
1533
|
+
attributes = {};
|
|
1534
|
+
children = args[0];
|
|
1535
|
+
}
|
|
1536
|
+
else {
|
|
1537
|
+
attributes = args[0] || {};
|
|
1538
|
+
children = args[1];
|
|
1539
|
+
}
|
|
1540
|
+
const match = H_REGEX.exec(tag);
|
|
1541
|
+
if (!match || !match.groups) {
|
|
1542
|
+
throw ( new Error('Bad use of h'));
|
|
1543
|
+
}
|
|
1544
|
+
const tagName = match.groups['tag'] || 'div';
|
|
1545
|
+
const el = document.createElementNS('http://www.w3.org/2000/svg', tagName);
|
|
1546
|
+
if (match.groups['id']) {
|
|
1547
|
+
el.id = match.groups['id'];
|
|
1548
|
+
}
|
|
1549
|
+
const classNames = [];
|
|
1550
|
+
if (match.groups['class']) {
|
|
1551
|
+
for (const className of match.groups['class'].split('.')) {
|
|
1552
|
+
if (className !== '') {
|
|
1553
|
+
classNames.push(className);
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
if (attributes.className !== undefined) {
|
|
1558
|
+
for (const className of attributes.className.split('.')) {
|
|
1559
|
+
if (className !== '') {
|
|
1560
|
+
classNames.push(className);
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
if (classNames.length > 0) {
|
|
1565
|
+
el.className = classNames.join(' ');
|
|
1566
|
+
}
|
|
1567
|
+
const result = {};
|
|
1568
|
+
if (match.groups['name']) {
|
|
1569
|
+
result[match.groups['name']] = el;
|
|
1570
|
+
}
|
|
1571
|
+
if (children) {
|
|
1572
|
+
for (const c of children) {
|
|
1573
|
+
if (isHTMLElement(c)) {
|
|
1574
|
+
el.appendChild(c);
|
|
1575
|
+
}
|
|
1576
|
+
else if (typeof c === 'string') {
|
|
1577
|
+
el.append(c);
|
|
1578
|
+
}
|
|
1579
|
+
else if ('root' in c) {
|
|
1580
|
+
Object.assign(result, c);
|
|
1581
|
+
el.appendChild(c.root);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
1586
|
+
if (key === 'className') {
|
|
1587
|
+
continue;
|
|
1588
|
+
}
|
|
1589
|
+
else if (key === 'style') {
|
|
1590
|
+
for (const [cssKey, cssValue] of Object.entries(value)) {
|
|
1591
|
+
el.style.setProperty(camelCaseToHyphenCase(cssKey), typeof cssValue === 'number' ? cssValue + 'px' : '' + cssValue);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
else if (key === 'tabIndex') {
|
|
1595
|
+
el.tabIndex = value;
|
|
1596
|
+
}
|
|
1597
|
+
else {
|
|
1598
|
+
el.setAttribute(camelCaseToHyphenCase(key), ( value.toString()));
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
result['root'] = el;
|
|
1602
|
+
return result;
|
|
1603
|
+
}
|
|
1528
1604
|
function camelCaseToHyphenCase(str) {
|
|
1529
1605
|
return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
1530
1606
|
}
|
|
@@ -1556,4 +1632,39 @@ function trackAttributes(from, to, filter) {
|
|
|
1556
1632
|
}));
|
|
1557
1633
|
return disposables;
|
|
1558
1634
|
}
|
|
1559
|
-
|
|
1635
|
+
class SafeTriangle {
|
|
1636
|
+
constructor(originX, originY, target) {
|
|
1637
|
+
this.originX = originX;
|
|
1638
|
+
this.originY = originY;
|
|
1639
|
+
this.triangles = [];
|
|
1640
|
+
const { top, left, right, bottom } = target.getBoundingClientRect();
|
|
1641
|
+
const t = this.triangles;
|
|
1642
|
+
let i = 0;
|
|
1643
|
+
t[i++] = left;
|
|
1644
|
+
t[i++] = top;
|
|
1645
|
+
t[i++] = right;
|
|
1646
|
+
t[i++] = top;
|
|
1647
|
+
t[i++] = left;
|
|
1648
|
+
t[i++] = top;
|
|
1649
|
+
t[i++] = left;
|
|
1650
|
+
t[i++] = bottom;
|
|
1651
|
+
t[i++] = right;
|
|
1652
|
+
t[i++] = top;
|
|
1653
|
+
t[i++] = right;
|
|
1654
|
+
t[i++] = bottom;
|
|
1655
|
+
t[i++] = left;
|
|
1656
|
+
t[i++] = bottom;
|
|
1657
|
+
t[i++] = right;
|
|
1658
|
+
t[i++] = bottom;
|
|
1659
|
+
}
|
|
1660
|
+
contains(x, y) {
|
|
1661
|
+
const { triangles, originX, originY } = this;
|
|
1662
|
+
for (let i = 0; i < 4; i++) {
|
|
1663
|
+
if (isPointWithinTriangle(x, y, originX, originY, triangles[2 * i], triangles[2 * i + 1], triangles[2 * i + 2], triangles[2 * i + 3])) {
|
|
1664
|
+
return true;
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
return false;
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
export { $, DetectedFullscreenMode, Dimension, DragAndDropObserver, EventHelper, EventType, ModifierKeyEmitter, Namespace, SafeTriangle, WindowIdleValue, WindowIntervalTimer, addDisposableGenericMouseDownListener, addDisposableGenericMouseMoveListener, addDisposableGenericMouseUpListener, addDisposableListener, addDisposableThrottledListener, addStandardDisposableGenericMouseDownListener, addStandardDisposableGenericMouseUpListener, addStandardDisposableListener, after, animate, append, asCSSPropertyValue, asCSSUrl, asCssValueWithDefault, basicMarkupHtmlTags, clearNode, cloneGlobalStylesheets, computeScreenAwareSize, copyAttributes, createCSSRule, createLinkElement, createMetaElement, createStyleSheet, createStyleSheet2, detectFullscreen, disposableWindowInterval, finalHandler, findParentWithClass, getActiveDocument, getActiveElement, getActiveWindow, getClientArea, getComputedStyle, getContentHeight, getContentWidth, getDocument, getDomNodePagePosition, getDomNodeZoomLevel, getLargestChildWidth, getShadowRoot, getTopLeftOffset, getTotalHeight, getTotalScrollWidth, getTotalWidth, getWindow, getWindowById, getWindowId, getWindows, getWindowsCount, h, hasParentWithClass, hasWindow, hide, hookDomPurifyHrefAndSrcSanitizer, isActiveDocument, isActiveElement, isAncestor, isAncestorOfActiveElement, isAncestorUsingFlowTo, isDragEvent, isEventLike, isGlobalStylesheet, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLTextAreaElement, isInShadowDOM, isKeyboardEvent, isMouseEvent, isPointerEvent, isShadowRoot, measure, modify, multibyteAwareBtoa, onDidRegisterWindow, onDidUnregisterWindow, onWillUnregisterWindow, position, prepend, registerWindow, removeCSSRulesContainingSelector, reset, restoreParentsScrollTop, runAtThisOrScheduleAtNextAnimationFrame, runWhenWindowIdle, safeInnerHtml, saveParentsScrollTop, scheduleAtNextAnimationFrame, setParentFlowTo, setVisibility, sharedMutationObserver, show, size, svgElem, trackAttributes, trackFocus, triggerDownload, triggerUpload, windowOpenNoOpener, windowOpenPopup, windowOpenWithSuccess };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createStyleSheet2 } from './dom.js';
|
|
2
|
+
import { DisposableStore } from '../common/lifecycle.js';
|
|
3
|
+
import '../common/arrays.js';
|
|
4
|
+
import '../common/observableInternal/derived.js';
|
|
5
|
+
import { autorun } from '../common/observableInternal/autorun.js';
|
|
6
|
+
import '../common/observableInternal/utils.js';
|
|
7
|
+
import '../common/cancellation.js';
|
|
8
|
+
function createStyleSheetFromObservable(css) {
|
|
9
|
+
const store = ( new DisposableStore());
|
|
10
|
+
const w = store.add(createStyleSheet2());
|
|
11
|
+
store.add(autorun(reader => {
|
|
12
|
+
w.setStyle(css.read(reader));
|
|
13
|
+
}));
|
|
14
|
+
return store;
|
|
15
|
+
}
|
|
16
|
+
export { createStyleSheetFromObservable };
|