monaco-editor-core 0.56.0-dev-20251124 → 0.56.0-dev-20251217
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/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +34 -2
- package/esm/vs/base/browser/dom.js +1 -4
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +25 -11
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +15 -8
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/list/list.css +1 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/common/async.js +11 -0
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +11 -2
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/defaultAccount.js +6 -0
- package/esm/vs/base/common/defaultAccount.js.map +1 -0
- package/esm/vs/base/common/equals.js +73 -24
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +14 -4
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keybindings.js +0 -8
- package/esm/vs/base/common/keybindings.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +2 -2
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/marshallingIds.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +1 -1
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/strings.js +3 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/view.js +11 -2
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
- package/esm/vs/editor/common/config/fontInfo.js +1 -1
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/core/edits/edit.js +19 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
- package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
- package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
- package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
- package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
- package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
- package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
- package/esm/vs/editor/common/languages.js +2 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/decorationProvider.js +21 -1
- package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +49 -30
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
- package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
- package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
- package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
- package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/textModelEvents.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +54 -36
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +14 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +2 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +33 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -65
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +69 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +159 -94
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +124 -50
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +393 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +11 -11
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +19 -11
- package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
- package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
- package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +37 -2
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +11 -4
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
- package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/log/common/log.js +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +6 -6
- package/esm/vs/platform/markers/common/markerService.js.map +1 -1
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +7 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +19 -11
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
- package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
- package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +21 -21
- package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
- package/esm/vs/platform/window/common/window.js +1 -1
- package/esm/vs/platform/window/common/window.js.map +1 -1
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +37 -2
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
- package/esm/vs/platform/product/common/productService.js.map +0 -1
|
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
14
|
import { mapFindFirst } from '../../../../../base/common/arraysFind.js';
|
|
15
|
-
import {
|
|
15
|
+
import { arrayEqualsC } from '../../../../../base/common/equals.js';
|
|
16
16
|
import { BugIndicatingError, onUnexpectedExternalError } from '../../../../../base/common/errors.js';
|
|
17
17
|
import { Emitter } from '../../../../../base/common/event.js';
|
|
18
18
|
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
@@ -40,7 +40,6 @@ import { AnimatedValue, easeOutCubic, ObservableAnimatedValue } from './animatio
|
|
|
40
40
|
import { computeGhostText } from './computeGhostText.js';
|
|
41
41
|
import { GhostText, ghostTextOrReplacementEquals, ghostTextsOrReplacementsEqual } from './ghostText.js';
|
|
42
42
|
import { InlineCompletionsSource } from './inlineCompletionsSource.js';
|
|
43
|
-
import { InlineEdit } from './inlineEdit.js';
|
|
44
43
|
import { InlineCompletionEditorType } from './provideInlineCompletions.js';
|
|
45
44
|
import { singleTextEditAugments, singleTextRemoveCommonPrefix } from './singleTextEditHelpers.js';
|
|
46
45
|
import { EditSources } from '../../../../common/textModelEditSource.js';
|
|
@@ -50,12 +49,13 @@ import { TypingInterval } from './typingSpeed.js';
|
|
|
50
49
|
import { StringReplacement } from '../../../../common/core/edits/stringEdit.js';
|
|
51
50
|
import { OffsetRange } from '../../../../common/core/ranges/offsetRange.js';
|
|
52
51
|
import { URI } from '../../../../../base/common/uri.js';
|
|
52
|
+
import { IDefaultAccountService } from '../../../../../platform/defaultAccount/common/defaultAccount.js';
|
|
53
53
|
let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
54
54
|
get isAcceptingPartially() { return this._isAcceptingPartially; }
|
|
55
55
|
get editor() {
|
|
56
56
|
return this._editor;
|
|
57
57
|
}
|
|
58
|
-
constructor(textModel, _selectedSuggestItem, _textModelVersionId, _positions, _debounceValue, _enabled, _editor, _instantiationService, _commandService, _languageConfigurationService, _accessibilityService, _languageFeaturesService, _codeEditorService, _inlineCompletionsService) {
|
|
58
|
+
constructor(textModel, _selectedSuggestItem, _textModelVersionId, _positions, _debounceValue, _enabled, _editor, _instantiationService, _commandService, _languageConfigurationService, _accessibilityService, _languageFeaturesService, _codeEditorService, _inlineCompletionsService, defaultAccountService) {
|
|
59
59
|
super();
|
|
60
60
|
this.textModel = textModel;
|
|
61
61
|
this._selectedSuggestItem = _selectedSuggestItem;
|
|
@@ -80,6 +80,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
80
80
|
this._selectedInlineCompletionId = observableValue(this, undefined);
|
|
81
81
|
this.primaryPosition = derived(this, reader => this._positions.read(reader)[0] ?? new Position(1, 1));
|
|
82
82
|
this.allPositions = derived(this, reader => this._positions.read(reader));
|
|
83
|
+
this.sku = observableValue(this, undefined);
|
|
83
84
|
this._isAcceptingPartially = false;
|
|
84
85
|
this._appearedInsideViewport = derived(this, reader => {
|
|
85
86
|
const state = this.state.read(reader);
|
|
@@ -208,6 +209,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
208
209
|
typingInterval: typingInterval.averageInterval,
|
|
209
210
|
typingIntervalCharacterCount: typingInterval.characterCount,
|
|
210
211
|
availableProviders: [],
|
|
212
|
+
sku: this.sku.read(undefined),
|
|
211
213
|
};
|
|
212
214
|
let context = {
|
|
213
215
|
triggerKind: changeSummary.inlineCompletionTriggerKind,
|
|
@@ -266,7 +268,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
266
268
|
inlineEdit,
|
|
267
269
|
};
|
|
268
270
|
});
|
|
269
|
-
this._filteredInlineCompletionItems = derivedOpts({ owner: this, equalsFn:
|
|
271
|
+
this._filteredInlineCompletionItems = derivedOpts({ owner: this, equalsFn: arrayEqualsC() }, reader => {
|
|
270
272
|
const c = this._inlineCompletionItems.read(reader);
|
|
271
273
|
return c?.inlineCompletions ?? [];
|
|
272
274
|
});
|
|
@@ -287,7 +289,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
287
289
|
const idx = this.selectedInlineCompletionIndex.read(reader);
|
|
288
290
|
return filteredCompletions[idx];
|
|
289
291
|
});
|
|
290
|
-
this.activeCommands = derivedOpts({ owner: this, equalsFn:
|
|
292
|
+
this.activeCommands = derivedOpts({ owner: this, equalsFn: arrayEqualsC() }, r => this.selectedInlineCompletion.read(r)?.source.inlineSuggestions.commands ?? []);
|
|
291
293
|
this.inlineCompletionsCount = derived(this, reader => {
|
|
292
294
|
if (this.lastTriggerKind.read(reader) === InlineCompletionTriggerKind.Explicit) {
|
|
293
295
|
return this._filteredInlineCompletionItems.read(reader).length;
|
|
@@ -326,7 +328,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
326
328
|
&& a.suggestItem === b.suggestItem;
|
|
327
329
|
}
|
|
328
330
|
else if (a.kind === 'inlineEdit' && b.kind === 'inlineEdit') {
|
|
329
|
-
return a.
|
|
331
|
+
return a.inlineSuggestion === b.inlineSuggestion;
|
|
330
332
|
}
|
|
331
333
|
return false;
|
|
332
334
|
}
|
|
@@ -341,17 +343,13 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
341
343
|
if (this._hasVisiblePeekWidgets.read(reader)) {
|
|
342
344
|
return undefined;
|
|
343
345
|
}
|
|
344
|
-
let edit = inlineEditResult.getSingleTextEdit();
|
|
345
|
-
edit = singleTextRemoveCommonPrefix(edit, model);
|
|
346
346
|
const cursorAtInlineEdit = this.primaryPosition.map(cursorPos => LineRange.fromRangeInclusive(inlineEditResult.targetRange).addMargin(1, 1).contains(cursorPos.lineNumber));
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
const edits = inlineEditResult.updatedEdit;
|
|
350
|
-
const e = edits ? TextEdit.fromStringEdit(edits, new TextModelText(this.textModel)).replacements : [edit];
|
|
347
|
+
const stringEdit = inlineEditResult.action?.kind === 'edit' ? inlineEditResult.action.stringEdit : undefined;
|
|
348
|
+
const replacements = stringEdit ? TextEdit.fromStringEdit(stringEdit, new TextModelText(this.textModel)).replacements : [];
|
|
351
349
|
const nextEditUri = (item.inlineEdit?.command?.id === 'vscode.open' || item.inlineEdit?.command?.id === '_workbench.open') &&
|
|
352
350
|
// eslint-disable-next-line local/code-no-any-casts
|
|
353
351
|
item.inlineEdit?.command.arguments?.length ? URI.from(item.inlineEdit?.command.arguments[0]) : undefined;
|
|
354
|
-
return { kind: 'inlineEdit',
|
|
352
|
+
return { kind: 'inlineEdit', inlineSuggestion: inlineEditResult, edits: replacements, cursorAtInlineEdit, nextEditUri };
|
|
355
353
|
}
|
|
356
354
|
const suggestItem = this._selectedSuggestItem.read(reader);
|
|
357
355
|
if (!this._shouldShowOnSuggestConflict.read(reader) && suggestItem) {
|
|
@@ -440,7 +438,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
440
438
|
if (!state || state.kind !== 'inlineEdit') {
|
|
441
439
|
return false;
|
|
442
440
|
}
|
|
443
|
-
if (state.inlineSuggestion.hint) {
|
|
441
|
+
if (state.inlineSuggestion.hint || state.inlineSuggestion.action?.kind === 'jumpTo') {
|
|
444
442
|
return false;
|
|
445
443
|
}
|
|
446
444
|
const isCurrentModelVersion = state.inlineSuggestion.updatedEditModelVersion === this._textModelVersionId.read(reader);
|
|
@@ -479,6 +477,9 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
479
477
|
if (!s) {
|
|
480
478
|
return false;
|
|
481
479
|
}
|
|
480
|
+
if (s.inlineSuggestion.action?.kind === 'jumpTo') {
|
|
481
|
+
return true;
|
|
482
|
+
}
|
|
482
483
|
if (this.showCollapsed.read(reader)) {
|
|
483
484
|
return true;
|
|
484
485
|
}
|
|
@@ -492,6 +493,9 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
492
493
|
if (!s) {
|
|
493
494
|
return false;
|
|
494
495
|
}
|
|
496
|
+
if (s.inlineSuggestion.action?.kind === 'jumpTo') {
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
495
499
|
if (this.showCollapsed.read(reader)) {
|
|
496
500
|
return false;
|
|
497
501
|
}
|
|
@@ -529,6 +533,8 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
529
533
|
this._suppressInSnippetMode = inlineSuggest.map(s => s.suppressInSnippetMode);
|
|
530
534
|
const snippetController = SnippetController2.get(this._editor);
|
|
531
535
|
this._isInSnippetMode = snippetController?.isInSnippetObservable ?? constObservable(false);
|
|
536
|
+
defaultAccountService.getDefaultAccount().then(createDisposableCb(account => this.sku.set(skuFromAccount(account), undefined), this._store));
|
|
537
|
+
this._register(defaultAccountService.onDidChangeDefaultAccount(account => this.sku.set(skuFromAccount(account), undefined)));
|
|
532
538
|
this._typing = this._register(new TypingInterval(this.textModel));
|
|
533
539
|
this._register(this._inlineCompletionsService.onDidChangeIsSnoozing((isSnoozing) => {
|
|
534
540
|
if (isSnoozing) {
|
|
@@ -561,6 +567,12 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
561
567
|
this._jumpedToId.set(undefined, undefined);
|
|
562
568
|
}
|
|
563
569
|
}));
|
|
570
|
+
this._register(autorun(reader => {
|
|
571
|
+
const inlineSuggestion = this.state.map(s => s?.inlineSuggestion).read(reader);
|
|
572
|
+
if (inlineSuggestion) {
|
|
573
|
+
inlineSuggestion.addPerformanceMarker('activeSuggestion');
|
|
574
|
+
}
|
|
575
|
+
}));
|
|
564
576
|
const inlineEditSemanticId = this.inlineEditState.map(s => s?.inlineSuggestion.semanticId);
|
|
565
577
|
this._register(autorun(reader => {
|
|
566
578
|
const id = inlineEditSemanticId.read(reader);
|
|
@@ -728,18 +740,20 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
728
740
|
providerId: completion.source.provider.providerId,
|
|
729
741
|
languageId,
|
|
730
742
|
type,
|
|
743
|
+
correlationId: completion.getSourceCompletion().correlationId,
|
|
731
744
|
});
|
|
732
745
|
}
|
|
733
746
|
else {
|
|
734
747
|
return EditSources.inlineCompletionAccept({
|
|
735
748
|
nes: completion.isInlineEdit,
|
|
736
749
|
requestUuid: completion.requestUuid,
|
|
750
|
+
correlationId: completion.getSourceCompletion().correlationId,
|
|
737
751
|
providerId: completion.source.provider.providerId,
|
|
738
752
|
languageId
|
|
739
753
|
});
|
|
740
754
|
}
|
|
741
755
|
}
|
|
742
|
-
async accept(editor = this._editor) {
|
|
756
|
+
async accept(editor = this._editor, alternativeAction = false) {
|
|
743
757
|
if (editor.getModel() !== this.textModel) {
|
|
744
758
|
throw new BugIndicatingError();
|
|
745
759
|
}
|
|
@@ -762,40 +776,51 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
762
776
|
// Make sure the completion list will not be disposed before the text change is sent.
|
|
763
777
|
completion.addRef();
|
|
764
778
|
try {
|
|
779
|
+
let followUpTrigger = false;
|
|
765
780
|
editor.pushUndoStop();
|
|
766
781
|
if (isNextEditUri) {
|
|
767
782
|
// Do nothing
|
|
768
783
|
}
|
|
769
|
-
else if (completion.
|
|
770
|
-
const
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
else {
|
|
778
|
-
const edits = state.edits;
|
|
779
|
-
// The cursor should move to the end of the edit, not the end of the range provided by the extension
|
|
780
|
-
// Inline Edit diffs (human readable) the suggestion from the extension so it already removes common suffix/prefix
|
|
781
|
-
// Inline Completions does diff the suggestion so it may contain common suffix
|
|
782
|
-
let minimalEdits = edits;
|
|
783
|
-
if (state.kind === 'ghostText') {
|
|
784
|
-
minimalEdits = removeTextReplacementCommonSuffixPrefix(edits, this.textModel);
|
|
784
|
+
else if (completion.action?.kind === 'edit') {
|
|
785
|
+
const action = completion.action;
|
|
786
|
+
if (alternativeAction && action.alternativeAction) {
|
|
787
|
+
followUpTrigger = true;
|
|
788
|
+
const altCommand = action.alternativeAction.command;
|
|
789
|
+
await this._commandService
|
|
790
|
+
.executeCommand(altCommand.id, ...(altCommand.arguments || []))
|
|
791
|
+
.then(undefined, onUnexpectedExternalError);
|
|
785
792
|
}
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
+
else if (action.snippetInfo) {
|
|
794
|
+
const mainEdit = TextReplacement.delete(action.textReplacement.range);
|
|
795
|
+
const additionalEdits = completion.additionalTextEdits.map(e => new TextReplacement(Range.lift(e.range), e.text ?? ''));
|
|
796
|
+
const edit = TextEdit.fromParallelReplacementsUnsorted([mainEdit, ...additionalEdits]);
|
|
797
|
+
editor.edit(edit, this._getMetadata(completion, this.textModel.getLanguageId()));
|
|
798
|
+
editor.setPosition(action.snippetInfo.range.getStartPosition(), 'inlineCompletionAccept');
|
|
799
|
+
SnippetController2.get(editor)?.insert(action.snippetInfo.snippet, { undoStopBefore: false });
|
|
793
800
|
}
|
|
794
|
-
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
801
|
+
else {
|
|
802
|
+
const edits = state.edits;
|
|
803
|
+
// The cursor should move to the end of the edit, not the end of the range provided by the extension
|
|
804
|
+
// Inline Edit diffs (human readable) the suggestion from the extension so it already removes common suffix/prefix
|
|
805
|
+
// Inline Completions does diff the suggestion so it may contain common suffix
|
|
806
|
+
let minimalEdits = edits;
|
|
807
|
+
if (state.kind === 'ghostText') {
|
|
808
|
+
minimalEdits = removeTextReplacementCommonSuffixPrefix(edits, this.textModel);
|
|
809
|
+
}
|
|
810
|
+
const selections = getEndPositionsAfterApplying(minimalEdits).map(p => Selection.fromPositions(p));
|
|
811
|
+
const additionalEdits = completion.additionalTextEdits.map(e => new TextReplacement(Range.lift(e.range), e.text ?? ''));
|
|
812
|
+
const edit = TextEdit.fromParallelReplacementsUnsorted([...edits, ...additionalEdits]);
|
|
813
|
+
editor.edit(edit, this._getMetadata(completion, this.textModel.getLanguageId()));
|
|
814
|
+
if (completion.hint === undefined) {
|
|
815
|
+
// do not move the cursor when the completion is displayed in a different location
|
|
816
|
+
editor.setSelections(state.kind === 'inlineEdit' ? selections.slice(-1) : selections, 'inlineCompletionAccept');
|
|
817
|
+
}
|
|
818
|
+
if (state.kind === 'inlineEdit' && !this._accessibilityService.isMotionReduced()) {
|
|
819
|
+
const editRanges = edit.getNewRanges();
|
|
820
|
+
const dec = this._store.add(new FadeoutDecoration(editor, editRanges, () => {
|
|
821
|
+
this._store.delete(dec);
|
|
822
|
+
}));
|
|
823
|
+
}
|
|
799
824
|
}
|
|
800
825
|
}
|
|
801
826
|
this._onDidAccept.fire();
|
|
@@ -806,7 +831,11 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
806
831
|
.executeCommand(completion.command.id, ...(completion.command.arguments || []))
|
|
807
832
|
.then(undefined, onUnexpectedExternalError);
|
|
808
833
|
}
|
|
809
|
-
|
|
834
|
+
// TODO: how can we make alternative actions to retrigger?
|
|
835
|
+
if (followUpTrigger) {
|
|
836
|
+
this.trigger(undefined);
|
|
837
|
+
}
|
|
838
|
+
completion.reportEndOfLife({ kind: InlineCompletionEndOfLifeReasonKind.Accepted, alternativeAction });
|
|
810
839
|
}
|
|
811
840
|
finally {
|
|
812
841
|
completion.removeRef();
|
|
@@ -936,27 +965,38 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
936
965
|
if (!s) {
|
|
937
966
|
return;
|
|
938
967
|
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
this.
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
968
|
+
const suggestion = s.inlineSuggestion;
|
|
969
|
+
suggestion.addRef();
|
|
970
|
+
try {
|
|
971
|
+
transaction(tx => {
|
|
972
|
+
if (suggestion.action?.kind === 'jumpTo') {
|
|
973
|
+
this.stop(undefined, tx);
|
|
974
|
+
suggestion.reportEndOfLife({ kind: InlineCompletionEndOfLifeReasonKind.Accepted, alternativeAction: false });
|
|
975
|
+
}
|
|
976
|
+
this._jumpedToId.set(s.inlineSuggestion.semanticId, tx);
|
|
977
|
+
this.dontRefetchSignal.trigger(tx);
|
|
978
|
+
const targetRange = s.inlineSuggestion.targetRange;
|
|
979
|
+
const targetPosition = targetRange.getStartPosition();
|
|
980
|
+
this._editor.setPosition(targetPosition, 'inlineCompletions.jump');
|
|
981
|
+
// TODO: consider using view information to reveal it
|
|
982
|
+
const isSingleLineChange = targetRange.isSingleLine() && (s.inlineSuggestion.hint || (s.inlineSuggestion.action?.kind === 'edit' && !s.inlineSuggestion.action.textReplacement.text.includes('\n')));
|
|
983
|
+
if (isSingleLineChange || s.inlineSuggestion.action?.kind === 'jumpTo') {
|
|
984
|
+
this._editor.revealPosition(targetPosition, 0 /* ScrollType.Smooth */);
|
|
985
|
+
}
|
|
986
|
+
else {
|
|
987
|
+
const revealRange = new Range(targetRange.startLineNumber - 1, 1, targetRange.endLineNumber + 1, 1);
|
|
988
|
+
this._editor.revealRange(revealRange, 0 /* ScrollType.Smooth */);
|
|
989
|
+
}
|
|
990
|
+
s.inlineSuggestion.identity.setJumpTo(tx);
|
|
991
|
+
this._editor.focus();
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
finally {
|
|
995
|
+
suggestion.removeRef();
|
|
996
|
+
}
|
|
957
997
|
}
|
|
958
|
-
async handleInlineSuggestionShown(inlineCompletion, viewKind, viewData) {
|
|
959
|
-
await inlineCompletion.reportInlineEditShown(this._commandService, viewKind, viewData);
|
|
998
|
+
async handleInlineSuggestionShown(inlineCompletion, viewKind, viewData, timeWhenShown) {
|
|
999
|
+
await inlineCompletion.reportInlineEditShown(this._commandService, viewKind, viewData, this.textModel, timeWhenShown);
|
|
960
1000
|
}
|
|
961
1001
|
};
|
|
962
1002
|
InlineCompletionsModel = __decorate([
|
|
@@ -966,7 +1006,8 @@ InlineCompletionsModel = __decorate([
|
|
|
966
1006
|
__param(10, IAccessibilityService),
|
|
967
1007
|
__param(11, ILanguageFeaturesService),
|
|
968
1008
|
__param(12, ICodeEditorService),
|
|
969
|
-
__param(13, IInlineCompletionsService)
|
|
1009
|
+
__param(13, IInlineCompletionsService),
|
|
1010
|
+
__param(14, IDefaultAccountService)
|
|
970
1011
|
], InlineCompletionsModel);
|
|
971
1012
|
export { InlineCompletionsModel };
|
|
972
1013
|
export var VersionIdChangeReason;
|
|
@@ -1041,4 +1082,26 @@ export function isSuggestionInViewport(editor, suggestion, reader = undefined) {
|
|
|
1041
1082
|
const viewportRange = new Range(visibleRanges[0].startLineNumber, visibleRanges[0].startColumn, visibleRanges[visibleRanges.length - 1].endLineNumber, visibleRanges[visibleRanges.length - 1].endColumn);
|
|
1042
1083
|
return viewportRange.containsRange(targetRange);
|
|
1043
1084
|
}
|
|
1085
|
+
function skuFromAccount(account) {
|
|
1086
|
+
if (account?.access_type_sku && account?.copilot_plan) {
|
|
1087
|
+
return { type: account.access_type_sku, plan: account.copilot_plan };
|
|
1088
|
+
}
|
|
1089
|
+
return undefined;
|
|
1090
|
+
}
|
|
1091
|
+
class DisposableCallback {
|
|
1092
|
+
constructor(cb) {
|
|
1093
|
+
this.handler = (val) => {
|
|
1094
|
+
return this._cb?.(val);
|
|
1095
|
+
};
|
|
1096
|
+
this._cb = cb;
|
|
1097
|
+
}
|
|
1098
|
+
dispose() {
|
|
1099
|
+
this._cb = undefined;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
function createDisposableCb(cb, store) {
|
|
1103
|
+
const dcb = new DisposableCallback(cb);
|
|
1104
|
+
store.add(dcb);
|
|
1105
|
+
return dcb.handler;
|
|
1106
|
+
}
|
|
1044
1107
|
//# sourceMappingURL=inlineCompletionsModel.js.map
|