@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
|
@@ -166,6 +166,7 @@ interface IProductConfiguration {
|
|
|
166
166
|
readonly extensionSyncedKeys?: {
|
|
167
167
|
readonly [extensionId: string]: string[];
|
|
168
168
|
};
|
|
169
|
+
readonly extensionsEnabledWithApiProposalVersion?: string[];
|
|
169
170
|
readonly extensionEnabledApiProposals?: {
|
|
170
171
|
readonly [extensionId: string]: string[];
|
|
171
172
|
};
|
|
@@ -283,7 +283,7 @@ class ChannelServer {
|
|
|
283
283
|
id, data: {
|
|
284
284
|
message: err.message,
|
|
285
285
|
name: err.name,
|
|
286
|
-
stack: err.stack ?
|
|
286
|
+
stack: err.stack ? err.stack.split('\n') : undefined
|
|
287
287
|
}, type: ResponseType.PromiseError
|
|
288
288
|
});
|
|
289
289
|
}
|
|
@@ -26,7 +26,7 @@ class DomCharWidthReader {
|
|
|
26
26
|
this._createDomElements();
|
|
27
27
|
targetWindow.document.body.appendChild(this._container);
|
|
28
28
|
this._readFromDomElements();
|
|
29
|
-
|
|
29
|
+
this._container?.remove();
|
|
30
30
|
this._container = null;
|
|
31
31
|
this._testElements = null;
|
|
32
32
|
}
|
|
@@ -720,7 +720,7 @@ function measureText(targetDocument, text, fontInfo, tabSize) {
|
|
|
720
720
|
container.appendChild(regularDomNode);
|
|
721
721
|
targetDocument.body.appendChild(container);
|
|
722
722
|
const res = regularDomNode.offsetWidth;
|
|
723
|
-
|
|
723
|
+
container.remove();
|
|
724
724
|
return res;
|
|
725
725
|
}
|
|
726
726
|
export { TextAreaHandler };
|
|
@@ -20,6 +20,7 @@ import { ContextKeyExpr } from '../../platform/contextkey/common/contextkey.js';
|
|
|
20
20
|
import { KeybindingsRegistry, KeybindingWeight } from '../../platform/keybinding/common/keybindingsRegistry.js';
|
|
21
21
|
import { EditorOption } from '../common/config/editorOptions.js';
|
|
22
22
|
import { getActiveElement } from '../../base/browser/dom.js';
|
|
23
|
+
import { EnterOperation } from '../common/cursor/cursorTypeEditOperations.js';
|
|
23
24
|
const _moduleId = "vs/editor/browser/coreCommands";
|
|
24
25
|
const CORE_WEIGHT = KeybindingWeight.EditorCore;
|
|
25
26
|
class CoreEditorCommand extends EditorCommand {
|
|
@@ -1561,7 +1562,7 @@ var CoreEditingCommands;
|
|
|
1561
1562
|
}
|
|
1562
1563
|
runCoreEditingCommand(editor, viewModel, args) {
|
|
1563
1564
|
editor.pushUndoStop();
|
|
1564
|
-
editor.executeCommands(this.id,
|
|
1565
|
+
editor.executeCommands(this.id, EnterOperation.lineBreakInsert(viewModel.cursorConfig, viewModel.model, ( (viewModel.getCursorStates().map(s => s.modelState.selection)))));
|
|
1565
1566
|
}
|
|
1566
1567
|
}));
|
|
1567
1568
|
CoreEditingCommands.Outdent = registerEditorCommand(new (class extends CoreEditingCommand {
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { equalsIfDefined, itemsEquals } from '../../base/common/equals.js';
|
|
2
|
+
import { Disposable, toDisposable, DisposableStore } from '../../base/common/lifecycle.js';
|
|
3
|
+
import { TransactionImpl, observableValue } from '../../base/common/observableInternal/base.js';
|
|
4
|
+
import { derivedOpts, derivedWithSetter, derived } from '../../base/common/observableInternal/derived.js';
|
|
5
|
+
import { autorunOpts, autorun, autorunWithStoreHandleChanges } from '../../base/common/observableInternal/autorun.js';
|
|
6
|
+
import { observableFromEvent, observableSignal } from '../../base/common/observableInternal/utils.js';
|
|
7
|
+
import '../../base/common/cancellation.js';
|
|
8
|
+
import { observableValueOpts } from '../../base/common/observableInternal/api.js';
|
|
9
|
+
import { EditorOption } from '../common/config/editorOptions.js';
|
|
10
|
+
import { Position } from '../common/core/position.js';
|
|
11
|
+
import { Selection } from '../common/core/selection.js';
|
|
12
|
+
function observableCodeEditor(editor) {
|
|
13
|
+
return ObservableCodeEditor.get(editor);
|
|
14
|
+
}
|
|
15
|
+
class ObservableCodeEditor extends Disposable {
|
|
16
|
+
static { this._map = ( new Map()); }
|
|
17
|
+
static get(editor) {
|
|
18
|
+
let result = ObservableCodeEditor._map.get(editor);
|
|
19
|
+
if (!result) {
|
|
20
|
+
result = ( new ObservableCodeEditor(editor));
|
|
21
|
+
ObservableCodeEditor._map.set(editor, result);
|
|
22
|
+
const d = editor.onDidDispose(() => {
|
|
23
|
+
const item = ObservableCodeEditor._map.get(editor);
|
|
24
|
+
if (item) {
|
|
25
|
+
ObservableCodeEditor._map.delete(editor);
|
|
26
|
+
item.dispose();
|
|
27
|
+
d.dispose();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
_beginUpdate() {
|
|
34
|
+
this._updateCounter++;
|
|
35
|
+
if (this._updateCounter === 1) {
|
|
36
|
+
this._currentTransaction = ( new TransactionImpl(() => {
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
_endUpdate() {
|
|
41
|
+
this._updateCounter--;
|
|
42
|
+
if (this._updateCounter === 0) {
|
|
43
|
+
const t = this._currentTransaction;
|
|
44
|
+
this._currentTransaction = undefined;
|
|
45
|
+
t.finish();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
constructor(editor) {
|
|
49
|
+
super();
|
|
50
|
+
this.editor = editor;
|
|
51
|
+
this._updateCounter = 0;
|
|
52
|
+
this._currentTransaction = undefined;
|
|
53
|
+
this._model = observableValue(this, this.editor.getModel());
|
|
54
|
+
this.model = this._model;
|
|
55
|
+
this.isReadonly = observableFromEvent(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(EditorOption.readOnly));
|
|
56
|
+
this._versionId = observableValueOpts({ owner: this, lazy: true }, this.editor.getModel()?.getVersionId() ?? null);
|
|
57
|
+
this.versionId = this._versionId;
|
|
58
|
+
this._selections = observableValueOpts({ owner: this, equalsFn: equalsIfDefined(itemsEquals(Selection.selectionsEqual)), lazy: true }, this.editor.getSelections() ?? null);
|
|
59
|
+
this.selections = this._selections;
|
|
60
|
+
this.positions = derivedOpts({ owner: this, equalsFn: equalsIfDefined(itemsEquals(Position.equals)) }, reader => this.selections.read(reader)?.map(s => s.getStartPosition()) ?? null);
|
|
61
|
+
this.isFocused = observableFromEvent(this, e => {
|
|
62
|
+
const d1 = this.editor.onDidFocusEditorWidget(e);
|
|
63
|
+
const d2 = this.editor.onDidBlurEditorWidget(e);
|
|
64
|
+
return {
|
|
65
|
+
dispose() {
|
|
66
|
+
d1.dispose();
|
|
67
|
+
d2.dispose();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}, () => this.editor.hasWidgetFocus());
|
|
71
|
+
this.value = derivedWithSetter(this, reader => { this.versionId.read(reader); return this.model.read(reader)?.getValue() ?? ''; }, (value, tx) => {
|
|
72
|
+
const model = this.model.get();
|
|
73
|
+
if (model !== null) {
|
|
74
|
+
if (value !== model.getValue()) {
|
|
75
|
+
model.setValue(value);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
this.valueIsEmpty = derived(this, reader => { this.versionId.read(reader); return this.editor.getModel()?.getValueLength() === 0; });
|
|
80
|
+
this.cursorSelection = derivedOpts({ owner: this, equalsFn: equalsIfDefined(Selection.selectionsEqual) }, reader => this.selections.read(reader)?.[0] ?? null);
|
|
81
|
+
this.cursorPosition = derivedOpts({ owner: this, equalsFn: Position.equals }, reader => this.selections.read(reader)?.[0]?.getPosition() ?? null);
|
|
82
|
+
this.onDidType = observableSignal(this);
|
|
83
|
+
this.scrollTop = observableFromEvent(this.editor.onDidScrollChange, () => this.editor.getScrollTop());
|
|
84
|
+
this.scrollLeft = observableFromEvent(this.editor.onDidScrollChange, () => this.editor.getScrollLeft());
|
|
85
|
+
this.layoutInfo = observableFromEvent(this.editor.onDidLayoutChange, () => this.editor.getLayoutInfo());
|
|
86
|
+
this.contentWidth = observableFromEvent(this.editor.onDidContentSizeChange, () => this.editor.getContentWidth());
|
|
87
|
+
this._overlayWidgetCounter = 0;
|
|
88
|
+
this._register(this.editor.onBeginUpdate(() => this._beginUpdate()));
|
|
89
|
+
this._register(this.editor.onEndUpdate(() => this._endUpdate()));
|
|
90
|
+
this._register(this.editor.onDidChangeModel(() => {
|
|
91
|
+
this._beginUpdate();
|
|
92
|
+
try {
|
|
93
|
+
this._model.set(this.editor.getModel(), this._currentTransaction);
|
|
94
|
+
this._forceUpdate();
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
this._endUpdate();
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
this._register(this.editor.onDidType((e) => {
|
|
101
|
+
this._beginUpdate();
|
|
102
|
+
try {
|
|
103
|
+
this._forceUpdate();
|
|
104
|
+
this.onDidType.trigger(this._currentTransaction, e);
|
|
105
|
+
}
|
|
106
|
+
finally {
|
|
107
|
+
this._endUpdate();
|
|
108
|
+
}
|
|
109
|
+
}));
|
|
110
|
+
this._register(this.editor.onDidChangeModelContent(e => {
|
|
111
|
+
this._beginUpdate();
|
|
112
|
+
try {
|
|
113
|
+
this._versionId.set(this.editor.getModel()?.getVersionId() ?? null, this._currentTransaction, e);
|
|
114
|
+
this._forceUpdate();
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
this._endUpdate();
|
|
118
|
+
}
|
|
119
|
+
}));
|
|
120
|
+
this._register(this.editor.onDidChangeCursorSelection(e => {
|
|
121
|
+
this._beginUpdate();
|
|
122
|
+
try {
|
|
123
|
+
this._selections.set(this.editor.getSelections(), this._currentTransaction, e);
|
|
124
|
+
this._forceUpdate();
|
|
125
|
+
}
|
|
126
|
+
finally {
|
|
127
|
+
this._endUpdate();
|
|
128
|
+
}
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
forceUpdate(cb) {
|
|
132
|
+
this._beginUpdate();
|
|
133
|
+
try {
|
|
134
|
+
this._forceUpdate();
|
|
135
|
+
if (!cb) {
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
return cb(this._currentTransaction);
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
this._endUpdate();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
_forceUpdate() {
|
|
145
|
+
this._beginUpdate();
|
|
146
|
+
try {
|
|
147
|
+
this._model.set(this.editor.getModel(), this._currentTransaction);
|
|
148
|
+
this._versionId.set(this.editor.getModel()?.getVersionId() ?? null, this._currentTransaction, undefined);
|
|
149
|
+
this._selections.set(this.editor.getSelections(), this._currentTransaction, undefined);
|
|
150
|
+
}
|
|
151
|
+
finally {
|
|
152
|
+
this._endUpdate();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
getOption(id) {
|
|
156
|
+
return observableFromEvent(this, cb => this.editor.onDidChangeConfiguration(e => {
|
|
157
|
+
if (e.hasChanged(id)) {
|
|
158
|
+
cb(undefined);
|
|
159
|
+
}
|
|
160
|
+
}), () => this.editor.getOption(id));
|
|
161
|
+
}
|
|
162
|
+
setDecorations(decorations) {
|
|
163
|
+
const d = ( new DisposableStore());
|
|
164
|
+
const decorationsCollection = this.editor.createDecorationsCollection();
|
|
165
|
+
d.add(autorunOpts({ owner: this, debugName: () => `Apply decorations from ${decorations.debugName}` }, reader => {
|
|
166
|
+
const d = decorations.read(reader);
|
|
167
|
+
decorationsCollection.set(d);
|
|
168
|
+
}));
|
|
169
|
+
d.add({
|
|
170
|
+
dispose: () => {
|
|
171
|
+
decorationsCollection.clear();
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
return d;
|
|
175
|
+
}
|
|
176
|
+
createOverlayWidget(widget) {
|
|
177
|
+
const overlayWidgetId = 'observableOverlayWidget' + (this._overlayWidgetCounter++);
|
|
178
|
+
const w = {
|
|
179
|
+
getDomNode: () => widget.domNode,
|
|
180
|
+
getPosition: () => widget.position.get(),
|
|
181
|
+
getId: () => overlayWidgetId,
|
|
182
|
+
allowEditorOverflow: widget.allowEditorOverflow,
|
|
183
|
+
getMinContentWidthInPx: () => widget.minContentWidthInPx.get(),
|
|
184
|
+
};
|
|
185
|
+
this.editor.addOverlayWidget(w);
|
|
186
|
+
const d = autorun(reader => {
|
|
187
|
+
widget.position.read(reader);
|
|
188
|
+
widget.minContentWidthInPx.read(reader);
|
|
189
|
+
this.editor.layoutOverlayWidget(w);
|
|
190
|
+
});
|
|
191
|
+
return toDisposable(() => {
|
|
192
|
+
d.dispose();
|
|
193
|
+
this.editor.removeOverlayWidget(w);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function reactToChange(observable, cb) {
|
|
198
|
+
return autorunWithStoreHandleChanges({
|
|
199
|
+
createEmptyChangeSummary: () => ({ deltas: [], didChange: false }),
|
|
200
|
+
handleChange: (context, changeSummary) => {
|
|
201
|
+
if (context.didChange(observable)) {
|
|
202
|
+
const e = context.change;
|
|
203
|
+
if (e !== undefined) {
|
|
204
|
+
changeSummary.deltas.push(e);
|
|
205
|
+
}
|
|
206
|
+
changeSummary.didChange = true;
|
|
207
|
+
}
|
|
208
|
+
return true;
|
|
209
|
+
},
|
|
210
|
+
}, (reader, changeSummary) => {
|
|
211
|
+
const value = observable.read(reader);
|
|
212
|
+
if (changeSummary.didChange) {
|
|
213
|
+
cb(value, changeSummary.deltas);
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function reactToChangeWithStore(observable, cb) {
|
|
218
|
+
const store = ( new DisposableStore());
|
|
219
|
+
const disposable = reactToChange(observable, (value, deltas) => {
|
|
220
|
+
store.clear();
|
|
221
|
+
cb(value, deltas, store);
|
|
222
|
+
});
|
|
223
|
+
return {
|
|
224
|
+
dispose() {
|
|
225
|
+
disposable.dispose();
|
|
226
|
+
store.dispose();
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
export { ObservableCodeEditor, observableCodeEditor, reactToChange, reactToChangeWithStore };
|
|
@@ -263,7 +263,7 @@ class RefCountedStyleSheet {
|
|
|
263
263
|
unref() {
|
|
264
264
|
this._refCount--;
|
|
265
265
|
if (this._refCount === 0) {
|
|
266
|
-
this._styleSheet.
|
|
266
|
+
this._styleSheet.remove();
|
|
267
267
|
this._parent._removeEditorStyleSheets(this._editorId);
|
|
268
268
|
}
|
|
269
269
|
}
|
|
@@ -25,7 +25,7 @@ import { IAccessibilityService } from '../../../../platform/accessibility/common
|
|
|
25
25
|
import { ILayoutService } from '../../../../platform/layout/browser/layoutService.service.js';
|
|
26
26
|
import { mainWindow } from '../../../../base/browser/window.js';
|
|
27
27
|
import { ContextViewHandler } from '../../../../platform/contextview/browser/contextViewService.js';
|
|
28
|
-
import {
|
|
28
|
+
import { ManagedHoverWidget } from './updatableHoverWidget.js';
|
|
29
29
|
import { TimeoutTimer } from '../../../../base/common/async.js';
|
|
30
30
|
let HoverService = class HoverService extends Disposable {
|
|
31
31
|
constructor(_instantiationService, contextMenuService, _keybindingService, _layoutService, _accessibilityService) {
|
|
@@ -34,7 +34,7 @@ let HoverService = class HoverService extends Disposable {
|
|
|
34
34
|
this._keybindingService = _keybindingService;
|
|
35
35
|
this._layoutService = _layoutService;
|
|
36
36
|
this._accessibilityService = _accessibilityService;
|
|
37
|
-
this.
|
|
37
|
+
this._managedHovers = ( new Map());
|
|
38
38
|
contextMenuService.onDidShowContextMenu(() => this.hideHover());
|
|
39
39
|
this._contextViewHandler = this._register(( new ContextViewHandler(this._layoutService)));
|
|
40
40
|
}
|
|
@@ -161,12 +161,12 @@ let HoverService = class HoverService extends Disposable {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (
|
|
164
|
+
setupManagedHover(hoverDelegate, targetElement, content, options) {
|
|
165
|
+
targetElement.setAttribute('custom-hover', 'true');
|
|
166
|
+
if (targetElement.title !== '') {
|
|
167
167
|
console.warn('HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute.');
|
|
168
|
-
console.trace('Stack trace:',
|
|
169
|
-
|
|
168
|
+
console.trace('Stack trace:', targetElement.title);
|
|
169
|
+
targetElement.title = '';
|
|
170
170
|
}
|
|
171
171
|
let hoverPreparation;
|
|
172
172
|
let hoverWidget;
|
|
@@ -188,22 +188,22 @@ let HoverService = class HoverService extends Disposable {
|
|
|
188
188
|
const triggerShowHover = (delay, focus, target, trapFocus) => {
|
|
189
189
|
return ( new TimeoutTimer(async () => {
|
|
190
190
|
if (!hoverWidget || hoverWidget.isDisposed) {
|
|
191
|
-
hoverWidget = ( new
|
|
191
|
+
hoverWidget = ( new ManagedHoverWidget(hoverDelegate, target || targetElement, delay > 0));
|
|
192
192
|
await hoverWidget.update(typeof content === 'function' ? content() : content, focus, { ...options, trapFocus });
|
|
193
193
|
}
|
|
194
194
|
}, delay));
|
|
195
195
|
};
|
|
196
196
|
let isMouseDown = false;
|
|
197
|
-
const mouseDownEmitter = addDisposableListener(
|
|
197
|
+
const mouseDownEmitter = addDisposableListener(targetElement, EventType.MOUSE_DOWN, () => {
|
|
198
198
|
isMouseDown = true;
|
|
199
199
|
hideHover(true, true);
|
|
200
200
|
}, true);
|
|
201
|
-
const mouseUpEmitter = addDisposableListener(
|
|
201
|
+
const mouseUpEmitter = addDisposableListener(targetElement, EventType.MOUSE_UP, () => {
|
|
202
202
|
isMouseDown = false;
|
|
203
203
|
}, true);
|
|
204
|
-
const mouseLeaveEmitter = addDisposableListener(
|
|
204
|
+
const mouseLeaveEmitter = addDisposableListener(targetElement, EventType.MOUSE_LEAVE, (e) => {
|
|
205
205
|
isMouseDown = false;
|
|
206
|
-
hideHover(false, e.fromElement ===
|
|
206
|
+
hideHover(false, e.fromElement === targetElement);
|
|
207
207
|
}, true);
|
|
208
208
|
const onMouseOver = (e) => {
|
|
209
209
|
if (hoverPreparation) {
|
|
@@ -211,43 +211,43 @@ let HoverService = class HoverService extends Disposable {
|
|
|
211
211
|
}
|
|
212
212
|
const toDispose = ( new DisposableStore());
|
|
213
213
|
const target = {
|
|
214
|
-
targetElements: [
|
|
214
|
+
targetElements: [targetElement],
|
|
215
215
|
dispose: () => { }
|
|
216
216
|
};
|
|
217
217
|
if (hoverDelegate.placement === undefined || hoverDelegate.placement === 'mouse') {
|
|
218
218
|
const onMouseMove = (e) => {
|
|
219
219
|
target.x = e.x + 10;
|
|
220
|
-
if ((isHTMLElement(e.target)) && getHoverTargetElement(e.target,
|
|
220
|
+
if ((isHTMLElement(e.target)) && getHoverTargetElement(e.target, targetElement) !== targetElement) {
|
|
221
221
|
hideHover(true, true);
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
|
-
toDispose.add(addDisposableListener(
|
|
224
|
+
toDispose.add(addDisposableListener(targetElement, EventType.MOUSE_MOVE, onMouseMove, true));
|
|
225
225
|
}
|
|
226
226
|
hoverPreparation = toDispose;
|
|
227
|
-
if ((isHTMLElement(e.target)) && getHoverTargetElement(e.target,
|
|
227
|
+
if ((isHTMLElement(e.target)) && getHoverTargetElement(e.target, targetElement) !== targetElement) {
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
230
230
|
toDispose.add(triggerShowHover(hoverDelegate.delay, false, target));
|
|
231
231
|
};
|
|
232
|
-
const mouseOverDomEmitter = addDisposableListener(
|
|
232
|
+
const mouseOverDomEmitter = addDisposableListener(targetElement, EventType.MOUSE_OVER, onMouseOver, true);
|
|
233
233
|
const onFocus = () => {
|
|
234
234
|
if (isMouseDown || hoverPreparation) {
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
237
|
const target = {
|
|
238
|
-
targetElements: [
|
|
238
|
+
targetElements: [targetElement],
|
|
239
239
|
dispose: () => { }
|
|
240
240
|
};
|
|
241
241
|
const toDispose = ( new DisposableStore());
|
|
242
242
|
const onBlur = () => hideHover(true, true);
|
|
243
|
-
toDispose.add(addDisposableListener(
|
|
243
|
+
toDispose.add(addDisposableListener(targetElement, EventType.BLUR, onBlur, true));
|
|
244
244
|
toDispose.add(triggerShowHover(hoverDelegate.delay, false, target));
|
|
245
245
|
hoverPreparation = toDispose;
|
|
246
246
|
};
|
|
247
247
|
let focusDomEmitter;
|
|
248
|
-
const tagName =
|
|
248
|
+
const tagName = targetElement.tagName.toLowerCase();
|
|
249
249
|
if (tagName !== 'input' && tagName !== 'textarea') {
|
|
250
|
-
focusDomEmitter = addDisposableListener(
|
|
250
|
+
focusDomEmitter = addDisposableListener(targetElement, EventType.FOCUS, onFocus, true);
|
|
251
251
|
}
|
|
252
252
|
const hover = {
|
|
253
253
|
show: focus => {
|
|
@@ -261,7 +261,7 @@ let HoverService = class HoverService extends Disposable {
|
|
|
261
261
|
await hoverWidget?.update(content, undefined, hoverOptions);
|
|
262
262
|
},
|
|
263
263
|
dispose: () => {
|
|
264
|
-
this.
|
|
264
|
+
this._managedHovers.delete(targetElement);
|
|
265
265
|
mouseOverDomEmitter.dispose();
|
|
266
266
|
mouseLeaveEmitter.dispose();
|
|
267
267
|
mouseDownEmitter.dispose();
|
|
@@ -270,17 +270,17 @@ let HoverService = class HoverService extends Disposable {
|
|
|
270
270
|
hideHover(true, true);
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
|
-
this.
|
|
273
|
+
this._managedHovers.set(targetElement, hover);
|
|
274
274
|
return hover;
|
|
275
275
|
}
|
|
276
|
-
|
|
277
|
-
const hover = this.
|
|
276
|
+
showManagedHover(target) {
|
|
277
|
+
const hover = this._managedHovers.get(target);
|
|
278
278
|
if (hover) {
|
|
279
279
|
hover.show(true);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
dispose() {
|
|
283
|
-
this.
|
|
283
|
+
this._managedHovers.forEach(hover => hover.dispose());
|
|
284
284
|
super.dispose();
|
|
285
285
|
}
|
|
286
286
|
};
|
|
@@ -5,7 +5,7 @@ import { isMarkdownString } from '../../../../base/common/htmlContent.js';
|
|
|
5
5
|
import { isString, isFunction } from '../../../../base/common/types.js';
|
|
6
6
|
import { localizeWithPath } from '../../../../nls.js';
|
|
7
7
|
const _moduleId = "vs/editor/browser/services/hoverService/updatableHoverWidget";
|
|
8
|
-
class
|
|
8
|
+
class ManagedHoverWidget {
|
|
9
9
|
constructor(hoverDelegate, target, fadeInAnimation) {
|
|
10
10
|
this.hoverDelegate = hoverDelegate;
|
|
11
11
|
this.target = target;
|
|
@@ -79,4 +79,4 @@ class UpdatableHoverWidget {
|
|
|
79
79
|
this._cancellationTokenSource = undefined;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
export {
|
|
82
|
+
export { ManagedHoverWidget };
|
|
@@ -151,7 +151,7 @@ function createLineBreaks(targetWindow, requests, fontInfo, tabSize, firstLineBr
|
|
|
151
151
|
wrappedTextIndentLength
|
|
152
152
|
));
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
containerDomNode.remove();
|
|
155
155
|
return result;
|
|
156
156
|
}
|
|
157
157
|
var Constants;
|
|
@@ -178,9 +178,7 @@ class VisibleLinesCollection {
|
|
|
178
178
|
if (deleted) {
|
|
179
179
|
for (let i = 0, len = deleted.length; i < len; i++) {
|
|
180
180
|
const lineDomNode = deleted[i].getDomNode();
|
|
181
|
-
|
|
182
|
-
this.domNode.domNode.removeChild(lineDomNode);
|
|
183
|
-
}
|
|
181
|
+
lineDomNode?.remove();
|
|
184
182
|
}
|
|
185
183
|
}
|
|
186
184
|
return true;
|
|
@@ -190,9 +188,7 @@ class VisibleLinesCollection {
|
|
|
190
188
|
if (deleted) {
|
|
191
189
|
for (let i = 0, len = deleted.length; i < len; i++) {
|
|
192
190
|
const lineDomNode = deleted[i].getDomNode();
|
|
193
|
-
|
|
194
|
-
this.domNode.domNode.removeChild(lineDomNode);
|
|
195
|
-
}
|
|
191
|
+
lineDomNode?.remove();
|
|
196
192
|
}
|
|
197
193
|
}
|
|
198
194
|
return true;
|
|
@@ -306,9 +302,7 @@ class ViewLayerRenderer {
|
|
|
306
302
|
_removeLinesBefore(ctx, removeCount) {
|
|
307
303
|
for (let i = 0; i < removeCount; i++) {
|
|
308
304
|
const lineDomNode = ctx.lines[i].getDomNode();
|
|
309
|
-
|
|
310
|
-
this.domNode.removeChild(lineDomNode);
|
|
311
|
-
}
|
|
305
|
+
lineDomNode?.remove();
|
|
312
306
|
}
|
|
313
307
|
ctx.lines.splice(0, removeCount);
|
|
314
308
|
}
|
|
@@ -324,9 +318,7 @@ class ViewLayerRenderer {
|
|
|
324
318
|
const removeIndex = ctx.linesLength - removeCount;
|
|
325
319
|
for (let i = 0; i < removeCount; i++) {
|
|
326
320
|
const lineDomNode = ctx.lines[removeIndex + i].getDomNode();
|
|
327
|
-
|
|
328
|
-
this.domNode.removeChild(lineDomNode);
|
|
329
|
-
}
|
|
321
|
+
lineDomNode?.remove();
|
|
330
322
|
}
|
|
331
323
|
ctx.lines.splice(removeIndex, removeCount);
|
|
332
324
|
}
|
|
@@ -85,7 +85,7 @@ class ViewContentWidgets extends ViewPart {
|
|
|
85
85
|
const myWidget = this._widgets[widgetId];
|
|
86
86
|
delete this._widgets[widgetId];
|
|
87
87
|
const domNode = myWidget.domNode.domNode;
|
|
88
|
-
domNode.
|
|
88
|
+
domNode.remove();
|
|
89
89
|
domNode.removeAttribute('monaco-visible-content-widget');
|
|
90
90
|
this.setShouldRender();
|
|
91
91
|
}
|
|
@@ -167,7 +167,7 @@ class GlyphMarginWidgets extends ViewPart {
|
|
|
167
167
|
const widgetData = this._widgets[widgetId];
|
|
168
168
|
const domNode = widgetData.domNode.domNode;
|
|
169
169
|
delete this._widgets[widgetId];
|
|
170
|
-
domNode.
|
|
170
|
+
domNode.remove();
|
|
171
171
|
this.setShouldRender();
|
|
172
172
|
}
|
|
173
173
|
}
|
|
@@ -192,11 +192,11 @@ class ViewZones extends ViewPart {
|
|
|
192
192
|
whitespaceAccessor.removeWhitespace(zone.whitespaceId);
|
|
193
193
|
zone.domNode.removeAttribute('monaco-visible-view-zone');
|
|
194
194
|
zone.domNode.removeAttribute('monaco-view-zone');
|
|
195
|
-
zone.domNode.domNode.
|
|
195
|
+
zone.domNode.domNode.remove();
|
|
196
196
|
if (zone.marginDomNode) {
|
|
197
197
|
zone.marginDomNode.removeAttribute('monaco-visible-view-zone');
|
|
198
198
|
zone.marginDomNode.removeAttribute('monaco-view-zone');
|
|
199
|
-
zone.marginDomNode.domNode.
|
|
199
|
+
zone.marginDomNode.domNode.remove();
|
|
200
200
|
}
|
|
201
201
|
this.setShouldRender();
|
|
202
202
|
return true;
|
|
@@ -1238,7 +1238,7 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
setBanner(domNode, domNodeHeight) {
|
|
1240
1240
|
if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) {
|
|
1241
|
-
this.
|
|
1241
|
+
this._bannerDomNode.remove();
|
|
1242
1242
|
}
|
|
1243
1243
|
this._bannerDomNode = domNode;
|
|
1244
1244
|
this._configuration.setReservedHeight(domNode ? domNodeHeight : 0);
|
|
@@ -1265,7 +1265,18 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
1265
1265
|
(callback) => scheduleAtNextAnimationFrame(getWindow(this._domElement), callback),
|
|
1266
1266
|
this.languageConfigurationService,
|
|
1267
1267
|
this._themeService,
|
|
1268
|
-
attachedView
|
|
1268
|
+
attachedView,
|
|
1269
|
+
{
|
|
1270
|
+
batchChanges: (cb) => {
|
|
1271
|
+
try {
|
|
1272
|
+
this._beginUpdate();
|
|
1273
|
+
return cb();
|
|
1274
|
+
}
|
|
1275
|
+
finally {
|
|
1276
|
+
this._endUpdate();
|
|
1277
|
+
}
|
|
1278
|
+
},
|
|
1279
|
+
}
|
|
1269
1280
|
)));
|
|
1270
1281
|
listenersToRemove.push(model.onWillDispose(() => this.setModel(null)));
|
|
1271
1282
|
listenersToRemove.push(viewModel.onEvent((e) => {
|
|
@@ -1474,10 +1485,10 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
1474
1485
|
this._modelData = null;
|
|
1475
1486
|
this._domElement.removeAttribute('data-mode-id');
|
|
1476
1487
|
if (removeDomNode && this._domElement.contains(removeDomNode)) {
|
|
1477
|
-
|
|
1488
|
+
removeDomNode.remove();
|
|
1478
1489
|
}
|
|
1479
1490
|
if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) {
|
|
1480
|
-
this.
|
|
1491
|
+
this._bannerDomNode.remove();
|
|
1481
1492
|
}
|
|
1482
1493
|
return model;
|
|
1483
1494
|
}
|
|
@@ -6,7 +6,7 @@ import { derivedOpts, derived } from '../../../../../base/common/observableInter
|
|
|
6
6
|
import { autorunHandleChanges } from '../../../../../base/common/observableInternal/autorun.js';
|
|
7
7
|
import { observableFromEvent } from '../../../../../base/common/observableInternal/utils.js';
|
|
8
8
|
import '../../../../../base/common/cancellation.js';
|
|
9
|
-
import {
|
|
9
|
+
import { observableCodeEditor } from '../../../observableCodeEditor.js';
|
|
10
10
|
import { OverviewRulerFeature } from '../features/overviewRulerFeature.js';
|
|
11
11
|
import { EditorOptions } from '../../../../common/config/editorOptions.js';
|
|
12
12
|
import { Position } from '../../../../common/core/position.js';
|
|
@@ -28,14 +28,14 @@ let DiffEditorEditors = class DiffEditorEditors extends Disposable {
|
|
|
28
28
|
this.original = this._register(this._createLeftHandSideEditor(this._options.editorOptions.get(), this._argCodeEditorWidgetOptions.originalEditor || {}));
|
|
29
29
|
this.modified = this._register(this._createRightHandSideEditor(this._options.editorOptions.get(), this._argCodeEditorWidgetOptions.modifiedEditor || {}));
|
|
30
30
|
this._onDidContentSizeChange = this._register(( (new Emitter())));
|
|
31
|
-
this.modifiedScrollTop = observableFromEvent(this.modified.onDidScrollChange, () => this.modified.getScrollTop());
|
|
32
|
-
this.modifiedScrollHeight = observableFromEvent(this.modified.onDidScrollChange, () => this.modified.getScrollHeight());
|
|
33
|
-
this.modifiedModel =
|
|
34
|
-
this.modifiedSelections = observableFromEvent(this.modified.onDidChangeCursorSelection, () => this.modified.getSelections() ?? []);
|
|
31
|
+
this.modifiedScrollTop = observableFromEvent(this, this.modified.onDidScrollChange, () => this.modified.getScrollTop());
|
|
32
|
+
this.modifiedScrollHeight = observableFromEvent(this, this.modified.onDidScrollChange, () => this.modified.getScrollHeight());
|
|
33
|
+
this.modifiedModel = observableCodeEditor(this.modified).model;
|
|
34
|
+
this.modifiedSelections = observableFromEvent(this, this.modified.onDidChangeCursorSelection, () => this.modified.getSelections() ?? []);
|
|
35
35
|
this.modifiedCursor = derivedOpts({ owner: this, equalsFn: Position.equals }, reader => this.modifiedSelections.read(reader)[0]?.getPosition() ?? ( (new Position(1, 1))));
|
|
36
|
-
this.originalCursor = observableFromEvent(this.original.onDidChangeCursorPosition, () => this.original.getPosition() ?? ( (new Position(1, 1))));
|
|
37
|
-
this.isOriginalFocused =
|
|
38
|
-
this.isModifiedFocused =
|
|
36
|
+
this.originalCursor = observableFromEvent(this, this.original.onDidChangeCursorPosition, () => this.original.getPosition() ?? ( (new Position(1, 1))));
|
|
37
|
+
this.isOriginalFocused = observableCodeEditor(this.original).isFocused;
|
|
38
|
+
this.isModifiedFocused = observableCodeEditor(this.modified).isFocused;
|
|
39
39
|
this.isFocused = derived(this, reader => this.isOriginalFocused.read(reader) || this.isModifiedFocused.read(reader));
|
|
40
40
|
this._argCodeEditorWidgetOptions = null;
|
|
41
41
|
this._register(autorunHandleChanges({
|