@codingame/monaco-vscode-api 2.0.3-improve-modularity.1 → 2.1.0-update-vscode-1.86.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/api.js +15 -12
- package/extensions.d.ts +4 -7
- package/external/@xterm/xterm/typings/xterm.d.ts +22 -0
- package/missing-services.js +62 -6
- package/package.json +8 -8
- package/service-override/tools/editor.js +14 -0
- package/services.d.ts +3 -2
- package/services.js +6 -4
- package/vscode/src/vs/base/browser/browser.js +45 -30
- package/vscode/src/vs/base/browser/canIUse.js +1 -1
- package/vscode/src/vs/base/browser/defaultWorkerFactory.js +12 -5
- package/vscode/src/vs/base/browser/dom.js +104 -14
- package/vscode/src/vs/base/browser/indexedDB.js +3 -3
- package/vscode/src/vs/base/browser/markdownRenderer.js +29 -1
- package/vscode/src/vs/base/browser/mouseEvent.js +17 -3
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +3 -3
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.js +287 -0
- package/vscode/src/vs/base/browser/ui/button/button.js +9 -0
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/dialog/dialog.js +1 -1
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabelHover.js +16 -5
- package/vscode/src/vs/base/browser/ui/list/listView.js +31 -11
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +35 -21
- package/vscode/src/vs/base/browser/ui/menu/menu.js +10 -1
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +8 -4
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +6 -5
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +469 -95
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +22 -7
- package/vscode/src/vs/base/browser/ui/tree/indexTreeModel.js +0 -5
- package/vscode/src/vs/base/browser/ui/tree/media/tree.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/objectTree.js +70 -4
- package/vscode/src/vs/base/common/assert.js +6 -1
- package/vscode/src/vs/base/common/async.js +31 -6
- package/vscode/src/vs/base/common/codicons.js +5 -0
- package/vscode/src/vs/base/common/event.d.ts +0 -5
- package/vscode/src/vs/base/common/event.js +0 -15
- package/vscode/src/vs/base/common/filters.d.ts +1 -18
- package/vscode/src/vs/base/common/htmlContent.js +12 -6
- package/vscode/src/vs/base/common/iterator.js +8 -0
- package/vscode/src/vs/base/common/labels.js +2 -1
- package/vscode/src/vs/base/common/map.js +20 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +4 -0
- package/vscode/src/vs/base/common/observableInternal/base.js +16 -8
- package/vscode/src/vs/base/common/observableInternal/derived.js +4 -6
- package/vscode/src/vs/base/common/observableInternal/utils.js +60 -5
- package/vscode/src/vs/base/common/platform.js +20 -20
- package/vscode/src/vs/base/common/prefixTree.js +4 -3
- package/vscode/src/vs/base/common/product.d.ts +5 -2
- package/vscode/src/vs/base/common/strings.js +23 -7
- package/vscode/src/vs/base/common/themables.js +4 -1
- package/vscode/src/vs/base/common/uri.js +11 -1
- package/vscode/src/vs/base/common/worker/simpleWorker.js +1 -1
- package/vscode/src/vs/editor/browser/config/migrateOptions.js +5 -0
- package/vscode/src/vs/editor/browser/controller/mouseHandler.js +1 -0
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +14 -8
- package/vscode/src/vs/editor/browser/controller/pointerHandler.js +18 -11
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +1 -1
- package/vscode/src/vs/editor/browser/controller/textAreaInput.js +3 -3
- package/vscode/src/vs/{workbench/services/hover/browser → editor/browser/services}/hoverService.d.ts +7 -6
- package/vscode/src/vs/editor/browser/services/hoverService.js +195 -0
- package/vscode/src/vs/editor/browser/view.js +29 -39
- package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +41 -19
- package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +30 -23
- package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +23 -8
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +8 -1
- package/vscode/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js +7 -1
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +30 -3
- package/vscode/src/vs/editor/browser/widget/codeEditorWidget.js +39 -15
- package/vscode/src/vs/editor/browser/widget/diffEditor/{accessibleDiffViewer.css.js → components/accessibleDiffViewer.css.js} +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/{accessibleDiffViewer.js → components/accessibleDiffViewer.js} +43 -43
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +89 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/{diffEditorEditors.js → components/diffEditorEditors.js} +14 -14
- package/vscode/src/vs/editor/browser/widget/diffEditor/{diffEditorSash.js → components/diffEditorSash.js} +5 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/{lineAlignment.js → components/diffEditorViewZones/diffEditorViewZones.js} +38 -28
- package/vscode/src/vs/editor/browser/widget/diffEditor/{inlineDiffDeletedCodeMargin.js → components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js} +14 -14
- package/vscode/src/vs/editor/browser/widget/diffEditor/{renderLines.js → components/diffEditorViewZones/renderLines.js} +7 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +29 -38
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +150 -38
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +17 -16
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +104 -6
- package/vscode/src/vs/editor/browser/widget/diffEditor/{hideUnchangedRegionsFeature.js → features/hideUnchangedRegionsFeature.js} +51 -78
- package/vscode/src/vs/editor/browser/widget/diffEditor/{movedBlocksLines.js → features/movedBlocksLinesFeature.js} +23 -23
- package/vscode/src/vs/editor/browser/widget/diffEditor/{overviewRulerPart.js → features/overviewRulerFeature.js} +28 -28
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +145 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/{decorations.js → registrations.contribution.js} +18 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +10 -2
- package/vscode/src/vs/editor/browser/widget/hoverWidget/hover.css.js +4 -0
- package/vscode/src/vs/editor/browser/widget/hoverWidget/hoverWidget.js +527 -0
- package/vscode/src/vs/editor/{contrib → browser/widget}/markdownRenderer/browser/markdownRenderer.js +11 -11
- package/vscode/src/vs/editor/{contrib → browser/widget}/markdownRenderer/browser/renderedMarkdown.css.js +1 -1
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +11 -10
- package/vscode/src/vs/editor/common/config/editorOptions.js +46 -42
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +3 -3
- package/vscode/src/vs/editor/common/core/offsetRange.d.ts +2 -0
- package/vscode/src/vs/editor/common/core/offsetRange.js +8 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.js +9 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js +50 -47
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.js +4 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +2 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +13 -2
- package/vscode/src/vs/editor/common/languages.d.ts +10 -2
- package/vscode/src/vs/editor/common/model/textModel.js +19 -13
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +1 -1
- package/vscode/src/vs/editor/common/model.d.ts +19 -1
- package/vscode/src/vs/editor/common/model.js +2 -1
- package/vscode/src/vs/editor/common/services/editorSimpleWorker.js +2 -1
- package/vscode/src/vs/editor/common/services/getIconClasses.js +4 -1
- package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +3 -3
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +9 -8
- package/vscode/src/vs/editor/common/standaloneStrings.js +18 -18
- package/vscode/src/vs/editor/common/viewEvents.js +2 -0
- package/vscode/src/vs/editor/common/viewModel/glyphLanesModel.js +55 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +4 -1
- package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +5 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +1 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +46 -20
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +38 -11
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +56 -101
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.js +3 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +10 -29
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +4 -4
- package/vscode/src/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +51 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +19 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +38 -10
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +29 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/edit.js +10 -3
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +3 -17
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +3 -35
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +26 -6
- package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +6 -6
- package/vscode/src/vs/editor/contrib/format/browser/format.js +9 -9
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +5 -5
- package/vscode/src/vs/editor/contrib/gotoError/browser/media/gotoErrorWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +85 -76
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +120 -90
- package/vscode/src/vs/editor/contrib/hover/browser/marginHover.js +18 -6
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHints.js +4 -2
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +56 -38
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +12 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +2 -2
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +50 -53
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +5 -2
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +5 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +4 -4
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +8 -5
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +58 -46
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +34 -7
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +30 -38
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestModel.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +11 -3
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +18 -7
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +8 -10
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +7 -6
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -0
- package/vscode/src/vs/editor/editor.api.d.ts +82 -11
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +8 -3
- package/vscode/src/vs/editor/standalone/browser/standaloneLayoutService.js +4 -3
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +22 -11
- package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +1 -1
- package/vscode/src/vs/nls.d.ts +6 -0
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +4 -1
- package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +2 -16
- package/vscode/src/vs/platform/accessibility/common/accessibility.js +1 -2
- package/vscode/src/vs/platform/action/common/actionCommonCategories.d.ts +7 -20
- package/vscode/src/vs/platform/action/common/actionCommonCategories.js +8 -8
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +0 -1
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -0
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +5 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +2 -2
- package/vscode/src/vs/platform/actions/common/actions.d.ts +9 -1
- package/vscode/src/vs/platform/actions/common/actions.js +12 -1
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +11 -1
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.js +174 -28
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +38 -5
- package/vscode/src/vs/platform/configuration/common/configuration.d.ts +0 -1
- package/vscode/src/vs/platform/environment/common/environmentService.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +5 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +24 -5
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +6 -1
- package/vscode/src/vs/{workbench/services → platform}/hover/browser/hover.d.ts +6 -8
- package/vscode/src/vs/platform/hover/browser/hover.js +3 -0
- package/vscode/src/vs/platform/instantiation/common/instantiationService.js +14 -4
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +11 -4
- package/vscode/src/vs/platform/keybinding/common/keybinding.d.ts +7 -0
- package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +6 -0
- package/vscode/src/vs/platform/list/browser/listService.js +7 -5
- package/vscode/src/vs/platform/log/common/bufferLog.js +1 -0
- package/vscode/src/vs/platform/log/common/log.d.ts +0 -1
- package/vscode/src/vs/platform/log/common/log.js +1 -2
- package/vscode/src/vs/platform/notification/common/notification.d.ts +36 -19
- package/vscode/src/vs/platform/notification/common/notification.js +9 -3
- package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +4 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +50 -48
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +3 -5
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +49 -66
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +11 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +16 -2
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +230 -26
- package/vscode/src/vs/platform/remote/common/remoteAuthorityResolver.d.ts +1 -0
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -0
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +5 -3
- package/vscode/src/vs/platform/theme/common/colorRegistry.js +28 -9
- package/vscode/src/vs/platform/tunnel/common/tunnel.d.ts +2 -0
- package/vscode/src/vs/platform/window/common/window.js +14 -8
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +97 -78
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +1 -22
- package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -6
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +31 -36
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostComments.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostConsoleForwarder.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +130 -6
- package/vscode/src/vs/workbench/api/common/extHostDocumentContentProviders.js +28 -15
- package/vscode/src/vs/workbench/api/common/extHostDocuments.js +4 -5
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +5 -1
- package/vscode/src/vs/workbench/api/common/extHostFileSystem.js +1 -2
- package/vscode/src/vs/workbench/api/common/extHostFileSystemConsumer.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +35 -33
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +40 -13
- package/vscode/src/vs/workbench/api/common/extHostMessageService.js +10 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +11 -7
- package/vscode/src/vs/workbench/api/common/extHostNotebookEditors.js +2 -3
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +29 -4
- package/vscode/src/vs/workbench/api/common/extHostProfileContentHandler.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostProgress.js +1 -7
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +49 -93
- package/vscode/src/vs/workbench/api/common/extHostSpeech.js +21 -0
- package/vscode/src/vs/workbench/api/common/extHostTask.js +18 -22
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +55 -36
- package/vscode/src/vs/workbench/api/common/extHostTextEditor.js +5 -2
- package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +6 -7
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +6 -3
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +4 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +74 -12
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +27 -8
- package/vscode/src/vs/workbench/api/worker/extHostConsoleForwarder.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +172 -103
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +13 -17
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +34 -34
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
- package/vscode/src/vs/workbench/browser/dnd.js +2 -2
- package/vscode/src/vs/workbench/browser/labels.js +34 -4
- package/vscode/src/vs/workbench/browser/part.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +801 -0
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsModel.js +140 -0
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +410 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +1 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +304 -303
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +101 -47
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +114 -47
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +1313 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +190 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +344 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorTitleControl.js +152 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +8 -8
- package/vscode/src/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/editortitlecontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/singleeditortabscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +1626 -0
- package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +150 -0
- package/vscode/src/vs/workbench/browser/parts/editor/noEditorTabsControl.js +52 -0
- package/vscode/src/vs/workbench/browser/parts/editor/singleEditorTabsControl.js +260 -0
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +39 -36
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +68 -28
- package/vscode/src/vs/workbench/browser/parts/panel/media/panelpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +15 -14
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +18 -17
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +7 -10
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +2 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +18 -17
- package/vscode/src/vs/workbench/browser/quickaccess.js +33 -1
- package/vscode/src/vs/workbench/browser/web.api.d.ts +6 -0
- package/vscode/src/vs/workbench/browser/window.js +92 -9
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +114 -65
- package/vscode/src/vs/workbench/common/component.d.ts +5 -1
- package/vscode/src/vs/workbench/common/component.js +6 -0
- package/vscode/src/vs/workbench/common/configuration.js +11 -1
- package/vscode/src/vs/workbench/common/contextkeys.js +8 -4
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +6 -0
- package/vscode/src/vs/workbench/common/editor/editorInput.js +3 -0
- package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +107 -0
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +6 -3
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.js +21 -3
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
- package/vscode/src/vs/workbench/common/editor.d.ts +16 -4
- package/vscode/src/vs/workbench/common/editor.js +7 -1
- package/vscode/src/vs/workbench/common/memento.js +33 -12
- package/vscode/src/vs/workbench/common/notifications.js +30 -7
- package/vscode/src/vs/workbench/common/theme.js +61 -1
- package/vscode/src/vs/workbench/common/views.d.ts +1 -28
- package/vscode/src/vs/workbench/common/views.js +1 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +232 -19
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +9 -9
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +1 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +19 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +57 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +31 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +93 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +30 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +24 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +21 -43
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +0 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/{comments.contribution.js → commentsAccessibility.js} +36 -128
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +41 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +202 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +27 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +165 -52
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +48 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +6 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +40 -10
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +28 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugContext.js +14 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +52 -23
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +164 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +10 -0
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +285 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +123 -78
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +10 -0
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +326 -0
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +1 -2
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +8 -9
- package/vscode/src/vs/workbench/contrib/files/browser/files.configuration.contribution.js +70 -2
- package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/files/browser/files.fileEditorFactory.contribution.js +13 -0
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +34 -17
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +5 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +48 -14
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +16 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +317 -321
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +17 -24
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingService.js +3 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +306 -130
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +3 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +385 -613
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +69 -64
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +71 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -44
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +5 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +38 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +36 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +32 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +24 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +264 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +60 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +12 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +12 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +188 -155
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +10 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -33
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +9 -7
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +6 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +29 -14
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +15 -3
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +22 -6
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +16 -17
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +78 -50
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +15 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +25 -45
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +12 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +33 -36
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +3 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +5 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +15 -27
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +38 -22
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +5 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +60 -40
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +15 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testService.js +26 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +24 -23
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +1 -1
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +124 -26
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +68 -0
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +76 -36
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorService.js +15 -3
- package/vscode/src/vs/workbench/services/editor/common/editorGroupFinder.js +10 -1
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +51 -43
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +13 -8
- package/vscode/src/vs/workbench/services/editor/common/editorService.js +2 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +10 -10
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +7 -7
- package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +1 -0
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.d.ts +29 -9
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +160 -63
- package/vscode/src/vs/workbench/services/host/browser/host.d.ts +8 -0
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +60 -72
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +0 -4
- package/vscode/src/vs/workbench/services/notebook/common/notebookDocumentService.js +56 -0
- package/vscode/src/vs/workbench/services/output/common/output.js +2 -2
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +10 -0
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +10 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +2 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +5 -4
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +21 -8
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +4 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +3 -0
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +4 -4
- package/vscode/src/vs/workbench/{browser/parts/views → services/views/browser}/viewsService.js +20 -15
- package/vscode/src/vs/workbench/services/views/common/viewsService.d.ts +34 -0
- package/vscode/src/vs/workbench/services/{hover/browser/hover.js → views/common/viewsService.js} +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.d.ts +6 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +5 -2
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js +1 -0
- package/vscode-dts/vscode.proposed.chatAgents2.d.ts +112 -47
- package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +68 -9
- package/vscode-dts/{vscode.proposed.scmInputBoxActionButton.d.ts → vscode.proposed.codeActionRanges.d.ts} +8 -10
- package/vscode-dts/{vscode.proposed.readonlyMessage.d.ts → vscode.proposed.commentReactor.d.ts} +3 -4
- package/vscode-dts/vscode.proposed.contribMultiDiffEditorMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemGroupMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.debugVisualization.d.ts +100 -0
- package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +1 -1
- package/vscode-dts/vscode.proposed.interactive.d.ts +13 -16
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +4 -1
- package/vscode-dts/vscode.proposed.resolvers.d.ts +4 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +4 -10
- package/vscode-dts/vscode.proposed.scmMultiDiffEditor.d.ts +34 -0
- package/vscode-dts/vscode.proposed.speech.d.ts +17 -3
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +7 -1
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +4 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/colors.js +0 -17
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorDecorations.js +0 -231
- package/vscode/src/vs/editor/browser/widget/diffEditor/outlineModel.js +0 -299
- package/vscode/src/vs/editor/browser/widget/diffEditor/workerBasedDocumentDiffProvider.js +0 -101
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +0 -390
- package/vscode/src/vs/workbench/services/editor/common/editorGroupColumn.d.ts +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +0 -4
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.d.ts +0 -28
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.d.ts +0 -30
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +0 -98
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.d.ts +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +0 -428
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +0 -83
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +0 -39
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +0 -77
- package/vscode-dts/vscode.proposed.saveEditor.d.ts +0 -35
- package/vscode-dts/vscode.proposed.scmInputBoxValueProvider.d.ts +0 -25
- package/vscode-dts/vscode.proposed.testingActiveProfile.d.ts +0 -21
|
@@ -3,16 +3,19 @@ import { RunOnceScheduler } from '../../../../base/common/async.js';
|
|
|
3
3
|
import { CancellationTokenSource } from '../../../../base/common/cancellation.js';
|
|
4
4
|
import { Disposable, toDisposable } from '../../../../base/common/lifecycle.js';
|
|
5
5
|
import { IDiffProviderFactoryService } from './diffProviderFactoryService.js';
|
|
6
|
-
import { readHotReloadableExport } from './utils.js';
|
|
7
|
-
import { LineRange } from '../../../common/core/lineRange.js';
|
|
6
|
+
import { readHotReloadableExport, filterWithPrevious } from './utils.js';
|
|
7
|
+
import { LineRange, LineRangeSet } from '../../../common/core/lineRange.js';
|
|
8
8
|
import { DefaultLinesDiffComputer } from '../../../common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js';
|
|
9
|
-
import { DetailedLineRangeMapping, RangeMapping } from '../../../common/diff/rangeMapping.js';
|
|
9
|
+
import { DetailedLineRangeMapping, LineRangeMapping, RangeMapping } from '../../../common/diff/rangeMapping.js';
|
|
10
10
|
import { TextEditInfo } from '../../../common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper.js';
|
|
11
11
|
import { combineTextEditInfos } from '../../../common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos.js';
|
|
12
12
|
import { optimizeSequenceDiffs } from '../../../common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js';
|
|
13
|
+
import { isDefined } from '../../../../base/common/types.js';
|
|
14
|
+
import { groupAdjacentBy } from '../../../../base/common/arrays.js';
|
|
15
|
+
import { softAssert } from '../../../../base/common/assert.js';
|
|
13
16
|
import { observableValue, transaction } from '../../../../base/common/observableInternal/base.js';
|
|
14
17
|
import { derived } from '../../../../base/common/observableInternal/derived.js';
|
|
15
|
-
import { autorunWithStore } from '../../../../base/common/observableInternal/autorun.js';
|
|
18
|
+
import { autorun, autorunWithStore } from '../../../../base/common/observableInternal/autorun.js';
|
|
16
19
|
import { waitForState, observableSignalFromEvent, observableSignal } from '../../../../base/common/observableInternal/utils.js';
|
|
17
20
|
let DiffEditorViewModel = class DiffEditorViewModel extends Disposable {
|
|
18
21
|
setActiveMovedText(movedText) {
|
|
@@ -30,14 +33,14 @@ let DiffEditorViewModel = class DiffEditorViewModel extends Disposable {
|
|
|
30
33
|
this.isDiffUpToDate = this._isDiffUpToDate;
|
|
31
34
|
this._diff = observableValue(this, undefined);
|
|
32
35
|
this.diff = this._diff;
|
|
33
|
-
this._unchangedRegions = observableValue(this,
|
|
36
|
+
this._unchangedRegions = observableValue(this, undefined);
|
|
34
37
|
this.unchangedRegions = derived(this, r => {
|
|
35
38
|
if (this._options.hideUnchangedRegions.read(r)) {
|
|
36
|
-
return this._unchangedRegions.read(r)
|
|
39
|
+
return this._unchangedRegions.read(r)?.regions ?? [];
|
|
37
40
|
}
|
|
38
41
|
else {
|
|
39
42
|
transaction(tx => {
|
|
40
|
-
for (const r of this._unchangedRegions.get()
|
|
43
|
+
for (const r of this._unchangedRegions.get()?.regions || []) {
|
|
41
44
|
r.collapseAll(tx);
|
|
42
45
|
}
|
|
43
46
|
});
|
|
@@ -62,32 +65,109 @@ let DiffEditorViewModel = class DiffEditorViewModel extends Disposable {
|
|
|
62
65
|
this._register(toDisposable(() => this._cancellationTokenSource.cancel()));
|
|
63
66
|
const contentChangedSignal = observableSignal('contentChangedSignal');
|
|
64
67
|
const debouncer = this._register(( new RunOnceScheduler(() => contentChangedSignal.trigger(undefined), 200)));
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
+
this._register(autorun(reader => {
|
|
69
|
+
const lastUnchangedRegions = this._unchangedRegions.read(reader);
|
|
70
|
+
if (!lastUnchangedRegions || ( lastUnchangedRegions.regions.some(r => r.isDragged.read(reader)))) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
68
73
|
const lastUnchangedRegionsOrigRanges = ( ( lastUnchangedRegions.originalDecorationIds
|
|
69
74
|
.map(id => model.original.getDecorationRange(id)))
|
|
70
|
-
.map(r => r ? LineRange.
|
|
75
|
+
.map(r => r ? LineRange.fromRangeInclusive(r) : undefined));
|
|
71
76
|
const lastUnchangedRegionsModRanges = ( ( lastUnchangedRegions.modifiedDecorationIds
|
|
72
77
|
.map(id => model.modified.getDecorationRange(id)))
|
|
73
|
-
.map(r => r ? LineRange.
|
|
74
|
-
const
|
|
78
|
+
.map(r => r ? LineRange.fromRangeInclusive(r) : undefined));
|
|
79
|
+
const updatedLastUnchangedRegions = ( lastUnchangedRegions.regions.map(
|
|
80
|
+
(r, idx) => (!lastUnchangedRegionsOrigRanges[idx] || !lastUnchangedRegionsModRanges[idx]) ? undefined :
|
|
81
|
+
( new UnchangedRegion(
|
|
82
|
+
lastUnchangedRegionsOrigRanges[idx].startLineNumber,
|
|
83
|
+
lastUnchangedRegionsModRanges[idx].startLineNumber,
|
|
84
|
+
lastUnchangedRegionsOrigRanges[idx].length,
|
|
85
|
+
r.visibleLineCountTop.read(reader),
|
|
86
|
+
r.visibleLineCountBottom.read(reader)
|
|
87
|
+
))
|
|
88
|
+
)).filter(isDefined);
|
|
89
|
+
const newRanges = [];
|
|
90
|
+
let didChange = false;
|
|
91
|
+
for (const touching of groupAdjacentBy(updatedLastUnchangedRegions, (a, b) => a.getHiddenModifiedRange(reader).endLineNumberExclusive === b.getHiddenModifiedRange(reader).startLineNumber)) {
|
|
92
|
+
if (touching.length > 1) {
|
|
93
|
+
didChange = true;
|
|
94
|
+
const sumLineCount = touching.reduce((sum, r) => sum + r.lineCount, 0);
|
|
95
|
+
const r = ( new UnchangedRegion(
|
|
96
|
+
touching[0].originalLineNumber,
|
|
97
|
+
touching[0].modifiedLineNumber,
|
|
98
|
+
sumLineCount,
|
|
99
|
+
touching[0].visibleLineCountTop.get(),
|
|
100
|
+
touching[touching.length - 1].visibleLineCountBottom.get()
|
|
101
|
+
));
|
|
102
|
+
newRanges.push(r);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
newRanges.push(touching[0]);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (didChange) {
|
|
109
|
+
const originalDecorationIds = model.original.deltaDecorations(lastUnchangedRegions.originalDecorationIds, ( newRanges.map(
|
|
110
|
+
r => ({ range: r.originalUnchangedRange.toInclusiveRange(), options: { description: 'unchanged' } })
|
|
111
|
+
)));
|
|
112
|
+
const modifiedDecorationIds = model.modified.deltaDecorations(lastUnchangedRegions.modifiedDecorationIds, ( newRanges.map(
|
|
113
|
+
r => ({ range: r.modifiedUnchangedRange.toInclusiveRange(), options: { description: 'unchanged' } })
|
|
114
|
+
)));
|
|
115
|
+
transaction(tx => {
|
|
116
|
+
this._unchangedRegions.set({
|
|
117
|
+
regions: newRanges,
|
|
118
|
+
originalDecorationIds,
|
|
119
|
+
modifiedDecorationIds
|
|
120
|
+
}, tx);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}));
|
|
124
|
+
const updateUnchangedRegions = (result, tx, reader) => {
|
|
125
|
+
const newUnchangedRegions = UnchangedRegion.fromDiffs(result.changes, model.original.getLineCount(), model.modified.getLineCount(), this._options.hideUnchangedRegionsMinimumLineCount.read(reader), this._options.hideUnchangedRegionsContextLineCount.read(reader));
|
|
126
|
+
let visibleRegions = undefined;
|
|
127
|
+
const lastUnchangedRegions = this._unchangedRegions.get();
|
|
128
|
+
if (lastUnchangedRegions) {
|
|
129
|
+
const lastUnchangedRegionsOrigRanges = ( ( lastUnchangedRegions.originalDecorationIds
|
|
130
|
+
.map(id => model.original.getDecorationRange(id)))
|
|
131
|
+
.map(r => r ? LineRange.fromRangeInclusive(r) : undefined));
|
|
132
|
+
const lastUnchangedRegionsModRanges = ( ( lastUnchangedRegions.modifiedDecorationIds
|
|
133
|
+
.map(id => model.modified.getDecorationRange(id)))
|
|
134
|
+
.map(r => r ? LineRange.fromRangeInclusive(r) : undefined));
|
|
135
|
+
const updatedLastUnchangedRegions = filterWithPrevious(( lastUnchangedRegions.regions
|
|
136
|
+
.map((r, idx) => {
|
|
137
|
+
if (!lastUnchangedRegionsOrigRanges[idx] || !lastUnchangedRegionsModRanges[idx]) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
const length = lastUnchangedRegionsOrigRanges[idx].length;
|
|
141
|
+
return ( new UnchangedRegion(
|
|
142
|
+
lastUnchangedRegionsOrigRanges[idx].startLineNumber,
|
|
143
|
+
lastUnchangedRegionsModRanges[idx].startLineNumber,
|
|
144
|
+
length,
|
|
145
|
+
Math.min(r.visibleLineCountTop.get(), length),
|
|
146
|
+
Math.min(r.visibleLineCountBottom.get(), length - r.visibleLineCountTop.get())
|
|
147
|
+
));
|
|
148
|
+
})).filter(isDefined), (cur, prev) => !prev || (cur.modifiedLineNumber >= prev.modifiedLineNumber + prev.lineCount && cur.originalLineNumber >= prev.originalLineNumber + prev.lineCount));
|
|
149
|
+
let hiddenRegions = ( updatedLastUnchangedRegions.map(r => ( new LineRangeMapping(r.getHiddenOriginalRange(reader), r.getHiddenModifiedRange(reader)))));
|
|
150
|
+
hiddenRegions = LineRangeMapping.clip(hiddenRegions, LineRange.ofLength(1, model.original.getLineCount()), LineRange.ofLength(1, model.modified.getLineCount()));
|
|
151
|
+
visibleRegions = LineRangeMapping.inverse(hiddenRegions, model.original.getLineCount(), model.modified.getLineCount());
|
|
152
|
+
}
|
|
153
|
+
const newUnchangedRegions2 = [];
|
|
154
|
+
if (visibleRegions) {
|
|
155
|
+
for (const r of newUnchangedRegions) {
|
|
156
|
+
const intersecting = visibleRegions.filter(f => f.original.intersectsStrict(r.originalUnchangedRange) && f.modified.intersectsStrict(r.modifiedUnchangedRange));
|
|
157
|
+
newUnchangedRegions2.push(...r.setVisibleRanges(intersecting, tx));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
newUnchangedRegions2.push(...newUnchangedRegions);
|
|
162
|
+
}
|
|
163
|
+
const originalDecorationIds = model.original.deltaDecorations(lastUnchangedRegions?.originalDecorationIds || [], ( newUnchangedRegions2.map(
|
|
75
164
|
r => ({ range: r.originalUnchangedRange.toInclusiveRange(), options: { description: 'unchanged' } })
|
|
76
165
|
)));
|
|
77
|
-
const modifiedDecorationIds = model.modified.deltaDecorations(lastUnchangedRegions
|
|
166
|
+
const modifiedDecorationIds = model.modified.deltaDecorations(lastUnchangedRegions?.modifiedDecorationIds || [], ( newUnchangedRegions2.map(
|
|
78
167
|
r => ({ range: r.modifiedUnchangedRange.toInclusiveRange(), options: { description: 'unchanged' } })
|
|
79
168
|
)));
|
|
80
|
-
for (const r of newUnchangedRegions) {
|
|
81
|
-
for (let i = 0; i < lastUnchangedRegions.regions.length; i++) {
|
|
82
|
-
if (lastUnchangedRegionsOrigRanges[i] && r.originalUnchangedRange.intersectsStrict(lastUnchangedRegionsOrigRanges[i])
|
|
83
|
-
&& lastUnchangedRegionsModRanges[i] && r.modifiedUnchangedRange.intersectsStrict(lastUnchangedRegionsModRanges[i])) {
|
|
84
|
-
r.setHiddenModifiedRange(lastUnchangedRegions.regions[i].getHiddenModifiedRange(undefined), tx);
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
169
|
this._unchangedRegions.set({
|
|
90
|
-
regions:
|
|
170
|
+
regions: newUnchangedRegions2,
|
|
91
171
|
originalDecorationIds,
|
|
92
172
|
modifiedDecorationIds
|
|
93
173
|
}, tx);
|
|
@@ -150,26 +230,26 @@ let DiffEditorViewModel = class DiffEditorViewModel extends Disposable {
|
|
|
150
230
|
});
|
|
151
231
|
}));
|
|
152
232
|
}
|
|
153
|
-
ensureModifiedLineIsVisible(lineNumber, tx) {
|
|
233
|
+
ensureModifiedLineIsVisible(lineNumber, preference, tx) {
|
|
154
234
|
if (this.diff.get()?.mappings.length === 0) {
|
|
155
235
|
return;
|
|
156
236
|
}
|
|
157
|
-
const unchangedRegions = this._unchangedRegions.get()
|
|
237
|
+
const unchangedRegions = this._unchangedRegions.get()?.regions || [];
|
|
158
238
|
for (const r of unchangedRegions) {
|
|
159
239
|
if (r.getHiddenModifiedRange(undefined).contains(lineNumber)) {
|
|
160
|
-
r.showModifiedLine(lineNumber, tx);
|
|
240
|
+
r.showModifiedLine(lineNumber, preference, tx);
|
|
161
241
|
return;
|
|
162
242
|
}
|
|
163
243
|
}
|
|
164
244
|
}
|
|
165
|
-
ensureOriginalLineIsVisible(lineNumber, tx) {
|
|
245
|
+
ensureOriginalLineIsVisible(lineNumber, preference, tx) {
|
|
166
246
|
if (this.diff.get()?.mappings.length === 0) {
|
|
167
247
|
return;
|
|
168
248
|
}
|
|
169
|
-
const unchangedRegions = this._unchangedRegions.get()
|
|
249
|
+
const unchangedRegions = this._unchangedRegions.get()?.regions || [];
|
|
170
250
|
for (const r of unchangedRegions) {
|
|
171
251
|
if (r.getHiddenOriginalRange(undefined).contains(lineNumber)) {
|
|
172
|
-
r.showOriginalLine(lineNumber, tx);
|
|
252
|
+
r.showOriginalLine(lineNumber, preference, tx);
|
|
173
253
|
return;
|
|
174
254
|
}
|
|
175
255
|
}
|
|
@@ -180,12 +260,15 @@ let DiffEditorViewModel = class DiffEditorViewModel extends Disposable {
|
|
|
180
260
|
serializeState() {
|
|
181
261
|
const regions = this._unchangedRegions.get();
|
|
182
262
|
return {
|
|
183
|
-
collapsedRegions:
|
|
263
|
+
collapsedRegions: regions?.regions.map(r => ({ range: r.getHiddenModifiedRange(undefined).serialize() }))
|
|
184
264
|
};
|
|
185
265
|
}
|
|
186
266
|
restoreSerializedState(state) {
|
|
187
|
-
const ranges =
|
|
267
|
+
const ranges = state.collapsedRegions?.map(r => LineRange.deserialize(r.range));
|
|
188
268
|
const regions = this._unchangedRegions.get();
|
|
269
|
+
if (!regions || !ranges) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
189
272
|
transaction(tx => {
|
|
190
273
|
for (const r of regions.regions) {
|
|
191
274
|
for (const range of ranges) {
|
|
@@ -284,8 +367,37 @@ class UnchangedRegion {
|
|
|
284
367
|
this.visibleLineCountBottom = this._visibleLineCountBottom;
|
|
285
368
|
this._shouldHideControls = derived(this, reader => this.visibleLineCountTop.read(reader) + this.visibleLineCountBottom.read(reader) === this.lineCount && !this.isDragged.read(reader));
|
|
286
369
|
this.isDragged = observableValue(this, undefined);
|
|
287
|
-
|
|
288
|
-
|
|
370
|
+
const visibleLineCountTop2 = Math.max(Math.min(visibleLineCountTop, this.lineCount), 0);
|
|
371
|
+
const visibleLineCountBottom2 = Math.max(Math.min(visibleLineCountBottom, this.lineCount - visibleLineCountTop), 0);
|
|
372
|
+
softAssert(visibleLineCountTop === visibleLineCountTop2);
|
|
373
|
+
softAssert(visibleLineCountBottom === visibleLineCountBottom2);
|
|
374
|
+
this._visibleLineCountTop.set(visibleLineCountTop2, undefined);
|
|
375
|
+
this._visibleLineCountBottom.set(visibleLineCountBottom2, undefined);
|
|
376
|
+
}
|
|
377
|
+
setVisibleRanges(visibleRanges, tx) {
|
|
378
|
+
const result = [];
|
|
379
|
+
const hiddenModified = ( new LineRangeSet(( visibleRanges.map(r => r.modified)))).subtractFrom(this.modifiedUnchangedRange);
|
|
380
|
+
let originalStartLineNumber = this.originalLineNumber;
|
|
381
|
+
let modifiedStartLineNumber = this.modifiedLineNumber;
|
|
382
|
+
const modifiedEndLineNumberEx = this.modifiedLineNumber + this.lineCount;
|
|
383
|
+
if (hiddenModified.ranges.length === 0) {
|
|
384
|
+
this.showAll(tx);
|
|
385
|
+
result.push(this);
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
let i = 0;
|
|
389
|
+
for (const r of hiddenModified.ranges) {
|
|
390
|
+
const isLast = i === hiddenModified.ranges.length - 1;
|
|
391
|
+
i++;
|
|
392
|
+
const length = (isLast ? modifiedEndLineNumberEx : r.endLineNumberExclusive) - modifiedStartLineNumber;
|
|
393
|
+
const newR = ( new UnchangedRegion(originalStartLineNumber, modifiedStartLineNumber, length, 0, 0));
|
|
394
|
+
newR.setHiddenModifiedRange(r, tx);
|
|
395
|
+
result.push(newR);
|
|
396
|
+
originalStartLineNumber = newR.originalUnchangedRange.endLineNumberExclusive;
|
|
397
|
+
modifiedStartLineNumber = newR.modifiedUnchangedRange.endLineNumberExclusive;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return result;
|
|
289
401
|
}
|
|
290
402
|
shouldHideControls(reader) {
|
|
291
403
|
return this._shouldHideControls.read(reader);
|
|
@@ -318,20 +430,20 @@ class UnchangedRegion {
|
|
|
318
430
|
showAll(tx) {
|
|
319
431
|
this._visibleLineCountBottom.set(this.lineCount - this._visibleLineCountTop.get(), tx);
|
|
320
432
|
}
|
|
321
|
-
showModifiedLine(lineNumber, tx) {
|
|
433
|
+
showModifiedLine(lineNumber, preference, tx) {
|
|
322
434
|
const top = lineNumber + 1 - (this.modifiedLineNumber + this._visibleLineCountTop.get());
|
|
323
435
|
const bottom = (this.modifiedLineNumber - this._visibleLineCountBottom.get() + this.lineCount) - lineNumber;
|
|
324
|
-
if (top < bottom) {
|
|
436
|
+
if (preference === 0 && top < bottom || preference === 1 ) {
|
|
325
437
|
this._visibleLineCountTop.set(this._visibleLineCountTop.get() + top, tx);
|
|
326
438
|
}
|
|
327
439
|
else {
|
|
328
440
|
this._visibleLineCountBottom.set(this._visibleLineCountBottom.get() + bottom, tx);
|
|
329
441
|
}
|
|
330
442
|
}
|
|
331
|
-
showOriginalLine(lineNumber, tx) {
|
|
443
|
+
showOriginalLine(lineNumber, preference, tx) {
|
|
332
444
|
const top = lineNumber - this.originalLineNumber;
|
|
333
445
|
const bottom = (this.originalLineNumber + this.lineCount) - lineNumber;
|
|
334
|
-
if (top < bottom) {
|
|
446
|
+
if (preference === 0 && top < bottom || preference === 1 ) {
|
|
335
447
|
this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get() + bottom - top, this.getMaxVisibleLineCountTop()), tx);
|
|
336
448
|
}
|
|
337
449
|
else {
|
|
@@ -10,13 +10,13 @@ import { EditorExtensionsRegistry } from '../../editorExtensions.js';
|
|
|
10
10
|
import { ICodeEditorService } from '../../services/codeEditorService.js';
|
|
11
11
|
import { StableEditorScrollState } from '../../stableEditorScroll.js';
|
|
12
12
|
import { CodeEditorWidget } from '../codeEditorWidget.js';
|
|
13
|
-
import { AccessibleDiffViewer } from './accessibleDiffViewer.js';
|
|
14
|
-
import { DiffEditorDecorations } from './diffEditorDecorations.js';
|
|
15
|
-
import { DiffEditorSash } from './diffEditorSash.js';
|
|
16
|
-
import { HideUnchangedRegionsFeature } from './hideUnchangedRegionsFeature.js';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
13
|
+
import { AccessibleDiffViewer } from './components/accessibleDiffViewer.js';
|
|
14
|
+
import { DiffEditorDecorations } from './components/diffEditorDecorations.js';
|
|
15
|
+
import { DiffEditorSash } from './components/diffEditorSash.js';
|
|
16
|
+
import { HideUnchangedRegionsFeature } from './features/hideUnchangedRegionsFeature.js';
|
|
17
|
+
import { DiffEditorViewZones } from './components/diffEditorViewZones/diffEditorViewZones.js';
|
|
18
|
+
import { MovedBlocksLinesFeature } from './features/movedBlocksLinesFeature.js';
|
|
19
|
+
import { OverviewRulerFeature } from './features/overviewRulerFeature.js';
|
|
20
20
|
import { ObservableElementSizeObserver, bindContextKey, applyViewZones, applyStyle, translatePosition, readHotReloadableExport } from './utils.js';
|
|
21
21
|
import { Position } from '../../../common/core/position.js';
|
|
22
22
|
import { Range } from '../../../common/core/range.js';
|
|
@@ -27,16 +27,16 @@ import { IContextKeyService } from '../../../../platform/contextkey/common/conte
|
|
|
27
27
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
28
28
|
import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
|
|
29
29
|
import { IEditorProgressService } from '../../../../platform/progress/common/progress.js';
|
|
30
|
-
import './colors.js';
|
|
31
30
|
import { DelegatingEditor } from './delegatingEditorImpl.js';
|
|
32
|
-
import { DiffEditorEditors } from './diffEditorEditors.js';
|
|
31
|
+
import { DiffEditorEditors } from './components/diffEditorEditors.js';
|
|
33
32
|
import { DiffEditorOptions } from './diffEditorOptions.js';
|
|
34
33
|
import { DiffEditorViewModel } from './diffEditorViewModel.js';
|
|
34
|
+
import { RevertButtonsFeature } from './features/revertButtonsFeature.js';
|
|
35
35
|
import { observableValue, subtransaction, transaction } from '../../../../base/common/observableInternal/base.js';
|
|
36
36
|
import { autorun, autorunWithStore } from '../../../../base/common/observableInternal/autorun.js';
|
|
37
37
|
import { recomputeInitiallyAndOnChange, observableFromEvent } from '../../../../base/common/observableInternal/utils.js';
|
|
38
38
|
let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
39
|
-
static { this.ENTIRE_DIFF_OVERVIEW_WIDTH =
|
|
39
|
+
static { this.ENTIRE_DIFF_OVERVIEW_WIDTH = OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH; }
|
|
40
40
|
get onDidContentSizeChange() { return this._editors.onDidContentSizeChange; }
|
|
41
41
|
get collapseUnchangedRegions() { return this._options.hideUnchangedRegions.get(); }
|
|
42
42
|
constructor(_domElement, options, codeEditorWidgetOptions, _parentContextKeyService, _parentInstantiationService, codeEditorService, _audioCueService, _editorProgressService) {
|
|
@@ -102,7 +102,7 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
102
102
|
this._editors = this._register(this._instantiationService.createInstance(DiffEditorEditors, this.elements.original, this.elements.modified, this._options, codeEditorWidgetOptions, (i, c, o, o2) => this._createInnerEditor(i, c, o, o2)));
|
|
103
103
|
this._overviewRulerPart = derivedDisposable(this, reader => !this._options.renderOverviewRuler.read(reader)
|
|
104
104
|
? undefined
|
|
105
|
-
: this._instantiationService.createInstance(readHotReloadableExport(
|
|
105
|
+
: this._instantiationService.createInstance(readHotReloadableExport(OverviewRulerFeature, reader), this._editors, this.elements.root, this._diffModel, this._rootSizeObserver.width, this._rootSizeObserver.height, ( this._layoutInfo.map(i => i.modifiedEditor)))).recomputeInitiallyAndOnChange(this._store);
|
|
106
106
|
this._sash = derivedDisposable(this, reader => {
|
|
107
107
|
const showSash = this._options.renderSideBySide.read(reader);
|
|
108
108
|
this.elements.root.classList.toggle('side-by-side', showSash);
|
|
@@ -116,7 +116,7 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
116
116
|
const origViewZoneIdsToIgnore = ( new Set());
|
|
117
117
|
const modViewZoneIdsToIgnore = ( new Set());
|
|
118
118
|
let isUpdatingViewZones = false;
|
|
119
|
-
const viewZoneManager = derivedDisposable(this, reader => this._instantiationService.createInstance(readHotReloadableExport(
|
|
119
|
+
const viewZoneManager = derivedDisposable(this, reader => this._instantiationService.createInstance(readHotReloadableExport(DiffEditorViewZones, reader), getWindow(this._domElement), this._editors, this._diffModel, this._options, this, () => isUpdatingViewZones || unchangedRangesFeature.get().isUpdatingHiddenAreas, origViewZoneIdsToIgnore, modViewZoneIdsToIgnore)).recomputeInitiallyAndOnChange(this._store);
|
|
120
120
|
const originalViewZones = derived(this, (reader) => {
|
|
121
121
|
const orig = viewZoneManager.read(reader).viewZones.read(reader).orig;
|
|
122
122
|
const orig2 = unchangedRangesFeature.read(reader).viewZones.read(reader).origViewZones;
|
|
@@ -148,7 +148,7 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
148
148
|
this._createDiffEditorContributions();
|
|
149
149
|
codeEditorService.addDiffEditor(this);
|
|
150
150
|
this._register(recomputeInitiallyAndOnChange(this._layoutInfo));
|
|
151
|
-
derivedDisposable(this, reader => new (readHotReloadableExport(
|
|
151
|
+
derivedDisposable(this, reader => new (readHotReloadableExport(MovedBlocksLinesFeature, reader))(this.elements.root, this._diffModel, ( this._layoutInfo.map(i => i.originalEditor)), ( this._layoutInfo.map(i => i.modifiedEditor)), this._editors)).recomputeInitiallyAndOnChange(this._store, value => {
|
|
152
152
|
this._movedBlocksLinesPart.set(value, undefined);
|
|
153
153
|
});
|
|
154
154
|
this._register(applyStyle(this.elements.overlay, {
|
|
@@ -189,6 +189,7 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
189
189
|
this._diffModel.get()?.dispose();
|
|
190
190
|
}
|
|
191
191
|
}));
|
|
192
|
+
this._register(( new RevertButtonsFeature(this._editors, this._diffModel, this._options, this)));
|
|
192
193
|
}
|
|
193
194
|
getViewWidth() {
|
|
194
195
|
return this._rootSizeObserver.width.get();
|
|
@@ -309,14 +310,14 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
309
310
|
this.revertRangeMappings(diff.innerChanges);
|
|
310
311
|
return;
|
|
311
312
|
}
|
|
312
|
-
const model = this._diffModel.get()
|
|
313
|
-
if (!model) {
|
|
313
|
+
const model = this._diffModel.get();
|
|
314
|
+
if (!model || !model.isDiffUpToDate.get()) {
|
|
314
315
|
return;
|
|
315
316
|
}
|
|
316
317
|
this._editors.modified.executeEdits('diffEditor', [
|
|
317
318
|
{
|
|
318
319
|
range: diff.modified.toExclusiveRange(),
|
|
319
|
-
text: model.original.getValueInRange(diff.original.toExclusiveRange())
|
|
320
|
+
text: model.model.original.getValueInRange(diff.original.toExclusiveRange())
|
|
320
321
|
}
|
|
321
322
|
]);
|
|
322
323
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { WorkerBasedDocumentDiffProvider } from './workerBasedDocumentDiffProvider.js';
|
|
3
2
|
import { registerSingleton } from '../../../../platform/instantiation/common/extensions.js';
|
|
4
3
|
import { createDecorator, IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
4
|
+
import { Emitter } from '../../../../base/common/event.js';
|
|
5
|
+
import { StopWatch } from '../../../../base/common/stopwatch.js';
|
|
6
|
+
import { LineRange } from '../../../common/core/lineRange.js';
|
|
7
|
+
import { DetailedLineRangeMapping, RangeMapping } from '../../../common/diff/rangeMapping.js';
|
|
8
|
+
import { IEditorWorkerService } from '../../../common/services/editorWorker.js';
|
|
9
|
+
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
|
|
10
|
+
var WorkerBasedDocumentDiffProvider_1;
|
|
5
11
|
const IDiffProviderFactoryService = ( createDecorator('diffProviderFactoryService'));
|
|
6
|
-
let
|
|
12
|
+
let WorkerBasedDiffProviderFactoryService = class WorkerBasedDiffProviderFactoryService {
|
|
7
13
|
constructor(instantiationService) {
|
|
8
14
|
this.instantiationService = instantiationService;
|
|
9
15
|
}
|
|
@@ -11,8 +17,100 @@ let DiffProviderFactoryService = class DiffProviderFactoryService {
|
|
|
11
17
|
return this.instantiationService.createInstance(WorkerBasedDocumentDiffProvider, options);
|
|
12
18
|
}
|
|
13
19
|
};
|
|
14
|
-
|
|
20
|
+
WorkerBasedDiffProviderFactoryService = ( __decorate([
|
|
15
21
|
( __param(0, IInstantiationService))
|
|
16
|
-
],
|
|
17
|
-
registerSingleton(IDiffProviderFactoryService,
|
|
18
|
-
|
|
22
|
+
], WorkerBasedDiffProviderFactoryService));
|
|
23
|
+
registerSingleton(IDiffProviderFactoryService, WorkerBasedDiffProviderFactoryService, 1 );
|
|
24
|
+
let WorkerBasedDocumentDiffProvider = class WorkerBasedDocumentDiffProvider {
|
|
25
|
+
static { WorkerBasedDocumentDiffProvider_1 = this; }
|
|
26
|
+
static { this.diffCache = ( new Map()); }
|
|
27
|
+
constructor(options, editorWorkerService, telemetryService) {
|
|
28
|
+
this.editorWorkerService = editorWorkerService;
|
|
29
|
+
this.telemetryService = telemetryService;
|
|
30
|
+
this.onDidChangeEventEmitter = ( new Emitter());
|
|
31
|
+
this.onDidChange = this.onDidChangeEventEmitter.event;
|
|
32
|
+
this.diffAlgorithm = 'advanced';
|
|
33
|
+
this.diffAlgorithmOnDidChangeSubscription = undefined;
|
|
34
|
+
this.setOptions(options);
|
|
35
|
+
}
|
|
36
|
+
dispose() {
|
|
37
|
+
this.diffAlgorithmOnDidChangeSubscription?.dispose();
|
|
38
|
+
}
|
|
39
|
+
async computeDiff(original, modified, options, cancellationToken) {
|
|
40
|
+
if (typeof this.diffAlgorithm !== 'string') {
|
|
41
|
+
return this.diffAlgorithm.computeDiff(original, modified, options, cancellationToken);
|
|
42
|
+
}
|
|
43
|
+
if (original.getLineCount() === 1 && original.getLineMaxColumn(1) === 1) {
|
|
44
|
+
if (modified.getLineCount() === 1 && modified.getLineMaxColumn(1) === 1) {
|
|
45
|
+
return {
|
|
46
|
+
changes: [],
|
|
47
|
+
identical: true,
|
|
48
|
+
quitEarly: false,
|
|
49
|
+
moves: [],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
changes: [
|
|
54
|
+
( new DetailedLineRangeMapping(( new LineRange(1, 2)), ( new LineRange(1, modified.getLineCount() + 1)), [
|
|
55
|
+
( new RangeMapping(original.getFullModelRange(), modified.getFullModelRange()))
|
|
56
|
+
]))
|
|
57
|
+
],
|
|
58
|
+
identical: false,
|
|
59
|
+
quitEarly: false,
|
|
60
|
+
moves: [],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const uriKey = JSON.stringify([( original.uri.toString()), ( modified.uri.toString())]);
|
|
64
|
+
const context = JSON.stringify([original.id, modified.id, original.getAlternativeVersionId(), modified.getAlternativeVersionId(), JSON.stringify(options)]);
|
|
65
|
+
const c = WorkerBasedDocumentDiffProvider_1.diffCache.get(uriKey);
|
|
66
|
+
if (c && c.context === context) {
|
|
67
|
+
return c.result;
|
|
68
|
+
}
|
|
69
|
+
const sw = StopWatch.create();
|
|
70
|
+
const result = await this.editorWorkerService.computeDiff(original.uri, modified.uri, options, this.diffAlgorithm);
|
|
71
|
+
const timeMs = sw.elapsed();
|
|
72
|
+
this.telemetryService.publicLog2('diffEditor.computeDiff', {
|
|
73
|
+
timeMs,
|
|
74
|
+
timedOut: result?.quitEarly ?? true,
|
|
75
|
+
detectedMoves: options.computeMoves ? (result?.moves.length ?? 0) : -1,
|
|
76
|
+
});
|
|
77
|
+
if (cancellationToken.isCancellationRequested) {
|
|
78
|
+
return {
|
|
79
|
+
changes: [],
|
|
80
|
+
identical: false,
|
|
81
|
+
quitEarly: true,
|
|
82
|
+
moves: [],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
if (!result) {
|
|
86
|
+
throw new Error('no diff result available');
|
|
87
|
+
}
|
|
88
|
+
if (WorkerBasedDocumentDiffProvider_1.diffCache.size > 10) {
|
|
89
|
+
WorkerBasedDocumentDiffProvider_1.diffCache.delete(( WorkerBasedDocumentDiffProvider_1.diffCache.keys()).next().value);
|
|
90
|
+
}
|
|
91
|
+
WorkerBasedDocumentDiffProvider_1.diffCache.set(uriKey, { result, context });
|
|
92
|
+
return result;
|
|
93
|
+
}
|
|
94
|
+
setOptions(newOptions) {
|
|
95
|
+
let didChange = false;
|
|
96
|
+
if (newOptions.diffAlgorithm) {
|
|
97
|
+
if (this.diffAlgorithm !== newOptions.diffAlgorithm) {
|
|
98
|
+
this.diffAlgorithmOnDidChangeSubscription?.dispose();
|
|
99
|
+
this.diffAlgorithmOnDidChangeSubscription = undefined;
|
|
100
|
+
this.diffAlgorithm = newOptions.diffAlgorithm;
|
|
101
|
+
if (typeof newOptions.diffAlgorithm !== 'string') {
|
|
102
|
+
this.diffAlgorithmOnDidChangeSubscription = newOptions.diffAlgorithm.onDidChange(() => this.onDidChangeEventEmitter.fire());
|
|
103
|
+
}
|
|
104
|
+
didChange = true;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (didChange) {
|
|
108
|
+
this.onDidChangeEventEmitter.fire();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
WorkerBasedDocumentDiffProvider = WorkerBasedDocumentDiffProvider_1 = ( __decorate([
|
|
113
|
+
( __param(1, IEditorWorkerService)),
|
|
114
|
+
( __param(2, ITelemetryService))
|
|
115
|
+
], WorkerBasedDocumentDiffProvider));
|
|
116
|
+
export { IDiffProviderFactoryService, WorkerBasedDiffProviderFactoryService, WorkerBasedDocumentDiffProvider };
|