@codingame/monaco-vscode-api 6.0.3 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -117
- package/api.js +1 -1
- package/debugProtocol.d.ts +10 -1
- package/extensions.d.ts +2 -0
- package/missing-services.js +21 -2
- package/package.json +9 -9
- package/service-override/extensions.d.ts +1 -2
- package/services.js +4 -2
- package/vscode/src/vs/base/browser/dnd.js +1 -1
- package/vscode/src/vs/base/browser/dom.js +116 -5
- package/vscode/src/vs/base/browser/domObservable.js +16 -0
- package/vscode/src/vs/base/browser/markdownRenderer.js +5 -3
- package/vscode/src/vs/base/browser/trustedTypes.js +1 -2
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +1 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +1 -1
- package/vscode/src/vs/base/browser/ui/button/button.js +2 -2
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -4
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +1 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -1
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hover.d.ts +32 -16
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +2 -2
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +2 -2
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +2 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +1 -1
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +1 -1
- package/vscode/src/vs/base/browser/ui/list/listView.js +3 -5
- package/vscode/src/vs/base/browser/ui/list/rowCache.js +1 -8
- package/vscode/src/vs/base/browser/ui/sash/sash.js +1 -1
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +7 -11
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/splitview.js +1 -1
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +1 -1
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +1 -1
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +8 -1
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +2 -3
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +0 -3
- package/vscode/src/vs/base/common/assert.js +1 -1
- package/vscode/src/vs/base/common/collections.js +49 -1
- package/vscode/src/vs/base/common/equals.js +55 -5
- package/vscode/src/vs/base/common/errors.js +14 -1
- package/vscode/src/vs/base/common/event.js +2 -1
- package/vscode/src/vs/base/common/history.js +7 -4
- package/vscode/src/vs/base/common/iterator.js +9 -1
- package/vscode/src/vs/base/common/map.d.ts +41 -0
- package/vscode/src/vs/base/common/numbers.js +18 -1
- package/vscode/src/vs/base/common/observableInternal/api.js +11 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.js +18 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +8 -1
- package/vscode/src/vs/base/common/observableInternal/base.js +2 -5
- package/vscode/src/vs/base/common/observableInternal/derived.js +13 -3
- package/vscode/src/vs/base/common/observableInternal/lazyObservableValue.js +109 -0
- package/vscode/src/vs/base/common/observableInternal/promise.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/utils.d.ts +7 -0
- package/vscode/src/vs/base/common/observableInternal/utils.js +64 -12
- package/vscode/src/vs/base/common/prefixTree.d.ts +52 -0
- package/vscode/src/vs/base/common/product.d.ts +1 -0
- package/vscode/src/vs/base/parts/ipc/common/ipc.js +1 -1
- package/vscode/src/vs/editor/browser/config/charWidthReader.js +1 -1
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +1 -1
- package/vscode/src/vs/editor/browser/coreCommands.js +2 -1
- package/vscode/src/vs/editor/browser/observableCodeEditor.js +230 -0
- package/vscode/src/vs/editor/browser/services/abstractCodeEditorService.js +1 -1
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +26 -26
- package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +2 -2
- package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
- package/vscode/src/vs/editor/browser/view/viewLayer.js +4 -12
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +15 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +8 -8
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +4 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +14 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +3 -3
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +2 -2
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/colors.js +1 -1
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +5 -0
- package/vscode/src/vs/editor/common/config/editorOptions.js +83 -65
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +43 -43
- package/vscode/src/vs/editor/common/cursor/cursor.js +3 -2
- package/vscode/src/vs/editor/common/cursor/cursorTypeEditOperations.js +911 -0
- package/vscode/src/vs/editor/common/cursor/cursorTypeOperations.js +36 -799
- package/vscode/src/vs/editor/common/cursor/cursorWordOperations.js +6 -5
- package/vscode/src/vs/editor/common/languageFeatureRegistry.d.ts +1 -0
- package/vscode/src/vs/editor/common/languageFeatureRegistry.js +3 -0
- package/vscode/src/vs/editor/common/languages/autoIndent.js +23 -1
- package/vscode/src/vs/editor/common/languages.d.ts +20 -3
- package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js +6 -6
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +19 -0
- package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js +3 -0
- package/vscode/src/vs/editor/common/model/textModel.js +6 -2
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +5 -5
- package/vscode/src/vs/editor/common/model.d.ts +4 -0
- package/vscode/src/vs/editor/common/services/getIconClasses.js +1 -1
- package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +2 -15
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +63 -62
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +11 -8
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +2 -17
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +18 -5
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +55 -27
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +7 -4
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +103 -47
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +18 -10
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +2 -4
- package/vscode/src/vs/editor/contrib/folding/browser/folding.css.js +1 -1
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +33 -13
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +12 -7
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +161 -185
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +321 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverStatusBar.js +4 -1
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +6 -21
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +39 -40
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +55 -46
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +12 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverController.js +15 -9
- package/vscode/src/vs/editor/contrib/hover/browser/hoverTypes.js +11 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +141 -93
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +24 -7
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +36 -1
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +5 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +25 -12
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +88 -118
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +34 -33
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions.js +11 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +10 -19
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +45 -27
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +4 -4
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/commands.js +126 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/consts.js +9 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEdits.contribution.js +9 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsController.js +82 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsModel.js +240 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.js +322 -0
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgress.js +8 -4
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +3 -2
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +2 -2
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +60 -0
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.css.js +4 -0
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +38 -20
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +3 -0
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetStatus.js +10 -32
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +23 -138
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +3 -0
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +5 -5
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +13 -12
- package/vscode/src/vs/editor/contrib/wordPartOperations/browser/wordPartOperations.js +3 -3
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +21 -0
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +5 -6
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +1 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +27 -6
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +33 -3
- package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -1
- package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -0
- package/vscode/src/vs/platform/actions/common/actions.js +3 -0
- package/vscode/src/vs/platform/actions/common/menuService.js +3 -2
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +1 -1
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.d.ts +7 -5
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +109 -13
- package/vscode/src/vs/platform/diagnostics/common/diagnostics.d.ts +2 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +12 -6
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +20 -10
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +46 -8
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1 -1
- package/vscode/src/vs/platform/extensions/common/extensions.js +12 -3
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +368 -0
- package/vscode/src/vs/platform/files/common/watcher.js +21 -24
- package/vscode/src/vs/platform/list/browser/listService.js +2 -1
- package/vscode/src/vs/platform/observable/common/platformObservableUtils.js +2 -2
- package/vscode/src/vs/platform/opener/browser/link.js +1 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +1 -1
- package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.service.d.ts +0 -2
- package/vscode/src/vs/platform/request/common/request.js +18 -8
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +2 -6
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +8 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.d.ts +1 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.js +25 -5
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +1 -1
- package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +6 -6
- package/vscode/src/vs/platform/theme/common/colors/editorColors.js +35 -35
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +9 -9
- package/vscode/src/vs/platform/theme/common/colors/listColors.js +11 -11
- package/vscode/src/vs/platform/theme/common/colors/menuColors.js +4 -4
- package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +5 -5
- package/vscode/src/vs/platform/theme/common/colors/miscColors.js +1 -1
- package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +5 -5
- package/vscode/src/vs/platform/tunnel/common/tunnel.js +4 -1
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +75 -19
- package/vscode/src/vs/platform/window/common/window.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +32 -25
- package/vscode/src/vs/workbench/api/common/extHost.common.services.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +5 -11
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +5 -15
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +2 -5
- package/vscode/src/vs/workbench/api/common/extHostComments.js +9 -3
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +32 -22
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +109 -40
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +46 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +84 -35
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +50 -41
- package/vscode/src/vs/workbench/api/common/extHostSearch.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostSecrets.js +11 -8
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +7 -6
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +63 -70
- package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +5 -3
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +75 -16
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +29 -4
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +127 -107
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +33 -21
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +23 -6
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +3 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
- package/vscode/src/vs/workbench/browser/web.api.js +8 -0
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +199 -194
- package/vscode/src/vs/workbench/common/configuration.js +1 -1
- package/vscode/src/vs/workbench/common/contributions.js +8 -1
- package/vscode/src/vs/workbench/common/editor.js +5 -1
- package/vscode/src/vs/workbench/common/theme.js +79 -454
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +221 -239
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +17 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +35 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +51 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{chatConfirmationWidget.js → chatContentParts/chatConfirmationWidget.js} +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +131 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +263 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +160 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +171 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatWarningContentPart.js +34 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatContentParts/media}/chatConfirmationWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +91 -44
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +292 -1019
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +22 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +61 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +23 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +8 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +16 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +43 -16
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +1 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +7 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +7 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +8 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +1 -1
- package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +14 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +8 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +19 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +13 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +19 -2
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +9 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +10 -5
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +4 -4
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +235 -173
- package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +2 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +17 -5
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +62 -44
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +114 -107
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +33 -25
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +71 -101
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +38 -43
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -33
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +3 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +49 -86
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +60 -71
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +116 -113
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +6 -10
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +1 -0
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +12 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +7 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +88 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +1 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +39 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +12 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +40 -105
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +27 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +14 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +43 -46
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +12 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +19 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +16 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +11 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +12 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +9 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +37 -36
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +18 -8
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +1 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +14 -5
- package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +17 -22
- package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +7 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +7 -27
- package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +3 -4
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +4 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +0 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +13 -37
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.d.ts +88 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +48 -31
- package/vscode/src/vs/workbench/contrib/testing/common/testId.d.ts +115 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.d.ts +226 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.d.ts +319 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +2 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +21 -2
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +7 -8
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +3 -3
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +10 -5
- package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +54 -21
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +1 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -4
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +5 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +3 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +59 -41
- package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +1 -1
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -2
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/language/common/languageService.js +7 -0
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +1 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +2 -2
- package/vscode/src/vs/workbench/services/search/common/search.js +2 -1
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +2 -2
- package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +2 -2
- package/vscode/src/vs/workbench/services/textfile/common/encoding.js +69 -26
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +23 -4
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +5 -1
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +12 -5
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +38 -19
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.service.d.ts +2 -1
- package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +0 -196
- package/vscode-dts/vscode.proposed.attributableCoverage.d.ts +28 -10
- package/vscode-dts/vscode.proposed.authGetSessions.d.ts +30 -22
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +17 -8
- package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +0 -9
- package/vscode-dts/vscode.proposed.commentReveal.d.ts +32 -0
- package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +10 -0
- package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +1 -1
- package/vscode-dts/vscode.proposed.fileComments.d.ts +12 -53
- package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +6 -0
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +6 -0
- package/vscode-dts/vscode.proposed.lmTools.d.ts +91 -0
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +1 -1
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +10 -6
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +38 -13
- package/vscode/src/vs/editor/browser/observableUtilities.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service.js +0 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +0 -122
|
@@ -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({
|
|
@@ -65,7 +65,7 @@ let DiffEditorViewZones = class DiffEditorViewZones extends Disposable {
|
|
|
65
65
|
}
|
|
66
66
|
}));
|
|
67
67
|
const originalModelTokenizationCompleted = ( ( this._diffModel.map(
|
|
68
|
-
m => m ? observableFromEvent(m.model.original.onDidChangeTokens, () => m.model.original.tokenization.backgroundTokenizationState === BackgroundTokenizationState.Completed) : undefined
|
|
68
|
+
m => m ? observableFromEvent(this, m.model.original.onDidChangeTokens, () => m.model.original.tokenization.backgroundTokenizationState === BackgroundTokenizationState.Completed) : undefined
|
|
69
69
|
)).map((m, reader) => m?.read(reader)));
|
|
70
70
|
const alignments = derived((reader) => {
|
|
71
71
|
const diffModel = this._diffModel.read(reader);
|
|
@@ -416,14 +416,14 @@ function computeRangeAlignment(originalEditor, modifiedEditor, diffs, originalEd
|
|
|
416
416
|
let first = true;
|
|
417
417
|
let lastModLineNumber = c.modified.startLineNumber;
|
|
418
418
|
let lastOrigLineNumber = c.original.startLineNumber;
|
|
419
|
-
function emitAlignment(origLineNumberExclusive, modLineNumberExclusive) {
|
|
419
|
+
function emitAlignment(origLineNumberExclusive, modLineNumberExclusive, forceAlignment = false) {
|
|
420
420
|
if (origLineNumberExclusive < lastOrigLineNumber || modLineNumberExclusive < lastModLineNumber) {
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
423
|
if (first) {
|
|
424
424
|
first = false;
|
|
425
425
|
}
|
|
426
|
-
else if (origLineNumberExclusive === lastOrigLineNumber || modLineNumberExclusive === lastModLineNumber) {
|
|
426
|
+
else if (!forceAlignment && (origLineNumberExclusive === lastOrigLineNumber || modLineNumberExclusive === lastModLineNumber)) {
|
|
427
427
|
return;
|
|
428
428
|
}
|
|
429
429
|
const originalRange = ( new LineRange(lastOrigLineNumber, origLineNumberExclusive));
|
|
@@ -459,7 +459,7 @@ function computeRangeAlignment(originalEditor, modifiedEditor, diffs, originalEd
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
emitAlignment(c.original.endLineNumberExclusive, c.modified.endLineNumberExclusive);
|
|
462
|
+
emitAlignment(c.original.endLineNumberExclusive, c.modified.endLineNumberExclusive, true);
|
|
463
463
|
lastOriginalLineNumber = c.original.endLineNumberExclusive;
|
|
464
464
|
lastModifiedLineNumber = c.modified.endLineNumberExclusive;
|
|
465
465
|
}
|
|
@@ -14,7 +14,7 @@ let DiffEditorOptions = class DiffEditorOptions {
|
|
|
14
14
|
constructor(options, _accessibilityService) {
|
|
15
15
|
this._accessibilityService = _accessibilityService;
|
|
16
16
|
this._diffEditorWidth = observableValue(this, 0);
|
|
17
|
-
this._screenReaderMode = observableFromEvent(this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized());
|
|
17
|
+
this._screenReaderMode = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized());
|
|
18
18
|
this.couldShowInlineViewBecauseOfSize = derived(this, reader => this._options.read(reader).renderSideBySide && this._diffEditorWidth.read(reader) <= this._options.read(reader).renderSideBySideInlineBreakpoint);
|
|
19
19
|
this.renderOverviewRuler = derived(this, reader => this._options.read(reader).renderOverviewRuler);
|
|
20
20
|
this.renderSideBySide = derived(this, reader => this._options.read(reader).renderSideBySide
|
|
@@ -7,6 +7,7 @@ import { derived } from '../../../../base/common/observableInternal/derived.js';
|
|
|
7
7
|
import { autorun, autorunWithStore } from '../../../../base/common/observableInternal/autorun.js';
|
|
8
8
|
import { observableSignalFromEvent, observableSignal } from '../../../../base/common/observableInternal/utils.js';
|
|
9
9
|
import { waitForState } from '../../../../base/common/observableInternal/promise.js';
|
|
10
|
+
import { groupAdjacentBy } from '../../../../base/common/arrays.js';
|
|
10
11
|
import { IDiffProviderFactoryService } from './diffProviderFactoryService.js';
|
|
11
12
|
import { readHotReloadableExport, filterWithPrevious } from './utils.js';
|
|
12
13
|
import { LineRange, LineRangeSet } from '../../../common/core/lineRange.js';
|
|
@@ -16,7 +17,6 @@ import { TextEditInfo } from '../../../common/model/bracketPairsTextModelPart/br
|
|
|
16
17
|
import { combineTextEditInfos } from '../../../common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos.js';
|
|
17
18
|
import { optimizeSequenceDiffs } from '../../../common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js';
|
|
18
19
|
import { isDefined } from '../../../../base/common/types.js';
|
|
19
|
-
import { groupAdjacentBy } from '../../../../base/common/arrays.js';
|
|
20
20
|
import { softAssert } from '../../../../base/common/assert.js';
|
|
21
21
|
let DiffEditorViewModel = class DiffEditorViewModel extends Disposable {
|
|
22
22
|
setActiveMovedText(movedText) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { h, getWindow } from '../../../../base/browser/dom.js';
|
|
3
3
|
import { findLast } from '../../../../base/common/arraysFind.js';
|
|
4
|
-
import { onUnexpectedError } from '../../../../base/common/errors.js';
|
|
4
|
+
import { onUnexpectedError, BugIndicatingError } from '../../../../base/common/errors.js';
|
|
5
5
|
import { Event } from '../../../../base/common/event.js';
|
|
6
6
|
import { toDisposable } from '../../../../base/common/lifecycle.js';
|
|
7
7
|
import { observableValue, subtransaction, transaction } from '../../../../base/common/observableInternal/base.js';
|
|
@@ -117,7 +117,7 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
117
117
|
this._contextKeyService.createKey('isInDiffEditor', true);
|
|
118
118
|
this.elements.root.classList.toggle('standalone', codeEditorWidgetOptions.isStandaloneEditor || false);
|
|
119
119
|
this._domElement.appendChild(this.elements.root);
|
|
120
|
-
this._register(toDisposable(() => this.
|
|
120
|
+
this._register(toDisposable(() => this.elements.root.remove()));
|
|
121
121
|
this._rootSizeObserver = this._register(( new ObservableElementSizeObserver(this.elements.root, options.dimension)));
|
|
122
122
|
this._rootSizeObserver.setAutomaticLayout(options.automaticLayout ?? false);
|
|
123
123
|
this._options = this._instantiationService.createInstance(DiffEditorOptions, options);
|
|
@@ -222,6 +222,18 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
222
222
|
this._register(autorunWithStore((reader, store) => {
|
|
223
223
|
store.add(new (readHotReloadableExport(RevertButtonsFeature, reader))(this._editors, this._diffModel, this._options, this));
|
|
224
224
|
}));
|
|
225
|
+
this._register(autorunWithStore((reader, store) => {
|
|
226
|
+
const model = this._diffModel.read(reader);
|
|
227
|
+
if (!model) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
for (const m of [model.model.original, model.model.modified]) {
|
|
231
|
+
store.add(m.onWillDispose(e => {
|
|
232
|
+
onUnexpectedError(( new BugIndicatingError('TextModel got disposed before DiffEditorWidget model got reset')));
|
|
233
|
+
this.setModel(null);
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
}));
|
|
225
237
|
}
|
|
226
238
|
getViewWidth() {
|
|
227
239
|
return this._rootSizeObserver.width.get();
|
|
@@ -40,7 +40,7 @@ let DiffEditorGutter = class DiffEditorGutter extends Disposable {
|
|
|
40
40
|
this._contextKeyService = _contextKeyService;
|
|
41
41
|
this._menuService = _menuService;
|
|
42
42
|
this._menu = this._register(this._menuService.createMenu(MenuId.DiffEditorHunkToolbar, this._contextKeyService));
|
|
43
|
-
this._actions = observableFromEvent(this._menu.onDidChange, () => this._menu.getActions());
|
|
43
|
+
this._actions = observableFromEvent(this, this._menu.onDidChange, () => this._menu.getActions());
|
|
44
44
|
this._hasActions = ( this._actions.map(a => a.length > 0));
|
|
45
45
|
this._showSash = derived(this, reader => this._options.renderSideBySide.read(reader) && this._hasActions.read(reader));
|
|
46
46
|
this.width = derived(this, reader => this._hasActions.read(reader) ? width : 0);
|
|
@@ -24,8 +24,8 @@ class MovedBlocksLinesFeature extends Disposable {
|
|
|
24
24
|
this._originalEditorLayoutInfo = _originalEditorLayoutInfo;
|
|
25
25
|
this._modifiedEditorLayoutInfo = _modifiedEditorLayoutInfo;
|
|
26
26
|
this._editors = _editors;
|
|
27
|
-
this._originalScrollTop = observableFromEvent(this._editors.original.onDidScrollChange, () => this._editors.original.getScrollTop());
|
|
28
|
-
this._modifiedScrollTop = observableFromEvent(this._editors.modified.onDidScrollChange, () => this._editors.modified.getScrollTop());
|
|
27
|
+
this._originalScrollTop = observableFromEvent(this, this._editors.original.onDidScrollChange, () => this._editors.original.getScrollTop());
|
|
28
|
+
this._modifiedScrollTop = observableFromEvent(this, this._editors.modified.onDidScrollChange, () => this._editors.modified.getScrollTop());
|
|
29
29
|
this._viewZonesChanged = observableSignalFromEvent('onDidChangeViewZones', this._editors.modified.onDidChangeViewZones);
|
|
30
30
|
this.width = observableValue(this, 0);
|
|
31
31
|
this._modifiedViewZonesChangedSignal = observableSignalFromEvent('modified.onDidChangeViewZones', this._editors.modified.onDidChangeViewZones);
|
|
@@ -15,12 +15,12 @@ import '../../../../platform/theme/common/colors/quickpickColors.js';
|
|
|
15
15
|
import '../../../../platform/theme/common/colors/searchColors.js';
|
|
16
16
|
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
|
17
17
|
const _moduleId = "vs/editor/browser/widget/diffEditor/registrations.contribution";
|
|
18
|
-
registerColor('diffEditor.move.border',
|
|
18
|
+
registerColor('diffEditor.move.border', '#8b8b8b9c', ( localizeWithPath(
|
|
19
19
|
_moduleId,
|
|
20
20
|
0,
|
|
21
21
|
'The border color for text that got moved in the diff editor.'
|
|
22
22
|
)));
|
|
23
|
-
registerColor('diffEditor.moveActive.border',
|
|
23
|
+
registerColor('diffEditor.moveActive.border', '#FFA500', ( localizeWithPath(
|
|
24
24
|
_moduleId,
|
|
25
25
|
1,
|
|
26
26
|
'The active border color for text that got moved in the diff editor.'
|
|
@@ -14,9 +14,9 @@ class EditorGutter extends Disposable {
|
|
|
14
14
|
this._editor = _editor;
|
|
15
15
|
this._domNode = _domNode;
|
|
16
16
|
this.itemProvider = itemProvider;
|
|
17
|
-
this.scrollTop = observableFromEvent(this._editor.onDidScrollChange, (e) => this._editor.getScrollTop());
|
|
17
|
+
this.scrollTop = observableFromEvent(this, this._editor.onDidScrollChange, (e) => this._editor.getScrollTop());
|
|
18
18
|
this.isScrollTopZero = ( this.scrollTop.map((scrollTop) => scrollTop === 0));
|
|
19
|
-
this.modelAttached = observableFromEvent(this._editor.onDidChangeModel, (e) => this._editor.hasModel());
|
|
19
|
+
this.modelAttached = observableFromEvent(this, this._editor.onDidChangeModel, (e) => this._editor.hasModel());
|
|
20
20
|
this.editorOnDidChangeViewZones = observableSignalFromEvent('onDidChangeViewZones', this._editor.onDidChangeViewZones);
|
|
21
21
|
this.editorOnDidContentSizeChange = observableSignalFromEvent('onDidContentSizeChange', this._editor.onDidContentSizeChange);
|
|
22
22
|
this.domNodeSizeChanged = observableSignal('domNodeSizeChanged');
|
|
@@ -90,7 +90,7 @@ class EditorGutter extends Disposable {
|
|
|
90
90
|
for (const id of unusedIds) {
|
|
91
91
|
const view = this.views.get(id);
|
|
92
92
|
view.gutterItemView.dispose();
|
|
93
|
-
|
|
93
|
+
view.domNode.remove();
|
|
94
94
|
this.views.delete(id);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -67,13 +67,13 @@ function applyObservableDecorations(editor, decorations) {
|
|
|
67
67
|
function appendRemoveOnDispose(parent, child) {
|
|
68
68
|
parent.appendChild(child);
|
|
69
69
|
return toDisposable(() => {
|
|
70
|
-
|
|
70
|
+
child.remove();
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
function prependRemoveOnDispose(parent, child) {
|
|
74
74
|
parent.prepend(child);
|
|
75
75
|
return toDisposable(() => {
|
|
76
|
-
|
|
76
|
+
child.remove();
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
class ObservableElementSizeObserver extends Disposable {
|
|
@@ -12,5 +12,5 @@ import '../../../../platform/theme/common/colors/quickpickColors.js';
|
|
|
12
12
|
import '../../../../platform/theme/common/colors/searchColors.js';
|
|
13
13
|
const _moduleId = "vs/editor/browser/widget/multiDiffEditor/colors";
|
|
14
14
|
registerColor('multiDiffEditor.headerBackground', { dark: '#262626', light: 'tab.inactiveBackground', hcDark: 'tab.inactiveBackground', hcLight: 'tab.inactiveBackground', }, ( localizeWithPath(_moduleId, 0, 'The background color of the diff editor\'s header')));
|
|
15
|
-
registerColor('multiDiffEditor.background',
|
|
15
|
+
registerColor('multiDiffEditor.background', 'editorBackground', ( localizeWithPath(_moduleId, 1, 'The background color of the multi file diff editor')));
|
|
16
16
|
registerColor('multiDiffEditor.border', { dark: 'sideBarSectionHeader.border', light: '#cccccc', hcDark: 'sideBarSectionHeader.border', hcLight: '#cccccc', }, ( localizeWithPath(_moduleId, 2, 'The border color of the multi file diff editor')));
|
|
@@ -60,8 +60,8 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
|
|
|
60
60
|
template.setData(data);
|
|
61
61
|
return template;
|
|
62
62
|
}))));
|
|
63
|
-
this.scrollTop = observableFromEvent(this._scrollableElement.onScroll, () => this._scrollableElement.getScrollPosition().scrollTop);
|
|
64
|
-
this.scrollLeft = observableFromEvent(this._scrollableElement.onScroll, () => this._scrollableElement.getScrollPosition().scrollLeft);
|
|
63
|
+
this.scrollTop = observableFromEvent(this, this._scrollableElement.onScroll, () => this._scrollableElement.getScrollPosition().scrollTop);
|
|
64
|
+
this.scrollLeft = observableFromEvent(this, this._scrollableElement.onScroll, () => this._scrollableElement.getScrollPosition().scrollLeft);
|
|
65
65
|
this._viewItemsInfo = derivedWithStore(this, (reader, store) => {
|
|
66
66
|
const vm = this._viewModel.read(reader);
|
|
67
67
|
if (!vm) {
|
|
@@ -668,6 +668,11 @@ interface IEditorOptions {
|
|
|
668
668
|
* Defaults to false.
|
|
669
669
|
*/
|
|
670
670
|
peekWidgetDefaultFocus?: 'tree' | 'editor';
|
|
671
|
+
/**
|
|
672
|
+
* Sets a placeholder for the editor.
|
|
673
|
+
* If set, the placeholder is shown if the editor is empty.
|
|
674
|
+
*/
|
|
675
|
+
placeholder?: string | undefined;
|
|
671
676
|
/**
|
|
672
677
|
* Controls whether the definition link opens element in the peek widget.
|
|
673
678
|
* Defaults to false.
|