monaco-editor-core 0.56.0-dev-20251125 → 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 +30 -4
- 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/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 +0 -3
- 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 +1 -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 -70
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +59 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +152 -95
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +113 -54
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +317 -75
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
- 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 -15
- 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 +34 -3
- 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 -5
- 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 +34 -3
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.ts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,EAAE,CAAC;IACzD,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IACpC,IAAI,CAAC,SAAS,EAAE,CAAC;QAChB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;IAC/B,IAAI,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrE,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,WAAW,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACzF,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,UAAU,CAAC;IAC/D,CAAC;IAED,OAAO,CAAC,CAAC;AACV,CAAC;AAED,SAAS,kBAAkB,CAAC,GAAW,EAAE,MAAc;IACtD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC;IACV,CAAC;IACD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC;QAClC,KAAK,EAAE,CAAC;QACR,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC","file":"inlineSuggestionsView.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { createStyleSheetFromObservable } from '../../../../../base/browser/domStylesheets.js';\nimport { createHotClass } from '../../../../../base/common/hotReloadHelpers.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { derived, mapObservableArrayCached, derivedDisposable, derivedObservableWithCache, IObservable, ISettableObservable, constObservable, observableValue } from '../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../common/core/ranges/lineRange.js';\nimport { InlineCompletionsHintsWidget } from '../hintsWidget/inlineCompletionsHintsWidget.js';\nimport { GhostTextOrReplacement } from '../model/ghostText.js';\nimport { InlineCompletionsModel } from '../model/inlineCompletionsModel.js';\nimport { InlineCompletionItem } from '../model/inlineSuggestionItem.js';\nimport { convertItemsToStableObservables } from '../utils.js';\nimport { GhostTextView, GhostTextWidgetWarning, IGhostTextWidgetData } from './ghostText/ghostTextView.js';\nimport { InlineEditsGutterIndicator, InlineEditsGutterIndicatorData, InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from './inlineEdits/components/gutterIndicatorView.js';\nimport { InlineEditsOnboardingExperience } from './inlineEdits/inlineEditsNewUsers.js';\nimport { InlineCompletionViewKind, InlineEditTabAction } from './inlineEdits/inlineEditsViewInterface.js';\nimport { InlineEditsViewAndDiffProducer } from './inlineEdits/inlineEditsViewProducer.js';\n\nexport class InlineSuggestionsView extends Disposable {\n\tpublic static hot = createHotClass(this);\n\n\tprivate readonly _ghostTexts = derived(this, (reader) => {\n\t\tconst model = this._model.read(reader);\n\t\treturn model?.ghostTexts.read(reader) ?? [];\n\t});\n\n\tprivate readonly _stablizedGhostTexts;\n\tprivate readonly _editorObs;\n\tprivate readonly _ghostTextWidgets;\n\n\tprivate readonly _inlineEdit = derived(this, reader => this._model.read(reader)?.inlineEditState.read(reader)?.inlineEdit);\n\tprivate readonly _everHadInlineEdit = derivedObservableWithCache<boolean>(this,\n\t\t(reader, last) => last || !!this._inlineEdit.read(reader)\n\t\t\t|| !!this._model.read(reader)?.inlineCompletionState.read(reader)?.inlineSuggestion?.showInlineEditMenu\n\t);\n\n\t// To break a cyclic dependency\n\tprivate readonly _indicatorIsHoverVisible = observableValue<IObservable<boolean> | undefined>(this, undefined);\n\n\tprivate readonly _showInlineEditCollapsed = derived(this, reader => {\n\t\tconst s = this._model.read(reader)?.showCollapsed.read(reader) ?? false;\n\t\treturn s && !this._indicatorIsHoverVisible.read(reader)?.read(reader);\n\t});\n\n\tprivate readonly _inlineEditWidget = derivedDisposable(reader => {\n\t\tif (!this._everHadInlineEdit.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this._instantiationService.createInstance(InlineEditsViewAndDiffProducer, this._editor, this._inlineEdit, this._model, this._showInlineEditCollapsed);\n\t});\n\n\tprivate readonly _fontFamily;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _model: IObservable<InlineCompletionsModel | undefined>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper();\n\n\t\tthis._stablizedGhostTexts = convertItemsToStableObservables(this._ghostTexts, this._store);\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._ghostTextWidgets = mapObservableArrayCached(\n\t\t\tthis,\n\t\t\tthis._stablizedGhostTexts,\n\t\t\t(ghostText, store) => store.add(this._createGhostText(ghostText))\n\t\t).recomputeInitiallyAndOnChange(this._store);\n\n\t\tthis._inlineEditWidget.recomputeInitiallyAndOnChange(this._store);\n\n\t\tthis._fontFamily = this._editorObs.getOption(EditorOption.inlineSuggest).map(val => val.fontFamily);\n\n\t\tthis._register(createStyleSheetFromObservable(derived(reader => {\n\t\t\tconst fontFamily = this._fontFamily.read(reader);\n\t\t\treturn `\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${fontFamily};\n}`;\n\t\t})));\n\n\t\tthis._register(new InlineCompletionsHintsWidget(this._editor, this._model, this._instantiationService));\n\n\t\tthis._indicator = this._register(this._instantiationService.createInstance(\n\t\t\tInlineEditsGutterIndicator,\n\t\t\tthis._editorObs,\n\t\t\tderived(reader => {\n\t\t\t\tconst s = this._gutterIndicatorState.read(reader);\n\t\t\t\tif (!s) { return undefined; }\n\t\t\t\treturn new InlineEditsGutterIndicatorData(\n\t\t\t\t\tInlineSuggestionGutterMenuData.fromInlineSuggestion(s.inlineSuggestion),\n\t\t\t\t\ts.displayRange,\n\t\t\t\t\tSimpleInlineSuggestModel.fromInlineCompletionModel(s.model),\n\t\t\t\t);\n\t\t\t}),\n\t\t\tthis._gutterIndicatorState.map((s, reader) => s?.tabAction.read(reader) ?? InlineEditTabAction.Inactive),\n\t\t\tthis._gutterIndicatorState.map((s, reader) => s?.gutterIndicatorOffset.read(reader) ?? 0),\n\t\t\tthis._inlineEditWidget.map((w, reader) => w?.view.inlineEditsIsHovered.read(reader) ?? false),\n\t\t\tthis._focusIsInMenu,\n\t\t));\n\t\tthis._indicatorIsHoverVisible.set(this._indicator.isHoverVisible, undefined);\n\n\t\tderived(reader => {\n\t\t\tconst w = this._inlineEditWidget.read(reader);\n\t\t\tif (!w) { return undefined; }\n\t\t\treturn reader.store.add(this._instantiationService.createInstance(\n\t\t\t\tInlineEditsOnboardingExperience,\n\t\t\t\tw._inlineEditModel,\n\t\t\t\tconstObservable(this._indicator),\n\t\t\t\tw.view._inlineCollapsedView,\n\t\t\t));\n\t\t}).recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate _createGhostText(ghostText: IObservable<GhostTextOrReplacement>): GhostTextView {\n\t\treturn this._instantiationService.createInstance(\n\t\t\tGhostTextView,\n\t\t\tthis._editor,\n\t\t\tderived(reader => {\n\t\t\t\tconst model = this._model.read(reader);\n\t\t\t\tconst inlineCompletion = model?.inlineCompletionState.read(reader)?.inlineSuggestion;\n\t\t\t\tif (!model || !inlineCompletion) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tghostText: ghostText.read(reader),\n\t\t\t\t\thandleInlineCompletionShown: (viewData) => model.handleInlineSuggestionShown(inlineCompletion, InlineCompletionViewKind.GhostText, viewData),\n\t\t\t\t\twarning: GhostTextWidgetWarning.from(model?.warning.read(reader)),\n\t\t\t\t} satisfies IGhostTextWidgetData;\n\t\t\t}),\n\t\t\t{\n\t\t\t\tuseSyntaxHighlighting: this._editorObs.getOption(EditorOption.inlineSuggest).map(v => v.syntaxHighlightingEnabled),\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic shouldShowHoverAtViewZone(viewZoneId: string): boolean {\n\t\treturn this._ghostTextWidgets.get()[0]?.ownsViewZone(viewZoneId) ?? false;\n\t}\n\n\tprivate readonly _gutterIndicatorState = derived(reader => {\n\t\tconst model = this._model.read(reader);\n\t\tif (!model) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst state = model.state.read(reader);\n\n\t\tif (state?.kind === 'ghostText' && state.inlineSuggestion?.showInlineEditMenu) {\n\t\t\treturn {\n\t\t\t\tdisplayRange: LineRange.ofLength(state.primaryGhostText.lineNumber, 1),\n\t\t\t\ttabAction: derived<InlineEditTabAction>(this,\n\t\t\t\t\treader => this._editorObs.isFocused.read(reader) ? InlineEditTabAction.Accept : InlineEditTabAction.Inactive\n\t\t\t\t),\n\t\t\t\tgutterIndicatorOffset: constObservable(getGhostTextTopOffset(state.inlineSuggestion, this._editor)),\n\t\t\t\tinlineSuggestion: state.inlineSuggestion,\n\t\t\t\tmodel,\n\t\t\t};\n\t\t} else if (state?.kind === 'inlineEdit') {\n\t\t\tconst inlineEditWidget = this._inlineEditWidget.read(reader)?.view;\n\t\t\tif (!inlineEditWidget) { return undefined; }\n\n\t\t\tconst displayRange = inlineEditWidget.displayRange.read(reader);\n\t\t\tif (!displayRange) { return undefined; }\n\t\t\treturn {\n\t\t\t\tdisplayRange,\n\t\t\t\ttabAction: derived(reader => {\n\t\t\t\t\tif (this._editorObs.isFocused.read(reader)) {\n\t\t\t\t\t\tif (model.tabShouldJumpToInlineEdit.read(reader)) { return InlineEditTabAction.Jump; }\n\t\t\t\t\t\tif (model.tabShouldAcceptInlineEdit.read(reader)) { return InlineEditTabAction.Accept; }\n\t\t\t\t\t}\n\t\t\t\t\treturn InlineEditTabAction.Inactive;\n\t\t\t\t}),\n\t\t\t\tgutterIndicatorOffset: inlineEditWidget.gutterIndicatorOffset,\n\t\t\t\tinlineSuggestion: state.inlineSuggestion,\n\t\t\t\tmodel,\n\t\t\t};\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t});\n\n\tprotected readonly _indicator;\n}\n\nfunction getGhostTextTopOffset(inlineCompletion: InlineCompletionItem, editor: ICodeEditor): number {\n\tconst replacement = inlineCompletion.getSingleTextEdit();\n\tconst textModel = editor.getModel();\n\tif (!textModel) {\n\t\treturn 0;\n\t}\n\n\tconst EOL = textModel.getEOL();\n\tif (replacement.range.isEmpty() && replacement.text.startsWith(EOL)) {\n\t\tconst lineHeight = editor.getLineHeightForPosition(replacement.range.getStartPosition());\n\t\treturn countPrefixRepeats(replacement.text, EOL) * lineHeight;\n\t}\n\n\treturn 0;\n}\n\nfunction countPrefixRepeats(str: string, prefix: string): number {\n\tif (!prefix.length) {\n\t\treturn 0;\n\t}\n\tlet count = 0;\n\tlet i = 0;\n\twhile (str.startsWith(prefix, i)) {\n\t\tcount++;\n\t\ti += prefix.length;\n\t}\n\treturn count;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { createStyleSheetFromObservable } from '../../../../../base/browser/domStylesheets.js';\nimport { createHotClass } from '../../../../../base/common/hotReloadHelpers.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { derived, mapObservableArrayCached, derivedDisposable, derivedObservableWithCache, IObservable, ISettableObservable, constObservable, observableValue } from '../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../common/core/ranges/lineRange.js';\nimport { InlineCompletionsHintsWidget } from '../hintsWidget/inlineCompletionsHintsWidget.js';\nimport { GhostTextOrReplacement } from '../model/ghostText.js';\nimport { InlineCompletionsModel } from '../model/inlineCompletionsModel.js';\nimport { InlineCompletionItem } from '../model/inlineSuggestionItem.js';\nimport { convertItemsToStableObservables } from '../utils.js';\nimport { GhostTextView, GhostTextWidgetWarning, IGhostTextWidgetData } from './ghostText/ghostTextView.js';\nimport { InlineEditsGutterIndicator, InlineEditsGutterIndicatorData, InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from './inlineEdits/components/gutterIndicatorView.js';\nimport { InlineEditsOnboardingExperience } from './inlineEdits/inlineEditsNewUsers.js';\nimport { InlineCompletionViewKind, InlineEditTabAction } from './inlineEdits/inlineEditsViewInterface.js';\nimport { InlineEditsViewAndDiffProducer } from './inlineEdits/inlineEditsViewProducer.js';\n\nexport class InlineSuggestionsView extends Disposable {\n\tpublic static hot = createHotClass(this);\n\n\tprivate readonly _ghostTexts = derived(this, (reader) => {\n\t\tconst model = this._model.read(reader);\n\t\treturn model?.ghostTexts.read(reader) ?? [];\n\t});\n\n\tprivate readonly _stablizedGhostTexts;\n\tprivate readonly _editorObs;\n\tprivate readonly _ghostTextWidgets;\n\n\tprivate readonly _inlineEdit = derived(this, reader => this._model.read(reader)?.inlineEditState.read(reader)?.inlineEdit);\n\tprivate readonly _everHadInlineEdit = derivedObservableWithCache<boolean>(this,\n\t\t(reader, last) => last || !!this._inlineEdit.read(reader)\n\t\t\t|| !!this._model.read(reader)?.inlineCompletionState.read(reader)?.inlineSuggestion?.showInlineEditMenu\n\t);\n\n\t// To break a cyclic dependency\n\tprivate readonly _indicatorIsHoverVisible = observableValue<IObservable<boolean> | undefined>(this, undefined);\n\n\tprivate readonly _showInlineEditCollapsed = derived(this, reader => {\n\t\tconst s = this._model.read(reader)?.showCollapsed.read(reader) ?? false;\n\t\treturn s && !this._indicatorIsHoverVisible.read(reader)?.read(reader);\n\t});\n\n\tprivate readonly _inlineEditWidget = derivedDisposable(reader => {\n\t\tif (!this._everHadInlineEdit.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this._instantiationService.createInstance(InlineEditsViewAndDiffProducer, this._editor, this._inlineEdit, this._model, this._showInlineEditCollapsed);\n\t});\n\n\tprivate readonly _fontFamily;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _model: IObservable<InlineCompletionsModel | undefined>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper();\n\n\t\tthis._stablizedGhostTexts = convertItemsToStableObservables(this._ghostTexts, this._store);\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._ghostTextWidgets = mapObservableArrayCached(\n\t\t\tthis,\n\t\t\tthis._stablizedGhostTexts,\n\t\t\t(ghostText, store) => store.add(this._createGhostText(ghostText))\n\t\t).recomputeInitiallyAndOnChange(this._store);\n\n\t\tthis._inlineEditWidget.recomputeInitiallyAndOnChange(this._store);\n\n\t\tthis._fontFamily = this._editorObs.getOption(EditorOption.inlineSuggest).map(val => val.fontFamily);\n\n\t\tthis._register(createStyleSheetFromObservable(derived(reader => {\n\t\t\tconst fontFamily = this._fontFamily.read(reader);\n\t\t\treturn `\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${fontFamily};\n}`;\n\t\t})));\n\n\t\tthis._register(new InlineCompletionsHintsWidget(this._editor, this._model, this._instantiationService));\n\n\t\tthis._indicator = this._register(this._instantiationService.createInstance(\n\t\t\tInlineEditsGutterIndicator,\n\t\t\tthis._editorObs,\n\t\t\tderived(reader => {\n\t\t\t\tconst s = this._gutterIndicatorState.read(reader);\n\t\t\t\tif (!s) { return undefined; }\n\t\t\t\treturn new InlineEditsGutterIndicatorData(\n\t\t\t\t\tInlineSuggestionGutterMenuData.fromInlineSuggestion(s.inlineSuggestion),\n\t\t\t\t\ts.displayRange,\n\t\t\t\t\tSimpleInlineSuggestModel.fromInlineCompletionModel(s.model),\n\t\t\t\t);\n\t\t\t}),\n\t\t\tthis._gutterIndicatorState.map((s, reader) => s?.tabAction.read(reader) ?? InlineEditTabAction.Inactive),\n\t\t\tthis._gutterIndicatorState.map((s, reader) => s?.gutterIndicatorOffset.read(reader) ?? 0),\n\t\t\tthis._inlineEditWidget.map((w, reader) => w?.view.inlineEditsIsHovered.read(reader) ?? false),\n\t\t\tthis._focusIsInMenu,\n\t\t));\n\t\tthis._indicatorIsHoverVisible.set(this._indicator.isHoverVisible, undefined);\n\n\t\tderived(reader => {\n\t\t\tconst w = this._inlineEditWidget.read(reader);\n\t\t\tif (!w) { return undefined; }\n\t\t\treturn reader.store.add(this._instantiationService.createInstance(\n\t\t\t\tInlineEditsOnboardingExperience,\n\t\t\t\tw._inlineEditModel,\n\t\t\t\tconstObservable(this._indicator),\n\t\t\t\tw.view._inlineCollapsedView,\n\t\t\t));\n\t\t}).recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate _createGhostText(ghostText: IObservable<GhostTextOrReplacement>): GhostTextView {\n\t\treturn this._instantiationService.createInstance(\n\t\t\tGhostTextView,\n\t\t\tthis._editor,\n\t\t\tderived(reader => {\n\t\t\t\tconst model = this._model.read(reader);\n\t\t\t\tconst inlineCompletion = model?.inlineCompletionState.read(reader)?.inlineSuggestion;\n\t\t\t\tif (!model || !inlineCompletion) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tghostText: ghostText.read(reader),\n\t\t\t\t\thandleInlineCompletionShown: (viewData) => model.handleInlineSuggestionShown(inlineCompletion, InlineCompletionViewKind.GhostText, viewData),\n\t\t\t\t\twarning: GhostTextWidgetWarning.from(model?.warning.read(reader)),\n\t\t\t\t} satisfies IGhostTextWidgetData;\n\t\t\t}),\n\t\t\t{\n\t\t\t\tuseSyntaxHighlighting: this._editorObs.getOption(EditorOption.inlineSuggest).map(v => v.syntaxHighlightingEnabled),\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic shouldShowHoverAtViewZone(viewZoneId: string): boolean {\n\t\treturn this._ghostTextWidgets.get()[0]?.ownsViewZone(viewZoneId) ?? false;\n\t}\n\n\tprivate readonly _gutterIndicatorState = derived(reader => {\n\t\tconst model = this._model.read(reader);\n\t\tif (!model) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst state = model.state.read(reader);\n\n\t\tif (state?.kind === 'ghostText' && state.inlineSuggestion?.showInlineEditMenu) {\n\t\t\treturn {\n\t\t\t\tdisplayRange: LineRange.ofLength(state.primaryGhostText.lineNumber, 1),\n\t\t\t\ttabAction: derived<InlineEditTabAction>(this,\n\t\t\t\t\treader => this._editorObs.isFocused.read(reader) ? InlineEditTabAction.Accept : InlineEditTabAction.Inactive\n\t\t\t\t),\n\t\t\t\tgutterIndicatorOffset: constObservable(getGhostTextTopOffset(state.inlineSuggestion, this._editor)),\n\t\t\t\tinlineSuggestion: state.inlineSuggestion,\n\t\t\t\tmodel,\n\t\t\t};\n\t\t} else if (state?.kind === 'inlineEdit') {\n\t\t\tconst inlineEditWidget = this._inlineEditWidget.read(reader)?.view;\n\t\t\tif (!inlineEditWidget) { return undefined; }\n\n\t\t\tconst displayRange = inlineEditWidget.displayRange.read(reader);\n\t\t\tif (!displayRange) { return undefined; }\n\t\t\treturn {\n\t\t\t\tdisplayRange,\n\t\t\t\ttabAction: derived(reader => {\n\t\t\t\t\tif (this._editorObs.isFocused.read(reader)) {\n\t\t\t\t\t\tif (model.tabShouldJumpToInlineEdit.read(reader)) { return InlineEditTabAction.Jump; }\n\t\t\t\t\t\tif (model.tabShouldAcceptInlineEdit.read(reader)) { return InlineEditTabAction.Accept; }\n\t\t\t\t\t}\n\t\t\t\t\treturn InlineEditTabAction.Inactive;\n\t\t\t\t}),\n\t\t\t\tgutterIndicatorOffset: inlineEditWidget.gutterIndicatorOffset,\n\t\t\t\tinlineSuggestion: state.inlineSuggestion,\n\t\t\t\tmodel,\n\t\t\t};\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t});\n\n\tprotected readonly _indicator;\n}\n\nfunction getGhostTextTopOffset(inlineCompletion: InlineCompletionItem, editor: ICodeEditor): number {\n\tconst replacement = inlineCompletion.getSingleTextEdit();\n\tconst textModel = editor.getModel();\n\tif (!textModel) {\n\t\treturn 0;\n\t}\n\n\tconst EOL = textModel.getEOL();\n\tif (replacement.range.isEmpty() && replacement.text.startsWith(EOL)) {\n\t\tconst lineHeight = editor.getLineHeightForPosition(replacement.range.getStartPosition());\n\t\treturn countPrefixRepeats(replacement.text, EOL) * lineHeight;\n\t}\n\n\treturn 0;\n}\n\nfunction countPrefixRepeats(str: string, prefix: string): number {\n\tif (!prefix.length) {\n\t\treturn 0;\n\t}\n\tlet count = 0;\n\tlet i = 0;\n\twhile (str.startsWith(prefix, i)) {\n\t\tcount++;\n\t\ti += prefix.length;\n\t}\n\treturn count;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,wBAAwB,EAAE,iBAA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mB;IACzF,MAAM,WAAW,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,CAAC;IACzD,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IACpC,IAAI,CAAC,SAAS,EAAE,CAAC;QAChB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;IAC/B,IAAI,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrE,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,WAAW,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACzF,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,UAAU,CAAC;IAC/D,CAAC;IAED,OAAO,CAAC,CAAC;AACV,CAAC;AAED,SAAS,kBAAkB,CAAC,GAAW,EAAE,MAAc;IACtD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC;IACV,CAAC;IACD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC;QAClC,KAAK,EAAE,CAAC;QACR,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC;IACpB,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC","file":"inlineSuggestionsView.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { createStyleSheetFromObservable } from '../../../../../base/browser/domStylesheets.js';\nimport { createHotClass } from '../../../../../base/common/hotReloadHelpers.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { derived, mapObservableArrayCached, derivedDisposable, derivedObservableWithCache, IObservable, ISettableObservable, constObservable, observableValue } from '../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../common/core/ranges/lineRange.js';\nimport { InlineCompletionsHintsWidget } from '../hintsWidget/inlineCompletionsHintsWidget.js';\nimport { GhostTextOrReplacement } from '../model/ghostText.js';\nimport { InlineCompletionsModel } from '../model/inlineCompletionsModel.js';\nimport { InlineCompletionItem } from '../model/inlineSuggestionItem.js';\nimport { convertItemsToStableObservables } from '../utils.js';\nimport { GhostTextView, GhostTextWidgetWarning, IGhostTextWidgetData } from './ghostText/ghostTextView.js';\nimport { InlineEditsGutterIndicator, InlineEditsGutterIndicatorData, InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from './inlineEdits/components/gutterIndicatorView.js';\nimport { InlineEditsOnboardingExperience } from './inlineEdits/inlineEditsNewUsers.js';\nimport { InlineCompletionViewKind, InlineEditTabAction } from './inlineEdits/inlineEditsViewInterface.js';\nimport { InlineEditsViewAndDiffProducer } from './inlineEdits/inlineEditsViewProducer.js';\n\nexport class InlineSuggestionsView extends Disposable {\n\tpublic static hot = createHotClass(this);\n\n\tprivate readonly _ghostTexts = derived(this, (reader) => {\n\t\tconst model = this._model.read(reader);\n\t\treturn model?.ghostTexts.read(reader) ?? [];\n\t});\n\n\tprivate readonly _stablizedGhostTexts;\n\tprivate readonly _editorObs;\n\tprivate readonly _ghostTextWidgets;\n\n\tprivate readonly _inlineEdit = derived(this, reader => this._model.read(reader)?.inlineEditState.read(reader)?.inlineSuggestion);\n\tprivate readonly _everHadInlineEdit = derivedObservableWithCache<boolean>(this,\n\t\t(reader, last) => last || !!this._inlineEdit.read(reader)\n\t\t\t|| !!this._model.read(reader)?.inlineCompletionState.read(reader)?.inlineSuggestion?.showInlineEditMenu\n\t);\n\n\t// To break a cyclic dependency\n\tprivate readonly _indicatorIsHoverVisible = observableValue<IObservable<boolean> | undefined>(this, undefined);\n\n\tprivate readonly _showInlineEditCollapsed = derived(this, reader => {\n\t\tconst s = this._model.read(reader)?.showCollapsed.read(reader) ?? false;\n\t\treturn s && !this._indicatorIsHoverVisible.read(reader)?.read(reader);\n\t});\n\n\tprivate readonly _inlineEditWidget = derivedDisposable(reader => {\n\t\tif (!this._everHadInlineEdit.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this._instantiationService.createInstance(InlineEditsViewAndDiffProducer, this._editor, this._model, this._showInlineEditCollapsed);\n\t});\n\n\tprivate readonly _fontFamily;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _model: IObservable<InlineCompletionsModel | undefined>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper();\n\n\t\tthis._stablizedGhostTexts = convertItemsToStableObservables(this._ghostTexts, this._store);\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._ghostTextWidgets = mapObservableArrayCached(\n\t\t\tthis,\n\t\t\tthis._stablizedGhostTexts,\n\t\t\t(ghostText, store) => store.add(this._createGhostText(ghostText))\n\t\t).recomputeInitiallyAndOnChange(this._store);\n\n\t\tthis._inlineEditWidget.recomputeInitiallyAndOnChange(this._store);\n\n\t\tthis._fontFamily = this._editorObs.getOption(EditorOption.inlineSuggest).map(val => val.fontFamily);\n\n\t\tthis._register(createStyleSheetFromObservable(derived(reader => {\n\t\t\tconst fontFamily = this._fontFamily.read(reader);\n\t\t\treturn `\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${fontFamily};\n}`;\n\t\t})));\n\n\t\tthis._register(new InlineCompletionsHintsWidget(this._editor, this._model, this._instantiationService));\n\n\t\tthis._indicator = this._register(this._instantiationService.createInstance(\n\t\t\tInlineEditsGutterIndicator,\n\t\t\tthis._editorObs,\n\t\t\tderived(reader => {\n\t\t\t\tconst s = this._gutterIndicatorState.read(reader);\n\t\t\t\tif (!s) { return undefined; }\n\t\t\t\treturn new InlineEditsGutterIndicatorData(\n\t\t\t\t\tInlineSuggestionGutterMenuData.fromInlineSuggestion(s.inlineSuggestion),\n\t\t\t\t\ts.displayRange,\n\t\t\t\t\tSimpleInlineSuggestModel.fromInlineCompletionModel(s.model),\n\t\t\t\t\ts.inlineSuggestion.action?.kind === 'edit' ? s.inlineSuggestion.action.alternativeAction : undefined,\n\t\t\t\t);\n\t\t\t}),\n\t\t\tthis._gutterIndicatorState.map((s, reader) => s?.tabAction.read(reader) ?? InlineEditTabAction.Inactive),\n\t\t\tthis._gutterIndicatorState.map((s, reader) => s?.gutterIndicatorOffset.read(reader) ?? 0),\n\t\t\tthis._inlineEditWidget.map((w, reader) => w?.view.inlineEditsIsHovered.read(reader) ?? false),\n\t\t\tthis._focusIsInMenu,\n\t\t));\n\t\tthis._indicatorIsHoverVisible.set(this._indicator.isHoverVisible, undefined);\n\n\t\tderived(reader => {\n\t\t\tconst w = this._inlineEditWidget.read(reader);\n\t\t\tif (!w) { return undefined; }\n\t\t\treturn reader.store.add(this._instantiationService.createInstance(\n\t\t\t\tInlineEditsOnboardingExperience,\n\t\t\t\tw._inlineEditModel,\n\t\t\t\tconstObservable(this._indicator),\n\t\t\t\tw.view._inlineCollapsedView,\n\t\t\t));\n\t\t}).recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate _createGhostText(ghostText: IObservable<GhostTextOrReplacement>): GhostTextView {\n\t\treturn this._instantiationService.createInstance(\n\t\t\tGhostTextView,\n\t\t\tthis._editor,\n\t\t\tderived(reader => {\n\t\t\t\tconst model = this._model.read(reader);\n\t\t\t\tconst inlineCompletion = model?.inlineCompletionState.read(reader)?.inlineSuggestion;\n\t\t\t\tif (!model || !inlineCompletion) {\n\t\t\t\t\t// editor.suggest.preview: true causes situations where we have ghost text, but no suggest preview.\n\t\t\t\t\treturn {\n\t\t\t\t\t\tghostText: ghostText.read(reader),\n\t\t\t\t\t\thandleInlineCompletionShown: () => { /* no-op */ },\n\t\t\t\t\t\twarning: undefined,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tghostText: ghostText.read(reader),\n\t\t\t\t\thandleInlineCompletionShown: (viewData) => model.handleInlineSuggestionShown(inlineCompletion, InlineCompletionViewKind.GhostText, viewData, Date.now()),\n\t\t\t\t\twarning: GhostTextWidgetWarning.from(model?.warning.read(reader)),\n\t\t\t\t} satisfies IGhostTextWidgetData;\n\t\t\t}),\n\t\t\t{\n\t\t\t\tuseSyntaxHighlighting: this._editorObs.getOption(EditorOption.inlineSuggest).map(v => v.syntaxHighlightingEnabled),\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic shouldShowHoverAtViewZone(viewZoneId: string): boolean {\n\t\treturn this._ghostTextWidgets.get()[0]?.ownsViewZone(viewZoneId) ?? false;\n\t}\n\n\tprivate readonly _gutterIndicatorState = derived(reader => {\n\t\tconst model = this._model.read(reader);\n\t\tif (!model) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst state = model.state.read(reader);\n\n\t\tif (state?.kind === 'ghostText' && state.inlineSuggestion?.showInlineEditMenu) {\n\t\t\treturn {\n\t\t\t\tdisplayRange: LineRange.ofLength(state.primaryGhostText.lineNumber, 1),\n\t\t\t\ttabAction: derived<InlineEditTabAction>(this,\n\t\t\t\t\treader => this._editorObs.isFocused.read(reader) ? InlineEditTabAction.Accept : InlineEditTabAction.Inactive\n\t\t\t\t),\n\t\t\t\tgutterIndicatorOffset: constObservable(getGhostTextTopOffset(state.inlineSuggestion, this._editor)),\n\t\t\t\tinlineSuggestion: state.inlineSuggestion,\n\t\t\t\tmodel,\n\t\t\t};\n\t\t} else if (state?.kind === 'inlineEdit') {\n\t\t\tconst inlineEditWidget = this._inlineEditWidget.read(reader)?.view;\n\t\t\tif (!inlineEditWidget) { return undefined; }\n\n\t\t\tconst displayRange = inlineEditWidget.displayRange.read(reader);\n\t\t\tif (!displayRange) { return undefined; }\n\t\t\treturn {\n\t\t\t\tdisplayRange,\n\t\t\t\ttabAction: derived(reader => {\n\t\t\t\t\tif (this._editorObs.isFocused.read(reader)) {\n\t\t\t\t\t\tif (model.tabShouldJumpToInlineEdit.read(reader)) { return InlineEditTabAction.Jump; }\n\t\t\t\t\t\tif (model.tabShouldAcceptInlineEdit.read(reader)) { return InlineEditTabAction.Accept; }\n\t\t\t\t\t}\n\t\t\t\t\treturn InlineEditTabAction.Inactive;\n\t\t\t\t}),\n\t\t\t\tgutterIndicatorOffset: inlineEditWidget.gutterIndicatorOffset,\n\t\t\t\tinlineSuggestion: state.inlineSuggestion,\n\t\t\t\tmodel,\n\t\t\t};\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t});\n\n\tprotected readonly _indicator;\n}\n\nfunction getGhostTextTopOffset(inlineCompletion: InlineCompletionItem, editor: ICodeEditor): number {\n\tconst replacement = inlineCompletion.getSingleTextEdit();\n\tconst textModel = editor.getModel();\n\tif (!textModel) {\n\t\treturn 0;\n\t}\n\n\tconst EOL = textModel.getEOL();\n\tif (replacement.range.isEmpty() && replacement.text.startsWith(EOL)) {\n\t\tconst lineHeight = editor.getLineHeightForPosition(replacement.range.getStartPosition());\n\t\treturn countPrefixRepeats(replacement.text, EOL) * lineHeight;\n\t}\n\n\treturn 0;\n}\n\nfunction countPrefixRepeats(str: string, prefix: string): number {\n\tif (!prefix.length) {\n\t\treturn 0;\n\t}\n\tlet count = 0;\n\tlet i = 0;\n\twhile (str.startsWith(prefix, i)) {\n\t\tcount++;\n\t\ti += prefix.length;\n\t}\n\treturn count;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { createStyleSheetFromObservable } from '../../../../../base/browser/domStylesheets.js';\nimport { createHotClass } from '../../../../../base/common/hotReloadHelpers.js';\nimport { Disposable } from '../../../../../base/common/lifecycle.js';\nimport { derived, mapObservableArrayCached, derivedDisposable, derivedObservableWithCache, IObservable, ISettableObservable, constObservable, observableValue } from '../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../common/core/ranges/lineRange.js';\nimport { InlineCompletionsHintsWidget } from '../hintsWidget/inlineCompletionsHintsWidget.js';\nimport { GhostTextOrReplacement } from '../model/ghostText.js';\nimport { InlineCompletionsModel } from '../model/inlineCompletionsModel.js';\nimport { InlineCompletionItem } from '../model/inlineSuggestionItem.js';\nimport { convertItemsToStableObservables } from '../utils.js';\nimport { GhostTextView, GhostTextWidgetWarning, IGhostTextWidgetData } from './ghostText/ghostTextView.js';\nimport { InlineEditsGutterIndicator, InlineEditsGutterIndicatorData, InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from './inlineEdits/components/gutterIndicatorView.js';\nimport { InlineEditsOnboardingExperience } from './inlineEdits/inlineEditsNewUsers.js';\nimport { InlineCompletionViewKind, InlineEditTabAction } from './inlineEdits/inlineEditsViewInterface.js';\nimport { InlineEditsViewAndDiffProducer } from './inlineEdits/inlineEditsViewProducer.js';\n\nexport class InlineSuggestionsView extends Disposable {\n\tpublic static hot = createHotClass(this);\n\n\tprivate readonly _ghostTexts = derived(this, (reader) => {\n\t\tconst model = this._model.read(reader);\n\t\treturn model?.ghostTexts.read(reader) ?? [];\n\t});\n\n\tprivate readonly _stablizedGhostTexts;\n\tprivate readonly _editorObs;\n\tprivate readonly _ghostTextWidgets;\n\n\tprivate readonly _inlineEdit = derived(this, reader => this._model.read(reader)?.inlineEditState.read(reader)?.inlineSuggestion);\n\tprivate readonly _everHadInlineEdit = derivedObservableWithCache<boolean>(this,\n\t\t(reader, last) => last || !!this._inlineEdit.read(reader)\n\t\t\t|| !!this._model.read(reader)?.inlineCompletionState.read(reader)?.inlineSuggestion?.showInlineEditMenu\n\t);\n\n\t// To break a cyclic dependency\n\tprivate readonly _indicatorIsHoverVisible = observableValue<IObservable<boolean> | undefined>(this, undefined);\n\n\tprivate readonly _showInlineEditCollapsed = derived(this, reader => {\n\t\tconst s = this._model.read(reader)?.showCollapsed.read(reader) ?? false;\n\t\treturn s && !this._indicatorIsHoverVisible.read(reader)?.read(reader);\n\t});\n\n\tprivate readonly _inlineEditWidget = derivedDisposable(reader => {\n\t\tif (!this._everHadInlineEdit.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this._instantiationService.createInstance(InlineEditsViewAndDiffProducer, this._editor, this._model, this._showInlineEditCollapsed);\n\t});\n\n\tprivate readonly _fontFamily;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _model: IObservable<InlineCompletionsModel | undefined>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService\n\t) {\n\t\tsuper();\n\n\t\tthis._stablizedGhostTexts = convertItemsToStableObservables(this._ghostTexts, this._store);\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._ghostTextWidgets = mapObservableArrayCached(\n\t\t\tthis,\n\t\t\tthis._stablizedGhostTexts,\n\t\t\t(ghostText, store) => store.add(this._createGhostText(ghostText))\n\t\t).recomputeInitiallyAndOnChange(this._store);\n\n\t\tthis._inlineEditWidget.recomputeInitiallyAndOnChange(this._store);\n\n\t\tthis._fontFamily = this._editorObs.getOption(EditorOption.inlineSuggest).map(val => val.fontFamily);\n\n\t\tthis._register(createStyleSheetFromObservable(derived(reader => {\n\t\t\tconst fontFamily = this._fontFamily.read(reader);\n\t\t\treturn `\n.monaco-editor .ghost-text-decoration,\n.monaco-editor .ghost-text-decoration-preview,\n.monaco-editor .ghost-text {\n\tfont-family: ${fontFamily};\n}`;\n\t\t})));\n\n\t\tthis._register(new InlineCompletionsHintsWidget(this._editor, this._model, this._instantiationService));\n\n\t\tthis._indicator = this._register(this._instantiationService.createInstance(\n\t\t\tInlineEditsGutterIndicator,\n\t\t\tthis._editorObs,\n\t\t\tderived(reader => {\n\t\t\t\tconst s = this._gutterIndicatorState.read(reader);\n\t\t\t\tif (!s) { return undefined; }\n\t\t\t\treturn new InlineEditsGutterIndicatorData(\n\t\t\t\t\tInlineSuggestionGutterMenuData.fromInlineSuggestion(s.inlineSuggestion),\n\t\t\t\t\ts.displayRange,\n\t\t\t\t\tSimpleInlineSuggestModel.fromInlineCompletionModel(s.model),\n\t\t\t\t\ts.inlineSuggestion.action?.kind === 'edit' ? s.inlineSuggestion.action.alternativeAction : undefined,\n\t\t\t\t);\n\t\t\t}),\n\t\t\tthis._gutterIndicatorState.map((s, reader) => s?.tabAction.read(reader) ?? InlineEditTabAction.Inactive),\n\t\t\tthis._gutterIndicatorState.map((s, reader) => s?.gutterIndicatorOffset.read(reader) ?? 0),\n\t\t\tthis._inlineEditWidget.map((w, reader) => w?.view.inlineEditsIsHovered.read(reader) ?? false),\n\t\t\tthis._focusIsInMenu,\n\t\t));\n\t\tthis._indicatorIsHoverVisible.set(this._indicator.isHoverVisible, undefined);\n\n\t\tderived(reader => {\n\t\t\tconst w = this._inlineEditWidget.read(reader);\n\t\t\tif (!w) { return undefined; }\n\t\t\treturn reader.store.add(this._instantiationService.createInstance(\n\t\t\t\tInlineEditsOnboardingExperience,\n\t\t\t\tw._inlineEditModel,\n\t\t\t\tconstObservable(this._indicator),\n\t\t\t\tw.view._inlineCollapsedView,\n\t\t\t));\n\t\t}).recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate _createGhostText(ghostText: IObservable<GhostTextOrReplacement>): GhostTextView {\n\t\treturn this._instantiationService.createInstance(\n\t\t\tGhostTextView,\n\t\t\tthis._editor,\n\t\t\tderived(reader => {\n\t\t\t\tconst model = this._model.read(reader);\n\t\t\t\tconst inlineCompletion = model?.inlineCompletionState.read(reader)?.inlineSuggestion;\n\t\t\t\tif (!model || !inlineCompletion) {\n\t\t\t\t\t// editor.suggest.preview: true causes situations where we have ghost text, but no suggest preview.\n\t\t\t\t\treturn {\n\t\t\t\t\t\tghostText: ghostText.read(reader),\n\t\t\t\t\t\thandleInlineCompletionShown: () => { /* no-op */ },\n\t\t\t\t\t\twarning: undefined,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tghostText: ghostText.read(reader),\n\t\t\t\t\thandleInlineCompletionShown: (viewData) => model.handleInlineSuggestionShown(inlineCompletion, InlineCompletionViewKind.GhostText, viewData, Date.now()),\n\t\t\t\t\twarning: GhostTextWidgetWarning.from(model?.warning.read(reader)),\n\t\t\t\t} satisfies IGhostTextWidgetData;\n\t\t\t}),\n\t\t\t{\n\t\t\t\tuseSyntaxHighlighting: this._editorObs.getOption(EditorOption.inlineSuggest).map(v => v.syntaxHighlightingEnabled),\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic shouldShowHoverAtViewZone(viewZoneId: string): boolean {\n\t\treturn this._ghostTextWidgets.get()[0]?.ownsViewZone(viewZoneId) ?? false;\n\t}\n\n\tprivate readonly _gutterIndicatorState = derived(reader => {\n\t\tconst model = this._model.read(reader);\n\t\tif (!model) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst state = model.state.read(reader);\n\n\t\tif (state?.kind === 'ghostText' && state.inlineSuggestion?.showInlineEditMenu) {\n\t\t\treturn {\n\t\t\t\tdisplayRange: LineRange.ofLength(state.primaryGhostText.lineNumber, 1),\n\t\t\t\ttabAction: derived<InlineEditTabAction>(this,\n\t\t\t\t\treader => this._editorObs.isFocused.read(reader) ? InlineEditTabAction.Accept : InlineEditTabAction.Inactive\n\t\t\t\t),\n\t\t\t\tgutterIndicatorOffset: constObservable(getGhostTextTopOffset(state.inlineSuggestion, this._editor)),\n\t\t\t\tinlineSuggestion: state.inlineSuggestion,\n\t\t\t\tmodel,\n\t\t\t};\n\t\t} else if (state?.kind === 'inlineEdit') {\n\t\t\tconst inlineEditWidget = this._inlineEditWidget.read(reader)?.view;\n\t\t\tif (!inlineEditWidget) { return undefined; }\n\n\t\t\tconst displayRange = inlineEditWidget.displayRange.read(reader);\n\t\t\tif (!displayRange) { return undefined; }\n\t\t\treturn {\n\t\t\t\tdisplayRange,\n\t\t\t\ttabAction: derived(reader => {\n\t\t\t\t\tif (this._editorObs.isFocused.read(reader)) {\n\t\t\t\t\t\tif (model.tabShouldJumpToInlineEdit.read(reader)) { return InlineEditTabAction.Jump; }\n\t\t\t\t\t\tif (model.tabShouldAcceptInlineEdit.read(reader)) { return InlineEditTabAction.Accept; }\n\t\t\t\t\t}\n\t\t\t\t\treturn InlineEditTabAction.Inactive;\n\t\t\t\t}),\n\t\t\t\tgutterIndicatorOffset: inlineEditWidget.gutterIndicatorOffset,\n\t\t\t\tinlineSuggestion: state.inlineSuggestion,\n\t\t\t\tmodel,\n\t\t\t};\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t});\n\n\tprotected readonly _indicator;\n}\n\nfunction getGhostTextTopOffset(inlineCompletion: InlineCompletionItem, editor: ICodeEditor): number {\n\tconst replacement = inlineCompletion.getSingleTextEdit();\n\tconst textModel = editor.getModel();\n\tif (!textModel) {\n\t\treturn 0;\n\t}\n\n\tconst EOL = textModel.getEOL();\n\tif (replacement.range.isEmpty() && replacement.text.startsWith(EOL)) {\n\t\tconst lineHeight = editor.getLineHeightForPosition(replacement.range.getStartPosition());\n\t\treturn countPrefixRepeats(replacement.text, EOL) * lineHeight;\n\t}\n\n\treturn 0;\n}\n\nfunction countPrefixRepeats(str: string, prefix: string): number {\n\tif (!prefix.length) {\n\t\treturn 0;\n\t}\n\tlet count = 0;\n\tlet i = 0;\n\twhile (str.startsWith(prefix, i)) {\n\t\tcount++;\n\t\ti += prefix.length;\n\t}\n\treturn count;\n}\n"]}
|
|
@@ -11,7 +11,7 @@ export class InsertFinalNewLineAction extends EditorAction {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: InsertFinalNewLineAction.ID,
|
|
14
|
-
label: nls.localize2(
|
|
14
|
+
label: nls.localize2(1255, "Insert Final New Line"),
|
|
15
15
|
precondition: EditorContextKeys.writable
|
|
16
16
|
});
|
|
17
17
|
}
|
|
@@ -10,7 +10,7 @@ export class ExpandLineSelectionAction extends EditorAction {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super({
|
|
12
12
|
id: 'expandLineSelection',
|
|
13
|
-
label: nls.localize2(
|
|
13
|
+
label: nls.localize2(1256, "Expand Line Selection"),
|
|
14
14
|
precondition: undefined,
|
|
15
15
|
kbOpts: {
|
|
16
16
|
weight: 0 /* KeybindingWeight.EditorCore */,
|
|
@@ -63,7 +63,7 @@ class CopyLinesUpAction extends AbstractCopyLinesAction {
|
|
|
63
63
|
constructor() {
|
|
64
64
|
super(false, {
|
|
65
65
|
id: 'editor.action.copyLinesUpAction',
|
|
66
|
-
label: nls.localize2(
|
|
66
|
+
label: nls.localize2(1262, "Copy Line Up"),
|
|
67
67
|
precondition: EditorContextKeys.writable,
|
|
68
68
|
kbOpts: {
|
|
69
69
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -74,7 +74,7 @@ class CopyLinesUpAction extends AbstractCopyLinesAction {
|
|
|
74
74
|
menuOpts: {
|
|
75
75
|
menuId: MenuId.MenubarSelectionMenu,
|
|
76
76
|
group: '2_line',
|
|
77
|
-
title: nls.localize(
|
|
77
|
+
title: nls.localize(1257, "&&Copy Line Up"),
|
|
78
78
|
order: 1
|
|
79
79
|
},
|
|
80
80
|
canTriggerInlineEdits: true,
|
|
@@ -85,7 +85,7 @@ class CopyLinesDownAction extends AbstractCopyLinesAction {
|
|
|
85
85
|
constructor() {
|
|
86
86
|
super(true, {
|
|
87
87
|
id: 'editor.action.copyLinesDownAction',
|
|
88
|
-
label: nls.localize2(
|
|
88
|
+
label: nls.localize2(1263, "Copy Line Down"),
|
|
89
89
|
precondition: EditorContextKeys.writable,
|
|
90
90
|
kbOpts: {
|
|
91
91
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -96,7 +96,7 @@ class CopyLinesDownAction extends AbstractCopyLinesAction {
|
|
|
96
96
|
menuOpts: {
|
|
97
97
|
menuId: MenuId.MenubarSelectionMenu,
|
|
98
98
|
group: '2_line',
|
|
99
|
-
title: nls.localize(
|
|
99
|
+
title: nls.localize(1258, "Co&&py Line Down"),
|
|
100
100
|
order: 2
|
|
101
101
|
},
|
|
102
102
|
canTriggerInlineEdits: true,
|
|
@@ -107,12 +107,12 @@ export class DuplicateSelectionAction extends EditorAction {
|
|
|
107
107
|
constructor() {
|
|
108
108
|
super({
|
|
109
109
|
id: 'editor.action.duplicateSelection',
|
|
110
|
-
label: nls.localize2(
|
|
110
|
+
label: nls.localize2(1264, "Duplicate Selection"),
|
|
111
111
|
precondition: EditorContextKeys.writable,
|
|
112
112
|
menuOpts: {
|
|
113
113
|
menuId: MenuId.MenubarSelectionMenu,
|
|
114
114
|
group: '2_line',
|
|
115
|
-
title: nls.localize(
|
|
115
|
+
title: nls.localize(1259, "&&Duplicate Selection"),
|
|
116
116
|
order: 5
|
|
117
117
|
},
|
|
118
118
|
canTriggerInlineEdits: true,
|
|
@@ -162,7 +162,7 @@ class MoveLinesUpAction extends AbstractMoveLinesAction {
|
|
|
162
162
|
constructor() {
|
|
163
163
|
super(false, {
|
|
164
164
|
id: 'editor.action.moveLinesUpAction',
|
|
165
|
-
label: nls.localize2(
|
|
165
|
+
label: nls.localize2(1265, "Move Line Up"),
|
|
166
166
|
precondition: EditorContextKeys.writable,
|
|
167
167
|
kbOpts: {
|
|
168
168
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -173,7 +173,7 @@ class MoveLinesUpAction extends AbstractMoveLinesAction {
|
|
|
173
173
|
menuOpts: {
|
|
174
174
|
menuId: MenuId.MenubarSelectionMenu,
|
|
175
175
|
group: '2_line',
|
|
176
|
-
title: nls.localize(
|
|
176
|
+
title: nls.localize(1260, "Mo&&ve Line Up"),
|
|
177
177
|
order: 3
|
|
178
178
|
},
|
|
179
179
|
canTriggerInlineEdits: true,
|
|
@@ -184,7 +184,7 @@ class MoveLinesDownAction extends AbstractMoveLinesAction {
|
|
|
184
184
|
constructor() {
|
|
185
185
|
super(true, {
|
|
186
186
|
id: 'editor.action.moveLinesDownAction',
|
|
187
|
-
label: nls.localize2(
|
|
187
|
+
label: nls.localize2(1266, "Move Line Down"),
|
|
188
188
|
precondition: EditorContextKeys.writable,
|
|
189
189
|
kbOpts: {
|
|
190
190
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -195,7 +195,7 @@ class MoveLinesDownAction extends AbstractMoveLinesAction {
|
|
|
195
195
|
menuOpts: {
|
|
196
196
|
menuId: MenuId.MenubarSelectionMenu,
|
|
197
197
|
group: '2_line',
|
|
198
|
-
title: nls.localize(
|
|
198
|
+
title: nls.localize(1261, "Move &&Line Down"),
|
|
199
199
|
order: 4
|
|
200
200
|
},
|
|
201
201
|
canTriggerInlineEdits: true,
|
|
@@ -235,7 +235,7 @@ export class SortLinesAscendingAction extends AbstractSortLinesAction {
|
|
|
235
235
|
constructor() {
|
|
236
236
|
super(false, {
|
|
237
237
|
id: 'editor.action.sortLinesAscending',
|
|
238
|
-
label: nls.localize2(
|
|
238
|
+
label: nls.localize2(1267, "Sort Lines Ascending"),
|
|
239
239
|
precondition: EditorContextKeys.writable,
|
|
240
240
|
canTriggerInlineEdits: true,
|
|
241
241
|
});
|
|
@@ -245,7 +245,7 @@ export class SortLinesDescendingAction extends AbstractSortLinesAction {
|
|
|
245
245
|
constructor() {
|
|
246
246
|
super(true, {
|
|
247
247
|
id: 'editor.action.sortLinesDescending',
|
|
248
|
-
label: nls.localize2(
|
|
248
|
+
label: nls.localize2(1268, "Sort Lines Descending"),
|
|
249
249
|
precondition: EditorContextKeys.writable,
|
|
250
250
|
canTriggerInlineEdits: true,
|
|
251
251
|
});
|
|
@@ -255,7 +255,7 @@ export class DeleteDuplicateLinesAction extends EditorAction {
|
|
|
255
255
|
constructor() {
|
|
256
256
|
super({
|
|
257
257
|
id: 'editor.action.removeDuplicateLines',
|
|
258
|
-
label: nls.localize2(
|
|
258
|
+
label: nls.localize2(1269, "Delete Duplicate Lines"),
|
|
259
259
|
precondition: EditorContextKeys.writable,
|
|
260
260
|
canTriggerInlineEdits: true,
|
|
261
261
|
});
|
|
@@ -291,7 +291,7 @@ export class DeleteDuplicateLinesAction extends EditorAction {
|
|
|
291
291
|
}
|
|
292
292
|
const selectionToReplace = new Selection(selection.startLineNumber, 1, selection.endLineNumber, model.getLineMaxColumn(selection.endLineNumber));
|
|
293
293
|
const adjustedSelectionStart = selection.startLineNumber - linesDeleted;
|
|
294
|
-
const finalSelection = new Selection(adjustedSelectionStart, 1, adjustedSelectionStart + lines.length - 1, lines[lines.length - 1].length);
|
|
294
|
+
const finalSelection = new Selection(adjustedSelectionStart, 1, adjustedSelectionStart + lines.length - 1, lines[lines.length - 1].length + 1);
|
|
295
295
|
edits.push(EditOperation.replace(selectionToReplace, lines.join('\n')));
|
|
296
296
|
endCursorState.push(finalSelection);
|
|
297
297
|
linesDeleted += (selection.endLineNumber - selection.startLineNumber + 1) - lines.length;
|
|
@@ -305,7 +305,7 @@ export class ReverseLinesAction extends EditorAction {
|
|
|
305
305
|
constructor() {
|
|
306
306
|
super({
|
|
307
307
|
id: 'editor.action.reverseLines',
|
|
308
|
-
label: nls.localize2(
|
|
308
|
+
label: nls.localize2(1270, "Reverse lines"),
|
|
309
309
|
precondition: EditorContextKeys.writable,
|
|
310
310
|
canTriggerInlineEdits: true
|
|
311
311
|
});
|
|
@@ -372,7 +372,7 @@ export class TrimTrailingWhitespaceAction extends EditorAction {
|
|
|
372
372
|
constructor() {
|
|
373
373
|
super({
|
|
374
374
|
id: TrimTrailingWhitespaceAction.ID,
|
|
375
|
-
label: nls.localize2(
|
|
375
|
+
label: nls.localize2(1271, "Trim Trailing Whitespace"),
|
|
376
376
|
precondition: EditorContextKeys.writable,
|
|
377
377
|
kbOpts: {
|
|
378
378
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -406,7 +406,7 @@ export class DeleteLinesAction extends EditorAction {
|
|
|
406
406
|
constructor() {
|
|
407
407
|
super({
|
|
408
408
|
id: 'editor.action.deleteLines',
|
|
409
|
-
label: nls.localize2(
|
|
409
|
+
label: nls.localize2(1272, "Delete Line"),
|
|
410
410
|
precondition: EditorContextKeys.writable,
|
|
411
411
|
kbOpts: {
|
|
412
412
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -496,7 +496,7 @@ export class IndentLinesAction extends EditorAction {
|
|
|
496
496
|
constructor() {
|
|
497
497
|
super({
|
|
498
498
|
id: 'editor.action.indentLines',
|
|
499
|
-
label: nls.localize2(
|
|
499
|
+
label: nls.localize2(1273, "Indent Line"),
|
|
500
500
|
precondition: EditorContextKeys.writable,
|
|
501
501
|
kbOpts: {
|
|
502
502
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -520,7 +520,7 @@ class OutdentLinesAction extends EditorAction {
|
|
|
520
520
|
constructor() {
|
|
521
521
|
super({
|
|
522
522
|
id: 'editor.action.outdentLines',
|
|
523
|
-
label: nls.localize2(
|
|
523
|
+
label: nls.localize2(1274, "Outdent Line"),
|
|
524
524
|
precondition: EditorContextKeys.writable,
|
|
525
525
|
kbOpts: {
|
|
526
526
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -539,7 +539,7 @@ export class InsertLineBeforeAction extends EditorAction {
|
|
|
539
539
|
constructor() {
|
|
540
540
|
super({
|
|
541
541
|
id: InsertLineBeforeAction.ID,
|
|
542
|
-
label: nls.localize2(
|
|
542
|
+
label: nls.localize2(1275, "Insert Line Above"),
|
|
543
543
|
precondition: EditorContextKeys.writable,
|
|
544
544
|
kbOpts: {
|
|
545
545
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -563,7 +563,7 @@ export class InsertLineAfterAction extends EditorAction {
|
|
|
563
563
|
constructor() {
|
|
564
564
|
super({
|
|
565
565
|
id: InsertLineAfterAction.ID,
|
|
566
|
-
label: nls.localize2(
|
|
566
|
+
label: nls.localize2(1276, "Insert Line Below"),
|
|
567
567
|
precondition: EditorContextKeys.writable,
|
|
568
568
|
kbOpts: {
|
|
569
569
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -615,7 +615,7 @@ export class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction {
|
|
|
615
615
|
constructor() {
|
|
616
616
|
super({
|
|
617
617
|
id: 'deleteAllLeft',
|
|
618
|
-
label: nls.localize2(
|
|
618
|
+
label: nls.localize2(1277, "Delete All Left"),
|
|
619
619
|
precondition: EditorContextKeys.writable,
|
|
620
620
|
kbOpts: {
|
|
621
621
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -685,7 +685,7 @@ export class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction {
|
|
|
685
685
|
constructor() {
|
|
686
686
|
super({
|
|
687
687
|
id: 'deleteAllRight',
|
|
688
|
-
label: nls.localize2(
|
|
688
|
+
label: nls.localize2(1278, "Delete All Right"),
|
|
689
689
|
precondition: EditorContextKeys.writable,
|
|
690
690
|
kbOpts: {
|
|
691
691
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -743,7 +743,7 @@ export class JoinLinesAction extends EditorAction {
|
|
|
743
743
|
constructor() {
|
|
744
744
|
super({
|
|
745
745
|
id: 'editor.action.joinLines',
|
|
746
|
-
label: nls.localize2(
|
|
746
|
+
label: nls.localize2(1279, "Join Lines"),
|
|
747
747
|
precondition: EditorContextKeys.writable,
|
|
748
748
|
kbOpts: {
|
|
749
749
|
kbExpr: EditorContextKeys.editorTextFocus,
|
|
@@ -885,7 +885,7 @@ export class TransposeAction extends EditorAction {
|
|
|
885
885
|
constructor() {
|
|
886
886
|
super({
|
|
887
887
|
id: 'editor.action.transpose',
|
|
888
|
-
label: nls.localize2(
|
|
888
|
+
label: nls.localize2(1280, "Transpose Characters around the Cursor"),
|
|
889
889
|
precondition: EditorContextKeys.writable,
|
|
890
890
|
canTriggerInlineEdits: true,
|
|
891
891
|
});
|
|
@@ -965,7 +965,7 @@ export class UpperCaseAction extends AbstractCaseAction {
|
|
|
965
965
|
constructor() {
|
|
966
966
|
super({
|
|
967
967
|
id: 'editor.action.transformToUppercase',
|
|
968
|
-
label: nls.localize2(
|
|
968
|
+
label: nls.localize2(1281, "Transform to Uppercase"),
|
|
969
969
|
precondition: EditorContextKeys.writable,
|
|
970
970
|
canTriggerInlineEdits: true,
|
|
971
971
|
});
|
|
@@ -978,7 +978,7 @@ export class LowerCaseAction extends AbstractCaseAction {
|
|
|
978
978
|
constructor() {
|
|
979
979
|
super({
|
|
980
980
|
id: 'editor.action.transformToLowercase',
|
|
981
|
-
label: nls.localize2(
|
|
981
|
+
label: nls.localize2(1282, "Transform to Lowercase"),
|
|
982
982
|
precondition: EditorContextKeys.writable,
|
|
983
983
|
canTriggerInlineEdits: true
|
|
984
984
|
});
|
|
@@ -1015,7 +1015,7 @@ export class TitleCaseAction extends AbstractCaseAction {
|
|
|
1015
1015
|
constructor() {
|
|
1016
1016
|
super({
|
|
1017
1017
|
id: 'editor.action.transformToTitlecase',
|
|
1018
|
-
label: nls.localize2(
|
|
1018
|
+
label: nls.localize2(1283, "Transform to Title Case"),
|
|
1019
1019
|
precondition: EditorContextKeys.writable,
|
|
1020
1020
|
canTriggerInlineEdits: true
|
|
1021
1021
|
});
|
|
@@ -1037,7 +1037,7 @@ export class SnakeCaseAction extends AbstractCaseAction {
|
|
|
1037
1037
|
constructor() {
|
|
1038
1038
|
super({
|
|
1039
1039
|
id: 'editor.action.transformToSnakecase',
|
|
1040
|
-
label: nls.localize2(
|
|
1040
|
+
label: nls.localize2(1284, "Transform to Snake Case"),
|
|
1041
1041
|
precondition: EditorContextKeys.writable,
|
|
1042
1042
|
canTriggerInlineEdits: true,
|
|
1043
1043
|
});
|
|
@@ -1062,7 +1062,7 @@ export class CamelCaseAction extends AbstractCaseAction {
|
|
|
1062
1062
|
constructor() {
|
|
1063
1063
|
super({
|
|
1064
1064
|
id: 'editor.action.transformToCamelcase',
|
|
1065
|
-
label: nls.localize2(
|
|
1065
|
+
label: nls.localize2(1285, "Transform to Camel Case"),
|
|
1066
1066
|
precondition: EditorContextKeys.writable,
|
|
1067
1067
|
canTriggerInlineEdits: true
|
|
1068
1068
|
});
|
|
@@ -1087,7 +1087,7 @@ export class PascalCaseAction extends AbstractCaseAction {
|
|
|
1087
1087
|
constructor() {
|
|
1088
1088
|
super({
|
|
1089
1089
|
id: 'editor.action.transformToPascalcase',
|
|
1090
|
-
label: nls.localize2(
|
|
1090
|
+
label: nls.localize2(1286, "Transform to Pascal Case"),
|
|
1091
1091
|
precondition: EditorContextKeys.writable,
|
|
1092
1092
|
canTriggerInlineEdits: true,
|
|
1093
1093
|
});
|
|
@@ -1127,7 +1127,7 @@ export class KebabCaseAction extends AbstractCaseAction {
|
|
|
1127
1127
|
constructor() {
|
|
1128
1128
|
super({
|
|
1129
1129
|
id: 'editor.action.transformToKebabcase',
|
|
1130
|
-
label: nls.localize2(
|
|
1130
|
+
label: nls.localize2(1287, 'Transform to Kebab Case'),
|
|
1131
1131
|
precondition: EditorContextKeys.writable,
|
|
1132
1132
|
canTriggerInlineEdits: true,
|
|
1133
1133
|
});
|