monaco-editor-core 0.55.1 → 0.56.0-dev-20251121
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 +27 -8
- package/esm/vs/base/browser/dom.js +31 -34
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +0 -1
- package/esm/vs/base/browser/keyboardEvent.js +3 -3
- package/esm/vs/base/browser/keyboardEvent.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +5 -2
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/pixelRatio.js +5 -5
- package/esm/vs/base/browser/pixelRatio.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +1 -1
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.js +3 -0
- package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +7 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hoverWidget.css +0 -13
- package/esm/vs/base/browser/ui/inputbox/inputBox.js +7 -0
- package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
- package/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +4 -2
- package/esm/vs/base/browser/ui/list/listView.js +7 -2
- package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/arrays.js +10 -0
- package/esm/vs/base/common/arrays.js.map +1 -1
- package/esm/vs/base/common/async.js +34 -0
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/buffer.js +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +3 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/collections.js.map +1 -1
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +32 -15
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/filters.js +22 -3
- package/esm/vs/base/common/filters.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +2 -2
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/iterator.js +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keyCodes.js +7 -6
- package/esm/vs/base/common/keyCodes.js.map +1 -1
- package/esm/vs/base/common/linkedList.js.map +1 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marked/marked.js +0 -1
- package/esm/vs/base/common/network.js +26 -1
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/normalization.js +19 -6
- package/esm/vs/base/common/normalization.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +0 -1
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +4 -4
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
- package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
- package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/path.js +1 -0
- package/esm/vs/base/common/path.js.map +1 -1
- package/esm/vs/base/common/strings.js +27 -19
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
- package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
- package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/config/tabFocus.js +4 -2
- package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js +1 -2
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/services/contribution.js +9 -0
- package/esm/vs/editor/browser/services/contribution.js.map +1 -0
- package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js +5 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
- package/esm/vs/editor/browser/view/renderingContext.js +1 -1
- package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
- package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
- package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
- package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +374 -360
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/2d/rect.js +7 -0
- package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
- package/esm/vs/editor/common/core/2d/size.js +20 -0
- package/esm/vs/editor/common/core/2d/size.js.map +1 -0
- package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
- package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
- package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
- package/esm/vs/editor/common/core/ranges/offsetRange.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/editorContextKeys.js +47 -47
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
- package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -10
- package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +1 -1
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
- package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/format.js +21 -6
- package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
- package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
- 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/model/inlineCompletionsModel.js +42 -37
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
- 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 +12 -12
- 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 +74 -48
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
- 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.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
- 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/longDistanceHint/inlineEditsLongDistanceHint.js +415 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +253 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
- 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 -31
- 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/editorNavigationQuickAccess.js +2 -2
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
- 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 +12 -12
- 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/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- 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/stickyScrollWidget.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- 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 +29 -29
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- 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 +4 -4
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/editor/editor.all.js +1 -0
- package/esm/vs/editor/editor.all.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +9 -5
- package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
- package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.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.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +2 -0
- 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/configuration.js +5 -4
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +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/contextview/browser/contextViewService.js.map +1 -1
- 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/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +11 -32
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +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/quickinput/browser/tree/quickInputTreeController.js +71 -40
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
- package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
- package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- 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/editorColors.js.map +1 -1
- 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 +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
- 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 +20 -20
- package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
- package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
- package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
- package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
- package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
- package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +9 -5
- package/package.json +2 -2
- package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletions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C;;AAxZW,2BAA2B;IAgDrC,WAAA,qBAAqB,CAAA;IACrB,WAAA,kBAAkB,CAAA;IAClB,WAAA,qBAAqB,CAAA;IACrB,WAAA,eAAe,CAAA;IACf,WAAA,+BAA+B,CAAA;IAC/B,WAAA,wBAAwB,CAAA;IACxB,WAAA,2BAA2B,CAAA;IAC3B,WAAA,kBAAkB,CAAA;IAClB,WAAA,qBAAqB,CAAA;GAxDX,2BAA2B,CAyZvC","file":"inlineCompletionsController.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 { alert } from '../../../../../base/browser/ui/aria/aria.js';\nimport { timeout } from '../../../../../base/common/async.js';\nimport { cancelOnDispose } from '../../../../../base/common/cancellation.js';\nimport { createHotClass } from '../../../../../base/common/hotReloadHelpers.js';\nimport { Disposable, toDisposable } from '../../../../../base/common/lifecycle.js';\nimport { ITransaction, autorun, derived, derivedDisposable, derivedObservableWithCache, observableFromEvent, observableSignal, observableValue, runOnChange, runOnChangeWithStore, transaction, waitForState } from '../../../../../base/common/observable.js';\nimport { isEqual } from '../../../../../base/common/resources.js';\nimport { isUndefined } from '../../../../../base/common/types.js';\nimport { localize } from '../../../../../nls.js';\nimport { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.js';\nimport { AccessibilitySignal, IAccessibilitySignalService } from '../../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\nimport { ICommandService } from '../../../../../platform/commands/common/commands.js';\nimport { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';\nimport { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';\nimport { hotClassGetOriginalInstance } from '../../../../../platform/observable/common/wrapInHotClass.js';\nimport { CoreEditingCommands } from '../../../../browser/coreCommands.js';\nimport { ICodeEditor } from '../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../browser/observableCodeEditor.js';\nimport { TriggerInlineEditCommandsRegistry } from '../../../../browser/triggerInlineEditCommandsRegistry.js';\nimport { getOuterEditor } from '../../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { EditorOption } from '../../../../common/config/editorOptions.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { CursorChangeReason } from '../../../../common/cursorEvents.js';\nimport { ILanguageFeatureDebounceService } from '../../../../common/services/languageFeatureDebounce.js';\nimport { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js';\nimport { FIND_IDS } from '../../../find/browser/findModel.js';\nimport { InsertLineAfterAction, InsertLineBeforeAction } from '../../../linesOperations/browser/linesOperations.js';\nimport { InlineSuggestionHintsContentWidget } from '../hintsWidget/inlineCompletionsHintsWidget.js';\nimport { TextModelChangeRecorder } from '../model/changeRecorder.js';\nimport { InlineCompletionsModel } from '../model/inlineCompletionsModel.js';\nimport { ObservableSuggestWidgetAdapter } from '../model/suggestWidgetAdapter.js';\nimport { ObservableContextKeyService } from '../utils.js';\nimport { InlineCompletionsView } from '../view/inlineCompletionsView.js';\nimport { inlineSuggestCommitId } from './commandIds.js';\nimport { InlineCompletionContextKeys } from './inlineCompletionContextKeys.js';\n\nexport class InlineCompletionsController extends Disposable {\n\tprivate static readonly _instances = new Set<InlineCompletionsController>();\n\n\tpublic static hot = createHotClass(this);\n\tpublic static ID = 'editor.contrib.inlineCompletionsController';\n\n\t/**\n\t * Find the controller in the focused editor or in the outer editor (if applicable)\n\t */\n\tpublic static getInFocusedEditorOrParent(accessor: ServicesAccessor): InlineCompletionsController | null {\n\t\tconst outerEditor = getOuterEditor(accessor);\n\t\tif (!outerEditor) {\n\t\t\treturn null;\n\t\t}\n\t\treturn InlineCompletionsController.get(outerEditor);\n\t}\n\n\tpublic static get(editor: ICodeEditor): InlineCompletionsController | null {\n\t\treturn hotClassGetOriginalInstance(editor.getContribution<InlineCompletionsController>(InlineCompletionsController.ID));\n\t}\n\n\tprivate readonly _editorObs;\n\tprivate readonly _positions;\n\n\tprivate readonly _suggestWidgetAdapter;\n\n\tprivate readonly _enabledInConfig;\n\tprivate readonly _isScreenReaderEnabled;\n\tprivate readonly _editorDictationInProgress;\n\tprivate readonly _enabled;\n\n\tprivate readonly _debounceValue;\n\n\tprivate readonly _focusIsInMenu;\n\tprivate readonly _focusIsInEditorOrMenu;\n\n\tprivate readonly _cursorIsInIndentation;\n\n\tpublic readonly model;\n\n\tprivate readonly _playAccessibilitySignal;\n\n\tprivate readonly _hideInlineEditOnSelectionChange;\n\n\tprotected readonly _view;\n\n\tconstructor(\n\t\tpublic readonly editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@ICommandService private readonly _commandService: ICommandService,\n\t\t@ILanguageFeatureDebounceService private readonly _debounceService: ILanguageFeatureDebounceService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@IAccessibilitySignalService private readonly _accessibilitySignalService: IAccessibilitySignalService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this.editor);\n\t\tthis._positions = derived(this, reader => this._editorObs.selections.read(reader)?.map(s => s.getEndPosition()) ?? [new Position(1, 1)]);\n\t\tthis._suggestWidgetAdapter = this._register(new ObservableSuggestWidgetAdapter(\n\t\t\tthis._editorObs,\n\t\t\titem => this.model.get()?.handleSuggestAccepted(item),\n\t\t\t() => this.model.get()?.selectedInlineCompletion.get()?.getSingleTextEdit(),\n\t\t));\n\t\tthis._enabledInConfig = observableFromEvent(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(EditorOption.inlineSuggest).enabled);\n\t\tthis._isScreenReaderEnabled = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized());\n\t\tthis._editorDictationInProgress = observableFromEvent(this,\n\t\t\tthis._contextKeyService.onDidChangeContext,\n\t\t\t() => this._contextKeyService.getContext(this.editor.getDomNode()).getValue('editorDictation.inProgress') === true\n\t\t);\n\t\tthis._enabled = derived(this, reader => this._enabledInConfig.read(reader) && (!this._isScreenReaderEnabled.read(reader) || !this._editorDictationInProgress.read(reader)));\n\t\tthis._debounceValue = this._debounceService.for(\n\t\t\tthis._languageFeaturesService.inlineCompletionsProvider,\n\t\t\t'InlineCompletionsDebounce',\n\t\t\t{ min: 50, max: 50 }\n\t\t);\n\t\tthis._focusIsInMenu = observableValue<boolean>(this, false);\n\t\tthis._focusIsInEditorOrMenu = derived(this, reader => {\n\t\t\tconst editorHasFocus = this._editorObs.isFocused.read(reader);\n\t\t\tconst menuHasFocus = this._focusIsInMenu.read(reader);\n\t\t\treturn editorHasFocus || menuHasFocus;\n\t\t});\n\t\tthis._cursorIsInIndentation = derived(this, reader => {\n\t\t\tconst cursorPos = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (cursorPos === null) { return false; }\n\t\t\tconst model = this._editorObs.model.read(reader);\n\t\t\tif (!model) { return false; }\n\t\t\tthis._editorObs.versionId.read(reader);\n\t\t\tconst indentMaxColumn = model.getLineIndentColumn(cursorPos.lineNumber);\n\t\t\treturn cursorPos.column <= indentMaxColumn;\n\t\t});\n\t\tthis.model = derivedDisposable<InlineCompletionsModel | undefined>(this, reader => {\n\t\t\tif (this._editorObs.isReadonly.read(reader)) { return undefined; }\n\t\t\tconst textModel = this._editorObs.model.read(reader);\n\t\t\tif (!textModel) { return undefined; }\n\n\t\t\tconst model: InlineCompletionsModel = this._instantiationService.createInstance(\n\t\t\t\tInlineCompletionsModel,\n\t\t\t\ttextModel,\n\t\t\t\tthis._suggestWidgetAdapter.selectedItem,\n\t\t\t\tthis._editorObs.versionId,\n\t\t\t\tthis._positions,\n\t\t\t\tthis._debounceValue,\n\t\t\t\tthis._enabled,\n\t\t\t\tthis.editor,\n\t\t\t);\n\t\t\treturn model;\n\t\t}).recomputeInitiallyAndOnChange(this._store);\n\t\tthis._playAccessibilitySignal = observableSignal(this);\n\t\tthis._hideInlineEditOnSelectionChange = this._editorObs.getOption(EditorOption.inlineSuggest).map(val => true);\n\t\tthis._view = this._register(this._instantiationService.createInstance(InlineCompletionsView, this.editor, this.model, this._focusIsInMenu));\n\n\t\tInlineCompletionsController._instances.add(this);\n\t\tthis._register(toDisposable(() => InlineCompletionsController._instances.delete(this)));\n\n\t\tthis._register(autorun(reader => {\n\t\t\t// Cancel all other inline completions when a new one starts\n\t\t\tconst model = this.model.read(reader);\n\t\t\tif (!model) { return; }\n\t\t\tconst state = model.state.read(reader);\n\t\t\tif (!state) { return; }\n\t\t\tif (!this._focusIsInEditorOrMenu.read(undefined)) { return; }\n\n\t\t\t// This controller is in focus, hence reject others.\n\t\t\t// However if we display a NES that relates to another edit then trigger NES on that related controller\n\t\t\tconst nextEditUri = state.kind === 'inlineEdit' ? state.nextEditUri : undefined;\n\t\t\tfor (const ctrl of InlineCompletionsController._instances) {\n\t\t\t\tif (ctrl === this) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (nextEditUri && isEqual(nextEditUri, ctrl.editor.getModel()?.uri)) {\n\t\t\t\t\t// The next edit in other edito is related to this controller, trigger it.\n\t\t\t\t\tctrl.model.read(undefined)?.trigger();\n\t\t\t\t} else {\n\t\t\t\t\tctrl.reject();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t\tthis._register(autorun(reader => {\n\t\t\t// Cancel all other inline completions when a new one starts\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst uri = this.editor.getModel()?.uri;\n\t\t\tif (!model || !uri) { return; }\n\n\t\t\t// This NES was accepted, its possible there is an NES that points to this editor.\n\t\t\t// I.e. there's an NES that reads `Go To Next Edit`,\n\t\t\t// If there is one that points to this editor, then we need to hide that as this NES was accepted.\n\t\t\treader.store.add(model.onDidAccept(() => {\n\t\t\t\tfor (const ctrl of InlineCompletionsController._instances) {\n\t\t\t\t\tif (ctrl === this) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Find the nes from another editor that points to this.\n\t\t\t\t\tconst state = ctrl.model.read(undefined)?.state.read(undefined);\n\t\t\t\t\tif (state?.kind === 'inlineEdit' && isEqual(state.nextEditUri, uri)) {\n\t\t\t\t\t\tctrl.model.read(undefined)?.stop('automatic');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}));\n\n\t\t}));\n\n\t\tthis._register(runOnChange(this._editorObs.onDidType, (_value, _changes) => {\n\t\t\tif (this._enabled.get()) {\n\t\t\t\tthis.model.get()?.trigger();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(runOnChange(this._editorObs.onDidPaste, (_value, _changes) => {\n\t\t\tif (this._enabled.get()) {\n\t\t\t\tthis.model.get()?.trigger();\n\t\t\t}\n\t\t}));\n\n\t\t// These commands don't trigger onDidType.\n\t\tconst triggerCommands = new Set([\n\t\t\tCoreEditingCommands.Tab.id,\n\t\t\tCoreEditingCommands.DeleteLeft.id,\n\t\t\tCoreEditingCommands.DeleteRight.id,\n\t\t\tinlineSuggestCommitId,\n\t\t\t'acceptSelectedSuggestion',\n\t\t\tInsertLineAfterAction.ID,\n\t\t\tInsertLineBeforeAction.ID,\n\t\t\tFIND_IDS.NextMatchFindAction,\n\t\t\t...TriggerInlineEditCommandsRegistry.getRegisteredCommands(),\n\t\t]);\n\t\tthis._register(this._commandService.onDidExecuteCommand((e) => {\n\t\t\tif (triggerCommands.has(e.commandId) && editor.hasTextFocus() && this._enabled.get()) {\n\t\t\t\tlet noDelay = false;\n\t\t\t\tif (e.commandId === inlineSuggestCommitId) {\n\t\t\t\t\tnoDelay = true;\n\t\t\t\t}\n\t\t\t\tthis._editorObs.forceUpdate(tx => {\n\t\t\t\t\t/** @description onDidExecuteCommand */\n\t\t\t\t\tthis.model.get()?.trigger(tx, { noDelay });\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(runOnChange(this._editorObs.selections, (_value, _, changes) => {\n\t\t\tif (changes.some(e => e.reason === CursorChangeReason.Explicit || e.source === 'api')) {\n\t\t\t\tif (!this._hideInlineEditOnSelectionChange.get() && this.model.get()?.state.get()?.kind === 'inlineEdit') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst m = this.model.get();\n\t\t\t\tif (!m) { return; }\n\t\t\t\tif (m.state.get()?.kind === 'ghostText') {\n\t\t\t\t\tthis.model.get()?.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst isFocused = this._focusIsInEditorOrMenu.read(reader);\n\t\t\tconst model = this.model.read(undefined);\n\t\t\tif (isFocused) {\n\t\t\t\t// If this model already has an NES for another editor, then leave as is\n\t\t\t\t// Else stop other models.\n\t\t\t\tconst state = model?.state.read(undefined);\n\t\t\t\tif (!state || state.kind !== 'inlineEdit' || !state.nextEditUri) {\n\t\t\t\t\ttransaction(tx => {\n\t\t\t\t\t\tfor (const ctrl of InlineCompletionsController._instances) {\n\t\t\t\t\t\t\tif (ctrl !== this) {\n\t\t\t\t\t\t\t\tctrl.model.read(undefined)?.stop('automatic', tx);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// This is a hidden setting very useful for debugging\n\t\t\tif (this._contextKeyService.getContextKeyValue<boolean>('accessibleViewIsShown')\n\t\t\t\t|| this._configurationService.getValue('editor.inlineSuggest.keepOnBlur')\n\t\t\t\t|| editor.getOption(EditorOption.inlineSuggest).keepOnBlur\n\t\t\t\t|| InlineSuggestionHintsContentWidget.dropDownVisible) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!model) { return; }\n\t\t\tif (model.state.read(undefined)?.inlineCompletion?.isFromExplicitRequest && model.inlineEditAvailable.read(undefined)) {\n\t\t\t\t// dont hide inline edits on blur when requested explicitly\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttransaction(tx => {\n\t\t\t\t/** @description InlineCompletionsController.onDidBlurEditorWidget */\n\t\t\t\tmodel.stop('automatic', tx);\n\t\t\t});\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\t/** @description InlineCompletionsController.forceRenderingAbove */\n\t\t\tconst state = this.model.read(reader)?.inlineCompletionState.read(reader);\n\t\t\tif (state?.suggestItem) {\n\t\t\t\tif (state.primaryGhostText.lineCount >= 2) {\n\t\t\t\t\tthis._suggestWidgetAdapter.forceRenderingAbove();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._suggestWidgetAdapter.stopForceRenderingAbove();\n\t\t\t}\n\t\t}));\n\t\tthis._register(toDisposable(() => {\n\t\t\tthis._suggestWidgetAdapter.stopForceRenderingAbove();\n\t\t}));\n\n\t\tconst currentInlineCompletionBySemanticId = derivedObservableWithCache<string | undefined>(this, (reader, last) => {\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst state = model?.state.read(reader);\n\t\t\tif (this._suggestWidgetAdapter.selectedItem.get()) {\n\t\t\t\treturn last;\n\t\t\t}\n\t\t\treturn state?.inlineCompletion?.semanticId;\n\t\t});\n\t\tthis._register(runOnChangeWithStore(derived(reader => {\n\t\t\tthis._playAccessibilitySignal.read(reader);\n\t\t\tcurrentInlineCompletionBySemanticId.read(reader);\n\t\t\treturn {};\n\t\t}), async (_value, _, _deltas, store) => {\n\t\t\t/** @description InlineCompletionsController.playAccessibilitySignalAndReadSuggestion */\n\t\t\tlet model = this.model.get();\n\t\t\tlet state = model?.state.get();\n\t\t\tif (!state || !model) { return; }\n\n\t\t\tawait timeout(50, cancelOnDispose(store));\n\t\t\tawait waitForState(this._suggestWidgetAdapter.selectedItem, isUndefined, () => false, cancelOnDispose(store));\n\n\t\t\tmodel = this.model.get();\n\t\t\tstate = model?.state.get();\n\t\t\tif (!state || !model) { return; }\n\t\t\tconst lineText = state.kind === 'ghostText' ? model.textModel.getLineContent(state.primaryGhostText.lineNumber) : '';\n\t\t\tthis._accessibilitySignalService.playSignal(state.kind === 'ghostText' ? AccessibilitySignal.inlineSuggestion : AccessibilitySignal.nextEditSuggestion);\n\n\t\t\tif (this.editor.getOption(EditorOption.screenReaderAnnounceInlineSuggestion)) {\n\t\t\t\tif (state.kind === 'ghostText') {\n\t\t\t\t\tthis._provideScreenReaderUpdate(state.primaryGhostText.renderForScreenReader(lineText));\n\t\t\t\t} else {\n\t\t\t\t\tthis._provideScreenReaderUpdate(''); // Only announce Alt+F2\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// TODO@hediet\n\t\tthis._register(this._configurationService.onDidChangeConfiguration(e => {\n\t\t\tif (e.affectsConfiguration('accessibility.verbosity.inlineCompletions')) {\n\t\t\t\tthis.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') });\n\t\t\t}\n\t\t}));\n\t\tthis.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') });\n\n\t\tconst contextKeySvcObs = new ObservableContextKeyService(this._contextKeyService);\n\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorInIndentation, this._cursorIsInIndentation));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.hasSelection, reader => !this._editorObs.cursorSelection.read(reader)?.isEmpty()));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorAtInlineEdit, this.model.map((m, reader) => m?.inlineEditState?.read(reader)?.cursorAtInlineEdit.read(reader))));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.tabShouldAcceptInlineEdit, this.model.map((m, r) => !!m?.tabShouldAcceptInlineEdit.read(r))));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.tabShouldJumpToInlineEdit, this.model.map((m, r) => !!m?.tabShouldJumpToInlineEdit.read(r))));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineEditVisible, reader => this.model.read(reader)?.inlineEditState.read(reader) !== undefined));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionHasIndentation,\n\t\t\treader => this.model.read(reader)?.getIndentationInfo(reader)?.startsWithIndentation\n\t\t));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize,\n\t\t\treader => this.model.read(reader)?.getIndentationInfo(reader)?.startsWithIndentationLessThanTabSize\n\t\t));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.suppressSuggestions, reader => {\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst state = model?.inlineCompletionState.read(reader);\n\t\t\treturn state?.primaryGhostText && state?.inlineCompletion ? state.inlineCompletion.source.inlineSuggestions.suppressSuggestions : undefined;\n\t\t}));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionVisible, reader => {\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst state = model?.inlineCompletionState.read(reader);\n\t\t\treturn !!state?.inlineCompletion && state?.primaryGhostText !== undefined && !state?.primaryGhostText.isEmpty();\n\t\t}));\n\t\tconst firstGhostTextPos = derived(this, reader => {\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst state = model?.inlineCompletionState.read(reader);\n\t\t\tconst primaryGhostText = state?.primaryGhostText;\n\t\t\tif (!primaryGhostText || primaryGhostText.isEmpty()) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst firstPartPos = new Position(primaryGhostText.lineNumber, primaryGhostText.parts[0].column);\n\t\t\treturn firstPartPos;\n\t\t});\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorBeforeGhostText, reader => {\n\t\t\tconst firstPartPos = firstGhostTextPos.read(reader);\n\t\t\tif (!firstPartPos) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst cursorPos = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (!cursorPos) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn firstPartPos.equals(cursorPos);\n\t\t}));\n\n\t\tthis._register(this._instantiationService.createInstance(TextModelChangeRecorder, this.editor));\n\t}\n\n\tpublic playAccessibilitySignal(tx: ITransaction) {\n\t\tthis._playAccessibilitySignal.trigger(tx);\n\t}\n\n\tprivate _provideScreenReaderUpdate(content: string): void {\n\t\tconst accessibleViewShowing = this._contextKeyService.getContextKeyValue<boolean>('accessibleViewIsShown');\n\t\tconst accessibleViewKeybinding = this._keybindingService.lookupKeybinding('editor.action.accessibleView');\n\t\tlet hint: string | undefined;\n\t\tif (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(EditorOption.inlineCompletionsAccessibilityVerbose)) {\n\t\t\thint = localize('showAccessibleViewHint', \"Inspect this in the accessible view ({0})\", accessibleViewKeybinding.getAriaLabel());\n\t\t}\n\t\talert(hint ? content + ', ' + hint : content);\n\t}\n\n\tpublic shouldShowHoverAt(range: Range) {\n\t\tconst ghostText = this.model.get()?.primaryGhostText.get();\n\t\tif (!ghostText) {\n\t\t\treturn false;\n\t\t}\n\t\treturn ghostText.parts.some(p => range.containsPosition(new Position(ghostText.lineNumber, p.column)));\n\t}\n\n\tpublic shouldShowHoverAtViewZone(viewZoneId: string): boolean {\n\t\treturn this._view.shouldShowHoverAtViewZone(viewZoneId);\n\t}\n\n\tpublic reject(): void {\n\t\ttransaction(tx => {\n\t\t\tconst m = this.model.get();\n\t\t\tif (m) {\n\t\t\t\tm.stop('explicitCancel', tx);\n\t\t\t\t// Only if this controller is in focus can we cancel others.\n\t\t\t\tif (this._focusIsInEditorOrMenu.get()) {\n\t\t\t\t\tfor (const ctrl of InlineCompletionsController._instances) {\n\t\t\t\t\t\tif (ctrl !== this) {\n\t\t\t\t\t\t\tctrl.model.get()?.stop('automatic', tx);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic jump(): void {\n\t\tconst m = this.model.get();\n\t\tif (m) {\n\t\t\tm.jump();\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAAE,KAAK,EAAE,MAAM,6CAA6C,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAgB,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC/P,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AACtG,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,mFAAmF,CAAC;AACrJ,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CA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,IAAI,CAAC,sBAAsB,CAAC,GAAG,EAAE,EAAE,CAAC;oBACvC,KAAK,MAAM,IAAI,IAAI,6BAA2B,CAAC,UAAU,EAAE,CAAC;wBAC3D,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;4BACnB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;wBACzC,CAAC;oBACF,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IAEM,IAAI;QACV,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,EAAE,CAAC;YACP,CAAC,CAAC,IAAI,EAAE,CAAC;QACV,CAAC;IACF,CAAC;;AArZW,2BAA2B;IA4ErC,WAAA,qBAAqB,CAAA;IACrB,WAAA,kBAAkB,CAAA;IAClB,WAAA,qBAAqB,CAAA;IACrB,WAAA,eAAe,CAAA;IACf,WAAA,+BAA+B,CAAA;IAC/B,WAAA,wBAAwB,CAAA;IACxB,WAAA,2BAA2B,CAAA;IAC3B,WAAA,kBAAkB,CAAA;IAClB,WAAA,qBAAqB,CAAA;GApFX,2BAA2B,CAsZvC","file":"inlineCompletionsController.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 { alert } from '../../../../../base/browser/ui/aria/aria.js';\nimport { timeout } from '../../../../../base/common/async.js';\nimport { cancelOnDispose } from '../../../../../base/common/cancellation.js';\nimport { createHotClass } from '../../../../../base/common/hotReloadHelpers.js';\nimport { Disposable, toDisposable } from '../../../../../base/common/lifecycle.js';\nimport { ITransaction, autorun, derived, derivedDisposable, derivedObservableWithCache, observableFromEvent, observableSignal, observableValue, runOnChange, runOnChangeWithStore, transaction, waitForState } from '../../../../../base/common/observable.js';\nimport { isEqual } from '../../../../../base/common/resources.js';\nimport { isUndefined } from '../../../../../base/common/types.js';\nimport { localize } from '../../../../../nls.js';\nimport { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.js';\nimport { AccessibilitySignal, IAccessibilitySignalService } from '../../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js';\nimport { ICommandService } from '../../../../../platform/commands/common/commands.js';\nimport { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';\nimport { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService, ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js';\nimport { hotClassGetOriginalInstance } from '../../../../../platform/observable/common/wrapInHotClass.js';\nimport { CoreEditingCommands } from '../../../../browser/coreCommands.js';\nimport { ICodeEditor } from '../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../browser/observableCodeEditor.js';\nimport { TriggerInlineEditCommandsRegistry } from '../../../../browser/triggerInlineEditCommandsRegistry.js';\nimport { getOuterEditor } from '../../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { EditorOption } from '../../../../common/config/editorOptions.js';\nimport { Position } from '../../../../common/core/position.js';\nimport { Range } from '../../../../common/core/range.js';\nimport { CursorChangeReason } from '../../../../common/cursorEvents.js';\nimport { ILanguageFeatureDebounceService } from '../../../../common/services/languageFeatureDebounce.js';\nimport { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js';\nimport { FIND_IDS } from '../../../find/browser/findModel.js';\nimport { InsertLineAfterAction, InsertLineBeforeAction } from '../../../linesOperations/browser/linesOperations.js';\nimport { InlineSuggestionHintsContentWidget } from '../hintsWidget/inlineCompletionsHintsWidget.js';\nimport { TextModelChangeRecorder } from '../model/changeRecorder.js';\nimport { InlineCompletionsModel } from '../model/inlineCompletionsModel.js';\nimport { ObservableSuggestWidgetAdapter } from '../model/suggestWidgetAdapter.js';\nimport { ObservableContextKeyService } from '../utils.js';\nimport { InlineSuggestionsView } from '../view/inlineSuggestionsView.js';\nimport { inlineSuggestCommitId } from './commandIds.js';\nimport { InlineCompletionContextKeys } from './inlineCompletionContextKeys.js';\n\nexport class InlineCompletionsController extends Disposable {\n\tprivate static readonly _instances = new Set<InlineCompletionsController>();\n\n\tpublic static hot = createHotClass(this);\n\tpublic static ID = 'editor.contrib.inlineCompletionsController';\n\n\t/**\n\t * Find the controller in the focused editor or in the outer editor (if applicable)\n\t */\n\tpublic static getInFocusedEditorOrParent(accessor: ServicesAccessor): InlineCompletionsController | null {\n\t\tconst outerEditor = getOuterEditor(accessor);\n\t\tif (!outerEditor) {\n\t\t\treturn null;\n\t\t}\n\t\treturn InlineCompletionsController.get(outerEditor);\n\t}\n\n\tpublic static get(editor: ICodeEditor): InlineCompletionsController | null {\n\t\treturn hotClassGetOriginalInstance(editor.getContribution<InlineCompletionsController>(InlineCompletionsController.ID));\n\t}\n\n\tprivate readonly _editorObs;\n\tprivate readonly _positions;\n\n\tprivate readonly _suggestWidgetAdapter;\n\n\tprivate readonly _enabledInConfig;\n\tprivate readonly _isScreenReaderEnabled;\n\tprivate readonly _editorDictationInProgress;\n\tprivate readonly _enabled = derived(this, reader => this._enabledInConfig.read(reader) && (!this._isScreenReaderEnabled.read(reader) || !this._editorDictationInProgress.read(reader)));\n\n\tprivate readonly _debounceValue;\n\n\tprivate readonly _focusIsInMenu = observableValue<boolean>(this, false);\n\tprivate readonly _focusIsInEditorOrMenu = derived(this, reader => {\n\t\tconst editorHasFocus = this._editorObs.isFocused.read(reader);\n\t\tconst menuHasFocus = this._focusIsInMenu.read(reader);\n\t\treturn editorHasFocus || menuHasFocus;\n\t});\n\n\tprivate readonly _cursorIsInIndentation = derived(this, reader => {\n\t\tconst cursorPos = this._editorObs.cursorPosition.read(reader);\n\t\tif (cursorPos === null) { return false; }\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) { return false; }\n\t\tthis._editorObs.versionId.read(reader);\n\t\tconst indentMaxColumn = model.getLineIndentColumn(cursorPos.lineNumber);\n\t\treturn cursorPos.column <= indentMaxColumn;\n\t});\n\n\tpublic readonly model = derivedDisposable<InlineCompletionsModel | undefined>(this, reader => {\n\t\tif (this._editorObs.isReadonly.read(reader)) { return undefined; }\n\t\tconst textModel = this._editorObs.model.read(reader);\n\t\tif (!textModel) { return undefined; }\n\n\t\tconst model: InlineCompletionsModel = this._instantiationService.createInstance(\n\t\t\tInlineCompletionsModel,\n\t\t\ttextModel,\n\t\t\tthis._suggestWidgetAdapter.selectedItem,\n\t\t\tthis._editorObs.versionId,\n\t\t\tthis._positions,\n\t\t\tthis._debounceValue,\n\t\t\tthis._enabled,\n\t\t\tthis.editor,\n\t\t);\n\t\treturn model;\n\t});\n\n\tprivate readonly _playAccessibilitySignal = observableSignal(this);\n\n\tprivate readonly _hideInlineEditOnSelectionChange;\n\n\tprotected readonly _view = derived(reader => reader.store.add(this._instantiationService.createInstance(InlineSuggestionsView.hot.read(reader), this.editor, this.model, this._focusIsInMenu)));\n\n\tconstructor(\n\t\tpublic readonly editor: ICodeEditor,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@ICommandService private readonly _commandService: ICommandService,\n\t\t@ILanguageFeatureDebounceService private readonly _debounceService: ILanguageFeatureDebounceService,\n\t\t@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,\n\t\t@IAccessibilitySignalService private readonly _accessibilitySignalService: IAccessibilitySignalService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\t\tthis._editorObs = observableCodeEditor(this.editor);\n\t\tthis._positions = derived(this, reader => this._editorObs.selections.read(reader)?.map(s => s.getEndPosition()) ?? [new Position(1, 1)]);\n\t\tthis._suggestWidgetAdapter = this._register(new ObservableSuggestWidgetAdapter(\n\t\t\tthis._editorObs,\n\t\t\titem => this.model.get()?.handleSuggestAccepted(item),\n\t\t\t() => this.model.get()?.selectedInlineCompletion.get()?.getSingleTextEdit(),\n\t\t));\n\t\tthis._enabledInConfig = observableFromEvent(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(EditorOption.inlineSuggest).enabled);\n\t\tthis._isScreenReaderEnabled = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized());\n\t\tthis._editorDictationInProgress = observableFromEvent(this,\n\t\t\tthis._contextKeyService.onDidChangeContext,\n\t\t\t() => this._contextKeyService.getContext(this.editor.getDomNode()).getValue('editorDictation.inProgress') === true\n\t\t);\n\n\t\tthis._debounceValue = this._debounceService.for(\n\t\t\tthis._languageFeaturesService.inlineCompletionsProvider,\n\t\t\t'InlineCompletionsDebounce',\n\t\t\t{ min: 50, max: 50 }\n\t\t);\n\t\tthis.model.recomputeInitiallyAndOnChange(this._store);\n\t\tthis._hideInlineEditOnSelectionChange = this._editorObs.getOption(EditorOption.inlineSuggest).map(val => true);\n\n\t\tthis._view.recomputeInitiallyAndOnChange(this._store);\n\n\t\tInlineCompletionsController._instances.add(this);\n\t\tthis._register(toDisposable(() => InlineCompletionsController._instances.delete(this)));\n\n\t\tthis._register(autorun(reader => {\n\t\t\t// Cancel all other inline completions when a new one starts\n\t\t\tconst model = this.model.read(reader);\n\t\t\tif (!model) { return; }\n\t\t\tconst state = model.state.read(reader);\n\t\t\tif (!state) { return; }\n\t\t\tif (!this._focusIsInEditorOrMenu.read(undefined)) { return; }\n\n\t\t\t// This controller is in focus, hence reject others.\n\t\t\t// However if we display a NES that relates to another edit then trigger NES on that related controller\n\t\t\tconst nextEditUri = state.kind === 'inlineEdit' ? state.nextEditUri : undefined;\n\t\t\tfor (const ctrl of InlineCompletionsController._instances) {\n\t\t\t\tif (ctrl === this) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (nextEditUri && isEqual(nextEditUri, ctrl.editor.getModel()?.uri)) {\n\t\t\t\t\t// The next edit in other edito is related to this controller, trigger it.\n\t\t\t\t\tctrl.model.read(undefined)?.trigger();\n\t\t\t\t} else {\n\t\t\t\t\tctrl.reject();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t\tthis._register(autorun(reader => {\n\t\t\t// Cancel all other inline completions when a new one starts\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst uri = this.editor.getModel()?.uri;\n\t\t\tif (!model || !uri) { return; }\n\n\t\t\t// This NES was accepted, its possible there is an NES that points to this editor.\n\t\t\t// I.e. there's an NES that reads `Go To Next Edit`,\n\t\t\t// If there is one that points to this editor, then we need to hide that as this NES was accepted.\n\t\t\treader.store.add(model.onDidAccept(() => {\n\t\t\t\tfor (const ctrl of InlineCompletionsController._instances) {\n\t\t\t\t\tif (ctrl === this) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// Find the nes from another editor that points to this.\n\t\t\t\t\tconst state = ctrl.model.read(undefined)?.state.read(undefined);\n\t\t\t\t\tif (state?.kind === 'inlineEdit' && isEqual(state.nextEditUri, uri)) {\n\t\t\t\t\t\tctrl.model.read(undefined)?.stop('automatic');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}));\n\n\t\t}));\n\n\t\tthis._register(runOnChange(this._editorObs.onDidType, (_value, _changes) => {\n\t\t\tif (this._enabled.get()) {\n\t\t\t\tthis.model.get()?.trigger();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(runOnChange(this._editorObs.onDidPaste, (_value, _changes) => {\n\t\t\tif (this._enabled.get()) {\n\t\t\t\tthis.model.get()?.trigger();\n\t\t\t}\n\t\t}));\n\n\t\t// These commands don't trigger onDidType.\n\t\tconst triggerCommands = new Set([\n\t\t\tCoreEditingCommands.Tab.id,\n\t\t\tCoreEditingCommands.DeleteLeft.id,\n\t\t\tCoreEditingCommands.DeleteRight.id,\n\t\t\tinlineSuggestCommitId,\n\t\t\t'acceptSelectedSuggestion',\n\t\t\tInsertLineAfterAction.ID,\n\t\t\tInsertLineBeforeAction.ID,\n\t\t\tFIND_IDS.NextMatchFindAction,\n\t\t\t...TriggerInlineEditCommandsRegistry.getRegisteredCommands(),\n\t\t]);\n\t\tthis._register(this._commandService.onDidExecuteCommand((e) => {\n\t\t\tif (triggerCommands.has(e.commandId) && editor.hasTextFocus() && this._enabled.get()) {\n\t\t\t\tlet noDelay = false;\n\t\t\t\tif (e.commandId === inlineSuggestCommitId) {\n\t\t\t\t\tnoDelay = true;\n\t\t\t\t}\n\t\t\t\tthis._editorObs.forceUpdate(tx => {\n\t\t\t\t\t/** @description onDidExecuteCommand */\n\t\t\t\t\tthis.model.get()?.trigger(tx, { noDelay });\n\t\t\t\t});\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(runOnChange(this._editorObs.selections, (_value, _, changes) => {\n\t\t\tif (changes.some(e => e.reason === CursorChangeReason.Explicit || e.source === 'api')) {\n\t\t\t\tif (!this._hideInlineEditOnSelectionChange.get() && this.model.get()?.state.get()?.kind === 'inlineEdit') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst m = this.model.get();\n\t\t\t\tif (!m) { return; }\n\t\t\t\tif (m.state.get()?.kind === 'ghostText') {\n\t\t\t\t\tthis.model.get()?.stop();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst isFocused = this._focusIsInEditorOrMenu.read(reader);\n\t\t\tconst model = this.model.read(undefined);\n\t\t\tif (isFocused) {\n\t\t\t\t// If this model already has an NES for another editor, then leave as is\n\t\t\t\t// Else stop other models.\n\t\t\t\tconst state = model?.state.read(undefined);\n\t\t\t\tif (!state || state.kind !== 'inlineEdit' || !state.nextEditUri) {\n\t\t\t\t\ttransaction(tx => {\n\t\t\t\t\t\tfor (const ctrl of InlineCompletionsController._instances) {\n\t\t\t\t\t\t\tif (ctrl !== this) {\n\t\t\t\t\t\t\t\tctrl.model.read(undefined)?.stop('automatic', tx);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// This is a hidden setting very useful for debugging\n\t\t\tif (this._contextKeyService.getContextKeyValue<boolean>('accessibleViewIsShown')\n\t\t\t\t|| this._configurationService.getValue('editor.inlineSuggest.keepOnBlur')\n\t\t\t\t|| editor.getOption(EditorOption.inlineSuggest).keepOnBlur\n\t\t\t\t|| InlineSuggestionHintsContentWidget.dropDownVisible) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!model) { return; }\n\t\t\tif (model.state.read(undefined)?.inlineSuggestion?.isFromExplicitRequest && model.inlineEditAvailable.read(undefined)) {\n\t\t\t\t// dont hide inline edits on blur when requested explicitly\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttransaction(tx => {\n\t\t\t\t/** @description InlineCompletionsController.onDidBlurEditorWidget */\n\t\t\t\tmodel.stop('automatic', tx);\n\t\t\t});\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\t/** @description InlineCompletionsController.forceRenderingAbove */\n\t\t\tconst state = this.model.read(reader)?.inlineCompletionState.read(reader);\n\t\t\tif (state?.suggestItem) {\n\t\t\t\tif (state.primaryGhostText.lineCount >= 2) {\n\t\t\t\t\tthis._suggestWidgetAdapter.forceRenderingAbove();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._suggestWidgetAdapter.stopForceRenderingAbove();\n\t\t\t}\n\t\t}));\n\t\tthis._register(toDisposable(() => {\n\t\t\tthis._suggestWidgetAdapter.stopForceRenderingAbove();\n\t\t}));\n\n\t\tconst currentInlineCompletionBySemanticId = derivedObservableWithCache<string | undefined>(this, (reader, last) => {\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst state = model?.state.read(reader);\n\t\t\tif (this._suggestWidgetAdapter.selectedItem.get()) {\n\t\t\t\treturn last;\n\t\t\t}\n\t\t\treturn state?.inlineSuggestion?.semanticId;\n\t\t});\n\t\tthis._register(runOnChangeWithStore(derived(reader => {\n\t\t\tthis._playAccessibilitySignal.read(reader);\n\t\t\tcurrentInlineCompletionBySemanticId.read(reader);\n\t\t\treturn {};\n\t\t}), async (_value, _, _deltas, store) => {\n\t\t\t/** @description InlineCompletionsController.playAccessibilitySignalAndReadSuggestion */\n\t\t\tlet model = this.model.get();\n\t\t\tlet state = model?.state.get();\n\t\t\tif (!state || !model) { return; }\n\n\t\t\tawait timeout(50, cancelOnDispose(store));\n\t\t\tawait waitForState(this._suggestWidgetAdapter.selectedItem, isUndefined, () => false, cancelOnDispose(store));\n\n\t\t\tmodel = this.model.get();\n\t\t\tstate = model?.state.get();\n\t\t\tif (!state || !model) { return; }\n\t\t\tconst lineText = state.kind === 'ghostText' ? model.textModel.getLineContent(state.primaryGhostText.lineNumber) : '';\n\t\t\tthis._accessibilitySignalService.playSignal(state.kind === 'ghostText' ? AccessibilitySignal.inlineSuggestion : AccessibilitySignal.nextEditSuggestion);\n\n\t\t\tif (this.editor.getOption(EditorOption.screenReaderAnnounceInlineSuggestion)) {\n\t\t\t\tif (state.kind === 'ghostText') {\n\t\t\t\t\tthis._provideScreenReaderUpdate(state.primaryGhostText.renderForScreenReader(lineText));\n\t\t\t\t} else {\n\t\t\t\t\tthis._provideScreenReaderUpdate(''); // Only announce Alt+F2\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// TODO@hediet\n\t\tthis._register(this._configurationService.onDidChangeConfiguration(e => {\n\t\t\tif (e.affectsConfiguration('accessibility.verbosity.inlineCompletions')) {\n\t\t\t\tthis.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') });\n\t\t\t}\n\t\t}));\n\t\tthis.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') });\n\n\t\tconst contextKeySvcObs = new ObservableContextKeyService(this._contextKeyService);\n\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorInIndentation, this._cursorIsInIndentation));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.hasSelection, reader => !this._editorObs.cursorSelection.read(reader)?.isEmpty()));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorAtInlineEdit, this.model.map((m, reader) => m?.inlineEditState?.read(reader)?.cursorAtInlineEdit.read(reader))));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.tabShouldAcceptInlineEdit, this.model.map((m, r) => !!m?.tabShouldAcceptInlineEdit.read(r))));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.tabShouldJumpToInlineEdit, this.model.map((m, r) => !!m?.tabShouldJumpToInlineEdit.read(r))));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineEditVisible, reader => this.model.read(reader)?.inlineEditState.read(reader) !== undefined));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionHasIndentation,\n\t\t\treader => this.model.read(reader)?.getIndentationInfo(reader)?.startsWithIndentation\n\t\t));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize,\n\t\t\treader => this.model.read(reader)?.getIndentationInfo(reader)?.startsWithIndentationLessThanTabSize\n\t\t));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.suppressSuggestions, reader => {\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst state = model?.inlineCompletionState.read(reader);\n\t\t\treturn state?.primaryGhostText && state?.inlineSuggestion ? state.inlineSuggestion.source.inlineSuggestions.suppressSuggestions : undefined;\n\t\t}));\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionVisible, reader => {\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst state = model?.inlineCompletionState.read(reader);\n\t\t\treturn !!state?.inlineSuggestion && state?.primaryGhostText !== undefined && !state?.primaryGhostText.isEmpty();\n\t\t}));\n\t\tconst firstGhostTextPos = derived(this, reader => {\n\t\t\tconst model = this.model.read(reader);\n\t\t\tconst state = model?.inlineCompletionState.read(reader);\n\t\t\tconst primaryGhostText = state?.primaryGhostText;\n\t\t\tif (!primaryGhostText || primaryGhostText.isEmpty()) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst firstPartPos = new Position(primaryGhostText.lineNumber, primaryGhostText.parts[0].column);\n\t\t\treturn firstPartPos;\n\t\t});\n\t\tthis._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorBeforeGhostText, reader => {\n\t\t\tconst firstPartPos = firstGhostTextPos.read(reader);\n\t\t\tif (!firstPartPos) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst cursorPos = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (!cursorPos) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn firstPartPos.equals(cursorPos);\n\t\t}));\n\n\t\tthis._register(this._instantiationService.createInstance(TextModelChangeRecorder, this.editor));\n\t}\n\n\tpublic playAccessibilitySignal(tx: ITransaction) {\n\t\tthis._playAccessibilitySignal.trigger(tx);\n\t}\n\n\tprivate _provideScreenReaderUpdate(content: string): void {\n\t\tconst accessibleViewShowing = this._contextKeyService.getContextKeyValue<boolean>('accessibleViewIsShown');\n\t\tconst accessibleViewKeybinding = this._keybindingService.lookupKeybinding('editor.action.accessibleView');\n\t\tlet hint: string | undefined;\n\t\tif (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(EditorOption.inlineCompletionsAccessibilityVerbose)) {\n\t\t\thint = localize('showAccessibleViewHint', \"Inspect this in the accessible view ({0})\", accessibleViewKeybinding.getAriaLabel());\n\t\t}\n\t\talert(hint ? content + ', ' + hint : content);\n\t}\n\n\tpublic shouldShowHoverAt(range: Range) {\n\t\tconst ghostText = this.model.get()?.primaryGhostText.get();\n\t\tif (!ghostText) {\n\t\t\treturn false;\n\t\t}\n\t\treturn ghostText.parts.some(p => range.containsPosition(new Position(ghostText.lineNumber, p.column)));\n\t}\n\n\tpublic shouldShowHoverAtViewZone(viewZoneId: string): boolean {\n\t\treturn this._view.get().shouldShowHoverAtViewZone(viewZoneId);\n\t}\n\n\tpublic reject(): void {\n\t\ttransaction(tx => {\n\t\t\tconst m = this.model.get();\n\t\t\tif (m) {\n\t\t\t\tm.stop('explicitCancel', tx);\n\t\t\t\t// Only if this controller is in focus can we cancel others.\n\t\t\t\tif (this._focusIsInEditorOrMenu.get()) {\n\t\t\t\t\tfor (const ctrl of InlineCompletionsController._instances) {\n\t\t\t\t\t\tif (ctrl !== this) {\n\t\t\t\t\t\t\tctrl.model.get()?.stop('automatic', tx);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic jump(): void {\n\t\tconst m = this.model.get();\n\t\tif (m) {\n\t\t\tm.jump();\n\t\t}\n\t}\n}\n"]}
|
|
@@ -115,7 +115,7 @@ let InlineCompletionsHoverParticipant = class InlineCompletionsHoverParticipant
|
|
|
115
115
|
return new RenderedHoverParts([renderedHoverPart]);
|
|
116
116
|
}
|
|
117
117
|
getAccessibleContent(hoverPart) {
|
|
118
|
-
return nls.localize(
|
|
118
|
+
return nls.localize(1211, 'There are inline completions here');
|
|
119
119
|
}
|
|
120
120
|
renderScreenReaderText(context, part) {
|
|
121
121
|
const disposables = new DisposableStore();
|
|
@@ -123,7 +123,7 @@ let InlineCompletionsHoverParticipant = class InlineCompletionsHoverParticipant
|
|
|
123
123
|
const markdownHoverElement = $('div.hover-row.markdown-hover');
|
|
124
124
|
const hoverContentsElement = dom.append(markdownHoverElement, $('div.hover-contents', { ['aria-live']: 'assertive' }));
|
|
125
125
|
const render = (code) => {
|
|
126
|
-
const inlineSuggestionAvailable = nls.localize(
|
|
126
|
+
const inlineSuggestionAvailable = nls.localize(1212, "Suggestion:");
|
|
127
127
|
const renderedContents = disposables.add(this._markdownRendererService.render(new MarkdownString().appendText(inlineSuggestionAvailable).appendCodeblock('text', code), {
|
|
128
128
|
context: this._editor,
|
|
129
129
|
asyncRenderCallback: () => {
|
package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js
CHANGED
|
@@ -97,8 +97,8 @@ InlineCompletionsHintsWidget = __decorate([
|
|
|
97
97
|
__param(2, IInstantiationService)
|
|
98
98
|
], InlineCompletionsHintsWidget);
|
|
99
99
|
export { InlineCompletionsHintsWidget };
|
|
100
|
-
const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, localize(
|
|
101
|
-
const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, localize(
|
|
100
|
+
const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, localize(1213, 'Icon for show next parameter hint.'));
|
|
101
|
+
const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, localize(1214, 'Icon for show previous parameter hint.'));
|
|
102
102
|
let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidget extends Disposable {
|
|
103
103
|
static { InlineSuggestionHintsContentWidget_1 = this; }
|
|
104
104
|
static { this.hot = createHotClass(this); }
|
|
@@ -110,7 +110,7 @@ let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidge
|
|
|
110
110
|
const kb = this.keybindingService.lookupKeybinding(commandId, this._contextKeyService);
|
|
111
111
|
let tooltip = label;
|
|
112
112
|
if (kb) {
|
|
113
|
-
tooltip = localize(
|
|
113
|
+
tooltip = localize(1215, '{0} ({1})', label, kb.getLabel());
|
|
114
114
|
}
|
|
115
115
|
action.tooltip = tooltip;
|
|
116
116
|
return action;
|
|
@@ -158,9 +158,9 @@ let InlineSuggestionHintsContentWidget = class InlineSuggestionHintsContentWidge
|
|
|
158
158
|
this._warningMessageNode.element,
|
|
159
159
|
h('div@toolBar'),
|
|
160
160
|
]);
|
|
161
|
-
this.previousAction = this._register(this.createCommandAction(showPreviousInlineSuggestionActionId, localize(
|
|
161
|
+
this.previousAction = this._register(this.createCommandAction(showPreviousInlineSuggestionActionId, localize(1216, 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon)));
|
|
162
162
|
this.availableSuggestionCountAction = this._register(new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false));
|
|
163
|
-
this.nextAction = this._register(this.createCommandAction(showNextInlineSuggestionActionId, localize(
|
|
163
|
+
this.nextAction = this._register(this.createCommandAction(showNextInlineSuggestionActionId, localize(1217, 'Next'), ThemeIcon.asClassName(inlineSuggestionHintsNextIcon)));
|
|
164
164
|
this.inlineCompletionsActionsMenus = this._register(this._menuService.createMenu(MenuId.InlineCompletionsActions, this._contextKeyService));
|
|
165
165
|
this.clearAvailableSuggestionCountLabelDebounced = this._register(new RunOnceScheduler(() => {
|
|
166
166
|
this.availableSuggestionCountAction.label = '';
|
|
@@ -52,6 +52,9 @@ import { OffsetRange } from '../../../../common/core/ranges/offsetRange.js';
|
|
|
52
52
|
import { URI } from '../../../../../base/common/uri.js';
|
|
53
53
|
let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
54
54
|
get isAcceptingPartially() { return this._isAcceptingPartially; }
|
|
55
|
+
get editor() {
|
|
56
|
+
return this._editor;
|
|
57
|
+
}
|
|
55
58
|
constructor(textModel, _selectedSuggestItem, _textModelVersionId, _positions, _debounceValue, _enabled, _editor, _instantiationService, _commandService, _languageConfigurationService, _accessibilityService, _languageFeaturesService, _codeEditorService, _inlineCompletionsService) {
|
|
56
59
|
super();
|
|
57
60
|
this.textModel = textModel;
|
|
@@ -80,10 +83,10 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
80
83
|
this._isAcceptingPartially = false;
|
|
81
84
|
this._appearedInsideViewport = derived(this, reader => {
|
|
82
85
|
const state = this.state.read(reader);
|
|
83
|
-
if (!state || !state.
|
|
86
|
+
if (!state || !state.inlineSuggestion) {
|
|
84
87
|
return false;
|
|
85
88
|
}
|
|
86
|
-
return isSuggestionInViewport(this._editor, state.
|
|
89
|
+
return isSuggestionInViewport(this._editor, state.inlineSuggestion);
|
|
87
90
|
});
|
|
88
91
|
this._onDidAccept = new Emitter();
|
|
89
92
|
this.onDidAccept = this._onDidAccept.event;
|
|
@@ -319,7 +322,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
319
322
|
}
|
|
320
323
|
if (a.kind === 'ghostText' && b.kind === 'ghostText') {
|
|
321
324
|
return ghostTextsOrReplacementsEqual(a.ghostTexts, b.ghostTexts)
|
|
322
|
-
&& a.
|
|
325
|
+
&& a.inlineSuggestion === b.inlineSuggestion
|
|
323
326
|
&& a.suggestItem === b.suggestItem;
|
|
324
327
|
}
|
|
325
328
|
else if (a.kind === 'inlineEdit' && b.kind === 'inlineEdit') {
|
|
@@ -348,7 +351,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
348
351
|
const nextEditUri = (item.inlineEdit?.command?.id === 'vscode.open' || item.inlineEdit?.command?.id === '_workbench.open') &&
|
|
349
352
|
// eslint-disable-next-line local/code-no-any-casts
|
|
350
353
|
item.inlineEdit?.command.arguments?.length ? URI.from(item.inlineEdit?.command.arguments[0]) : undefined;
|
|
351
|
-
return { kind: 'inlineEdit', inlineEdit,
|
|
354
|
+
return { kind: 'inlineEdit', inlineEdit, inlineSuggestion: inlineEditResult, edits: e, cursorAtInlineEdit, nextEditUri };
|
|
352
355
|
}
|
|
353
356
|
const suggestItem = this._selectedSuggestItem.read(reader);
|
|
354
357
|
if (!this._shouldShowOnSuggestConflict.read(reader) && suggestItem) {
|
|
@@ -369,17 +372,17 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
369
372
|
const edits = validEditsAndGhostTexts.map(({ edit }) => edit);
|
|
370
373
|
const ghostTexts = validEditsAndGhostTexts.map(({ ghostText }) => ghostText);
|
|
371
374
|
const primaryGhostText = ghostTexts[0] ?? new GhostText(fullEdit.range.endLineNumber, []);
|
|
372
|
-
return { kind: 'ghostText', edits, primaryGhostText, ghostTexts,
|
|
375
|
+
return { kind: 'ghostText', edits, primaryGhostText, ghostTexts, inlineSuggestion: augmentation?.completion, suggestItem };
|
|
373
376
|
}
|
|
374
377
|
else {
|
|
375
378
|
if (!this._isActive.read(reader)) {
|
|
376
379
|
return undefined;
|
|
377
380
|
}
|
|
378
|
-
const
|
|
379
|
-
if (!
|
|
381
|
+
const inlineSuggestion = this.selectedInlineCompletion.read(reader);
|
|
382
|
+
if (!inlineSuggestion) {
|
|
380
383
|
return undefined;
|
|
381
384
|
}
|
|
382
|
-
const replacement =
|
|
385
|
+
const replacement = inlineSuggestion.getSingleTextEdit();
|
|
383
386
|
const mode = this._inlineSuggestMode.read(reader);
|
|
384
387
|
const positions = this._positions.read(reader);
|
|
385
388
|
const allPotentialEdits = [replacement, ...getSecondaryEdits(this.textModel, positions, replacement)];
|
|
@@ -391,7 +394,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
391
394
|
if (!ghostTexts[0]) {
|
|
392
395
|
return undefined;
|
|
393
396
|
}
|
|
394
|
-
return { kind: 'ghostText', edits, primaryGhostText: ghostTexts[0], ghostTexts,
|
|
397
|
+
return { kind: 'ghostText', edits, primaryGhostText: ghostTexts[0], ghostTexts, inlineSuggestion, suggestItem: undefined };
|
|
395
398
|
}
|
|
396
399
|
});
|
|
397
400
|
this.inlineCompletionState = derived(this, reader => {
|
|
@@ -416,7 +419,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
416
419
|
return !!s;
|
|
417
420
|
});
|
|
418
421
|
this.warning = derived(this, reader => {
|
|
419
|
-
return this.inlineCompletionState.read(reader)?.
|
|
422
|
+
return this.inlineCompletionState.read(reader)?.inlineSuggestion?.warning;
|
|
420
423
|
});
|
|
421
424
|
this.ghostTexts = derivedOpts({ owner: this, equalsFn: ghostTextsOrReplacementsEqual }, reader => {
|
|
422
425
|
const v = this.inlineCompletionState.read(reader);
|
|
@@ -437,12 +440,12 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
437
440
|
if (!state || state.kind !== 'inlineEdit') {
|
|
438
441
|
return false;
|
|
439
442
|
}
|
|
440
|
-
if (state.
|
|
443
|
+
if (state.inlineSuggestion.hint) {
|
|
441
444
|
return false;
|
|
442
445
|
}
|
|
443
|
-
const isCurrentModelVersion = state.
|
|
446
|
+
const isCurrentModelVersion = state.inlineSuggestion.updatedEditModelVersion === this._textModelVersionId.read(reader);
|
|
444
447
|
return (this._inlineEditsShowCollapsedEnabled.read(reader) || !isCurrentModelVersion)
|
|
445
|
-
&& this._jumpedToId.read(reader) !== state.
|
|
448
|
+
&& this._jumpedToId.read(reader) !== state.inlineSuggestion.semanticId
|
|
446
449
|
&& !this._inAcceptFlow.read(reader);
|
|
447
450
|
});
|
|
448
451
|
this._tabShouldIndent = derived(this, reader => {
|
|
@@ -479,7 +482,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
479
482
|
if (this.showCollapsed.read(reader)) {
|
|
480
483
|
return true;
|
|
481
484
|
}
|
|
482
|
-
if (this._inAcceptFlow.read(reader) && this._appearedInsideViewport.read(reader)
|
|
485
|
+
if (this._inAcceptFlow.read(reader) && this._appearedInsideViewport.read(reader)) {
|
|
483
486
|
return false;
|
|
484
487
|
}
|
|
485
488
|
return !s.cursorAtInlineEdit.read(reader);
|
|
@@ -495,13 +498,13 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
495
498
|
if (this._tabShouldIndent.read(reader)) {
|
|
496
499
|
return false;
|
|
497
500
|
}
|
|
498
|
-
if (this._inAcceptFlow.read(reader) && this._appearedInsideViewport.read(reader)
|
|
501
|
+
if (this._inAcceptFlow.read(reader) && this._appearedInsideViewport.read(reader)) {
|
|
499
502
|
return true;
|
|
500
503
|
}
|
|
501
|
-
if (s.
|
|
504
|
+
if (s.inlineSuggestion.targetRange.startLineNumber === this._editorObs.cursorLineNumber.read(reader)) {
|
|
502
505
|
return true;
|
|
503
506
|
}
|
|
504
|
-
if (this._jumpedToId.read(reader) === s.
|
|
507
|
+
if (this._jumpedToId.read(reader) === s.inlineSuggestion.semanticId) {
|
|
505
508
|
return true;
|
|
506
509
|
}
|
|
507
510
|
return s.cursorAtInlineEdit.read(reader);
|
|
@@ -543,8 +546,8 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
543
546
|
: InlineCompletionEditorType.TextEditor;
|
|
544
547
|
}
|
|
545
548
|
this._register(recomputeInitiallyAndOnChange(this.state, (s) => {
|
|
546
|
-
if (s && s.
|
|
547
|
-
this._inlineCompletionsService.reportNewCompletion(s.
|
|
549
|
+
if (s && s.inlineSuggestion) {
|
|
550
|
+
this._inlineCompletionsService.reportNewCompletion(s.inlineSuggestion.requestUuid);
|
|
548
551
|
}
|
|
549
552
|
}));
|
|
550
553
|
this._register(recomputeInitiallyAndOnChange(this._fetchInlineCompletionsPromise));
|
|
@@ -558,14 +561,14 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
558
561
|
this._jumpedToId.set(undefined, undefined);
|
|
559
562
|
}
|
|
560
563
|
}));
|
|
561
|
-
const inlineEditSemanticId = this.inlineEditState.map(s => s?.
|
|
564
|
+
const inlineEditSemanticId = this.inlineEditState.map(s => s?.inlineSuggestion.semanticId);
|
|
562
565
|
this._register(autorun(reader => {
|
|
563
566
|
const id = inlineEditSemanticId.read(reader);
|
|
564
567
|
if (id) {
|
|
565
568
|
this._editor.pushUndoStop();
|
|
566
569
|
this._lastShownInlineCompletionInfo = {
|
|
567
570
|
alternateTextModelVersionId: this.textModel.getAlternativeVersionId(),
|
|
568
|
-
inlineCompletion: this.state.get().
|
|
571
|
+
inlineCompletion: this.state.get().inlineSuggestion,
|
|
569
572
|
};
|
|
570
573
|
}
|
|
571
574
|
}));
|
|
@@ -591,7 +594,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
591
594
|
}
|
|
592
595
|
// If there is an active suggestion from a different provider, we ignore the update
|
|
593
596
|
const activeState = this.state.get();
|
|
594
|
-
if (activeState && (activeState.
|
|
597
|
+
if (activeState && (activeState.inlineSuggestion || activeState.edits) && activeState.inlineSuggestion?.source.provider !== provider) {
|
|
595
598
|
return;
|
|
596
599
|
}
|
|
597
600
|
transaction(tx => {
|
|
@@ -682,7 +685,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
682
685
|
stop(stopReason = 'automatic', tx) {
|
|
683
686
|
subtransaction(tx, tx => {
|
|
684
687
|
if (stopReason === 'explicitCancel') {
|
|
685
|
-
const inlineCompletion = this.state.get()?.
|
|
688
|
+
const inlineCompletion = this.state.get()?.inlineSuggestion;
|
|
686
689
|
if (inlineCompletion) {
|
|
687
690
|
inlineCompletion.reportEndOfLife({ kind: InlineCompletionEndOfLifeReasonKind.Rejected });
|
|
688
691
|
}
|
|
@@ -744,13 +747,13 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
744
747
|
let isNextEditUri = false;
|
|
745
748
|
const state = this.state.get();
|
|
746
749
|
if (state?.kind === 'ghostText') {
|
|
747
|
-
if (!state || state.primaryGhostText.isEmpty() || !state.
|
|
750
|
+
if (!state || state.primaryGhostText.isEmpty() || !state.inlineSuggestion) {
|
|
748
751
|
return;
|
|
749
752
|
}
|
|
750
|
-
completion = state.
|
|
753
|
+
completion = state.inlineSuggestion;
|
|
751
754
|
}
|
|
752
755
|
else if (state?.kind === 'inlineEdit') {
|
|
753
|
-
completion = state.
|
|
756
|
+
completion = state.inlineSuggestion;
|
|
754
757
|
isNextEditUri = !!state.nextEditUri;
|
|
755
758
|
}
|
|
756
759
|
else {
|
|
@@ -853,11 +856,11 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
853
856
|
throw new BugIndicatingError();
|
|
854
857
|
}
|
|
855
858
|
const state = this.inlineCompletionState.get();
|
|
856
|
-
if (!state || state.primaryGhostText.isEmpty() || !state.
|
|
859
|
+
if (!state || state.primaryGhostText.isEmpty() || !state.inlineSuggestion) {
|
|
857
860
|
return;
|
|
858
861
|
}
|
|
859
862
|
const ghostText = state.primaryGhostText;
|
|
860
|
-
const completion = state.
|
|
863
|
+
const completion = state.inlineSuggestion;
|
|
861
864
|
if (completion.snippetInfo) {
|
|
862
865
|
// not in WYSIWYG mode, partial commit might change completion, thus it is not supported
|
|
863
866
|
await this.accept(editor);
|
|
@@ -887,7 +890,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
887
890
|
const selections = getEndPositionsAfterApplying(edits).map(p => Selection.fromPositions(p));
|
|
888
891
|
editor.edit(TextEdit.fromParallelReplacementsUnsorted(edits), this._getMetadata(completion, type));
|
|
889
892
|
editor.setSelections(selections, 'inlineCompletionPartialAccept');
|
|
890
|
-
editor.revealPositionInCenterIfOutsideViewport(editor.getPosition(),
|
|
893
|
+
editor.revealPositionInCenterIfOutsideViewport(editor.getPosition(), 0 /* ScrollType.Smooth */);
|
|
891
894
|
}
|
|
892
895
|
finally {
|
|
893
896
|
this._isAcceptingPartially = false;
|
|
@@ -922,7 +925,7 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
922
925
|
}
|
|
923
926
|
extractReproSample() {
|
|
924
927
|
const value = this.textModel.getValue();
|
|
925
|
-
const item = this.state.get()?.
|
|
928
|
+
const item = this.state.get()?.inlineSuggestion;
|
|
926
929
|
return {
|
|
927
930
|
documentValue: value,
|
|
928
931
|
inlineCompletion: item?.getSourceCompletion(),
|
|
@@ -934,21 +937,21 @@ let InlineCompletionsModel = class InlineCompletionsModel extends Disposable {
|
|
|
934
937
|
return;
|
|
935
938
|
}
|
|
936
939
|
transaction(tx => {
|
|
937
|
-
this._jumpedToId.set(s.
|
|
940
|
+
this._jumpedToId.set(s.inlineSuggestion.semanticId, tx);
|
|
938
941
|
this.dontRefetchSignal.trigger(tx);
|
|
939
|
-
const targetRange = s.
|
|
942
|
+
const targetRange = s.inlineSuggestion.targetRange;
|
|
940
943
|
const targetPosition = targetRange.getStartPosition();
|
|
941
944
|
this._editor.setPosition(targetPosition, 'inlineCompletions.jump');
|
|
942
945
|
// TODO: consider using view information to reveal it
|
|
943
|
-
const isSingleLineChange = targetRange.isSingleLine() && (s.
|
|
946
|
+
const isSingleLineChange = targetRange.isSingleLine() && (s.inlineSuggestion.hint || !s.inlineSuggestion.insertText.includes('\n'));
|
|
944
947
|
if (isSingleLineChange) {
|
|
945
|
-
this._editor.revealPosition(targetPosition);
|
|
948
|
+
this._editor.revealPosition(targetPosition, 0 /* ScrollType.Smooth */);
|
|
946
949
|
}
|
|
947
950
|
else {
|
|
948
951
|
const revealRange = new Range(targetRange.startLineNumber - 1, 1, targetRange.endLineNumber + 1, 1);
|
|
949
|
-
this._editor.revealRange(revealRange,
|
|
952
|
+
this._editor.revealRange(revealRange, 0 /* ScrollType.Smooth */);
|
|
950
953
|
}
|
|
951
|
-
s.
|
|
954
|
+
s.inlineSuggestion.identity.setJumpTo(tx);
|
|
952
955
|
this._editor.focus();
|
|
953
956
|
});
|
|
954
957
|
}
|
|
@@ -1027,8 +1030,10 @@ class FadeoutDecoration extends Disposable {
|
|
|
1027
1030
|
}));
|
|
1028
1031
|
}
|
|
1029
1032
|
}
|
|
1030
|
-
function isSuggestionInViewport(editor, suggestion) {
|
|
1033
|
+
export function isSuggestionInViewport(editor, suggestion, reader = undefined) {
|
|
1031
1034
|
const targetRange = suggestion.targetRange;
|
|
1035
|
+
// TODO make getVisibleRanges reactive!
|
|
1036
|
+
observableCodeEditor(editor).scrollTop.read(reader);
|
|
1032
1037
|
const visibleRanges = editor.getVisibleRanges();
|
|
1033
1038
|
if (visibleRanges.length < 1) {
|
|
1034
1039
|
return false;
|