@codingame/monaco-vscode-api 2.2.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -3
- package/api.js +8 -10
- package/contributions.js +3 -3
- package/debugProtocol.d.ts +143 -51
- package/extensions.d.ts +9 -5
- package/external/@xterm/xterm/typings/xterm.d.ts +2 -2
- package/missing-services.js +48 -13
- package/monaco.js +30 -14
- package/package.json +8 -8
- package/service-override/tools/editor.js +31 -8
- package/service-override/tools/views.d.ts +5 -6
- package/service-override/tools/views.js +10 -11
- package/services.d.ts +2 -2
- package/services.js +4 -3
- package/vscode/src/vs/base/browser/browser.js +2 -66
- package/vscode/src/vs/base/browser/dom.js +10 -22
- package/vscode/src/vs/base/browser/markdownRenderer.js +13 -5
- package/vscode/src/vs/base/browser/mouseEvent.js +9 -3
- package/vscode/src/vs/base/browser/pixelRatio.js +72 -0
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +4 -3
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +3 -4
- package/vscode/src/vs/base/browser/ui/button/button.js +16 -4
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -3
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +8 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +6 -2
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.js +22 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconHoverDelegate.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +3 -2
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabelHover.js +2 -1
- package/vscode/src/vs/base/browser/ui/list/listView.js +27 -42
- package/vscode/src/vs/base/browser/ui/menu/menu.js +0 -4
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +7 -4
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +8 -4
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +4 -2
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +7 -2
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
- package/vscode/src/vs/base/common/actions.js +1 -1
- package/vscode/src/vs/base/common/assert.js +1 -1
- package/vscode/src/vs/base/common/async.js +11 -7
- package/vscode/src/vs/base/common/codicons.d.ts +4 -0
- package/vscode/src/vs/base/common/codicons.js +4 -0
- package/vscode/src/vs/base/common/date.js +55 -1
- package/vscode/src/vs/base/common/event.js +5 -3
- package/vscode/src/vs/base/common/filters.js +1 -1
- package/vscode/src/vs/base/common/hotReload.js +5 -4
- package/vscode/src/vs/base/common/network.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.js +19 -35
- package/vscode/src/vs/base/common/observableInternal/base.js +3 -82
- package/vscode/src/vs/base/common/observableInternal/debugName.js +100 -0
- package/vscode/src/vs/base/common/observableInternal/derived.js +14 -46
- package/vscode/src/vs/base/common/observableInternal/promise.js +94 -0
- package/vscode/src/vs/base/common/observableInternal/utils.js +5 -27
- package/vscode/src/vs/base/common/prefixTree.js +56 -22
- package/vscode/src/vs/base/common/product.d.ts +1 -1
- package/vscode/src/vs/base/common/strings.js +9 -1
- package/vscode/src/vs/editor/browser/config/charWidthReader.js +5 -6
- package/vscode/src/vs/editor/browser/config/editorConfiguration.js +7 -4
- package/vscode/src/vs/editor/browser/config/fontMeasurements.js +39 -26
- package/vscode/src/vs/editor/browser/controller/mouseHandler.js +10 -10
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +4 -4
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +12 -12
- package/vscode/src/vs/editor/browser/coreCommands.js +2 -2
- package/vscode/src/vs/editor/browser/view/viewController.js +3 -3
- package/vscode/src/vs/editor/browser/view/viewLayer.js +1 -1
- package/vscode/src/vs/editor/browser/view/viewOverlays.js +6 -6
- package/vscode/src/vs/editor/browser/view.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -5
- package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +8 -8
- package/vscode/src/vs/editor/browser/viewParts/decorations/decorations.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +11 -11
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +4 -4
- package/vscode/src/vs/editor/browser/viewParts/indentGuides/indentGuides.js +4 -4
- package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +4 -4
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLine.js +4 -4
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.js +13 -13
- package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/margin/margin.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +7 -7
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +7 -7
- package/vscode/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +6 -6
- package/vscode/src/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
- package/vscode/src/vs/editor/browser/viewParts/selections/selections.js +4 -4
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +5 -5
- package/vscode/src/vs/editor/browser/viewParts/whitespace/whitespace.js +5 -5
- package/vscode/src/vs/editor/browser/widget/codeEditorContributions.js +2 -2
- package/vscode/src/vs/editor/browser/widget/codeEditorWidget.js +34 -32
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.css.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +82 -37
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +3 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +7 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +3 -3
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +6 -6
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +10 -16
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +2 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +12 -12
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -4
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +17 -18
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +1 -1
- package/vscode/src/vs/editor/browser/widget/embeddedCodeEditorWidget.js +4 -4
- package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/renderedMarkdown.css.js +1 -1
- package/vscode/src/vs/editor/browser/widget/multiDiffEditorWidget/colors.js +2 -2
- package/vscode/src/vs/editor/browser/widget/multiDiffEditorWidget/diffEditorItemTemplate.js +43 -16
- package/vscode/src/vs/editor/browser/widget/multiDiffEditorWidget/multiDiffEditorWidget.js +3 -0
- package/vscode/src/vs/editor/browser/widget/multiDiffEditorWidget/multiDiffEditorWidgetImpl.js +42 -8
- package/vscode/src/vs/editor/browser/widget/multiDiffEditorWidget/style.css.js +1 -1
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +18 -1
- package/vscode/src/vs/editor/common/config/editorOptions.js +188 -107
- package/vscode/src/vs/editor/common/config/fontInfo.js +2 -2
- package/vscode/src/vs/editor/common/cursorCommon.js +14 -14
- package/vscode/src/vs/editor/common/editorContextKeys.js +1 -1
- package/vscode/src/vs/editor/common/languageSelector.js +12 -1
- package/vscode/src/vs/editor/common/languages.d.ts +28 -1
- package/vscode/src/vs/editor/common/languages.js +6 -1
- package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +3 -1
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +2 -0
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +96 -86
- package/vscode/src/vs/editor/common/standaloneStrings.js +5 -5
- package/vscode/src/vs/editor/common/viewLayout/viewLayout.js +19 -19
- package/vscode/src/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +2 -2
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +12 -12
- package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +3 -3
- package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +6 -6
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +5 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +3 -3
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +2 -2
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorDetector.js +3 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +3 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions.js +2 -3
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +3 -3
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +3 -3
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +1 -1
- package/vscode/src/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +9 -62
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +3 -3
- package/vscode/src/vs/editor/contrib/format/browser/format.js +5 -5
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +5 -5
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoError/browser/markerNavigationService.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +58 -84
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +8 -2
- package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/marginHover.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +18 -15
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +3 -3
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +1 -1
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commands.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostText.js +14 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +10 -10
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +54 -27
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +115 -45
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/singleTextEdit.js +6 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +46 -1
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/commandIds.js +5 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/commands.js +145 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +188 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +91 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEdit.contribution.js +12 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEdit.css.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +309 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.css.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +193 -0
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgress.js +2 -2
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +1 -1
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/vscode/src/vs/editor/contrib/links/browser/links.js +5 -5
- package/vscode/src/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
- package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +10 -10
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +1 -1
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +1 -1
- package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +143 -9
- package/vscode/src/vs/editor/contrib/rename/browser/renameInputField.css.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/renameInputField.js +347 -17
- package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +1 -1
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +23 -37
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +11 -10
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -2
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +8 -8
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +4 -4
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +6 -6
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +3 -3
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +3 -3
- package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/wordDistance.js +1 -1
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +3 -3
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +3 -3
- package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +4 -4
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +26 -16
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +3 -3
- package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.js +7 -3
- package/vscode/src/vs/editor/editor.api.d.ts +146 -85
- package/vscode/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +3 -5
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +7 -4
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +10 -10
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.d.ts +99 -0
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +608 -0
- package/vscode/src/vs/platform/action/common/actionCommonCategories.d.ts +1 -4
- package/vscode/src/vs/platform/action/common/actionCommonCategories.js +3 -3
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +26 -41
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +6 -4
- package/vscode/src/vs/platform/actions/common/actions.d.ts +11 -0
- package/vscode/src/vs/platform/actions/common/actions.js +11 -0
- package/vscode/src/vs/platform/configuration/common/configuration.d.ts +17 -33
- package/vscode/src/vs/platform/configuration/common/configurationModels.js +42 -29
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +3 -4
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +2 -2
- package/vscode/src/vs/platform/hover/browser/hover.js +69 -1
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +14 -20
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +11 -5
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +22 -2
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +9 -7
- package/vscode/src/vs/platform/remote/common/remoteAgentConnection.js +2 -5
- package/vscode/src/vs/platform/request/common/request.js +111 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +1 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/terminalCommand.js +15 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +9 -0
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +5 -3
- package/vscode/src/vs/platform/theme/common/colorRegistry.js +5 -5
- package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +6 -2
- package/vscode/src/vs/platform/window/common/window.js +4 -1
- package/vscode/src/vs/platform/workspace/common/workspace.js +2 -1
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +2 -2
- package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +130 -14
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +76 -24
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +4 -1
- package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -39
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +309 -137
- package/vscode/src/vs/workbench/api/common/extHostChatProvider.js +164 -49
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +67 -7
- package/vscode/src/vs/workbench/api/common/extHostComments.js +28 -0
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +129 -48
- package/vscode/src/vs/workbench/api/common/extHostDocumentData.js +1 -2
- package/vscode/src/vs/workbench/api/common/extHostDocumentsAndEditors.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +5 -4
- package/vscode/src/vs/workbench/api/common/extHostInteractive.js +0 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +130 -16
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +12 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocument.js +14 -5
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +19 -1
- package/vscode/src/vs/workbench/api/common/extHostSpeech.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +301 -75
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +127 -45
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +46 -7
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +55 -2
- package/vscode/src/vs/workbench/api/worker/extensionHostWorker.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +146 -99
- package/vscode/src/vs/workbench/browser/actions/listCommands.js +2 -3
- package/vscode/src/vs/workbench/browser/actions/widgetNavigationCommands.js +3 -4
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +4 -8
- package/vscode/src/vs/workbench/browser/composite.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/composite.js +1 -1
- package/vscode/src/vs/workbench/browser/editor.js +11 -1
- package/vscode/src/vs/workbench/browser/media/style.css.js +1 -1
- package/vscode/src/vs/workbench/browser/panecomposite.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/panecomposite.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/activitybar/activitybarPart.js +4 -6
- package/vscode/src/vs/workbench/browser/parts/activitybar/media/activityaction.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBar.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/compositePart.js +8 -5
- package/vscode/src/vs/workbench/browser/parts/editor/auxiliaryEditorPart.js +39 -29
- package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +20 -24
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +6 -4
- package/vscode/src/vs/workbench/browser/parts/editor/editor.autosave.contribution.js +2 -3
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +52 -54
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +30 -30
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +12 -18
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +1 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +7 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +17 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +13 -5
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +84 -71
- package/vscode/src/vs/workbench/browser/parts/editor/singleEditorTabsControl.js +2 -6
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +4 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +29 -29
- package/vscode/src/vs/workbench/browser/parts/media/paneCompositePart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCenter.js +5 -5
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/paneCompositeBar.js +1 -5
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.js +9 -6
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +56 -74
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.js +6 -9
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/titlebar/titlebarPart.d.ts +9 -1
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +55 -12
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +9 -16
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +4 -4
- package/vscode/src/vs/workbench/browser/quickaccess.js +8 -1
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +22 -20
- package/vscode/src/vs/workbench/common/configuration.js +146 -43
- package/vscode/src/vs/workbench/common/contextkeys.js +4 -4
- package/vscode/src/vs/workbench/common/contributions.js +136 -20
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +5 -5
- package/vscode/src/vs/workbench/common/editor/editorGroupModel.js +1 -1
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +17 -11
- package/vscode/src/vs/workbench/common/editor/editorInput.js +1 -1
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +2 -2
- package/vscode/src/vs/workbench/common/editor.d.ts +4 -0
- package/vscode/src/vs/workbench/common/theme.js +11 -1
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +1064 -118
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +7 -7
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +306 -0
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +46 -0
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalLineFeatureContribution.js +177 -0
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +163 -0
- package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +31 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +11 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +18 -27
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +2 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +34 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +142 -109
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +80 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +44 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +230 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +87 -29
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +19 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +18 -3
- package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +11 -8
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +11 -5
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActions.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +71 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +256 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js +3 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +8 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +11 -11
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +3 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +9 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +9 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +27 -13
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +41 -23
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.js +15 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +22 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +1 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +2 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +3 -1
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +2 -3
- package/vscode/src/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +1 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +66 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +31 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +37 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +118 -25
- 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 +37 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +24 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +237 -140
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +72 -25
- package/vscode/src/vs/workbench/contrib/editSessions/common/editSessions.js +5 -8
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +29 -4
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorHandler.js +1 -0
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileEditorTracker.js +1 -0
- package/vscode/src/vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler.js +2 -1
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +8 -7
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.js +21 -19
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +152 -120
- package/vscode/src/vs/workbench/contrib/files/browser/fileCommands.js +24 -1
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/files.contribution.js +26 -25
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +5 -5
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +51 -12
- package/vscode/src/vs/workbench/contrib/files/browser/views/media/openeditors.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +24 -9
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/common/dirtyFilesIndicator.js +1 -0
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +16 -22
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +48 -27
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +23 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +48 -6
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +145 -73
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +31 -9
- package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.contribution.js +8 -10
- package/vscode/src/vs/workbench/contrib/list/browser/list.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +7 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +95 -152
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +16 -25
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +2 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +19 -19
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +17 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +102 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +234 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +48 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +52 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +62 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +20 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +3 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +28 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +28 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +78 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +208 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +85 -71
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +1 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +2 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +82 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +0 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +92 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +136 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +6 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +5 -1
- package/vscode/src/vs/workbench/contrib/preferences/browser/keybindingWidgets.js +279 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +6 -7
- package/vscode/src/vs/workbench/contrib/preferences/browser/media/keybindings.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesIcons.js +64 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +507 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsLayout.js +478 -0
- package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +796 -0
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +8 -10
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +14 -20
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +12 -12
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +3 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +44 -54
- package/vscode/src/vs/workbench/contrib/search/common/constants.js +26 -65
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +6 -9
- package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +6 -9
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +2 -2
- package/vscode/src/vs/workbench/contrib/snippets/browser/tabCompletion.js +2 -2
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +3 -124
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +2 -2
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +61 -24
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +24 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalExtensionPoints.js +1 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +4 -4
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +10 -10
- package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +45 -20
- package/vscode/src/vs/workbench/contrib/update/common/update.js +2 -1
- package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +3 -4
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +3 -3
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +1 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +15 -18
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewPane.js +2 -5
- package/vscode/src/vs/workbench/contrib/webviewView/browser/webviewViewService.js +4 -4
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +2 -2
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +5 -5
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +193 -54
- package/vscode/src/vs/workbench/services/authentication/common/authentication.js +2 -1
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +9 -3
- package/vscode/src/vs/workbench/services/editor/browser/editorPaneService.js +10 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorService.d.ts +3 -1
- package/vscode/src/vs/workbench/services/editor/browser/editorService.js +5 -0
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +1 -6
- package/vscode/src/vs/workbench/services/editor/common/editorPaneService.js +3 -0
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +5 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionFeatures.js +29 -0
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +3 -4
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +4 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +11 -5
- package/vscode/src/vs/workbench/services/extensions/common/workspaceContains.js +5 -5
- package/vscode/src/vs/workbench/services/history/browser/historyService.js +25 -4
- package/vscode/src/vs/workbench/services/history/common/history.d.ts +5 -0
- package/vscode/src/vs/workbench/services/language/common/languageService.js +111 -2
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +2 -2
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +59 -1
- package/vscode/src/vs/workbench/services/preferences/common/preferencesModels.js +1008 -0
- package/vscode/src/vs/workbench/services/preferences/common/preferencesValidation.js +477 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +2 -2
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.d.ts +4 -1
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +53 -13
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -0
- package/vscode/src/vs/workbench/services/textMate/common/TMGrammars.js +2 -2
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +1 -1
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +22 -9
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +76 -4
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +2 -2
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +7 -7
- package/vscode/src/vs/workbench/services/timer/browser/timerService.js +1 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorHandler.js +3 -2
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +1 -1
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +2 -2
- package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +6 -9
- package/vscode/src/vs/workbench/services/views/browser/viewsService.js +12 -12
- package/vscode/src/vs/workbench/services/views/common/viewContainerModel.js +6 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.d.ts +43 -4
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.d.ts +16 -7
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js +3 -6
- package/vscode-dts/vscode.proposed.activeComment.d.ts +23 -0
- package/vscode-dts/vscode.proposed.chatParticipant.d.ts +509 -0
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +288 -0
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +10 -1
- package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +56 -0
- package/vscode-dts/vscode.proposed.codeActionRanges.d.ts +2 -4
- package/vscode-dts/{vscode.proposed.chat.d.ts → vscode.proposed.contribIssueReporter.d.ts} +2 -20
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemGroupMenu.d.ts +2 -0
- package/vscode-dts/vscode.proposed.contribSourceControlTitleMenu.d.ts +7 -0
- package/vscode-dts/vscode.proposed.debugVisualization.d.ts +76 -6
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +49 -0
- package/vscode-dts/vscode.proposed.findFiles2.d.ts +89 -0
- package/vscode-dts/vscode.proposed.inlineEdit.d.ts +86 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +6 -3
- package/vscode-dts/vscode.proposed.languageModels.d.ts +184 -0
- package/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts +36 -0
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +6 -0
- package/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts +3 -0
- package/vscode-dts/vscode.proposed.speech.d.ts +5 -1
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +40 -27
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +0 -98
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.js +0 -576
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -348
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +0 -554
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +0 -471
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +0 -159
- package/vscode-dts/vscode.proposed.chatAgents2.d.ts +0 -440
- package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +0 -139
- package/vscode-dts/vscode.proposed.chatRequestAccess.d.ts +0 -105
- package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +0 -30
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js
CHANGED
|
@@ -36,9 +36,9 @@ class InlineCompletionContextKeys extends Disposable {
|
|
|
36
36
|
this._register(autorun(reader => {
|
|
37
37
|
const model = this.model.read(reader);
|
|
38
38
|
const state = model?.state.read(reader);
|
|
39
|
-
const isInlineCompletionVisible = !!state?.inlineCompletion && state?.
|
|
39
|
+
const isInlineCompletionVisible = !!state?.inlineCompletion && state?.primaryGhostText !== undefined && !state?.primaryGhostText.isEmpty();
|
|
40
40
|
this.inlineCompletionVisible.set(isInlineCompletionVisible);
|
|
41
|
-
if (state?.
|
|
41
|
+
if (state?.primaryGhostText && state?.inlineCompletion) {
|
|
42
42
|
this.suppressSuggestions.set(state.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions);
|
|
43
43
|
}
|
|
44
44
|
}));
|
|
@@ -46,7 +46,7 @@ class InlineCompletionContextKeys extends Disposable {
|
|
|
46
46
|
const model = this.model.read(reader);
|
|
47
47
|
let startsWithIndentation = false;
|
|
48
48
|
let startsWithIndentationLessThanTabSize = true;
|
|
49
|
-
const ghostText = model?.
|
|
49
|
+
const ghostText = model?.primaryGhostText.read(reader);
|
|
50
50
|
if (!!model?.selectedSuggestItem && ghostText && ghostText.parts.length > 0) {
|
|
51
51
|
const { column, lines } = ghostText.parts[0];
|
|
52
52
|
const firstLine = lines[0];
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js
CHANGED
|
@@ -13,14 +13,14 @@ import { InlineSuggestionHintsContentWidget, InlineCompletionsHintsWidget } from
|
|
|
13
13
|
import { VersionIdChangeReason, InlineCompletionsModel } from './inlineCompletionsModel.js';
|
|
14
14
|
import { SuggestWidgetAdaptor } from './suggestWidgetInlineCompletionProvider.js';
|
|
15
15
|
import { localizeWithPath } from '../../../../nls.js';
|
|
16
|
-
import {
|
|
16
|
+
import { AccessibilitySignal, IAccessibilitySignalService } from '../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';
|
|
17
17
|
import { ICommandService } from '../../../../platform/commands/common/commands.js';
|
|
18
18
|
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
|
|
19
19
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
|
|
20
20
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
21
21
|
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
|
|
22
|
+
import { observableFromEvent, mapObservableArrayCached, observableSignal, constObservable } from '../../../../base/common/observableInternal/utils.js';
|
|
22
23
|
import { disposableObservableValue, observableValue, transaction } from '../../../../base/common/observableInternal/base.js';
|
|
23
|
-
import { observableFromEvent, constObservable, observableSignal } from '../../../../base/common/observableInternal/utils.js';
|
|
24
24
|
import { derived } from '../../../../base/common/observableInternal/derived.js';
|
|
25
25
|
import { autorun, autorunHandleChanges } from '../../../../base/common/observableInternal/autorun.js';
|
|
26
26
|
var InlineCompletionsController_1;
|
|
@@ -30,7 +30,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
30
30
|
static get(editor) {
|
|
31
31
|
return editor.getContribution(InlineCompletionsController_1.ID);
|
|
32
32
|
}
|
|
33
|
-
constructor(editor, _instantiationService, _contextKeyService, _configurationService, _commandService, _debounceService, _languageFeaturesService,
|
|
33
|
+
constructor(editor, _instantiationService, _contextKeyService, _configurationService, _commandService, _debounceService, _languageFeaturesService, _accessibilitySignalService, _keybindingService) {
|
|
34
34
|
super();
|
|
35
35
|
this.editor = editor;
|
|
36
36
|
this._instantiationService = _instantiationService;
|
|
@@ -39,11 +39,11 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
39
39
|
this._commandService = _commandService;
|
|
40
40
|
this._debounceService = _debounceService;
|
|
41
41
|
this._languageFeaturesService = _languageFeaturesService;
|
|
42
|
-
this.
|
|
42
|
+
this._accessibilitySignalService = _accessibilitySignalService;
|
|
43
43
|
this._keybindingService = _keybindingService;
|
|
44
|
-
this.model = disposableObservableValue('inlineCompletionModel', undefined);
|
|
44
|
+
this.model = this._register(disposableObservableValue('inlineCompletionModel', undefined));
|
|
45
45
|
this._textModelVersionId = observableValue(this, -1);
|
|
46
|
-
this.
|
|
46
|
+
this._positions = observableValue(this, [( new Position(1, 1))]);
|
|
47
47
|
this._suggestWidgetAdaptor = this._register(( new SuggestWidgetAdaptor(
|
|
48
48
|
this.editor,
|
|
49
49
|
() => this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(undefined),
|
|
@@ -57,14 +57,21 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
57
57
|
)));
|
|
58
58
|
this._enabled = observableFromEvent(this.editor.onDidChangeConfiguration, () => this.editor.getOption(62 ).enabled);
|
|
59
59
|
this._fontFamily = observableFromEvent(this.editor.onDidChangeConfiguration, () => this.editor.getOption(62 ).fontFamily);
|
|
60
|
-
this.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
this._ghostTexts = derived(this, (reader) => {
|
|
61
|
+
const model = this.model.read(reader);
|
|
62
|
+
return model?.ghostTexts.read(reader) ?? [];
|
|
63
|
+
});
|
|
64
|
+
this._stablizedGhostTexts = convertItemsToStableObservables(this._ghostTexts, this._store);
|
|
65
|
+
this._ghostTextWidgets = mapObservableArrayCached(this, this._stablizedGhostTexts, (ghostText, store) => {
|
|
66
|
+
return store.add(this._instantiationService.createInstance(GhostTextWidget, this.editor, {
|
|
67
|
+
ghostText: ghostText,
|
|
68
|
+
minReservedLineCount: constObservable(0),
|
|
69
|
+
targetTextModel: ( this.model.map(v => v?.textModel)),
|
|
70
|
+
}));
|
|
71
|
+
}).recomputeInitiallyAndOnChange(this._store);
|
|
65
72
|
this._debounceValue = this._debounceService.for(this._languageFeaturesService.inlineCompletionsProvider, 'InlineCompletionsDebounce', { min: 50, max: 50 });
|
|
66
|
-
this.
|
|
67
|
-
this._isReadonly = observableFromEvent(this.editor.onDidChangeConfiguration, () => this.editor.getOption(
|
|
73
|
+
this._playAccessibilitySignal = observableSignal(this);
|
|
74
|
+
this._isReadonly = observableFromEvent(this.editor.onDidChangeConfiguration, () => this.editor.getOption(91 ));
|
|
68
75
|
this._textModel = observableFromEvent(this.editor.onDidChangeModel, () => this.editor.getModel());
|
|
69
76
|
this._textModelIfWritable = derived(reader => this._isReadonly.read(reader) ? undefined : this._textModel.read(reader));
|
|
70
77
|
this._register(( new InlineCompletionContextKeys(this._contextKeyService, this.model)));
|
|
@@ -74,7 +81,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
74
81
|
this.model.set(undefined, tx);
|
|
75
82
|
this.updateObservables(tx, VersionIdChangeReason.Other);
|
|
76
83
|
if (textModel) {
|
|
77
|
-
const model = _instantiationService.createInstance(InlineCompletionsModel, textModel, this._suggestWidgetAdaptor.selectedItem, this.
|
|
84
|
+
const model = _instantiationService.createInstance(InlineCompletionsModel, textModel, this._suggestWidgetAdaptor.selectedItem, this._textModelVersionId, this._positions, this._debounceValue, observableFromEvent(editor.onDidChangeConfiguration, () => editor.getOption(118 ).preview), observableFromEvent(editor.onDidChangeConfiguration, () => editor.getOption(118 ).previewMode), observableFromEvent(editor.onDidChangeConfiguration, () => editor.getOption(62 ).mode), this._enabled);
|
|
78
85
|
this.model.set(model, tx);
|
|
79
86
|
}
|
|
80
87
|
});
|
|
@@ -144,7 +151,7 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
144
151
|
this._register(autorun(reader => {
|
|
145
152
|
const state = this.model.read(reader)?.state.read(reader);
|
|
146
153
|
if (state?.suggestItem) {
|
|
147
|
-
if (state.
|
|
154
|
+
if (state.primaryGhostText.lineCount >= 2) {
|
|
148
155
|
this._suggestWidgetAdaptor.forceRenderingAbove();
|
|
149
156
|
}
|
|
150
157
|
}
|
|
@@ -158,13 +165,13 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
158
165
|
let lastInlineCompletionId = undefined;
|
|
159
166
|
this._register(autorunHandleChanges({
|
|
160
167
|
handleChange: (context, changeSummary) => {
|
|
161
|
-
if (context.didChange(this.
|
|
168
|
+
if (context.didChange(this._playAccessibilitySignal)) {
|
|
162
169
|
lastInlineCompletionId = undefined;
|
|
163
170
|
}
|
|
164
171
|
return true;
|
|
165
172
|
},
|
|
166
173
|
}, async (reader) => {
|
|
167
|
-
this.
|
|
174
|
+
this._playAccessibilitySignal.read(reader);
|
|
168
175
|
const model = this.model.read(reader);
|
|
169
176
|
const state = model?.state.read(reader);
|
|
170
177
|
if (!model || !state || !state.inlineCompletion) {
|
|
@@ -173,10 +180,10 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
173
180
|
}
|
|
174
181
|
if (state.inlineCompletion.semanticId !== lastInlineCompletionId) {
|
|
175
182
|
lastInlineCompletionId = state.inlineCompletion.semanticId;
|
|
176
|
-
const lineText = model.textModel.getLineContent(state.
|
|
177
|
-
this.
|
|
183
|
+
const lineText = model.textModel.getLineContent(state.primaryGhostText.lineNumber);
|
|
184
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.inlineSuggestion).then(() => {
|
|
178
185
|
if (this.editor.getOption(8 )) {
|
|
179
|
-
this.provideScreenReaderUpdate(state.
|
|
186
|
+
this.provideScreenReaderUpdate(state.primaryGhostText.renderForScreenReader(lineText));
|
|
180
187
|
}
|
|
181
188
|
});
|
|
182
189
|
}
|
|
@@ -189,14 +196,14 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
189
196
|
}));
|
|
190
197
|
this.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') });
|
|
191
198
|
}
|
|
192
|
-
|
|
193
|
-
this.
|
|
199
|
+
playAccessibilitySignal(tx) {
|
|
200
|
+
this._playAccessibilitySignal.trigger(tx);
|
|
194
201
|
}
|
|
195
202
|
provideScreenReaderUpdate(content) {
|
|
196
203
|
const accessibleViewShowing = this._contextKeyService.getContextKeyValue('accessibleViewIsShown');
|
|
197
204
|
const accessibleViewKeybinding = this._keybindingService.lookupKeybinding('editor.action.accessibleView');
|
|
198
205
|
let hint;
|
|
199
|
-
if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(
|
|
206
|
+
if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(148 )) {
|
|
200
207
|
hint = ( localizeWithPath(
|
|
201
208
|
'vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController',
|
|
202
209
|
'showAccessibleViewHint',
|
|
@@ -209,17 +216,17 @@ let InlineCompletionsController = class InlineCompletionsController extends Disp
|
|
|
209
216
|
updateObservables(tx, changeReason) {
|
|
210
217
|
const newModel = this.editor.getModel();
|
|
211
218
|
this._textModelVersionId.set(newModel?.getVersionId() ?? -1, tx, changeReason);
|
|
212
|
-
this.
|
|
219
|
+
this._positions.set(this.editor.getSelections()?.map(selection => selection.getPosition()) ?? [( new Position(1, 1))], tx);
|
|
213
220
|
}
|
|
214
221
|
shouldShowHoverAt(range) {
|
|
215
|
-
const ghostText = this.model.get()?.
|
|
222
|
+
const ghostText = this.model.get()?.primaryGhostText.get();
|
|
216
223
|
if (ghostText) {
|
|
217
224
|
return ( ghostText.parts.some(p => range.containsPosition(( new Position(ghostText.lineNumber, p.column)))));
|
|
218
225
|
}
|
|
219
226
|
return false;
|
|
220
227
|
}
|
|
221
228
|
shouldShowHoverAtViewZone(viewZoneId) {
|
|
222
|
-
return this.
|
|
229
|
+
return this._ghostTextWidgets.get()[0]?.ownsViewZone(viewZoneId) ?? false;
|
|
223
230
|
}
|
|
224
231
|
hide() {
|
|
225
232
|
transaction(tx => {
|
|
@@ -234,7 +241,27 @@ InlineCompletionsController = InlineCompletionsController_1 = ( __decorate([
|
|
|
234
241
|
( __param(4, ICommandService)),
|
|
235
242
|
( __param(5, ILanguageFeatureDebounceService)),
|
|
236
243
|
( __param(6, ILanguageFeaturesService)),
|
|
237
|
-
( __param(7,
|
|
244
|
+
( __param(7, IAccessibilitySignalService)),
|
|
238
245
|
( __param(8, IKeybindingService))
|
|
239
246
|
], InlineCompletionsController));
|
|
247
|
+
function convertItemsToStableObservables(items, store) {
|
|
248
|
+
const result = observableValue('result', []);
|
|
249
|
+
const innerObservables = [];
|
|
250
|
+
store.add(autorun(reader => {
|
|
251
|
+
const itemsValue = items.read(reader);
|
|
252
|
+
transaction(tx => {
|
|
253
|
+
if (itemsValue.length !== innerObservables.length) {
|
|
254
|
+
innerObservables.length = itemsValue.length;
|
|
255
|
+
for (let i = 0; i < innerObservables.length; i++) {
|
|
256
|
+
if (!innerObservables[i]) {
|
|
257
|
+
innerObservables[i] = observableValue('item', itemsValue[i]);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
result.set([...innerObservables], tx);
|
|
261
|
+
}
|
|
262
|
+
innerObservables.forEach((o, i) => o.set(itemsValue[i], tx));
|
|
263
|
+
});
|
|
264
|
+
}));
|
|
265
|
+
return result;
|
|
266
|
+
}
|
|
240
267
|
export { InlineCompletionsController };
|
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js
CHANGED
|
@@ -37,7 +37,7 @@ let InlineCompletionsHintsWidget = class InlineCompletionsHintsWidget extends Di
|
|
|
37
37
|
this.alwaysShowToolbar = observableFromEvent(this.editor.onDidChangeConfiguration, () => this.editor.getOption(62 ).showToolbar === 'always');
|
|
38
38
|
this.sessionPosition = undefined;
|
|
39
39
|
this.position = derived(this, reader => {
|
|
40
|
-
const ghostText = this.model.read(reader)?.
|
|
40
|
+
const ghostText = this.model.read(reader)?.primaryGhostText.read(reader);
|
|
41
41
|
if (!this.alwaysShowToolbar.read(reader) || !ghostText || ghostText.parts.length === 0) {
|
|
42
42
|
this.sessionPosition = undefined;
|
|
43
43
|
return null;
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { mapFindFirst } from '../../../../base/common/arraysFind.js';
|
|
3
|
-
import { BugIndicatingError, onUnexpectedExternalError } from '../../../../base/common/errors.js';
|
|
3
|
+
import { BugIndicatingError, onUnexpectedExternalError, onUnexpectedError } from '../../../../base/common/errors.js';
|
|
4
4
|
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
5
|
+
import { commonPrefixLength, splitLinesIncludeSeparators } from '../../../../base/common/strings.js';
|
|
5
6
|
import { isDefined } from '../../../../base/common/types.js';
|
|
6
7
|
import { EditOperation } from '../../../common/core/editOperation.js';
|
|
7
8
|
import { Position } from '../../../common/core/position.js';
|
|
8
9
|
import { Range } from '../../../common/core/range.js';
|
|
10
|
+
import { Selection } from '../../../common/core/selection.js';
|
|
9
11
|
import { InlineCompletionTriggerKind } from '../../../common/languages.js';
|
|
10
12
|
import { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js';
|
|
11
|
-
import { GhostText, ghostTextOrReplacementEquals } from './ghostText.js';
|
|
13
|
+
import { GhostText, ghostTextsOrReplacementsEqual, ghostTextOrReplacementEquals } from './ghostText.js';
|
|
12
14
|
import { InlineCompletionsSource } from './inlineCompletionsSource.js';
|
|
13
|
-
import {
|
|
15
|
+
import { SingleTextEdit } from './singleTextEdit.js';
|
|
16
|
+
import { addPositions, lengthOfText, subtractPositions, Permutation, getNewRanges } from './utils.js';
|
|
14
17
|
import { SnippetController2 } from '../../snippet/browser/snippetController2.js';
|
|
15
18
|
import { ICommandService } from '../../../../platform/commands/common/commands.js';
|
|
16
19
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
17
20
|
import { observableValue, subtransaction, transaction } from '../../../../base/common/observableInternal/base.js';
|
|
18
21
|
import { observableSignal, recomputeInitiallyAndOnChange } from '../../../../base/common/observableInternal/utils.js';
|
|
19
|
-
import {
|
|
22
|
+
import { derived, derivedHandleChanges, derivedOpts } from '../../../../base/common/observableInternal/derived.js';
|
|
20
23
|
import { autorun } from '../../../../base/common/observableInternal/autorun.js';
|
|
21
24
|
var VersionIdChangeReason;
|
|
22
25
|
( (function(VersionIdChangeReason) {
|
|
@@ -27,12 +30,12 @@ var VersionIdChangeReason;
|
|
|
27
30
|
})(VersionIdChangeReason || (VersionIdChangeReason = {})));
|
|
28
31
|
let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
29
32
|
get isAcceptingPartially() { return this._isAcceptingPartially; }
|
|
30
|
-
constructor(textModel, selectedSuggestItem,
|
|
33
|
+
constructor(textModel, selectedSuggestItem, textModelVersionId, _positions, _debounceValue, _suggestPreviewEnabled, _suggestPreviewMode, _inlineSuggestMode, _enabled, _instantiationService, _commandService, _languageConfigurationService) {
|
|
31
34
|
super();
|
|
32
35
|
this.textModel = textModel;
|
|
33
36
|
this.selectedSuggestItem = selectedSuggestItem;
|
|
34
|
-
this.cursorPosition = cursorPosition;
|
|
35
37
|
this.textModelVersionId = textModelVersionId;
|
|
38
|
+
this._positions = _positions;
|
|
36
39
|
this._debounceValue = _debounceValue;
|
|
37
40
|
this._suggestPreviewEnabled = _suggestPreviewEnabled;
|
|
38
41
|
this._suggestPreviewMode = _suggestPreviewMode;
|
|
@@ -45,6 +48,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
45
48
|
this._isActive = observableValue(this, false);
|
|
46
49
|
this._forceUpdateSignal = observableSignal('forceUpdate');
|
|
47
50
|
this._selectedInlineCompletionId = observableValue(this, undefined);
|
|
51
|
+
this._primaryPosition = derived(this, reader => this._positions.read(reader)[0] ?? ( new Position(1, 1)));
|
|
48
52
|
this._isAcceptingPartially = false;
|
|
49
53
|
this._preserveCurrentCompletionReasons = ( new Set([
|
|
50
54
|
VersionIdChangeReason.Redo,
|
|
@@ -88,7 +92,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
88
92
|
this._source.clearSuggestWidgetInlineCompletions(tx);
|
|
89
93
|
});
|
|
90
94
|
}
|
|
91
|
-
const cursorPosition = this.
|
|
95
|
+
const cursorPosition = this._primaryPosition.read(reader);
|
|
92
96
|
const context = {
|
|
93
97
|
triggerKind: changeSummary.inlineCompletionTriggerKind,
|
|
94
98
|
selectedSuggestionInfo: suggestItem?.toSelectedSuggestionInfo(),
|
|
@@ -100,7 +104,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
100
104
|
if (!c) {
|
|
101
105
|
return [];
|
|
102
106
|
}
|
|
103
|
-
const cursorPosition = this.
|
|
107
|
+
const cursorPosition = this._primaryPosition.read(reader);
|
|
104
108
|
const filteredCompletions = c.inlineCompletions.filter(c => c.isVisible(this.textModel, cursorPosition, reader));
|
|
105
109
|
return filteredCompletions;
|
|
106
110
|
});
|
|
@@ -135,7 +139,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
135
139
|
if (!a || !b) {
|
|
136
140
|
return a === b;
|
|
137
141
|
}
|
|
138
|
-
return
|
|
142
|
+
return ghostTextsOrReplacementsEqual(a.ghostTexts, b.ghostTexts)
|
|
139
143
|
&& a.inlineCompletion === b.inlineCompletion
|
|
140
144
|
&& a.suggestItem === b.suggestItem;
|
|
141
145
|
}
|
|
@@ -143,36 +147,57 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
143
147
|
const model = this.textModel;
|
|
144
148
|
const suggestItem = this.selectedSuggestItem.read(reader);
|
|
145
149
|
if (suggestItem) {
|
|
146
|
-
const
|
|
147
|
-
const
|
|
150
|
+
const suggestCompletionEdit = suggestItem.toSingleTextEdit().removeCommonPrefix(model);
|
|
151
|
+
const augmentation = this._computeAugmentation(suggestCompletionEdit, reader);
|
|
148
152
|
const isSuggestionPreviewEnabled = this._suggestPreviewEnabled.read(reader);
|
|
149
|
-
if (!isSuggestionPreviewEnabled && !
|
|
153
|
+
if (!isSuggestionPreviewEnabled && !augmentation) {
|
|
150
154
|
return undefined;
|
|
151
155
|
}
|
|
152
|
-
const
|
|
153
|
-
const
|
|
156
|
+
const fullEdit = augmentation?.edit ?? suggestCompletionEdit;
|
|
157
|
+
const fullEditPreviewLength = augmentation ? augmentation.edit.text.length - suggestCompletionEdit.text.length : 0;
|
|
154
158
|
const mode = this._suggestPreviewMode.read(reader);
|
|
155
|
-
const
|
|
156
|
-
const
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
+
const positions = this._positions.read(reader);
|
|
160
|
+
const edits = [fullEdit, ...getSecondaryEdits(this.textModel, positions, fullEdit)];
|
|
161
|
+
const ghostTexts = ( edits
|
|
162
|
+
.map(
|
|
163
|
+
(edit, idx) => edit.computeGhostText(model, mode, positions[idx], fullEditPreviewLength)
|
|
164
|
+
))
|
|
165
|
+
.filter(isDefined);
|
|
166
|
+
const primaryGhostText = ghostTexts[0] ?? ( new GhostText(fullEdit.range.endLineNumber, []));
|
|
167
|
+
return { edits, primaryGhostText, ghostTexts, inlineCompletion: augmentation?.completion, suggestItem };
|
|
159
168
|
}
|
|
160
169
|
else {
|
|
161
170
|
if (!this._isActive.read(reader)) {
|
|
162
171
|
return undefined;
|
|
163
172
|
}
|
|
164
|
-
const
|
|
165
|
-
if (!
|
|
173
|
+
const inlineCompletion = this.selectedInlineCompletion.read(reader);
|
|
174
|
+
if (!inlineCompletion) {
|
|
166
175
|
return undefined;
|
|
167
176
|
}
|
|
168
|
-
const replacement =
|
|
177
|
+
const replacement = inlineCompletion.toSingleTextEdit(reader);
|
|
169
178
|
const mode = this._inlineSuggestMode.read(reader);
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
|
|
179
|
+
const positions = this._positions.read(reader);
|
|
180
|
+
const edits = [replacement, ...getSecondaryEdits(this.textModel, positions, replacement)];
|
|
181
|
+
const ghostTexts = ( edits
|
|
182
|
+
.map((edit, idx) => edit.computeGhostText(model, mode, positions[idx], 0)))
|
|
183
|
+
.filter(isDefined);
|
|
184
|
+
if (!ghostTexts[0]) {
|
|
185
|
+
return undefined;
|
|
186
|
+
}
|
|
187
|
+
return { edits, primaryGhostText: ghostTexts[0], ghostTexts, inlineCompletion, suggestItem: undefined };
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
this.ghostTexts = derivedOpts({
|
|
191
|
+
owner: this,
|
|
192
|
+
equalityComparer: ghostTextsOrReplacementsEqual
|
|
193
|
+
}, reader => {
|
|
194
|
+
const v = this.state.read(reader);
|
|
195
|
+
if (!v) {
|
|
196
|
+
return undefined;
|
|
173
197
|
}
|
|
198
|
+
return v.ghostTexts;
|
|
174
199
|
});
|
|
175
|
-
this.
|
|
200
|
+
this.primaryGhostText = derivedOpts({
|
|
176
201
|
owner: this,
|
|
177
202
|
equalityComparer: ghostTextOrReplacementEquals
|
|
178
203
|
}, reader => {
|
|
@@ -180,7 +205,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
180
205
|
if (!v) {
|
|
181
206
|
return undefined;
|
|
182
207
|
}
|
|
183
|
-
return v
|
|
208
|
+
return v?.primaryGhostText;
|
|
184
209
|
});
|
|
185
210
|
this._register(recomputeInitiallyAndOnChange(this._fetchInlineCompletions));
|
|
186
211
|
let lastItem = undefined;
|
|
@@ -214,7 +239,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
214
239
|
this._source.clear(tx);
|
|
215
240
|
});
|
|
216
241
|
}
|
|
217
|
-
|
|
242
|
+
_computeAugmentation(suggestCompletion, reader) {
|
|
218
243
|
const model = this.textModel;
|
|
219
244
|
const suggestWidgetInlineCompletions = this._source.suggestWidgetInlineCompletions.read(reader);
|
|
220
245
|
const candidateInlineCompletions = suggestWidgetInlineCompletions
|
|
@@ -223,7 +248,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
223
248
|
const augmentedCompletion = mapFindFirst(candidateInlineCompletions, completion => {
|
|
224
249
|
let r = completion.toSingleTextEdit(reader);
|
|
225
250
|
r = r.removeCommonPrefix(model, Range.fromPositions(r.range.getStartPosition(), suggestCompletion.range.getEndPosition()));
|
|
226
|
-
return r.augments(suggestCompletion) ? { edit: r
|
|
251
|
+
return r.augments(suggestCompletion) ? { completion, edit: r } : undefined;
|
|
227
252
|
});
|
|
228
253
|
return augmentedCompletion;
|
|
229
254
|
}
|
|
@@ -249,7 +274,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
249
274
|
throw new BugIndicatingError();
|
|
250
275
|
}
|
|
251
276
|
const state = this.state.get();
|
|
252
|
-
if (!state || state.
|
|
277
|
+
if (!state || state.primaryGhostText.isEmpty() || !state.inlineCompletion) {
|
|
253
278
|
return;
|
|
254
279
|
}
|
|
255
280
|
const completion = state.inlineCompletion.toInlineCompletion(undefined);
|
|
@@ -263,10 +288,13 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
263
288
|
SnippetController2.get(editor)?.insert(completion.snippetInfo.snippet, { undoStopBefore: false });
|
|
264
289
|
}
|
|
265
290
|
else {
|
|
291
|
+
const edits = state.edits;
|
|
292
|
+
const selections = ( getEndPositionsAfterApplying(edits).map(p => Selection.fromPositions(p)));
|
|
266
293
|
editor.executeEdits('inlineSuggestion.accept', [
|
|
267
|
-
EditOperation.replaceMove(
|
|
294
|
+
...( edits.map(edit => EditOperation.replaceMove(edit.range, edit.text))),
|
|
268
295
|
...completion.additionalTextEdits
|
|
269
296
|
]);
|
|
297
|
+
editor.setSelections(selections, 'inlineCompletionAccept');
|
|
270
298
|
}
|
|
271
299
|
if (completion.command) {
|
|
272
300
|
completion.source.addRef();
|
|
@@ -324,40 +352,44 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
324
352
|
throw new BugIndicatingError();
|
|
325
353
|
}
|
|
326
354
|
const state = this.state.get();
|
|
327
|
-
if (!state || state.
|
|
355
|
+
if (!state || state.primaryGhostText.isEmpty() || !state.inlineCompletion) {
|
|
328
356
|
return;
|
|
329
357
|
}
|
|
330
|
-
const ghostText = state.
|
|
358
|
+
const ghostText = state.primaryGhostText;
|
|
331
359
|
const completion = state.inlineCompletion.toInlineCompletion(undefined);
|
|
332
360
|
if (completion.snippetInfo || completion.filterText !== completion.insertText) {
|
|
333
361
|
await this.accept(editor);
|
|
334
362
|
return;
|
|
335
363
|
}
|
|
336
364
|
const firstPart = ghostText.parts[0];
|
|
337
|
-
const
|
|
338
|
-
const
|
|
339
|
-
const acceptUntilIndexExclusive = getAcceptUntilIndex(
|
|
340
|
-
if (acceptUntilIndexExclusive ===
|
|
365
|
+
const ghostTextPos = ( new Position(ghostText.lineNumber, firstPart.column));
|
|
366
|
+
const ghostTextVal = firstPart.text;
|
|
367
|
+
const acceptUntilIndexExclusive = getAcceptUntilIndex(ghostTextPos, ghostTextVal);
|
|
368
|
+
if (acceptUntilIndexExclusive === ghostTextVal.length && ghostText.parts.length === 1) {
|
|
341
369
|
this.accept(editor);
|
|
342
370
|
return;
|
|
343
371
|
}
|
|
344
|
-
const
|
|
372
|
+
const partialGhostTextVal = ghostTextVal.substring(0, acceptUntilIndexExclusive);
|
|
373
|
+
const positions = this._positions.get();
|
|
374
|
+
const cursorPosition = positions[0];
|
|
345
375
|
completion.source.addRef();
|
|
346
376
|
try {
|
|
347
377
|
this._isAcceptingPartially = true;
|
|
348
378
|
try {
|
|
349
379
|
editor.pushUndoStop();
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
const
|
|
354
|
-
|
|
380
|
+
const replaceRange = Range.fromPositions(cursorPosition, ghostTextPos);
|
|
381
|
+
const newText = editor.getModel().getValueInRange(replaceRange) + partialGhostTextVal;
|
|
382
|
+
const primaryEdit = ( new SingleTextEdit(replaceRange, newText));
|
|
383
|
+
const edits = [primaryEdit, ...getSecondaryEdits(this.textModel, positions, primaryEdit)];
|
|
384
|
+
const selections = ( getEndPositionsAfterApplying(edits).map(p => Selection.fromPositions(p)));
|
|
385
|
+
editor.executeEdits('inlineSuggestion.accept', ( edits.map(edit => EditOperation.replaceMove(edit.range, edit.text))));
|
|
386
|
+
editor.setSelections(selections, 'inlineCompletionPartialAccept');
|
|
355
387
|
}
|
|
356
388
|
finally {
|
|
357
389
|
this._isAcceptingPartially = false;
|
|
358
390
|
}
|
|
359
391
|
if (completion.source.provider.handlePartialAccept) {
|
|
360
|
-
const acceptedRange = Range.fromPositions(completion.range.getStartPosition(), addPositions(
|
|
392
|
+
const acceptedRange = Range.fromPositions(completion.range.getStartPosition(), addPositions(ghostTextPos, lengthOfText(partialGhostTextVal)));
|
|
361
393
|
const text = editor.getModel().getValueInRange(acceptedRange, 1 );
|
|
362
394
|
completion.source.provider.handlePartialAccept(completion.source.inlineCompletions, completion.sourceInlineCompletion, text.length);
|
|
363
395
|
}
|
|
@@ -368,7 +400,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
368
400
|
}
|
|
369
401
|
handleSuggestAccepted(item) {
|
|
370
402
|
const itemEdit = item.toSingleTextEdit().removeCommonPrefix(this.textModel);
|
|
371
|
-
const augmentedCompletion = this.
|
|
403
|
+
const augmentedCompletion = this._computeAugmentation(itemEdit, undefined);
|
|
372
404
|
if (!augmentedCompletion) {
|
|
373
405
|
return;
|
|
374
406
|
}
|
|
@@ -381,4 +413,42 @@ InlineCompletionsModel = ( __decorate([
|
|
|
381
413
|
( __param(10, ICommandService)),
|
|
382
414
|
( __param(11, ILanguageConfigurationService))
|
|
383
415
|
], InlineCompletionsModel));
|
|
384
|
-
|
|
416
|
+
function getSecondaryEdits(textModel, positions, primaryEdit) {
|
|
417
|
+
if (positions.length === 1) {
|
|
418
|
+
return [];
|
|
419
|
+
}
|
|
420
|
+
const primaryPosition = positions[0];
|
|
421
|
+
const secondaryPositions = positions.slice(1);
|
|
422
|
+
const primaryEditStartPosition = primaryEdit.range.getStartPosition();
|
|
423
|
+
const primaryEditEndPosition = primaryEdit.range.getEndPosition();
|
|
424
|
+
const replacedTextAfterPrimaryCursor = textModel.getValueInRange(Range.fromPositions(primaryPosition, primaryEditEndPosition));
|
|
425
|
+
const positionWithinTextEdit = subtractPositions(primaryPosition, primaryEditStartPosition);
|
|
426
|
+
if (positionWithinTextEdit.lineNumber < 1) {
|
|
427
|
+
onUnexpectedError(( new BugIndicatingError(`positionWithinTextEdit line number should be bigger than 0.
|
|
428
|
+
Invalid subtraction between ${( primaryPosition.toString())} and ${( primaryEditStartPosition.toString())}`)));
|
|
429
|
+
return [];
|
|
430
|
+
}
|
|
431
|
+
const secondaryEditText = substringPos(primaryEdit.text, positionWithinTextEdit);
|
|
432
|
+
return ( secondaryPositions.map(pos => {
|
|
433
|
+
const posEnd = addPositions(subtractPositions(pos, primaryEditStartPosition), primaryEditEndPosition);
|
|
434
|
+
const textAfterSecondaryCursor = textModel.getValueInRange(Range.fromPositions(pos, posEnd));
|
|
435
|
+
const l = commonPrefixLength(replacedTextAfterPrimaryCursor, textAfterSecondaryCursor);
|
|
436
|
+
const range = Range.fromPositions(pos, pos.delta(0, l));
|
|
437
|
+
return ( new SingleTextEdit(range, secondaryEditText));
|
|
438
|
+
}));
|
|
439
|
+
}
|
|
440
|
+
function substringPos(text, pos) {
|
|
441
|
+
let subtext = '';
|
|
442
|
+
const lines = splitLinesIncludeSeparators(text);
|
|
443
|
+
for (let i = pos.lineNumber - 1; i < lines.length; i++) {
|
|
444
|
+
subtext += lines[i].substring(i === pos.lineNumber - 1 ? pos.column - 1 : 0);
|
|
445
|
+
}
|
|
446
|
+
return subtext;
|
|
447
|
+
}
|
|
448
|
+
function getEndPositionsAfterApplying(edits) {
|
|
449
|
+
const sortPerm = Permutation.createSortPermutation(edits, (edit1, edit2) => Range.compareRangesUsingStarts(edit1.range, edit2.range));
|
|
450
|
+
const sortedNewRanges = getNewRanges(sortPerm.apply(edits));
|
|
451
|
+
const newRanges = sortPerm.inverse().apply(sortedNewRanges);
|
|
452
|
+
return ( newRanges.map(range => range.getEndPosition()));
|
|
453
|
+
}
|
|
454
|
+
export { InlineCompletionsModel, VersionIdChangeReason, getSecondaryEdits };
|
|
@@ -40,7 +40,7 @@ let InlineCompletionsSource = class InlineCompletionsSource extends Disposable {
|
|
|
40
40
|
const promise = (async () => {
|
|
41
41
|
const shouldDebounce = updateOngoing || context.triggerKind === InlineCompletionTriggerKind.Automatic;
|
|
42
42
|
if (shouldDebounce) {
|
|
43
|
-
await wait(this._debounceValue.get(this.textModel));
|
|
43
|
+
await wait(this._debounceValue.get(this.textModel), source.token);
|
|
44
44
|
}
|
|
45
45
|
if (source.token.isCancellationRequested || this.textModel.getVersionId() !== request.versionId) {
|
|
46
46
|
return false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LcsDiff } from '../../../../base/common/diff/diff.js';
|
|
2
|
-
import { commonPrefixLength, getLeadingWhitespace
|
|
2
|
+
import { commonPrefixLength, getLeadingWhitespace } from '../../../../base/common/strings.js';
|
|
3
3
|
import { Range } from '../../../common/core/range.js';
|
|
4
4
|
import { GhostTextPart, GhostText } from './ghostText.js';
|
|
5
5
|
import { addPositions, lengthOfText } from './utils.js';
|
|
@@ -8,6 +8,9 @@ class SingleTextEdit {
|
|
|
8
8
|
this.range = range;
|
|
9
9
|
this.text = text;
|
|
10
10
|
}
|
|
11
|
+
static equals(first, second) {
|
|
12
|
+
return first.range.equalsRange(second.range) && first.text === second.text;
|
|
13
|
+
}
|
|
11
14
|
removeCommonPrefix(model, validModelRange) {
|
|
12
15
|
const modelRange = validModelRange ? this.range.intersectRanges(validModelRange) : this.range;
|
|
13
16
|
if (!modelRange) {
|
|
@@ -74,12 +77,10 @@ class SingleTextEdit {
|
|
|
74
77
|
const nonPreviewText = edit.text.substring(c.modifiedStart, nonPreviewTextEnd);
|
|
75
78
|
const italicText = edit.text.substring(nonPreviewTextEnd, Math.max(c.modifiedStart, modifiedEnd));
|
|
76
79
|
if (nonPreviewText.length > 0) {
|
|
77
|
-
|
|
78
|
-
parts.push(( new GhostTextPart(insertColumn, lines, false)));
|
|
80
|
+
parts.push(( new GhostTextPart(insertColumn, nonPreviewText, false)));
|
|
79
81
|
}
|
|
80
82
|
if (italicText.length > 0) {
|
|
81
|
-
|
|
82
|
-
parts.push(( new GhostTextPart(insertColumn, lines, true)));
|
|
83
|
+
parts.push(( new GhostTextPart(insertColumn, italicText, true)));
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
return ( new GhostText(lineNumber, parts));
|
|
@@ -73,6 +73,12 @@ function addPositions(pos1, pos2) {
|
|
|
73
73
|
pos2.lineNumber === 1 ? pos1.column + pos2.column - 1 : pos2.column
|
|
74
74
|
));
|
|
75
75
|
}
|
|
76
|
+
function subtractPositions(pos1, pos2) {
|
|
77
|
+
return ( new Position(
|
|
78
|
+
pos1.lineNumber - pos2.lineNumber + 1,
|
|
79
|
+
pos1.lineNumber - pos2.lineNumber === 0 ? pos1.column - pos2.column + 1 : pos1.column
|
|
80
|
+
));
|
|
81
|
+
}
|
|
76
82
|
function lengthOfText(text) {
|
|
77
83
|
let line = 1;
|
|
78
84
|
let column = 1;
|
|
@@ -87,4 +93,43 @@ function lengthOfText(text) {
|
|
|
87
93
|
}
|
|
88
94
|
return ( new Position(line, column));
|
|
89
95
|
}
|
|
90
|
-
|
|
96
|
+
function getNewRanges(edits) {
|
|
97
|
+
const newRanges = [];
|
|
98
|
+
let previousEditEndLineNumber = 0;
|
|
99
|
+
let lineOffset = 0;
|
|
100
|
+
let columnOffset = 0;
|
|
101
|
+
for (const edit of edits) {
|
|
102
|
+
const text = edit.text ?? '';
|
|
103
|
+
const textLength = lengthOfText(text);
|
|
104
|
+
const newRangeStart = Position.lift({
|
|
105
|
+
lineNumber: edit.range.startLineNumber + lineOffset,
|
|
106
|
+
column: edit.range.startColumn + (edit.range.startLineNumber === previousEditEndLineNumber ? columnOffset : 0)
|
|
107
|
+
});
|
|
108
|
+
const newRangeEnd = addPositions(newRangeStart, textLength);
|
|
109
|
+
newRanges.push(Range.fromPositions(newRangeStart, newRangeEnd));
|
|
110
|
+
lineOffset += textLength.lineNumber - edit.range.endLineNumber + edit.range.startLineNumber - 1;
|
|
111
|
+
columnOffset = newRangeEnd.column - edit.range.endColumn;
|
|
112
|
+
previousEditEndLineNumber = edit.range.endLineNumber;
|
|
113
|
+
}
|
|
114
|
+
return newRanges;
|
|
115
|
+
}
|
|
116
|
+
class Permutation {
|
|
117
|
+
constructor(_indexMap) {
|
|
118
|
+
this._indexMap = _indexMap;
|
|
119
|
+
}
|
|
120
|
+
static createSortPermutation(arr, compareFn) {
|
|
121
|
+
const sortIndices = Array.from(( arr.keys())).sort((index1, index2) => compareFn(arr[index1], arr[index2]));
|
|
122
|
+
return ( new Permutation(sortIndices));
|
|
123
|
+
}
|
|
124
|
+
apply(arr) {
|
|
125
|
+
return ( arr.map((_, index) => arr[this._indexMap[index]]));
|
|
126
|
+
}
|
|
127
|
+
inverse() {
|
|
128
|
+
const inverseIndexMap = this._indexMap.slice();
|
|
129
|
+
for (let i = 0; i < this._indexMap.length; i++) {
|
|
130
|
+
inverseIndexMap[this._indexMap[i]] = i;
|
|
131
|
+
}
|
|
132
|
+
return ( new Permutation(inverseIndexMap));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
export { ColumnRange, Permutation, addPositions, applyEdits, applyObservableDecorations, getNewRanges, getReadonlyEmptyArray, lengthOfText, subtractPositions };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const inlineEditAcceptId = 'editor.action.inlineEdit.accept';
|
|
2
|
+
const inlineEditRejectId = 'editor.action.inlineEdit.reject';
|
|
3
|
+
const inlineEditJumpToId = 'editor.action.inlineEdit.jumpTo';
|
|
4
|
+
const inlineEditJumpBackId = 'editor.action.inlineEdit.jumpBack';
|
|
5
|
+
export { inlineEditAcceptId, inlineEditJumpBackId, inlineEditJumpToId, inlineEditRejectId };
|