@codingame/monaco-vscode-api 16.1.1 → 17.1.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/missing-services.js +105 -0
- package/monaco.d.ts +2 -2
- package/package.json +10 -9
- package/services.d.ts +4 -4
- package/services.js +3 -3
- package/vscode/product.json.js +3 -0
- package/vscode/src/vs/base/browser/dom.d.ts +1 -0
- package/vscode/src/vs/base/browser/dom.js +6 -1
- package/vscode/src/vs/base/browser/mouseEvent.d.ts +2 -0
- package/vscode/src/vs/base/browser/mouseEvent.js +1 -0
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.d.ts +2 -3
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hover.d.ts +1 -0
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +6 -1
- package/vscode/src/vs/base/browser/ui/list/listPaging.d.ts +2 -1
- package/vscode/src/vs/base/browser/ui/severityIcon/media/severityIcon.css +1 -3
- package/vscode/src/vs/base/browser/ui/toggle/toggle.d.ts +5 -1
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +17 -4
- package/vscode/src/vs/base/common/arrays.d.ts +1 -0
- package/vscode/src/vs/base/common/arrays.js +5 -2
- package/vscode/src/vs/base/common/async.js +9 -2
- package/vscode/src/vs/base/common/codicons.d.ts +5 -0
- package/vscode/src/vs/base/common/codiconsLibrary.d.ts +5 -0
- package/vscode/src/vs/base/common/codiconsLibrary.js +5 -0
- package/vscode/src/vs/base/common/color.d.ts +1 -0
- package/vscode/src/vs/base/common/color.js +10 -0
- package/vscode/src/vs/base/common/comparers.d.ts +2 -2
- package/vscode/src/vs/base/common/decorators.d.ts +1 -1
- package/vscode/src/vs/base/common/glob.d.ts +3 -0
- package/vscode/src/vs/base/common/glob.js +10 -1
- package/vscode/src/vs/base/common/marshallingIds.d.ts +2 -1
- package/vscode/src/vs/base/common/marshallingIds.js +1 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.d.ts +6 -8
- package/vscode/src/vs/base/common/observableInternal/autorun.js +15 -11
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +0 -10
- package/vscode/src/vs/base/common/observableInternal/changeTracker.d.ts +23 -0
- package/vscode/src/vs/base/common/observableInternal/changeTracker.js +30 -0
- package/vscode/src/vs/base/common/observableInternal/derived.d.ts +18 -13
- package/vscode/src/vs/base/common/observableInternal/derived.js +47 -18
- package/vscode/src/vs/base/common/observableInternal/index.d.ts +6 -5
- package/vscode/src/vs/base/common/observableInternal/index.js +2 -2
- package/vscode/src/vs/base/common/observableInternal/logging/logging.d.ts +2 -2
- package/vscode/src/vs/base/common/observableInternal/promise.d.ts +28 -0
- package/vscode/src/vs/base/common/observableInternal/promise.js +65 -0
- package/vscode/src/vs/base/common/observableInternal/reducer.d.ts +16 -0
- package/vscode/src/vs/base/common/observableInternal/reducer.js +36 -0
- package/vscode/src/vs/base/common/observableInternal/utils.d.ts +2 -0
- package/vscode/src/vs/base/common/observableInternal/utils.js +19 -11
- package/vscode/src/vs/base/common/product.d.ts +5 -0
- package/vscode/src/vs/base/common/sseParser.d.ts +26 -0
- package/vscode/src/vs/base/common/sseParser.js +134 -0
- package/vscode/src/vs/base/common/stopwatch.js +2 -2
- package/vscode/src/vs/base/common/strings.d.ts +1 -0
- package/vscode/src/vs/base/common/strings.js +8 -19
- package/vscode/src/vs/base/common/ternarySearchTree.d.ts +1 -0
- package/vscode/src/vs/base/common/ternarySearchTree.js +55 -13
- package/vscode/src/vs/editor/browser/config/editorConfiguration.d.ts +1 -0
- package/vscode/src/vs/editor/browser/config/editorConfiguration.js +3 -1
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.css +1 -1
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.d.ts +6 -3
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.js +86 -54
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderSupport.d.ts +0 -1
- package/vscode/src/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +12 -8
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.d.ts +0 -1
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +9 -6
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +3 -3
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +2 -2
- package/vscode/src/vs/editor/browser/editorBrowser.d.ts +1 -1
- package/vscode/src/vs/editor/browser/gpu/objectCollectionBuffer.d.ts +1 -1
- package/vscode/src/vs/editor/browser/services/abstractCodeEditorService.js +2 -0
- package/vscode/src/vs/editor/browser/services/hoverService/hover.css +8 -0
- package/vscode/src/vs/editor/browser/services/hoverService/hoverWidget.d.ts +1 -0
- package/vscode/src/vs/editor/browser/services/hoverService/hoverWidget.js +6 -1
- package/vscode/src/vs/editor/browser/view/renderingContext.d.ts +1 -0
- package/vscode/src/vs/editor/browser/view/renderingContext.js +3 -0
- package/vscode/src/vs/editor/browser/view/viewLayer.d.ts +3 -1
- package/vscode/src/vs/editor/browser/view/viewLayer.js +13 -6
- package/vscode/src/vs/editor/browser/view/viewOverlays.js +4 -1
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +4 -5
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +4 -2
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.d.ts +0 -1
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.js +6 -6
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLine.js +3 -0
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLines.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/whitespace/whitespace.js +1 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.d.ts +5 -2
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +15 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +7 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.d.ts +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +10 -8
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +19 -15
- package/vscode/src/vs/editor/common/codecs/frontMatterCodec/tokens/index.d.ts +5 -0
- package/vscode/src/vs/editor/common/codecs/simpleCodec/tokens/index.d.ts +20 -0
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +24 -23
- package/vscode/src/vs/editor/common/config/editorOptions.js +1 -2
- package/vscode/src/vs/editor/common/core/columnRange.d.ts +11 -0
- package/vscode/src/vs/editor/common/core/columnRange.js +32 -0
- package/vscode/src/vs/editor/common/core/offsetEdit.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/offsetEdit.js +10 -0
- package/vscode/src/vs/editor/common/core/offsetRange.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/offsetRange.js +3 -0
- package/vscode/src/vs/editor/common/core/positionToOffset.d.ts +15 -3
- package/vscode/src/vs/editor/common/core/positionToOffset.js +45 -11
- package/vscode/src/vs/editor/common/core/rangeSingleLine.d.ts +9 -0
- package/vscode/src/vs/editor/common/core/rangeSingleLine.js +27 -0
- package/vscode/src/vs/editor/common/core/textEdit.d.ts +1 -0
- package/vscode/src/vs/editor/common/core/textEdit.js +41 -0
- package/vscode/src/vs/editor/common/editorCommon.d.ts +1 -0
- package/vscode/src/vs/editor/common/languages/modesRegistry.d.ts +2 -2
- package/vscode/src/vs/editor/common/languages/modesRegistry.js +4 -2
- package/vscode/src/vs/editor/common/languages.d.ts +22 -1
- package/vscode/src/vs/editor/common/languages.js +7 -1
- package/vscode/src/vs/editor/common/model/textModel.d.ts +5 -1
- package/vscode/src/vs/editor/common/model/textModel.js +80 -18
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +1 -1
- package/vscode/src/vs/editor/common/model.d.ts +2 -1
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.d.ts +5 -0
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +7 -1
- package/vscode/src/vs/editor/common/textModelEvents.d.ts +11 -0
- package/vscode/src/vs/editor/common/textModelEvents.js +14 -1
- package/vscode/src/vs/editor/common/tokens/common.d.ts +7 -0
- package/vscode/src/vs/editor/common/tokens/common.js +18 -0
- package/vscode/src/vs/editor/common/tokens/contiguousTokensEditing.d.ts +1 -1
- package/vscode/src/vs/editor/common/tokens/lineTokens.d.ts +1 -0
- package/vscode/src/vs/editor/common/tokens/lineTokens.js +3 -0
- package/vscode/src/vs/editor/common/tokens/sparseMultilineTokens.d.ts +2 -0
- package/vscode/src/vs/editor/common/tokens/sparseMultilineTokens.js +20 -0
- package/vscode/src/vs/editor/common/tokens/sparseTokensStore.d.ts +2 -1
- package/vscode/src/vs/editor/common/tokens/sparseTokensStore.js +9 -4
- package/vscode/src/vs/editor/common/tokens/tokenArray.d.ts +1 -0
- package/vscode/src/vs/editor/common/tokens/tokenArray.js +4 -0
- package/vscode/src/vs/editor/common/tokens/tokenWithTextArray.d.ts +25 -0
- package/vscode/src/vs/editor/common/tokens/tokenWithTextArray.js +73 -0
- package/vscode/src/vs/editor/common/viewLayout/lineHeights.d.ts +35 -0
- package/vscode/src/vs/editor/common/viewLayout/lineHeights.js +339 -0
- package/vscode/src/vs/editor/common/viewLayout/linesLayout.d.ts +8 -6
- package/vscode/src/vs/editor/common/viewLayout/linesLayout.js +42 -49
- package/vscode/src/vs/editor/common/viewLayout/viewLayout.d.ts +6 -3
- package/vscode/src/vs/editor/common/viewLayout/viewLayout.js +16 -5
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.d.ts +1 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +44 -7
- package/vscode/src/vs/editor/common/viewModel.d.ts +5 -0
- package/vscode/src/vs/editor/common/viewModelEventDispatcher.d.ts +11 -3
- package/vscode/src/vs/editor/common/viewModelEventDispatcher.js +14 -1
- package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +20 -14
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +3 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +3 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorDetector.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorDetector.js +4 -3
- package/vscode/src/vs/editor/contrib/find/browser/findController.d.ts +1 -3
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +5 -11
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.d.ts +1 -7
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +2 -15
- package/vscode/src/vs/editor/contrib/folding/browser/folding.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/folding/browser/folding.js +24 -23
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +5 -5
- package/vscode/src/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +3 -3
- package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +14 -12
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/vscode/src/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +21 -21
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.d.ts +0 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +29 -41
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +11 -11
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +11 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +6 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +1 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.d.ts +4 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.js +1 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/changeRecorder.d.ts +10 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/changeRecorder.js +31 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/ghostText.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.d.ts +16 -16
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +156 -202
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.d.ts +21 -49
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +135 -431
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.d.ts +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.d.ts +98 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +487 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.d.ts +34 -32
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +141 -132
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.d.ts +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/structuredLogger.d.ts +26 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.d.ts +2 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +21 -20
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +19 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +17 -9
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.d.ts +5 -13
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +139 -188
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.d.ts +8 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.d.ts +4 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +6 -6
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.d.ts +23 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +157 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.d.ts +2 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +37 -20
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.d.ts +3 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +3 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.d.ts +6 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +28 -5
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.d.ts +21 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +215 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +0 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +0 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.d.ts +1 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +3 -4
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -21
- package/vscode/src/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/vscode/src/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +30 -30
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/vscode/src/vs/editor/contrib/links/browser/links.js +10 -10
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/vscode/src/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +17 -17
- package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/vscode/src/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +23 -49
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +6 -6
- package/vscode/src/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +8 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -2
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.d.ts +1 -0
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +24 -14
- package/vscode/src/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +19 -18
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/vscode/src/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +5 -10
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/vscode/src/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.js +1 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.d.ts +2 -2
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +2 -2
- package/vscode/src/vs/platform/accessibility/browser/accessibleView.d.ts +1 -1
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.d.ts +3 -0
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +23 -14
- package/vscode/src/vs/platform/actionWidget/browser/actionList.d.ts +2 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +17 -3
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css +6 -1
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.d.ts +2 -1
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.service.d.ts +2 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -2
- package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -1
- package/vscode/src/vs/platform/actions/common/actions.js +2 -0
- package/vscode/src/vs/platform/actions/common/menuResetAction.js +1 -1
- package/vscode/src/vs/platform/actions/common/menuService.js +2 -2
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.d.ts +1 -0
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +3 -0
- package/vscode/src/vs/platform/clipboard/common/clipboardService.service.d.ts +1 -0
- package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +15 -13
- package/vscode/src/vs/platform/configuration/common/configurations.js +1 -1
- package/vscode/src/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/vscode/src/vs/platform/contextkey/common/contextkey.js +11 -11
- package/vscode/src/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/vscode/src/vs/platform/contextkey/common/scanner.js +5 -5
- package/vscode/src/vs/platform/dialogs/common/dialogs.service.d.ts +1 -1
- package/vscode/src/vs/platform/dnd/browser/dnd.d.ts +5 -0
- package/vscode/src/vs/platform/dnd/browser/dnd.js +6 -2
- package/vscode/src/vs/platform/editor/common/editor.d.ts +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +8 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +94 -4
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +3 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.d.ts +3 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementUtil.js +10 -7
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionsProfileScannerService.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.d.ts +0 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +10 -11
- package/vscode/src/vs/platform/extensions/common/extensionValidator.js +20 -20
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1 -0
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.d.ts +7 -6
- package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +9 -8
- package/vscode/src/vs/platform/files/browser/htmlFileSystemProvider.js +2 -2
- package/vscode/src/vs/platform/files/common/files.js +6 -6
- package/vscode/src/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/vscode/src/vs/platform/jsonschemas/common/jsonContributionRegistry.js +5 -4
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
- package/vscode/src/vs/platform/label/common/label.service.d.ts +1 -1
- package/vscode/src/vs/platform/languagePacks/common/languagePacks.service.d.ts +1 -1
- package/vscode/src/vs/platform/list/browser/listService.d.ts +1 -1
- package/vscode/src/vs/platform/list/browser/listService.js +27 -27
- package/vscode/src/vs/platform/log/common/log.js +6 -6
- package/vscode/src/vs/platform/markers/common/markerService.d.ts +2 -7
- package/vscode/src/vs/platform/markers/common/markerService.js +5 -5
- package/vscode/src/vs/platform/markers/common/markers.d.ts +7 -0
- package/vscode/src/vs/platform/markers/common/markers.js +6 -6
- package/vscode/src/vs/platform/markers/common/markers.service.d.ts +2 -7
- package/vscode/src/vs/platform/native/common/native.d.ts +168 -0
- package/vscode/src/vs/platform/notification/common/notification.d.ts +6 -2
- package/vscode/src/vs/platform/notification/common/notification.js +3 -2
- package/vscode/src/vs/platform/notification/common/notification.service.d.ts +2 -3
- package/vscode/src/vs/platform/product/common/product.js +7 -90
- package/vscode/src/vs/platform/quickinput/browser/media/quickInput.css +4 -19
- package/vscode/src/vs/platform/quickinput/browser/quickInput.d.ts +6 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +33 -10
- package/vscode/src/vs/platform/quickinput/browser/quickInputActions.js +3 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInputBox.d.ts +2 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputBox.js +6 -0
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +25 -18
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.d.ts +5 -5
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +58 -43
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +1 -1
- package/vscode/src/vs/platform/registry/common/platform.js +9 -1
- package/vscode/src/vs/platform/request/common/request.d.ts +1 -1
- package/vscode/src/vs/platform/request/common/request.js +18 -18
- package/vscode/src/vs/platform/request/common/request.service.d.ts +1 -1
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -1
- package/vscode/src/vs/platform/terminal/common/terminal.d.ts +14 -1
- package/vscode/src/vs/platform/terminal/common/terminal.js +14 -1
- package/vscode/src/vs/platform/theme/browser/defaultStyles.d.ts +1 -2
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +4 -2
- package/vscode/src/vs/platform/theme/common/colorUtils.d.ts +7 -1
- package/vscode/src/vs/platform/theme/common/colorUtils.js +12 -4
- package/vscode/src/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/vscode/src/vs/platform/theme/common/colors/editorColors.js +94 -94
- package/vscode/src/vs/platform/theme/common/colors/inputColors.d.ts +2 -0
- package/vscode/src/vs/platform/theme/common/colors/inputColors.js +49 -47
- package/vscode/src/vs/platform/theme/common/colors/listColors.js +36 -36
- package/vscode/src/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/vscode/src/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/vscode/src/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/vscode/src/vs/platform/theme/common/iconRegistry.js +10 -8
- package/vscode/src/vs/platform/theme/common/themeService.d.ts +0 -8
- package/vscode/src/vs/platform/theme/common/themeService.js +4 -3
- package/vscode/src/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.d.ts +1 -1
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +5 -5
- package/vscode/src/vs/platform/userDataSync/common/userDataSync.service.d.ts +2 -2
- package/vscode/src/vs/platform/window/common/window.d.ts +4 -0
- package/vscode/src/vs/platform/window/common/window.js +2 -1
- package/vscode/src/vs/platform/workspace/common/workspace.js +1 -1
- package/vscode/src/vs/platform/workspaces/common/workspaces.service.d.ts +2 -2
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +27 -20
- package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +54 -19
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHostAiSettingsSearch.d.ts +14 -0
- package/vscode/src/vs/workbench/api/common/extHostAiSettingsSearch.js +38 -0
- package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.d.ts +2 -1
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +30 -17
- package/vscode/src/vs/workbench/api/common/extHostCodeMapper.js +2 -0
- package/vscode/src/vs/workbench/api/common/extHostCommands.d.ts +0 -1
- package/vscode/src/vs/workbench/api/common/extHostCommands.js +4 -2
- package/vscode/src/vs/workbench/api/common/extHostCustomEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.d.ts +2 -0
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +15 -4
- package/vscode/src/vs/workbench/api/common/extHostLabelService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.d.ts +4 -0
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +31 -6
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.d.ts +2 -3
- package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +60 -14
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +15 -9
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostMcp.d.ts +4 -3
- package/vscode/src/vs/workbench/api/common/extHostMcp.js +279 -82
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +3 -0
- package/vscode/src/vs/workbench/api/common/extHostQuickDiff.d.ts +2 -1
- package/vscode/src/vs/workbench/api/common/extHostQuickDiff.js +4 -2
- package/vscode/src/vs/workbench/api/common/extHostRequireInterceptor.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostSCM.d.ts +1 -0
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +21 -0
- package/vscode/src/vs/workbench/api/common/extHostSearch.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.d.ts +27 -9
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +201 -29
- package/vscode/src/vs/workbench/api/common/extHostTypes.d.ts +67 -27
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +79 -28
- package/vscode/src/vs/workbench/api/common/extHostWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.d.ts +7 -4
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +34 -9
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +12 -12
- package/vscode/src/vs/workbench/api/worker/extHostExtensionService.d.ts +1 -0
- package/vscode/src/vs/workbench/api/worker/extHostExtensionService.js +3 -0
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +31 -31
- package/vscode/src/vs/workbench/browser/actions/textInputActions.js +6 -6
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.service.d.ts +1 -1
- package/vscode/src/vs/workbench/common/configuration.js +10 -16
- package/vscode/src/vs/workbench/common/contextkeys.d.ts +3 -0
- package/vscode/src/vs/workbench/common/contextkeys.js +73 -71
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/common/editor.d.ts +13 -9
- package/vscode/src/vs/workbench/common/editor.js +4 -4
- package/vscode/src/vs/workbench/common/theme.js +160 -160
- package/vscode/src/vs/workbench/common/views.js +4 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +164 -147
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentParts.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorContextKeys.js +15 -14
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.d.ts +245 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +435 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.d.ts +6 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +51 -49
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.d.ts +19 -26
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.js +16 -23
- package/vscode/src/vs/workbench/contrib/chat/common/chatEditingService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatEntitlementService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.d.ts +585 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +1179 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.d.ts +116 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +211 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.d.ts +19 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.service.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatTransferService.service.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariables.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatVariables.service.d.ts +2 -7
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/constants.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/chat/common/constants.js +12 -4
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.d.ts +33 -5
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +14 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.d.ts +18 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/modelPicker/modelPickerWidget.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/contentProviders/types.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/metadata/index.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/parsers/types.d.ts +14 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/types.d.ts +28 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/types.service.d.ts +10 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.d.ts +8 -25
- package/vscode/src/vs/workbench/contrib/chat/common/tools/editFileTool.js +11 -97
- package/vscode/src/vs/workbench/contrib/chat/common/tools/tools.d.ts +0 -3
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorAccessibilityHelp.js +5 -5
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +5 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsAccessibility.js +12 -12
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +11 -11
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +64 -64
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.d.ts +171 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +85 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.service.d.ts +2 -3
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +127 -0
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/files/browser/files.service.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.d.ts +19 -8
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +12 -10
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +8 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiff.service.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.d.ts +11 -3
- package/vscode/src/vs/workbench/contrib/scm/common/quickDiffService.js +77 -16
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +3 -2
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/contrib/webview/browser/webview.service.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +1 -1
- package/vscode/src/vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/aiSettingsSearch/common/aiSettingsSearch.d.ts +17 -0
- package/vscode/src/vs/workbench/services/aiSettingsSearch/common/aiSettingsSearch.js +10 -0
- package/vscode/src/vs/workbench/services/aiSettingsSearch/common/aiSettingsSearch.service.d.ts +13 -0
- package/vscode/src/vs/workbench/services/aiSettingsSearch/common/aiSettingsSearch.service.js +6 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverExpression.d.ts +2 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverExpression.js +61 -12
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.d.ts +3 -2
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +25 -29
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +4 -1
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.service.d.ts +1 -0
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/editor/common/editorService.service.d.ts +2 -2
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/extensionRecommendations.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionDescriptionRegistry.js +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +84 -84
- package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +4 -1
- package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.service.d.ts +2 -4
- package/vscode/src/vs/workbench/services/localization/common/locale.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/notebook/common/notebookDocumentService.d.ts +1 -0
- package/vscode/src/vs/workbench/services/notebook/common/notebookDocumentService.js +2 -0
- package/vscode/src/vs/workbench/services/outline/browser/outline.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/output/common/output.js +6 -4
- package/vscode/src/vs/workbench/services/preferences/common/preferences.service.d.ts +1 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/search/common/search.d.ts +2 -1
- package/vscode/src/vs/workbench/services/search/common/searchExtTypes.d.ts +5 -0
- package/vscode/src/vs/workbench/services/search/common/searchExtTypes.js +6 -1
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.d.ts +2 -2
- package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +31 -23
- package/vscode/src/vs/workbench/services/textfile/common/encoding.d.ts +64 -0
- package/vscode/src/vs/workbench/services/textfile/common/encoding.js +560 -0
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +165 -0
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +74 -0
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.service.d.ts +12 -2
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +12 -12
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceEditing.service.d.ts +1 -1
- package/vscode-dts/vscode.d.ts +204 -9
- package/vscode-dts/vscode.proposed.aiSettingsSearch.d.ts +30 -0
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +18 -16
- package/vscode-dts/vscode.proposed.chatParticipantPrivate.d.ts +84 -5
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +18 -16
- package/vscode-dts/vscode.proposed.chatStatusItem.d.ts +1 -1
- package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +1 -1
- package/vscode-dts/vscode.proposed.contribDebugCreateConfiguration.d.ts +1 -1
- package/vscode-dts/vscode.proposed.d.ts +2 -2
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +2 -2
- package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +46 -8
- package/vscode-dts/vscode.proposed.languageModelDataPart.d.ts +106 -16
- package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +2 -0
- package/vscode-dts/vscode.proposed.mcpConfigurationProvider.d.ts +115 -21
- package/vscode-dts/vscode.proposed.quickDiffProvider.d.ts +7 -3
- package/vscode-dts/vscode.proposed.textSearchProvider2.d.ts +23 -1
- package/vscode-dts/vscode.proposed.toolProgress.d.ts +25 -0
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +1 -1
- package/workbench.d.ts +1 -1
- package/vscode-dts/vscode.proposed.languageModelToolsForAgent.d.ts +0 -8
- package/vscode-dts/vscode.proposed.textDocumentEncoding.d.ts +0 -170
package/vscode/src/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js
CHANGED
|
@@ -22,26 +22,28 @@ import { Selection } from '../../../../common/core/selection.js';
|
|
|
22
22
|
import { TextEdit, SingleTextEdit } from '../../../../common/core/textEdit.js';
|
|
23
23
|
import { TextLength } from '../../../../common/core/textLength.js';
|
|
24
24
|
import { ScrollType } from '../../../../common/editorCommon.js';
|
|
25
|
-
import { InlineCompletionTriggerKind, PartialAcceptTriggerKind } from '../../../../common/languages.js';
|
|
25
|
+
import { InlineCompletionTriggerKind, InlineCompletionEndOfLifeReasonKind, PartialAcceptTriggerKind } from '../../../../common/languages.js';
|
|
26
26
|
import { ILanguageConfigurationService } from '../../../../common/languages/languageConfigurationRegistry.service.js';
|
|
27
27
|
import { EndOfLinePreference } from '../../../../common/model.js';
|
|
28
28
|
import { TextModelText } from '../../../../common/model/textModelText.js';
|
|
29
|
+
import { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.service.js';
|
|
29
30
|
import { SnippetController2 } from '../../../snippet/browser/snippetController2.js';
|
|
30
|
-
import { getEndPositionsAfterApplying,
|
|
31
|
+
import { getEndPositionsAfterApplying, subtractPositions, substringPos, addPositions } from '../utils.js';
|
|
31
32
|
import { AnimatedValue, easeOutCubic, ObservableAnimatedValue } from './animation.js';
|
|
33
|
+
import { TextModelChangeRecorder } from './changeRecorder.js';
|
|
32
34
|
import { computeGhostText } from './computeGhostText.js';
|
|
33
35
|
import { ghostTextsOrReplacementsEqual, GhostText, ghostTextOrReplacementEquals } from './ghostText.js';
|
|
34
36
|
import { InlineCompletionsSource } from './inlineCompletionsSource.js';
|
|
35
37
|
import { InlineEdit } from './inlineEdit.js';
|
|
36
38
|
import { singleTextRemoveCommonPrefix, singleTextEditAugments } from './singleTextEditHelpers.js';
|
|
37
|
-
import { observableValue, transaction, subtransaction } from '../../../../../base/common/observableInternal/base.js';
|
|
38
|
-
import { observableSignal, recomputeInitiallyAndOnChange, constObservable } from '../../../../../base/common/observableInternal/utils.js';
|
|
39
39
|
import { derived, derivedHandleChanges, derivedOpts } from '../../../../../base/common/observableInternal/derived.js';
|
|
40
|
-
import {
|
|
40
|
+
import { observableValue, transaction, subtransaction } from '../../../../../base/common/observableInternal/base.js';
|
|
41
|
+
import { observableSignal, recomputeInitiallyAndOnChange, observableFromEvent, constObservable } from '../../../../../base/common/observableInternal/utils.js';
|
|
42
|
+
import { autorun, autorunWithStore } from '../../../../../base/common/observableInternal/autorun.js';
|
|
41
43
|
|
|
42
44
|
let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
43
45
|
get isAcceptingPartially() { return this._isAcceptingPartially; }
|
|
44
|
-
constructor(textModel, _selectedSuggestItem, _textModelVersionId, _positions, _debounceValue, _enabled, _editor, _instantiationService, _commandService, _languageConfigurationService, _accessibilityService) {
|
|
46
|
+
constructor(textModel, _selectedSuggestItem, _textModelVersionId, _positions, _debounceValue, _enabled, _editor, _instantiationService, _commandService, _languageConfigurationService, _accessibilityService, _languageFeaturesService) {
|
|
45
47
|
super();
|
|
46
48
|
this.textModel = textModel;
|
|
47
49
|
this._selectedSuggestItem = _selectedSuggestItem;
|
|
@@ -54,11 +56,13 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
54
56
|
this._commandService = _commandService;
|
|
55
57
|
this._languageConfigurationService = _languageConfigurationService;
|
|
56
58
|
this._accessibilityService = _accessibilityService;
|
|
59
|
+
this._languageFeaturesService = _languageFeaturesService;
|
|
57
60
|
this._source = this._register(this._instantiationService.createInstance(InlineCompletionsSource, this.textModel, this._textModelVersionId, this._debounceValue));
|
|
58
61
|
this._isActive = observableValue(this, false);
|
|
59
62
|
this._onlyRequestInlineEditsSignal = observableSignal(this);
|
|
60
63
|
this._forceUpdateExplicitlySignal = observableSignal(this);
|
|
61
64
|
this._noDelaySignal = observableSignal(this);
|
|
65
|
+
this._fetchSpecificProviderSignal = observableSignal(this);
|
|
62
66
|
this._selectedInlineCompletionId = observableValue(this, undefined);
|
|
63
67
|
this.primaryPosition = derived(this, reader => this._positions.read(reader)[0] ?? ( new Position(1, 1)));
|
|
64
68
|
this._isAcceptingPartially = false;
|
|
@@ -74,10 +78,12 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
74
78
|
this._lastAcceptedInlineCompletionInfo = undefined;
|
|
75
79
|
this._didUndoInlineEdits = derivedHandleChanges({
|
|
76
80
|
owner: this,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
changeTracker: {
|
|
82
|
+
createChangeSummary: () => ({ didUndo: false }),
|
|
83
|
+
handleChange: (ctx, changeSummary) => {
|
|
84
|
+
changeSummary.didUndo = ctx.didChange(this._textModelVersionId) && !!ctx.change?.isUndoing;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
81
87
|
}
|
|
82
88
|
}, (reader, changeSummary) => {
|
|
83
89
|
const versionId = this._textModelVersionId.read(reader);
|
|
@@ -99,30 +105,33 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
99
105
|
this.dontRefetchSignal = observableSignal(this);
|
|
100
106
|
this._fetchInlineCompletionsPromise = derivedHandleChanges({
|
|
101
107
|
owner: this,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
108
|
+
changeTracker: {
|
|
109
|
+
createChangeSummary: () => ({
|
|
110
|
+
dontRefetch: false,
|
|
111
|
+
preserveCurrentCompletion: false,
|
|
112
|
+
inlineCompletionTriggerKind: InlineCompletionTriggerKind.Automatic,
|
|
113
|
+
onlyRequestInlineEdits: false,
|
|
114
|
+
shouldDebounce: true,
|
|
115
|
+
provider: undefined,
|
|
116
|
+
}),
|
|
117
|
+
handleChange: (ctx, changeSummary) => {
|
|
118
|
+
if (ctx.didChange(this._textModelVersionId) && ( this._preserveCurrentCompletionReasons.has(this._getReason(ctx.change)))) {
|
|
119
|
+
changeSummary.preserveCurrentCompletion = true;
|
|
120
|
+
}
|
|
121
|
+
else if (ctx.didChange(this._forceUpdateExplicitlySignal)) {
|
|
122
|
+
changeSummary.inlineCompletionTriggerKind = InlineCompletionTriggerKind.Explicit;
|
|
123
|
+
}
|
|
124
|
+
else if (ctx.didChange(this.dontRefetchSignal)) {
|
|
125
|
+
changeSummary.dontRefetch = true;
|
|
126
|
+
}
|
|
127
|
+
else if (ctx.didChange(this._onlyRequestInlineEditsSignal)) {
|
|
128
|
+
changeSummary.onlyRequestInlineEdits = true;
|
|
129
|
+
}
|
|
130
|
+
else if (ctx.didChange(this._fetchSpecificProviderSignal)) {
|
|
131
|
+
changeSummary.provider = ctx.change;
|
|
132
|
+
}
|
|
133
|
+
return true;
|
|
134
|
+
},
|
|
126
135
|
},
|
|
127
136
|
}, (reader, changeSummary) => {
|
|
128
137
|
this._source.clearOperationOnTextModelChange.read(reader);
|
|
@@ -130,6 +139,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
130
139
|
this.dontRefetchSignal.read(reader);
|
|
131
140
|
this._onlyRequestInlineEditsSignal.read(reader);
|
|
132
141
|
this._forceUpdateExplicitlySignal.read(reader);
|
|
142
|
+
this._fetchSpecificProviderSignal.read(reader);
|
|
133
143
|
const shouldUpdate = (this._enabled.read(reader) && this._selectedSuggestItem.read(reader)) || this._isActive.read(reader);
|
|
134
144
|
if (!shouldUpdate) {
|
|
135
145
|
this._source.cancelUpdate();
|
|
@@ -139,19 +149,13 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
139
149
|
const suggestWidgetInlineCompletions = this._source.suggestWidgetInlineCompletions.get();
|
|
140
150
|
const suggestItem = this._selectedSuggestItem.read(reader);
|
|
141
151
|
if (suggestWidgetInlineCompletions && !suggestItem) {
|
|
142
|
-
|
|
143
|
-
transaction(tx => {
|
|
144
|
-
if (!inlineCompletions || suggestWidgetInlineCompletions.request.versionId > inlineCompletions.request.versionId) {
|
|
145
|
-
this._source.inlineCompletions.set(suggestWidgetInlineCompletions.clone(), tx);
|
|
146
|
-
}
|
|
147
|
-
this._source.clearSuggestWidgetInlineCompletions(tx);
|
|
148
|
-
});
|
|
152
|
+
this._source.seedInlineCompletionsWithSuggestWidget();
|
|
149
153
|
}
|
|
150
154
|
const cursorPosition = this.primaryPosition.get();
|
|
151
155
|
if (changeSummary.dontRefetch) {
|
|
152
156
|
return Promise.resolve(true);
|
|
153
157
|
}
|
|
154
|
-
if (this._didUndoInlineEdits.read(reader)) {
|
|
158
|
+
if (this._didUndoInlineEdits.read(reader) && changeSummary.inlineCompletionTriggerKind !== InlineCompletionTriggerKind.Explicit) {
|
|
155
159
|
transaction(tx => {
|
|
156
160
|
this._source.clear(tx);
|
|
157
161
|
});
|
|
@@ -178,7 +182,8 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
178
182
|
const userJumpedToActiveCompletion = ( this._jumpedToId.map(
|
|
179
183
|
jumpedTo => !!jumpedTo && jumpedTo === this._inlineCompletionItems.get()?.inlineEdit?.semanticId
|
|
180
184
|
));
|
|
181
|
-
|
|
185
|
+
const providers = changeSummary.provider ? [changeSummary.provider] : this._languageFeaturesService.inlineCompletionsProvider.all(this.textModel);
|
|
186
|
+
return this._source.fetch(providers, cursorPosition, context, itemToPreserve?.identity, changeSummary.shouldDebounce, userJumpedToActiveCompletion, !!changeSummary.provider);
|
|
182
187
|
});
|
|
183
188
|
this._inlineCompletionItems = derivedOpts({ owner: this }, reader => {
|
|
184
189
|
const c = this._source.inlineCompletions.read(reader);
|
|
@@ -189,8 +194,8 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
189
194
|
let inlineEdit = undefined;
|
|
190
195
|
const visibleCompletions = [];
|
|
191
196
|
for (const completion of c.inlineCompletions) {
|
|
192
|
-
if (!completion.
|
|
193
|
-
if (completion.isVisible(this.textModel, cursorPosition
|
|
197
|
+
if (!completion.isInlineEdit) {
|
|
198
|
+
if (completion.isVisible(this.textModel, cursorPosition)) {
|
|
194
199
|
visibleCompletions.push(completion);
|
|
195
200
|
}
|
|
196
201
|
}
|
|
@@ -226,8 +231,8 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
226
231
|
const idx = this.selectedInlineCompletionIndex.read(reader);
|
|
227
232
|
return filteredCompletions[idx];
|
|
228
233
|
});
|
|
229
|
-
this.activeCommands = derivedOpts({ owner: this, equalsFn: itemsEquals() }, r => this.selectedInlineCompletion.read(r)?.source.
|
|
230
|
-
this.lastTriggerKind = ( this._source.inlineCompletions.map(this, v => v?.request
|
|
234
|
+
this.activeCommands = derivedOpts({ owner: this, equalsFn: itemsEquals() }, r => this.selectedInlineCompletion.read(r)?.source.inlineSuggestions.commands ?? []);
|
|
235
|
+
this.lastTriggerKind = ( this._source.inlineCompletions.map(this, v => v?.request?.context.triggerKind));
|
|
231
236
|
this.inlineCompletionsCount = derived(this, reader => {
|
|
232
237
|
if (this.lastTriggerKind.read(reader) === InlineCompletionTriggerKind.Explicit) {
|
|
233
238
|
return this._filteredInlineCompletionItems.read(reader).length;
|
|
@@ -249,7 +254,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
249
254
|
&& a.suggestItem === b.suggestItem;
|
|
250
255
|
}
|
|
251
256
|
else if (a.kind === 'inlineEdit' && b.kind === 'inlineEdit') {
|
|
252
|
-
return a.inlineEdit.equals(b.inlineEdit)
|
|
257
|
+
return a.inlineEdit.equals(b.inlineEdit);
|
|
253
258
|
}
|
|
254
259
|
return false;
|
|
255
260
|
}
|
|
@@ -261,23 +266,20 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
261
266
|
if (this._hasVisiblePeekWidgets.read(reader)) {
|
|
262
267
|
return undefined;
|
|
263
268
|
}
|
|
264
|
-
let edit = inlineEditResult.
|
|
269
|
+
let edit = inlineEditResult.getSingleTextEdit();
|
|
265
270
|
edit = singleTextRemoveCommonPrefix(edit, model);
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const commands = inlineEditResult.inlineCompletion.source.inlineCompletions.commands;
|
|
273
|
-
const inlineEdit = ( new InlineEdit(edit, commands ?? [], inlineEditResult.inlineCompletion));
|
|
274
|
-
const edits = inlineEditResult.updatedEdit.read(reader);
|
|
271
|
+
const cursorAtInlineEdit = ( this.primaryPosition.map(
|
|
272
|
+
cursorPos => LineRange.fromRangeInclusive(inlineEditResult.targetRange).addMargin(1, 1).contains(cursorPos.lineNumber)
|
|
273
|
+
));
|
|
274
|
+
const commands = inlineEditResult.source.inlineSuggestions.commands;
|
|
275
|
+
const inlineEdit = ( new InlineEdit(edit, commands ?? [], inlineEditResult));
|
|
276
|
+
const edits = inlineEditResult.updatedEdit;
|
|
275
277
|
const e = edits ? TextEdit.fromOffsetEdit(edits, ( new TextModelText(this.textModel))).edits : [edit];
|
|
276
278
|
return { kind: 'inlineEdit', inlineEdit, inlineCompletion: inlineEditResult, edits: e, cursorAtInlineEdit };
|
|
277
279
|
}
|
|
278
280
|
const suggestItem = this._selectedSuggestItem.read(reader);
|
|
279
281
|
if (suggestItem) {
|
|
280
|
-
const suggestCompletionEdit = singleTextRemoveCommonPrefix(suggestItem.
|
|
282
|
+
const suggestCompletionEdit = singleTextRemoveCommonPrefix(suggestItem.getSingleTextEdit(), model);
|
|
281
283
|
const augmentation = this._computeAugmentation(suggestCompletionEdit, reader);
|
|
282
284
|
const isSuggestionPreviewEnabled = this._suggestPreviewEnabled.read(reader);
|
|
283
285
|
if (!isSuggestionPreviewEnabled && !augmentation) {
|
|
@@ -304,7 +306,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
304
306
|
if (!inlineCompletion) {
|
|
305
307
|
return undefined;
|
|
306
308
|
}
|
|
307
|
-
const replacement = inlineCompletion.
|
|
309
|
+
const replacement = inlineCompletion.getSingleTextEdit();
|
|
308
310
|
const mode = this._inlineSuggestMode.read(reader);
|
|
309
311
|
const positions = this._positions.read(reader);
|
|
310
312
|
const edits = [replacement, ...getSecondaryEdits(this.textModel, positions, replacement)];
|
|
@@ -352,7 +354,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
352
354
|
return !!s;
|
|
353
355
|
});
|
|
354
356
|
this.warning = derived(this, reader => {
|
|
355
|
-
return this.inlineCompletionState.read(reader)?.inlineCompletion?.
|
|
357
|
+
return this.inlineCompletionState.read(reader)?.inlineCompletion?.warning;
|
|
356
358
|
});
|
|
357
359
|
this.ghostTexts = derivedOpts({ owner: this, equalsFn: ghostTextsOrReplacementsEqual }, reader => {
|
|
358
360
|
const v = this.inlineCompletionState.read(reader);
|
|
@@ -373,6 +375,9 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
373
375
|
if (!state || state.kind !== 'inlineEdit') {
|
|
374
376
|
return false;
|
|
375
377
|
}
|
|
378
|
+
if (state.inlineCompletion.displayLocation) {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
376
381
|
const isCurrentModelVersion = state.inlineCompletion.updatedEditModelVersion === this._textModelVersionId.read(reader);
|
|
377
382
|
return (this._inlineEditsShowCollapsedEnabled.read(reader) || !isCurrentModelVersion)
|
|
378
383
|
&& this._jumpedToId.read(reader) !== state.inlineCompletion.semanticId
|
|
@@ -412,7 +417,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
412
417
|
if (this.showCollapsed.read(reader)) {
|
|
413
418
|
return true;
|
|
414
419
|
}
|
|
415
|
-
return !s.cursorAtInlineEdit;
|
|
420
|
+
return !s.cursorAtInlineEdit.read(reader);
|
|
416
421
|
});
|
|
417
422
|
this.tabShouldAcceptInlineEdit = derived(this, reader => {
|
|
418
423
|
const s = this.inlineEditState.read(reader);
|
|
@@ -422,7 +427,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
422
427
|
if (this.showCollapsed.read(reader)) {
|
|
423
428
|
return false;
|
|
424
429
|
}
|
|
425
|
-
if (s.
|
|
430
|
+
if (s.inlineCompletion.targetRange.startLineNumber === this._editorObs.cursorLineNumber.read(reader)) {
|
|
426
431
|
return true;
|
|
427
432
|
}
|
|
428
433
|
if (this._jumpedToId.read(reader) === s.inlineCompletion.semanticId) {
|
|
@@ -431,37 +436,17 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
431
436
|
if (this._tabShouldIndent.read(reader)) {
|
|
432
437
|
return false;
|
|
433
438
|
}
|
|
434
|
-
return s.cursorAtInlineEdit;
|
|
439
|
+
return s.cursorAtInlineEdit.read(reader);
|
|
435
440
|
});
|
|
436
|
-
this._inAcceptPartialFlow = observableValue(this, false);
|
|
437
|
-
this.inPartialAcceptFlow = this._inAcceptPartialFlow;
|
|
438
441
|
this._jumpedToId = observableValue(this, undefined);
|
|
439
442
|
this._inAcceptFlow = observableValue(this, false);
|
|
440
443
|
this.inAcceptFlow = this._inAcceptFlow;
|
|
441
444
|
this._register(recomputeInitiallyAndOnChange(this._fetchInlineCompletionsPromise));
|
|
442
|
-
let lastItem = undefined;
|
|
443
445
|
this._register(autorun(reader => {
|
|
444
446
|
const item = this.inlineCompletionState.read(reader);
|
|
445
447
|
const completion = item?.inlineCompletion;
|
|
446
|
-
if (completion
|
|
447
|
-
|
|
448
|
-
if (completion) {
|
|
449
|
-
const i = completion.inlineCompletion;
|
|
450
|
-
const src = i.source;
|
|
451
|
-
src.provider.handleItemDidShow?.(src.inlineCompletions, i.sourceInlineCompletion, i.insertText);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}));
|
|
455
|
-
this._register(autorun(reader => {
|
|
456
|
-
const inlineCompletions = this._source.inlineCompletions.read(reader);
|
|
457
|
-
if (!inlineCompletions) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
for (const inlineCompletion of inlineCompletions.inlineCompletions) {
|
|
461
|
-
if (inlineCompletion.updatedEdit.read(reader) === undefined) {
|
|
462
|
-
this.stop();
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
448
|
+
if (completion) {
|
|
449
|
+
this.handleInlineSuggestionShown(completion);
|
|
465
450
|
}
|
|
466
451
|
}));
|
|
467
452
|
this._register(autorun(reader => {
|
|
@@ -469,7 +454,9 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
469
454
|
this._inAcceptFlow.set(false, undefined);
|
|
470
455
|
}));
|
|
471
456
|
this._register(autorun(reader => {
|
|
472
|
-
const jumpToReset = ( this.state.map(
|
|
457
|
+
const jumpToReset = ( this.state.map(
|
|
458
|
+
(s, reader) => !s || s.kind === 'inlineEdit' && !s.cursorAtInlineEdit.read(reader)
|
|
459
|
+
)).read(reader);
|
|
473
460
|
if (jumpToReset) {
|
|
474
461
|
this._jumpedToId.set(undefined, undefined);
|
|
475
462
|
}
|
|
@@ -481,10 +468,32 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
481
468
|
this._editor.pushUndoStop();
|
|
482
469
|
this._lastShownInlineCompletionInfo = {
|
|
483
470
|
alternateTextModelVersionId: this.textModel.getAlternativeVersionId(),
|
|
484
|
-
inlineCompletion: this.state.get().inlineCompletion
|
|
471
|
+
inlineCompletion: this.state.get().inlineCompletion,
|
|
485
472
|
};
|
|
486
473
|
}
|
|
487
474
|
}));
|
|
475
|
+
const inlineCompletionProviders = observableFromEvent(this._languageFeaturesService.inlineCompletionsProvider.onDidChange, () => this._languageFeaturesService.inlineCompletionsProvider.all(textModel));
|
|
476
|
+
this._register(autorunWithStore((reader, store) => {
|
|
477
|
+
const providers = inlineCompletionProviders.read(reader);
|
|
478
|
+
for (const provider of providers) {
|
|
479
|
+
if (!provider.onDidChangeInlineCompletions) {
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
store.add(provider.onDidChangeInlineCompletions(() => {
|
|
483
|
+
if (!this._enabled.get()) {
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
const activeState = this.state.get();
|
|
487
|
+
if (activeState && (activeState.inlineCompletion || activeState.edits) && activeState.inlineCompletion?.source.provider !== provider) {
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
transaction(tx => {
|
|
491
|
+
this._fetchSpecificProviderSignal.trigger(tx, provider);
|
|
492
|
+
this.trigger(tx);
|
|
493
|
+
});
|
|
494
|
+
}));
|
|
495
|
+
}
|
|
496
|
+
}));
|
|
488
497
|
this._didUndoInlineEdits.recomputeInitiallyAndOnChange(this._store);
|
|
489
498
|
}
|
|
490
499
|
debugGetSelectedSuggestItem() {
|
|
@@ -554,13 +563,10 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
554
563
|
subtransaction(tx, tx => {
|
|
555
564
|
if (stopReason === 'explicitCancel') {
|
|
556
565
|
const inlineCompletion = this.state.get()?.inlineCompletion;
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
if (sourceInlineCompletion && source?.provider.handleRejection) {
|
|
560
|
-
source.provider.handleRejection(source.inlineCompletions, sourceInlineCompletion);
|
|
566
|
+
if (inlineCompletion) {
|
|
567
|
+
inlineCompletion.reportEndOfLife({ kind: InlineCompletionEndOfLifeReasonKind.Rejected });
|
|
561
568
|
}
|
|
562
569
|
}
|
|
563
|
-
this._inAcceptPartialFlow.set(false, tx);
|
|
564
570
|
this._isActive.set(false, tx);
|
|
565
571
|
this._source.clear(tx);
|
|
566
572
|
});
|
|
@@ -569,10 +575,10 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
569
575
|
const model = this.textModel;
|
|
570
576
|
const suggestWidgetInlineCompletions = this._source.suggestWidgetInlineCompletions.read(reader);
|
|
571
577
|
const candidateInlineCompletions = suggestWidgetInlineCompletions
|
|
572
|
-
? suggestWidgetInlineCompletions.inlineCompletions
|
|
578
|
+
? suggestWidgetInlineCompletions.inlineCompletions.filter(c => !c.isInlineEdit)
|
|
573
579
|
: [this.selectedInlineCompletion.read(reader)].filter(isDefined);
|
|
574
580
|
const augmentedCompletion = mapFindFirst(candidateInlineCompletions, completion => {
|
|
575
|
-
let r = completion.
|
|
581
|
+
let r = completion.getSingleTextEdit();
|
|
576
582
|
r = singleTextRemoveCommonPrefix(r, model, Range.fromPositions(r.range.getStartPosition(), suggestCompletion.range.getEndPosition()));
|
|
577
583
|
return singleTextEditAugments(r, suggestCompletion) ? { completion, edit: r } : undefined;
|
|
578
584
|
});
|
|
@@ -591,50 +597,58 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
591
597
|
}
|
|
592
598
|
async next() { await this._deltaSelectedInlineCompletionIndex(1); }
|
|
593
599
|
async previous() { await this._deltaSelectedInlineCompletionIndex(-1); }
|
|
600
|
+
_getMetadata(completion, type = undefined) {
|
|
601
|
+
return {
|
|
602
|
+
extensionId: completion.source.provider.groupId,
|
|
603
|
+
nes: completion.isInlineEdit,
|
|
604
|
+
type
|
|
605
|
+
};
|
|
606
|
+
}
|
|
594
607
|
async accept(editor = this._editor) {
|
|
595
608
|
if (editor.getModel() !== this.textModel) {
|
|
596
609
|
throw ( new BugIndicatingError());
|
|
597
610
|
}
|
|
598
|
-
|
|
599
|
-
this._inAcceptPartialFlow.set(false, undefined);
|
|
600
|
-
this.jump();
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
let completionWithUpdatedRange;
|
|
611
|
+
let completion;
|
|
604
612
|
const state = this.state.get();
|
|
605
613
|
if (state?.kind === 'ghostText') {
|
|
606
614
|
if (!state || state.primaryGhostText.isEmpty() || !state.inlineCompletion) {
|
|
607
615
|
return;
|
|
608
616
|
}
|
|
609
|
-
|
|
617
|
+
completion = state.inlineCompletion;
|
|
610
618
|
}
|
|
611
619
|
else if (state?.kind === 'inlineEdit') {
|
|
612
|
-
|
|
620
|
+
completion = state.inlineCompletion;
|
|
613
621
|
}
|
|
614
622
|
else {
|
|
615
623
|
return;
|
|
616
624
|
}
|
|
617
|
-
|
|
625
|
+
completion.reportEndOfLife({ kind: InlineCompletionEndOfLifeReasonKind.Accepted });
|
|
618
626
|
if (completion.command) {
|
|
619
627
|
completion.source.addRef();
|
|
620
628
|
}
|
|
621
629
|
editor.pushUndoStop();
|
|
622
630
|
if (completion.snippetInfo) {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
631
|
+
TextModelChangeRecorder.editWithMetadata(this._getMetadata(completion), () => {
|
|
632
|
+
editor.executeEdits('inlineSuggestion.accept', [
|
|
633
|
+
EditOperation.replace(completion.editRange, ''),
|
|
634
|
+
...completion.additionalTextEdits
|
|
635
|
+
]);
|
|
636
|
+
});
|
|
627
637
|
editor.setPosition(completion.snippetInfo.range.getStartPosition(), 'inlineCompletionAccept');
|
|
628
638
|
SnippetController2.get(editor)?.insert(completion.snippetInfo.snippet, { undoStopBefore: false });
|
|
629
639
|
}
|
|
630
640
|
else {
|
|
631
641
|
const edits = state.edits;
|
|
632
642
|
const selections = ( getEndPositionsAfterApplying(edits).map(p => Selection.fromPositions(p)));
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
643
|
+
TextModelChangeRecorder.editWithMetadata(this._getMetadata(completion), () => {
|
|
644
|
+
editor.executeEdits('inlineSuggestion.accept', [
|
|
645
|
+
...( edits.map(edit => EditOperation.replace(edit.range, edit.text))),
|
|
646
|
+
...completion.additionalTextEdits
|
|
647
|
+
]);
|
|
648
|
+
});
|
|
649
|
+
if (completion.displayLocation === undefined) {
|
|
650
|
+
editor.setSelections(state.kind === 'inlineEdit' ? selections.slice(-1) : selections, 'inlineCompletionAccept');
|
|
651
|
+
}
|
|
638
652
|
if (state.kind === 'inlineEdit' && !this._accessibilityService.isMotionReduced()) {
|
|
639
653
|
const editRanges = ( new TextEdit(edits)).getNewRanges();
|
|
640
654
|
const dec = this._store.add(( new FadeoutDecoration(editor, editRanges, () => {
|
|
@@ -653,8 +667,8 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
653
667
|
this._inAcceptFlow.set(true, undefined);
|
|
654
668
|
this._lastAcceptedInlineCompletionInfo = { textModelVersionIdAfter: this.textModel.getVersionId(), inlineCompletion: completion };
|
|
655
669
|
}
|
|
656
|
-
async acceptNextWord(
|
|
657
|
-
await this._acceptNext(
|
|
670
|
+
async acceptNextWord() {
|
|
671
|
+
await this._acceptNext(this._editor, 'word', (pos, text) => {
|
|
658
672
|
const langId = this.textModel.getLanguageIdAtPosition(pos.lineNumber, pos.column);
|
|
659
673
|
const config = this._languageConfigurationService.getLanguageConfiguration(langId);
|
|
660
674
|
const wordRegExp = ( new RegExp(config.wordDefinition.source, config.wordDefinition.flags.replace('g', '')));
|
|
@@ -681,8 +695,8 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
681
695
|
return acceptUntilIndexExclusive;
|
|
682
696
|
}, PartialAcceptTriggerKind.Word);
|
|
683
697
|
}
|
|
684
|
-
async acceptNextLine(
|
|
685
|
-
await this._acceptNext(
|
|
698
|
+
async acceptNextLine() {
|
|
699
|
+
await this._acceptNext(this._editor, 'line', (pos, text) => {
|
|
686
700
|
const m = text.match(/\n/);
|
|
687
701
|
if (m && m.index !== undefined) {
|
|
688
702
|
return m.index + 1;
|
|
@@ -690,7 +704,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
690
704
|
return text.length;
|
|
691
705
|
}, PartialAcceptTriggerKind.Line);
|
|
692
706
|
}
|
|
693
|
-
async _acceptNext(editor, getAcceptUntilIndex, kind) {
|
|
707
|
+
async _acceptNext(editor, type, getAcceptUntilIndex, kind) {
|
|
694
708
|
if (editor.getModel() !== this.textModel) {
|
|
695
709
|
throw ( new BugIndicatingError());
|
|
696
710
|
}
|
|
@@ -699,8 +713,8 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
699
713
|
return;
|
|
700
714
|
}
|
|
701
715
|
const ghostText = state.primaryGhostText;
|
|
702
|
-
const completion = state.inlineCompletion
|
|
703
|
-
if (completion.snippetInfo
|
|
716
|
+
const completion = state.inlineCompletion;
|
|
717
|
+
if (completion.snippetInfo) {
|
|
704
718
|
await this.accept(editor);
|
|
705
719
|
return;
|
|
706
720
|
}
|
|
@@ -725,98 +739,43 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
725
739
|
const primaryEdit = ( new SingleTextEdit(replaceRange, newText));
|
|
726
740
|
const edits = [primaryEdit, ...getSecondaryEdits(this.textModel, positions, primaryEdit)];
|
|
727
741
|
const selections = ( getEndPositionsAfterApplying(edits).map(p => Selection.fromPositions(p)));
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}
|
|
732
|
-
finally {
|
|
733
|
-
this._isAcceptingPartially = false;
|
|
734
|
-
}
|
|
735
|
-
if (completion.source.provider.handlePartialAccept) {
|
|
736
|
-
const acceptedRange = Range.fromPositions(completion.range.getStartPosition(), TextLength.ofText(partialGhostTextVal).addToPosition(ghostTextPos));
|
|
737
|
-
const text = editor.getModel().getValueInRange(acceptedRange, EndOfLinePreference.LF);
|
|
738
|
-
const acceptedLength = text.length;
|
|
739
|
-
completion.source.provider.handlePartialAccept(completion.source.inlineCompletions, completion.sourceInlineCompletion, acceptedLength, { kind, acceptedLength: acceptedLength, });
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
finally {
|
|
743
|
-
completion.source.removeRef();
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
async acceptNextInlineEditPart(editor) {
|
|
747
|
-
if (editor.getModel() !== this.textModel) {
|
|
748
|
-
throw ( new BugIndicatingError());
|
|
749
|
-
}
|
|
750
|
-
const state = this.inlineEditState.get();
|
|
751
|
-
const updatedEdit = state?.inlineCompletion.updatedEdit.get();
|
|
752
|
-
const completion = state?.inlineCompletion.toInlineCompletion(undefined);
|
|
753
|
-
if (!updatedEdit || updatedEdit.isEmpty || !completion) {
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
const nextPart = updatedEdit.edits[0];
|
|
757
|
-
const edit = ( new SingleTextEdit(
|
|
758
|
-
Range.fromPositions(this.textModel.getPositionAt(nextPart.replaceRange.start), this.textModel.getPositionAt(nextPart.replaceRange.endExclusive)),
|
|
759
|
-
nextPart.newText
|
|
760
|
-
));
|
|
761
|
-
const cursorAtStartPosition = this._editor.getSelection()?.getStartPosition().equals(edit.range.getStartPosition());
|
|
762
|
-
if (!cursorAtStartPosition || !this._inAcceptPartialFlow.get()) {
|
|
763
|
-
this._inAcceptPartialFlow.set(true, undefined);
|
|
764
|
-
this.jump();
|
|
765
|
-
return;
|
|
766
|
-
}
|
|
767
|
-
const partToJumpToNext = updatedEdit.edits[1] ?? undefined;
|
|
768
|
-
const editToJumpToNext = partToJumpToNext ? ( new SingleTextEdit(
|
|
769
|
-
Range.fromPositions(this.textModel.getPositionAt(partToJumpToNext.replaceRange.start), this.textModel.getPositionAt(partToJumpToNext.replaceRange.endExclusive)),
|
|
770
|
-
partToJumpToNext.newText
|
|
771
|
-
)) : undefined;
|
|
772
|
-
completion.source.addRef();
|
|
773
|
-
try {
|
|
774
|
-
this._isAcceptingPartially = true;
|
|
775
|
-
try {
|
|
776
|
-
editor.pushUndoStop();
|
|
777
|
-
let selections;
|
|
778
|
-
if (editToJumpToNext) {
|
|
779
|
-
const [_, rangeOfEditToJumpTo] = getModifiedRangesAfterApplying([edit, editToJumpToNext]);
|
|
780
|
-
selections = [Selection.fromPositions(rangeOfEditToJumpTo.getStartPosition())];
|
|
781
|
-
}
|
|
782
|
-
else {
|
|
783
|
-
selections = ( getEndPositionsAfterApplying([edit]).map(p => Selection.fromPositions(p)));
|
|
784
|
-
}
|
|
785
|
-
const edits = [edit];
|
|
786
|
-
editor.executeEdits('inlineSuggestion.accept', ( edits.map(edit => EditOperation.replace(edit.range, edit.text))));
|
|
742
|
+
TextModelChangeRecorder.editWithMetadata(this._getMetadata(completion, type), () => {
|
|
743
|
+
editor.executeEdits('inlineSuggestion.accept', ( edits.map(edit => EditOperation.replace(edit.range, edit.text))));
|
|
744
|
+
});
|
|
787
745
|
editor.setSelections(selections, 'inlineCompletionPartialAccept');
|
|
788
746
|
editor.revealPositionInCenterIfOutsideViewport(editor.getPosition(), ScrollType.Immediate);
|
|
789
747
|
}
|
|
790
748
|
finally {
|
|
791
749
|
this._isAcceptingPartially = false;
|
|
792
750
|
}
|
|
751
|
+
const acceptedRange = Range.fromPositions(completion.editRange.getStartPosition(), TextLength.ofText(partialGhostTextVal).addToPosition(ghostTextPos));
|
|
752
|
+
const text = editor.getModel().getValueInRange(acceptedRange, EndOfLinePreference.LF);
|
|
753
|
+
const acceptedLength = text.length;
|
|
754
|
+
completion.reportPartialAccept(acceptedLength, { kind, acceptedLength: acceptedLength });
|
|
793
755
|
}
|
|
794
756
|
finally {
|
|
795
757
|
completion.source.removeRef();
|
|
796
758
|
}
|
|
797
759
|
}
|
|
798
760
|
handleSuggestAccepted(item) {
|
|
799
|
-
const itemEdit = singleTextRemoveCommonPrefix(item.
|
|
761
|
+
const itemEdit = singleTextRemoveCommonPrefix(item.getSingleTextEdit(), this.textModel);
|
|
800
762
|
const augmentedCompletion = this._computeAugmentation(itemEdit, undefined);
|
|
801
763
|
if (!augmentedCompletion) {
|
|
802
764
|
return;
|
|
803
765
|
}
|
|
804
|
-
const
|
|
805
|
-
const sourceInlineCompletion = augmentedCompletion.completion.sourceInlineCompletion;
|
|
806
|
-
const completion = augmentedCompletion.completion.toInlineCompletion(undefined);
|
|
807
|
-
const alreadyAcceptedLength = this.textModel.getValueInRange(completion.range, EndOfLinePreference.LF).length;
|
|
766
|
+
const alreadyAcceptedLength = this.textModel.getValueInRange(augmentedCompletion.completion.editRange, EndOfLinePreference.LF).length;
|
|
808
767
|
const acceptedLength = alreadyAcceptedLength + itemEdit.text.length;
|
|
809
|
-
|
|
768
|
+
augmentedCompletion.completion.reportPartialAccept(itemEdit.text.length, {
|
|
810
769
|
kind: PartialAcceptTriggerKind.Suggest,
|
|
811
770
|
acceptedLength,
|
|
812
771
|
});
|
|
813
772
|
}
|
|
814
773
|
extractReproSample() {
|
|
815
774
|
const value = this.textModel.getValue();
|
|
816
|
-
const item = this.state.get()?.inlineCompletion
|
|
775
|
+
const item = this.state.get()?.inlineCompletion;
|
|
817
776
|
return {
|
|
818
777
|
documentValue: value,
|
|
819
|
-
inlineCompletion: item?.
|
|
778
|
+
inlineCompletion: item?.getSourceCompletion(),
|
|
820
779
|
};
|
|
821
780
|
}
|
|
822
781
|
jump() {
|
|
@@ -827,35 +786,30 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
827
786
|
transaction(tx => {
|
|
828
787
|
this._jumpedToId.set(s.inlineCompletion.semanticId, tx);
|
|
829
788
|
this.dontRefetchSignal.trigger(tx);
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
|
|
789
|
+
const targetRange = s.inlineCompletion.targetRange;
|
|
790
|
+
const targetPosition = targetRange.getStartPosition();
|
|
791
|
+
this._editor.setPosition(targetPosition, 'inlineCompletions.jump');
|
|
792
|
+
const isSingleLineChange = targetRange.isSingleLine() && (s.inlineCompletion.displayLocation || !s.inlineCompletion.insertText.includes('\n'));
|
|
833
793
|
if (isSingleLineChange) {
|
|
834
|
-
this._editor.revealPosition(
|
|
794
|
+
this._editor.revealPosition(targetPosition);
|
|
835
795
|
}
|
|
836
796
|
else {
|
|
837
|
-
const revealRange = ( new Range(
|
|
797
|
+
const revealRange = ( new Range(targetRange.startLineNumber - 1, 1, targetRange.endLineNumber + 1, 1));
|
|
838
798
|
this._editor.revealRange(revealRange, ScrollType.Immediate);
|
|
839
799
|
}
|
|
840
800
|
this._editor.focus();
|
|
841
801
|
});
|
|
842
802
|
}
|
|
843
|
-
async
|
|
844
|
-
|
|
845
|
-
return;
|
|
846
|
-
}
|
|
847
|
-
inlineCompletion.markAsShown();
|
|
848
|
-
inlineCompletion.source.provider.handleItemDidShow?.(inlineCompletion.source.inlineCompletions, inlineCompletion.sourceInlineCompletion, inlineCompletion.insertText);
|
|
849
|
-
if (inlineCompletion.shownCommand) {
|
|
850
|
-
await this._commandService.executeCommand(inlineCompletion.shownCommand.id, ...(inlineCompletion.shownCommand.arguments || []));
|
|
851
|
-
}
|
|
803
|
+
async handleInlineSuggestionShown(inlineCompletion) {
|
|
804
|
+
await inlineCompletion.reportInlineEditShown(this._commandService);
|
|
852
805
|
}
|
|
853
806
|
};
|
|
854
807
|
InlineCompletionsModel = ( __decorate([
|
|
855
808
|
( __param(7, IInstantiationService)),
|
|
856
809
|
( __param(8, ICommandService)),
|
|
857
810
|
( __param(9, ILanguageConfigurationService)),
|
|
858
|
-
( __param(10, IAccessibilityService))
|
|
811
|
+
( __param(10, IAccessibilityService)),
|
|
812
|
+
( __param(11, ILanguageFeaturesService))
|
|
859
813
|
], InlineCompletionsModel));
|
|
860
814
|
var VersionIdChangeReason;
|
|
861
815
|
(function (VersionIdChangeReason) {
|