monaco-editor-core 0.55.0 → 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/version.txt +1 -1
- 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":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC1G,OAAO,EAAoC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAC7M,OAAO,EAAE,qBAAqB,EAAE,MAAM,qEAAqE,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qEAAqE,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,0DAA0D,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAC;AAG3F,OAAO,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,0CAA0C,CAAC;AAKhE,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+DAA+D,CAAC;AACvG,OAAO,EAAoB,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,oCAAoC,EAAE,gCAAgC,EAAE,oCAAoC,EAAE,sCAAsC,EAAE,kCAAkC,EAAE,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AS,wBAAwB,CAAC,SAAqC;IACtE,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QACtB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACF,CAAC","file":"gutterIndicatorView.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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../../platform/hover/browser/hoverService.js';\nimport { HoverWidget } from '../../../../../../../platform/hover/browser/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, reader.store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../../platform/hover/browser/hoverService.js';\nimport { HoverWidget } from '../../../../../../../platform/hover/browser/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\n\tprivate get model() {\n\t\tconst model = this._model.get();\n\t\tif (!model) { throw new BugIndicatingError('Inline Edit Model not available'); }\n\t\treturn model;\n\t}\n\n\tprivate readonly _gutterIndicatorStyles;\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _originalRange: IObservable<LineRange | undefined>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService themeService: IThemeService,\n\t) {\n\t\tsuper();\n\n\t\tthis._tabAction = derived(this, reader => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return InlineEditTabAction.Inactive; }\n\t\t\treturn model.tabAction.read(reader);\n\t\t});\n\n\t\tthis._hoverVisible = observableValue(this, false);\n\t\tthis.isHoverVisible = this._hoverVisible;\n\t\tthis._isHoveredOverIcon = observableValue(this, false);\n\t\tthis._isHoveredOverIconDebounced = debouncedObservable(this._isHoveredOverIcon, 100);\n\t\tthis.isHoveredOverIcon = this._isHoveredOverIconDebounced;\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\tthis._gutterIndicatorStyles = this._tabAction.map(this, (v, reader) => {\n\t\t\tswitch (v) {\n\t\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, themeService).read(reader).toString(),\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, themeService).read(reader).toString(),\n\t\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, themeService).read(reader).toString(),\n\t\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, themeService).read(reader).toString()\n\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tassertNever(v);\n\t\t\t}\n\t\t});\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._originalRange);\n\t\tthis._state = derived(this, reader => {\n\t\t\tconst range = this._originalRangeObs.read(reader);\n\t\t\tif (!range) { return undefined; }\n\t\t\treturn {\n\t\t\t\trange,\n\t\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, reader.store),\n\t\t\t};\n\t\t});\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\t\tthis._lineNumberToRender = derived(this, reader => {\n\t\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst lineNumber = this._originalRange.read(reader)?.startLineNumber;\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\t\tif (!cursorPosition) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\t\treturn lineNumber.toString();\n\t\t\t\t}\n\t\t\t\treturn relativeLineNumber.toString();\n\t\t\t}\n\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\treturn lineNumber.toString();\n\t\t});\n\t\tthis._availableWidthForIcon = derived(this, reader => {\n\t\t\tconst textModel = this._editorObs.editor.getModel();\n\t\t\tconst editor = this._editorObs.editor;\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\t\treturn () => 0;\n\t\t\t}\n\n\t\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\t\treturn () => gutterWidth;\n\t\t\t}\n\n\t\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\t\tconst totalLines = textModel.getLineCount();\n\t\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\t\tconst offsetDigits: {\n\t\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\t\ttopOfLineNumber: number;\n\t\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t\t}[] = [];\n\n\t\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\t\tconst digitsWidth = digits * w;\n\t\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t\t}\n\n\t\t\treturn (topOffset: number) => {\n\t\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t\t};\n\t\t});\n\t\tthis._layout = derived(this, reader => {\n\t\t\tconst s = this._state.read(reader);\n\t\t\tif (!s) { return undefined; }\n\n\t\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\t\tconst gutterViewPortPadding = 2;\n\n\t\t\t// Entire gutter view from top left to bottom right\n\t\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t\t// The glyph margin area across all relevant lines\n\t\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t\t// The gutter view container (pill)\n\t\t\tconst pillHeight = lineHeight;\n\t\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t\t// The icon which will be rendered in the pill\n\t\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\t\tconst iconDocked = derived(this, reader => {\n\t\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\t\treturn Codicon.check;\n\t\t\t\t}\n\t\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t\t}\n\t\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t\t});\n\n\t\t\tconst idealIconWidth = 22;\n\t\t\tconst minimalIconWidth = 16; // codicon size\n\t\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t\t};\n\n\t\t\tif (pillIsFullyDocked) {\n\t\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\t\tlet lineNumberWidth;\n\t\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t\t} else {\n\t\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t\t}\n\n\t\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t\tlineNumberRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\t\tif (pillIsPartiallyDocked) {\n\t\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\t\tconst iconRect = pillRect;\n\n\t\t\t\treturn {\n\t\t\t\t\tgutterEditArea,\n\t\t\t\t\ticon: iconDocked,\n\t\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\t\ticonRect,\n\t\t\t\t\tpillRect,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\t// docked = pill was already in the viewport\n\t\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t\t'top' as const :\n\t\t\t\t'bottom' as const;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconNoneDocked,\n\t\t\t\ticonDirection,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t});\n\t\tthis._iconRef = n.ref<HTMLDivElement>();\n\t\tthis.isVisible = this._layout.map(l => !!l);\n\t\tthis._indicator = n.div({\n\t\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\t\tonclick: () => {\n\t\t\t\tconst layout = this._layout.get();\n\t\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\tif (acceptOnClick) {\n\t\t\t\t\tthis.model.accept();\n\t\t\t\t} else {\n\t\t\t\t\tthis.model.jump();\n\t\t\t\t}\n\t\t\t},\n\t\t\ttabIndex: 0,\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'visible',\n\t\t\t},\n\t\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t\t}\n\t\t\t}),\n\t\t\tn.div({\n\t\t\t\tclass: 'icon',\n\t\t\t\tref: this._iconRef,\n\t\t\t\tonmouseenter: () => {\n\t\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\t\tthis._showHover();\n\t\t\t\t},\n\t\t\t\tstyle: {\n\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\tzIndex: '20',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tn.div({\n\t\t\t\t\tclassName: 'line-number',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\tthis._lineNumberToRender\n\t\t\t\t),\n\t\t\t\tn.div({\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t\t}\n\t\t\t\t}, [\n\t\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t\t])\n\t\t\t]),\n\t\t])).keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tthis._indicator.readEffect(reader);\n\t\t\tif (this._indicator.element) {\n\t\t\t\tthis._editorObs.editor.applyFontInfo(this._indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state;\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender;\n\n\tprivate readonly _availableWidthForIcon;\n\n\tprivate readonly _layout;\n\n\n\tprivate readonly _iconRef;\n\n\tpublic readonly isVisible;\n\n\tprivate readonly _hoverVisible;\n\tpublic readonly isHoverVisible: IObservable<boolean>;\n\n\tprivate readonly _isHoveredOverIcon;\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean>;\n\tpublic readonly isHoveredOverIcon: IObservable<boolean>;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis.model,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t\tthis._editorObs,\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _tabAction;\n\n\tprivate readonly _indicator;\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE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,CAAC,OAAO;SACxB,CAA4B,CAAC;QAC9B,IAAI,CAAC,EAAE,CAAC;YACP,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YACxC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACjF,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE;gBACpC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;gBACzC,eAAe,CAAC,OAAO,EAAE,CAAC;YAC3B,CAAC,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACP,eAAe,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;IACF,CAAC;CAqFD,CAAA;AAldY,0BAA0B;IASpC,WAAA,aAAa,CAAA;IACb,WAAA,qBAAqB,CAAA;IACrB,WAAA,qBAAqB,CAAA;IACrB,WAAA,aAAa,CAAA;GAZH,0BAA0B,CAkdtC;;AAED,SAAS,wBAAwB,CAAC,SAAqC;IACtE,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;QACtB,KAAK,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,KAAK,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;AACF,CAAC","file":"gutterIndicatorView.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 { n, trackFocus } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { BugIndicatingError } from '../../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';\nimport { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';\nimport { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { HoverService } from '../../../../../../../platform/hover/browser/hoverService.js';\nimport { HoverWidget } from '../../../../../../../platform/hover/browser/hoverWidget.js';\nimport { EditorOption, RenderLineNumbersType } from '../../../../../../common/config/editorOptions.js';\nimport { LineRange } from '../../../../../../common/core/ranges/lineRange.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';\nimport { InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';\nimport { mapOutFalsy, rectToProps } from '../utils/utils.js';\nimport { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';\nimport { assertNever } from '../../../../../../../base/common/assert.js';\nimport { Command, InlineCompletionCommand } from '../../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../../model/inlineSuggestionItem.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { InlineCompletionsModel } from '../../../model/inlineCompletionsModel.js';\n\nexport class InlineEditsGutterIndicatorData {\n\tconstructor(\n\t\treadonly gutterMenuData: InlineSuggestionGutterMenuData,\n\t\treadonly originalRange: LineRange,\n\t\treadonly model: SimpleInlineSuggestModel,\n\t) { }\n}\n\nexport class InlineSuggestionGutterMenuData {\n\tpublic static fromInlineSuggestion(suggestion: InlineSuggestionItem): InlineSuggestionGutterMenuData {\n\t\treturn new InlineSuggestionGutterMenuData(\n\t\t\tsuggestion.action,\n\t\t\tsuggestion.source.provider.displayName ?? localize('inlineSuggestion', \"Inline Suggestion\"),\n\t\t\tsuggestion.source.inlineSuggestions.commands ?? [],\n\t\t);\n\t}\n\n\tconstructor(\n\t\treadonly action: Command | undefined,\n\t\treadonly displayName: string,\n\t\treadonly extensionCommands: InlineCompletionCommand[],\n\t) { }\n}\n\n// TODO this class does not make that much sense yet.\nexport class SimpleInlineSuggestModel {\n\tpublic static fromInlineCompletionModel(model: InlineCompletionsModel): SimpleInlineSuggestModel {\n\t\treturn new SimpleInlineSuggestModel(\n\t\t\t() => model.accept(),\n\t\t\t() => model.jump(),\n\t\t);\n\t}\n\n\tconstructor(\n\t\treadonly accept: () => void,\n\t\treadonly jump: () => void,\n\t) { }\n}\n\nexport class InlineEditsGutterIndicator extends Disposable {\n\tconstructor(\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\tprivate readonly _data: IObservable<InlineEditsGutterIndicatorData | undefined>,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\tprivate readonly _verticalOffset: IObservable<number>,\n\t\tprivate readonly _isHoveringOverInlineEdit: IObservable<boolean>,\n\t\tprivate readonly _focusIsInMenu: ISettableObservable<boolean>,\n\n\t\t@IHoverService private readonly _hoverService: HoverService,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,\n\t\t@IThemeService private readonly _themeService: IThemeService\n\t) {\n\t\tsuper();\n\n\t\tthis._originalRangeObs = mapOutFalsy(this._data.map(d => d?.originalRange));\n\n\t\tthis._stickyScrollController = StickyScrollController.get(this._editorObs.editor);\n\t\tthis._stickyScrollHeight = this._stickyScrollController\n\t\t\t? observableFromEvent(this._stickyScrollController.onDidChangeStickyScrollHeight, () => this._stickyScrollController!.stickyScrollWidgetHeight)\n\t\t\t: constObservable(0);\n\n\t\tconst indicator = this._indicator.keepUpdated(this._store);\n\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: indicator.element,\n\t\t\tposition: constObservable(null),\n\t\t\tallowEditorOverflow: false,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onMouseMove((e: IEditorMouseEvent) => {\n\t\t\tconst state = this._state.get();\n\t\t\tif (state === undefined) { return; }\n\n\t\t\tconst el = this._iconRef.element;\n\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\tconst rectangularArea = Rect.fromLeftTopWidthHeight(rect.left, rect.top, rect.width, rect.height);\n\t\t\tconst point = new Point(e.event.posx, e.event.posy);\n\t\t\tthis._isHoveredOverIcon.set(rectangularArea.containsPoint(point), undefined);\n\t\t}));\n\n\t\tthis._register(this._editorObs.editor.onDidScrollChange(() => {\n\t\t\tthis._isHoveredOverIcon.set(false, undefined);\n\t\t}));\n\n\t\tthis._isHoveredOverInlineEditDebounced = debouncedObservable(this._isHoveringOverInlineEdit, 100);\n\n\t\t// pulse animation when hovering inline edit\n\t\tthis._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {\n\t\t\tif (isHovering) {\n\t\t\t\tthis.triggerAnimation();\n\t\t\t}\n\t\t}));\n\n\t\tthis._register(autorun(reader => {\n\t\t\tindicator.readEffect(reader);\n\t\t\tif (indicator.element) {\n\t\t\t\t// For the line number\n\t\t\t\tthis._editorObs.editor.applyFontInfo(indicator.element);\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;\n\n\tprivate readonly _gutterIndicatorStyles = derived(this, reader => {\n\t\tconst v = this._tabAction.read(reader);\n\t\tswitch (v) {\n\t\t\tcase InlineEditTabAction.Inactive: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorSecondaryBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorSecondaryForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorSecondaryBorder, this._themeService).read(reader).toString(),\n\t\t\t};\n\t\t\tcase InlineEditTabAction.Jump: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorPrimaryBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorPrimaryForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorPrimaryBorder, this._themeService).read(reader).toString()\n\t\t\t};\n\t\t\tcase InlineEditTabAction.Accept: return {\n\t\t\t\tbackground: getEditorBlendedColor(inlineEditIndicatorsuccessfulBackground, this._themeService).read(reader).toString(),\n\t\t\t\tforeground: getEditorBlendedColor(inlineEditIndicatorsuccessfulForeground, this._themeService).read(reader).toString(),\n\t\t\t\tborder: getEditorBlendedColor(inlineEditIndicatorsuccessfulBorder, this._themeService).read(reader).toString()\n\t\t\t};\n\t\t\tdefault:\n\t\t\t\tassertNever(v);\n\t\t}\n\t});\n\n\tpublic triggerAnimation(): Promise<Animation> {\n\t\tif (this._accessibilityService.isMotionReduced()) {\n\t\t\treturn new Animation(null, null).finished;\n\t\t}\n\n\t\t// PULSE ANIMATION:\n\t\tconst animation = this._iconRef.element.animate([\n\t\t\t{\n\t\t\t\toutline: `2px solid ${this._gutterIndicatorStyles.map(v => v.border).get()}`,\n\t\t\t\toutlineOffset: '-1px',\n\t\t\t\toffset: 0\n\t\t\t},\n\t\t\t{\n\t\t\t\toutline: `2px solid transparent`,\n\t\t\t\toutlineOffset: '10px',\n\t\t\t\toffset: 1\n\t\t\t},\n\t\t], { duration: 500 });\n\n\t\treturn animation.finished;\n\t}\n\n\tprivate readonly _originalRangeObs;\n\n\tprivate readonly _state = derived(this, reader => {\n\t\tconst range = this._originalRangeObs.read(reader);\n\t\tif (!range) { return undefined; }\n\t\treturn {\n\t\t\trange,\n\t\t\tlineOffsetRange: this._editorObs.observeLineOffsetRange(range, reader.store),\n\t\t};\n\t});\n\n\tprivate readonly _stickyScrollController;\n\tprivate readonly _stickyScrollHeight;\n\n\tprivate readonly _lineNumberToRender = derived(this, reader => {\n\t\tif (this._verticalOffset.read(reader) !== 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst lineNumber = this._data.read(reader)?.originalRange.startLineNumber;\n\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\n\t\tif (lineNumber === undefined || lineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Interval) {\n\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (lineNumber % 10 === 0 || cursorPosition && cursorPosition.lineNumber === lineNumber) {\n\t\t\t\treturn lineNumber.toString();\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative) {\n\t\t\tconst cursorPosition = this._editorObs.cursorPosition.read(reader);\n\t\t\tif (!cursorPosition) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tconst relativeLineNumber = Math.abs(lineNumber - cursorPosition.lineNumber);\n\t\t\tif (relativeLineNumber === 0) {\n\t\t\t\treturn lineNumber.toString();\n\t\t\t}\n\t\t\treturn relativeLineNumber.toString();\n\t\t}\n\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Custom) {\n\t\t\tif (lineNumberOptions.renderFn) {\n\t\t\t\treturn lineNumberOptions.renderFn(lineNumber);\n\t\t\t}\n\t\t\treturn '';\n\t\t}\n\n\t\treturn lineNumber.toString();\n\t});\n\n\tprivate readonly _availableWidthForIcon = derived(this, reader => {\n\t\tconst textModel = this._editorObs.editor.getModel();\n\t\tconst editor = this._editorObs.editor;\n\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\t\tconst gutterWidth = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft;\n\n\t\tif (!textModel || gutterWidth <= 0) {\n\t\t\treturn () => 0;\n\t\t}\n\n\t\t// no glyph margin => the entire gutter width is available as there is no optimal place to put the icon\n\t\tif (layout.lineNumbersLeft === 0) {\n\t\t\treturn () => gutterWidth;\n\t\t}\n\n\t\tconst lineNumberOptions = this._editorObs.getOption(EditorOption.lineNumbers).read(reader);\n\t\tif (lineNumberOptions.renderType === RenderLineNumbersType.Relative || /* likely to flicker */\n\t\t\tlineNumberOptions.renderType === RenderLineNumbersType.Off) {\n\t\t\treturn () => gutterWidth;\n\t\t}\n\n\t\tconst w = editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth;\n\t\tconst rightOfLineNumber = layout.lineNumbersLeft + layout.lineNumbersWidth;\n\t\tconst totalLines = textModel.getLineCount();\n\t\tconst totalLinesDigits = (totalLines + 1 /* 0 based to 1 based*/).toString().length;\n\n\t\tconst offsetDigits: {\n\t\t\tfirstLineNumberWithDigitCount: number;\n\t\t\ttopOfLineNumber: number;\n\t\t\tusableWidthLeftOfLineNumber: number;\n\t\t}[] = [];\n\n\t\t// We only need to pre compute the usable width left of the line number for the first line number with a given digit count\n\t\tfor (let digits = 1; digits <= totalLinesDigits; digits++) {\n\t\t\tconst firstLineNumberWithDigitCount = 10 ** (digits - 1);\n\t\t\tconst topOfLineNumber = editor.getTopForLineNumber(firstLineNumberWithDigitCount);\n\t\t\tconst digitsWidth = digits * w;\n\t\t\tconst usableWidthLeftOfLineNumber = Math.min(gutterWidth, Math.max(0, rightOfLineNumber - digitsWidth - layout.glyphMarginLeft));\n\t\t\toffsetDigits.push({ firstLineNumberWithDigitCount, topOfLineNumber, usableWidthLeftOfLineNumber });\n\t\t}\n\n\t\treturn (topOffset: number) => {\n\t\t\tfor (let i = offsetDigits.length - 1; i >= 0; i--) {\n\t\t\t\tif (topOffset >= offsetDigits[i].topOfLineNumber) {\n\t\t\t\t\treturn offsetDigits[i].usableWidthLeftOfLineNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new BugIndicatingError('Could not find avilable width for icon');\n\t\t};\n\t});\n\n\tprivate readonly _layout = derived(this, reader => {\n\t\tconst s = this._state.read(reader);\n\t\tif (!s) { return undefined; }\n\n\t\tconst layout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst lineHeight = this._editorObs.observeLineHeightForLine(s.range.map(r => r.startLineNumber)).read(reader);\n\t\tconst gutterViewPortPadding = 2;\n\n\t\t// Entire gutter view from top left to bottom right\n\t\tconst gutterWidthWithoutPadding = layout.decorationsLeft + layout.decorationsWidth - layout.glyphMarginLeft - 2 * gutterViewPortPadding;\n\t\tconst gutterHeightWithoutPadding = layout.height - 2 * gutterViewPortPadding;\n\t\tconst gutterViewPortWithStickyScroll = Rect.fromLeftTopWidthHeight(gutterViewPortPadding, gutterViewPortPadding, gutterWidthWithoutPadding, gutterHeightWithoutPadding);\n\t\tconst gutterViewPortWithoutStickyScrollWithoutPaddingTop = gutterViewPortWithStickyScroll.withTop(this._stickyScrollHeight.read(reader));\n\t\tconst gutterViewPortWithoutStickyScroll = gutterViewPortWithStickyScroll.withTop(gutterViewPortWithoutStickyScrollWithoutPaddingTop.top + gutterViewPortPadding);\n\n\t\t// The glyph margin area across all relevant lines\n\t\tconst verticalEditRange = s.lineOffsetRange.read(reader);\n\t\tconst gutterEditArea = Rect.fromRanges(OffsetRange.fromTo(gutterViewPortWithoutStickyScroll.left, gutterViewPortWithoutStickyScroll.right), verticalEditRange);\n\n\t\t// The gutter view container (pill)\n\t\tconst pillHeight = lineHeight;\n\t\tconst pillOffset = this._verticalOffset.read(reader);\n\t\tconst pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);\n\t\tconst pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);\n\n\t\t// The icon which will be rendered in the pill\n\t\tconst iconNoneDocked = this._tabAction.map(action => action === InlineEditTabAction.Accept ? Codicon.keyboardTab : Codicon.arrowRight);\n\t\tconst iconDocked = derived(this, reader => {\n\t\t\tif (this._isHoveredOverIconDebounced.read(reader) || this._isHoveredOverInlineEditDebounced.read(reader)) {\n\t\t\t\treturn Codicon.check;\n\t\t\t}\n\t\t\tif (this._tabAction.read(reader) === InlineEditTabAction.Accept) {\n\t\t\t\treturn Codicon.keyboardTab;\n\t\t\t}\n\t\t\tconst cursorLineNumber = this._editorObs.cursorLineNumber.read(reader) ?? 0;\n\t\t\tconst editStartLineNumber = s.range.read(reader).startLineNumber;\n\t\t\treturn cursorLineNumber <= editStartLineNumber ? Codicon.keyboardTabAbove : Codicon.keyboardTabBelow;\n\t\t});\n\n\t\tconst idealIconWidth = 22;\n\t\tconst minimalIconWidth = 16; // codicon size\n\t\tconst iconWidth = (pillRect: Rect) => {\n\t\t\tconst availableWidth = this._availableWidthForIcon.read(undefined)(pillRect.bottom + this._editorObs.editor.getScrollTop()) - gutterViewPortPadding;\n\t\t\treturn Math.max(Math.min(availableWidth, idealIconWidth), minimalIconWidth);\n\t\t};\n\n\t\tif (pillIsFullyDocked) {\n\t\t\tconst pillRect = pillFullyDockedRect;\n\n\t\t\tlet lineNumberWidth;\n\t\t\tif (layout.lineNumbersWidth === 0) {\n\t\t\t\tlineNumberWidth = Math.min(Math.max(layout.lineNumbersLeft - gutterViewPortWithStickyScroll.left, 0), pillRect.width - idealIconWidth);\n\t\t\t} else {\n\t\t\t\tlineNumberWidth = Math.max(layout.lineNumbersLeft + layout.lineNumbersWidth - gutterViewPortWithStickyScroll.left, 0);\n\t\t\t}\n\n\t\t\tconst lineNumberRect = pillRect.withWidth(lineNumberWidth);\n\t\t\tconst iconWidth = Math.max(Math.min(layout.decorationsWidth, idealIconWidth), minimalIconWidth);\n\t\t\tconst iconRect = pillRect.withWidth(iconWidth).translateX(lineNumberWidth);\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconDocked,\n\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t\tlineNumberRect,\n\t\t\t};\n\t\t}\n\n\t\tconst pillPartiallyDockedPossibleArea = gutterViewPortWithStickyScroll.intersect(gutterEditArea); // The area in which the pill could be partially docked\n\t\tconst pillIsPartiallyDocked = pillPartiallyDockedPossibleArea && pillPartiallyDockedPossibleArea.height >= pillHeight;\n\n\t\tif (pillIsPartiallyDocked) {\n\t\t\t// pillFullyDockedRect is outside viewport, move it into the viewport under sticky scroll as we prefer the pill to not be on top of the sticky scroll\n\t\t\t// then move it into the possible area which will only cause it to move if it has to be rendered on top of the sticky scroll\n\t\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithoutStickyScroll).moveToBeContainedIn(pillPartiallyDockedPossibleArea);\n\t\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\t\tconst iconRect = pillRect;\n\n\t\t\treturn {\n\t\t\t\tgutterEditArea,\n\t\t\t\ticon: iconDocked,\n\t\t\t\ticonDirection: 'right' as const,\n\t\t\t\ticonRect,\n\t\t\t\tpillRect,\n\t\t\t};\n\t\t}\n\n\t\t// pillFullyDockedRect is outside viewport, so move it into viewport\n\t\tconst pillRectMoved = pillFullyDockedRect.moveToBeContainedIn(gutterViewPortWithStickyScroll);\n\t\tconst pillRect = pillRectMoved.withWidth(iconWidth(pillRectMoved));\n\t\tconst iconRect = pillRect;\n\n\t\t// docked = pill was already in the viewport\n\t\tconst iconDirection = pillRect.top < pillFullyDockedRect.top ?\n\t\t\t'top' as const :\n\t\t\t'bottom' as const;\n\n\t\treturn {\n\t\t\tgutterEditArea,\n\t\t\ticon: iconNoneDocked,\n\t\t\ticonDirection,\n\t\t\ticonRect,\n\t\t\tpillRect,\n\t\t};\n\t});\n\n\n\tprivate readonly _iconRef = n.ref<HTMLDivElement>();\n\n\tpublic readonly isVisible = this._layout.map(l => !!l);\n\n\tprivate readonly _hoverVisible = observableValue(this, false);\n\tpublic readonly isHoverVisible: IObservable<boolean> = this._hoverVisible;\n\n\tprivate readonly _isHoveredOverIcon = observableValue(this, false);\n\tprivate readonly _isHoveredOverIconDebounced: IObservable<boolean> = debouncedObservable(this._isHoveredOverIcon, 100);\n\tpublic readonly isHoveredOverIcon: IObservable<boolean> = this._isHoveredOverIconDebounced;\n\n\tprivate _showHover(): void {\n\t\tif (this._hoverVisible.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst data = this._data.get();\n\t\tif (!data) {\n\t\t\tthrow new BugIndicatingError('Gutter indicator data not available');\n\t\t}\n\t\tconst disposableStore = new DisposableStore();\n\t\tconst content = disposableStore.add(this._instantiationService.createInstance(\n\t\t\tGutterIndicatorMenuContent,\n\t\t\tthis._editorObs,\n\t\t\tdata.gutterMenuData,\n\t\t\t(focusEditor) => {\n\t\t\t\tif (focusEditor) {\n\t\t\t\t\tthis._editorObs.editor.focus();\n\t\t\t\t}\n\t\t\t\th?.dispose();\n\t\t\t},\n\t\t).toDisposableLiveElement());\n\n\t\tconst focusTracker = disposableStore.add(trackFocus(content.element));\n\t\tdisposableStore.add(focusTracker.onDidBlur(() => this._focusIsInMenu.set(false, undefined)));\n\t\tdisposableStore.add(focusTracker.onDidFocus(() => this._focusIsInMenu.set(true, undefined)));\n\t\tdisposableStore.add(toDisposable(() => this._focusIsInMenu.set(false, undefined)));\n\n\t\tconst h = this._hoverService.showInstantHover({\n\t\t\ttarget: this._iconRef.element,\n\t\t\tcontent: content.element,\n\t\t}) as HoverWidget | undefined;\n\t\tif (h) {\n\t\t\tthis._hoverVisible.set(true, undefined);\n\t\t\tdisposableStore.add(this._editorObs.editor.onDidScrollChange(() => h.dispose()));\n\t\t\tdisposableStore.add(h.onDispose(() => {\n\t\t\t\tthis._hoverVisible.set(false, undefined);\n\t\t\t\tdisposableStore.dispose();\n\t\t\t}));\n\t\t} else {\n\t\t\tdisposableStore.dispose();\n\t\t}\n\t}\n\n\tprivate readonly _indicator = n.div({\n\t\tclass: 'inline-edits-view-gutter-indicator',\n\t\tonclick: () => {\n\t\t\tconst layout = this._layout.get();\n\t\t\tconst acceptOnClick = layout?.icon.get() === Codicon.check;\n\n\t\t\tconst data = this._data.get();\n\t\t\tif (!data) { throw new BugIndicatingError('Gutter indicator data not available'); }\n\n\t\t\tthis._editorObs.editor.focus();\n\t\t\tif (acceptOnClick) {\n\t\t\t\tdata.model.accept();\n\t\t\t} else {\n\t\t\t\tdata.model.jump();\n\t\t\t}\n\t\t},\n\t\ttabIndex: 0,\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t},\n\t}, mapOutFalsy(this._layout).map(layout => !layout ? [] : [\n\t\tn.div({\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\tbackground: asCssVariable(inlineEditIndicatorBackground),\n\t\t\t\tborderRadius: '4px',\n\t\t\t\t...rectToProps(reader => layout.read(reader).gutterEditArea),\n\t\t\t}\n\t\t}),\n\t\tn.div({\n\t\t\tclass: 'icon',\n\t\t\tref: this._iconRef,\n\t\t\tonmouseenter: () => {\n\t\t\t\t// TODO show hover when hovering ghost text etc.\n\t\t\t\tthis._showHover();\n\t\t\t},\n\t\t\tstyle: {\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tzIndex: '20',\n\t\t\t\tposition: 'absolute',\n\t\t\t\tbackgroundColor: this._gutterIndicatorStyles.map(v => v.background),\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t['--vscodeIconForeground' as any]: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\tborder: this._gutterIndicatorStyles.map(v => `1px solid ${v.border}`),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: '4px',\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\ttransition: 'background-color 0.2s ease-in-out, width 0.2s ease-in-out',\n\t\t\t\t...rectToProps(reader => layout.read(reader).pillRect),\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclassName: 'line-number',\n\t\t\t\tstyle: {\n\t\t\t\t\tlineHeight: layout.map(l => l.lineNumberRect ? l.lineNumberRect.height : 0),\n\t\t\t\t\tdisplay: layout.map(l => l.lineNumberRect ? 'flex' : 'none'),\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'flex-end',\n\t\t\t\t\twidth: layout.map(l => l.lineNumberRect ? l.lineNumberRect.width : 0),\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tcolor: this._gutterIndicatorStyles.map(v => v.foreground),\n\t\t\t\t}\n\t\t\t},\n\t\t\t\tthis._lineNumberToRender\n\t\t\t),\n\t\t\tn.div({\n\t\t\t\tstyle: {\n\t\t\t\t\trotate: layout.map(l => `${getRotationFromDirection(l.iconDirection)}deg`),\n\t\t\t\t\ttransition: 'rotate 0.2s ease-in-out',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\talignItems: 'center',\n\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tmarginRight: layout.map(l => l.pillRect.width - l.iconRect.width - (l.lineNumberRect?.width ?? 0)),\n\t\t\t\t\twidth: layout.map(l => l.iconRect.width),\n\t\t\t\t}\n\t\t\t}, [\n\t\t\t\tlayout.map((l, reader) => renderIcon(l.icon.read(reader))),\n\t\t\t])\n\t\t]),\n\t]));\n}\n\nfunction getRotationFromDirection(direction: 'top' | 'bottom' | 'right'): number {\n\tswitch (direction) {\n\t\tcase 'top': return 90;\n\t\tcase 'bottom': return -90;\n\t\tcase 'right': return 0;\n\t}\n}\n"]}
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js
CHANGED
|
@@ -3,54 +3,26 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { derived } from '../../../../../../base/common/observable.js';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export class InlineEditModel {
|
|
6
|
+
import { isSuggestionInViewport } from '../../model/inlineCompletionsModel.js';
|
|
7
|
+
/**
|
|
8
|
+
* Warning: This is not per inline edit id and gets created often.
|
|
9
|
+
* @deprecated TODO@hediet remove
|
|
10
|
+
*/
|
|
11
|
+
export class ModelPerInlineEdit {
|
|
13
12
|
constructor(_model, inlineEdit, tabAction) {
|
|
14
13
|
this._model = _model;
|
|
15
14
|
this.inlineEdit = inlineEdit;
|
|
16
15
|
this.tabAction = tabAction;
|
|
17
|
-
this.action = this.inlineEdit.inlineCompletion.action;
|
|
18
|
-
this.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize(1219, "Inline Edit");
|
|
19
|
-
this.extensionCommands = this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands ?? [];
|
|
20
16
|
this.isInDiffEditor = this._model.isInDiffEditor;
|
|
21
17
|
this.displayLocation = this.inlineEdit.inlineCompletion.hint;
|
|
22
|
-
this.
|
|
18
|
+
this.inViewPort = derived(this, reader => isSuggestionInViewport(this._model.editor, this.inlineEdit.inlineCompletion, reader));
|
|
19
|
+
this.onDidAccept = this._model.onDidAccept;
|
|
23
20
|
}
|
|
24
21
|
accept() {
|
|
25
22
|
this._model.accept();
|
|
26
23
|
}
|
|
27
|
-
jump() {
|
|
28
|
-
this._model.jump();
|
|
29
|
-
}
|
|
30
24
|
handleInlineEditShown(viewKind, viewData) {
|
|
31
25
|
this._model.handleInlineSuggestionShown(this.inlineEdit.inlineCompletion, viewKind, viewData);
|
|
32
26
|
}
|
|
33
27
|
}
|
|
34
|
-
export class InlineEditHost {
|
|
35
|
-
constructor(_model) {
|
|
36
|
-
this._model = _model;
|
|
37
|
-
this.onDidAccept = this._model.onDidAccept;
|
|
38
|
-
this.inAcceptFlow = this._model.inAcceptFlow;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
export class GhostTextIndicator {
|
|
42
|
-
constructor(editor, model, lineRange, inlineCompletion) {
|
|
43
|
-
this.lineRange = lineRange;
|
|
44
|
-
const editorObs = observableCodeEditor(editor);
|
|
45
|
-
const tabAction = derived(this, reader => {
|
|
46
|
-
if (editorObs.isFocused.read(reader)) {
|
|
47
|
-
if (inlineCompletion.showInlineEditMenu) {
|
|
48
|
-
return InlineEditTabAction.Accept;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return InlineEditTabAction.Inactive;
|
|
52
|
-
});
|
|
53
|
-
this.model = new InlineEditModel(model, new InlineEditWithChanges(new StringText(''), new TextEdit([inlineCompletion.getSingleTextEdit()]), model.primaryPosition.get(), model.allPositions.get(), inlineCompletion.source.inlineSuggestions.commands ?? [], inlineCompletion), tabAction);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
28
|
//# sourceMappingURL=inlineEditsModel.js.map
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,OAAO,EAAe,MAAM,6CAA6C,CAAC;AACnF,OAAO,
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,OAAO,EAAe,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAA0B,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAKvG;;;EAGE;AACF,MAAM,OAAO,kBAAkB;IAY9B,YACkB,MAA8B,EACtC,UAAiC,EACjC,SAA2C;QAFnC,WAAM,GAAN,MAAM,CAAwB;QACtC,eAAU,GAAV,UAAU,CAAuB;QACjC,cAAS,GAAT,SAAS,CAAkC;QAEpD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAEjD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC;QAE7D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC;QAChI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;IAC5C,CAAC;IAED,MAAM;QACL,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;IAED,qBAAqB,CAAC,QAAkC,EAAE,QAAkC;QAC3F,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC/F,CAAC;CACD","file":"inlineEditsModel.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 { Event } from '../../../../../../base/common/event.js';\nimport { derived, IObservable } from '../../../../../../base/common/observable.js';\nimport { InlineCompletionsModel, isSuggestionInViewport } from '../../model/inlineCompletionsModel.js';\nimport { InlineSuggestHint } from '../../model/inlineSuggestionItem.js';\nimport { InlineCompletionViewData, InlineCompletionViewKind, InlineEditTabAction } from './inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from './inlineEditWithChanges.js';\n\n/**\n * Warning: This is not per inline edit id and gets created often.\n * @deprecated TODO@hediet remove\n*/\nexport class ModelPerInlineEdit {\n\n\treadonly isInDiffEditor: boolean;\n\n\treadonly displayLocation: InlineSuggestHint | undefined;\n\n\n\t/** Determines if the inline suggestion is fully in the view port */\n\treadonly inViewPort: IObservable<boolean>;\n\n\treadonly onDidAccept: Event<void>;\n\n\tconstructor(\n\t\tprivate readonly _model: InlineCompletionsModel,\n\t\treadonly inlineEdit: InlineEditWithChanges,\n\t\treadonly tabAction: IObservable<InlineEditTabAction>,\n\t) {\n\t\tthis.isInDiffEditor = this._model.isInDiffEditor;\n\n\t\tthis.displayLocation = this.inlineEdit.inlineCompletion.hint;\n\n\t\tthis.inViewPort = derived(this, reader => isSuggestionInViewport(this._model.editor, this.inlineEdit.inlineCompletion, reader));\n\t\tthis.onDidAccept = this._model.onDidAccept;\n\t}\n\n\taccept() {\n\t\tthis._model.accept();\n\t}\n\n\thandleInlineEditShown(viewKind: InlineCompletionViewKind, viewData: InlineCompletionViewData) {\n\t\tthis._model.handleInlineSuggestionShown(this.inlineEdit.inlineCompletion, viewKind, viewData);\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Event } from '../../../../../../base/common/event.js';\nimport { derived, IObservable } from '../../../../../../base/common/observable.js';\nimport { InlineCompletionsModel, isSuggestionInViewport } from '../../model/inlineCompletionsModel.js';\nimport { InlineSuggestHint } from '../../model/inlineSuggestionItem.js';\nimport { InlineCompletionViewData, InlineCompletionViewKind, InlineEditTabAction } from './inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from './inlineEditWithChanges.js';\n\n/**\n * Warning: This is not per inline edit id and gets created often.\n * @deprecated TODO@hediet remove\n*/\nexport class ModelPerInlineEdit {\n\n\treadonly isInDiffEditor: boolean;\n\n\treadonly displayLocation: InlineSuggestHint | undefined;\n\n\n\t/** Determines if the inline suggestion is fully in the view port */\n\treadonly inViewPort: IObservable<boolean>;\n\n\treadonly onDidAccept: Event<void>;\n\n\tconstructor(\n\t\tprivate readonly _model: InlineCompletionsModel,\n\t\treadonly inlineEdit: InlineEditWithChanges,\n\t\treadonly tabAction: IObservable<InlineEditTabAction>,\n\t) {\n\t\tthis.isInDiffEditor = this._model.isInDiffEditor;\n\n\t\tthis.displayLocation = this.inlineEdit.inlineCompletion.hint;\n\n\t\tthis.inViewPort = derived(this, reader => isSuggestionInViewport(this._model.editor, this.inlineEdit.inlineCompletion, reader));\n\t\tthis.onDidAccept = this._model.onDidAccept;\n\t}\n\n\taccept() {\n\t\tthis._model.accept();\n\t}\n\n\thandleInlineEditShown(viewKind: InlineCompletionViewKind, viewData: InlineCompletionViewData) {\n\t\tthis._model.handleInlineSuggestionShown(this.inlineEdit.inlineCompletion, viewKind, viewData);\n\t}\n}\n"]}
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js
CHANGED
|
@@ -14,7 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
import { timeout } from '../../../../../../base/common/async.js';
|
|
15
15
|
import { BugIndicatingError } from '../../../../../../base/common/errors.js';
|
|
16
16
|
import { Disposable, DisposableStore, MutableDisposable } from '../../../../../../base/common/lifecycle.js';
|
|
17
|
-
import { autorun,
|
|
17
|
+
import { autorun, derived, observableValue, runOnChange, runOnChangeWithCancellationToken } from '../../../../../../base/common/observable.js';
|
|
18
18
|
import { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js';
|
|
19
19
|
import { IStorageService } from '../../../../../../platform/storage/common/storage.js';
|
|
20
20
|
var UserKind;
|
|
@@ -24,9 +24,8 @@ var UserKind;
|
|
|
24
24
|
UserKind["Active"] = "active";
|
|
25
25
|
})(UserKind || (UserKind = {}));
|
|
26
26
|
let InlineEditsOnboardingExperience = class InlineEditsOnboardingExperience extends Disposable {
|
|
27
|
-
constructor(
|
|
27
|
+
constructor(_model, _indicator, _collapsedView, _storageService, _configurationService) {
|
|
28
28
|
super();
|
|
29
|
-
this._host = _host;
|
|
30
29
|
this._model = _model;
|
|
31
30
|
this._indicator = _indicator;
|
|
32
31
|
this._collapsedView = _collapsedView;
|
|
@@ -108,24 +107,24 @@ let InlineEditsOnboardingExperience = class InlineEditsOnboardingExperience exte
|
|
|
108
107
|
}
|
|
109
108
|
}));
|
|
110
109
|
// Remember when the user has hovered over the icon
|
|
111
|
-
disposableStore.add(
|
|
110
|
+
disposableStore.add(autorun((reader) => {
|
|
112
111
|
const indicator = this._indicator.read(reader);
|
|
113
112
|
if (!indicator) {
|
|
114
113
|
return;
|
|
115
114
|
}
|
|
116
|
-
store.add(runOnChange(indicator.isHoveredOverIcon, async (isHovered) => {
|
|
115
|
+
reader.store.add(runOnChange(indicator.isHoveredOverIcon, async (isHovered) => {
|
|
117
116
|
if (isHovered) {
|
|
118
117
|
userHasHoveredOverIcon = true;
|
|
119
118
|
}
|
|
120
119
|
}));
|
|
121
120
|
}));
|
|
122
121
|
// Remember when the user has accepted an inline edit
|
|
123
|
-
disposableStore.add(
|
|
124
|
-
const
|
|
125
|
-
if (!
|
|
122
|
+
disposableStore.add(autorun((reader) => {
|
|
123
|
+
const model = this._model.read(reader);
|
|
124
|
+
if (!model) {
|
|
126
125
|
return;
|
|
127
126
|
}
|
|
128
|
-
store.add(
|
|
127
|
+
reader.store.add(model.onDidAccept(() => {
|
|
129
128
|
inlineEditHasBeenAccepted = true;
|
|
130
129
|
}));
|
|
131
130
|
}));
|
|
@@ -162,8 +161,8 @@ let InlineEditsOnboardingExperience = class InlineEditsOnboardingExperience exte
|
|
|
162
161
|
}
|
|
163
162
|
};
|
|
164
163
|
InlineEditsOnboardingExperience = __decorate([
|
|
165
|
-
__param(
|
|
166
|
-
__param(
|
|
164
|
+
__param(3, IStorageService),
|
|
165
|
+
__param(4, IConfigurationService)
|
|
167
166
|
], InlineEditsOnboardingExperience);
|
|
168
167
|
export { InlineEditsOnboardingExperience };
|
|
169
168
|
//# sourceMappingURL=inlineEditsNewUsers.js.map
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AACzH,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAe,eAAe,EAAE,WAAW,EAAE,gCAAgC,EAAE,MAAM,6CAA6C,CAAC;AAC9K,OAAO,EAAE,qBAAqB,EAAE,MAAM,kEAAkE,CAAC;AACzG,OAAO,EAAE,eAAe,EAA+B,MAAM,sDAAsD,CAAC;AAKpH,IAAK,QAIJ;AAJD,WAAK,QAAQ;IACZ,mCAAuB,CAAA;IACvB,qCAAyB,CAAA;IACzB,6BAAiB,CAAA;AAClB,CAAC,EAJI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D;QACjD,MAAM,kBAAkB,GAAG,mDAAmD,CAAC;QAC/E,IAAI,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,oCAAoC,oCAA2B,CAAC;QAC7F,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE;YAC1E,IAAI,CAAC,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;gBAC3G,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,oCAAoC,oCAA2B,CAAC;gBAC5F,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;YACzD,CAAC;QACF,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAxJY,+BAA+B;IAuBzC,WAAA,eAAe,CAAA;IACf,WAAA,qBAAqB,CAAA;GAxBX,+BAA+B,CAwJ3C","file":"inlineEditsNewUsers.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 { timeout } from '../../../../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, IDisposable, MutableDisposable } from '../../../../../../base/common/lifecycle.js';\nimport { autorun, autorunWithStore, derived, IObservable, observableValue, runOnChange, runOnChangeWithCancellationToken } from '../../../../../../base/common/observable.js';\nimport { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../../../../platform/storage/common/storage.js';\nimport { InlineEditsGutterIndicator } from './components/gutterIndicatorView.js';\nimport { IInlineEditHost, IInlineEditModel } from './inlineEditsViewInterface.js';\nimport { InlineEditsCollapsedView } from './inlineEditsViews/inlineEditsCollapsedView.js';\n\nenum UserKind {\n\tFirstTime = 'firstTime',\n\tSecondTime = 'secondTime',\n\tActive = 'active'\n}\n\nexport class InlineEditsOnboardingExperience extends Disposable {\n\n\tprivate readonly _disposables = this._register(new MutableDisposable());\n\n\tprivate readonly _setupDone = observableValue({ name: 'setupDone' }, false);\n\n\tprivate readonly _activeCompletionId = derived<string | undefined>(reader => {\n\t\tconst model = this._model.read(reader);\n\t\tif (!model) { return undefined; }\n\n\t\tif (!this._setupDone.read(reader)) { return undefined; }\n\n\t\tconst indicator = this._indicator.read(reader);\n\t\tif (!indicator || !indicator.isVisible.read(reader)) { return undefined; }\n\n\t\treturn model.inlineEdit.inlineCompletion.identity.id;\n\t});\n\n\tconstructor(\n\t\tprivate readonly _host: IObservable<IInlineEditHost | undefined>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _indicator: IObservable<InlineEditsGutterIndicator | undefined>,\n\t\tprivate readonly _collapsedView: InlineEditsCollapsedView,\n\t\t@IStorageService private readonly _storageService: IStorageService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t) {\n\t\tsuper();\n\n\t\tthis._register(this._initializeDebugSetting());\n\n\t\t// Setup the onboarding experience for new users\n\t\tthis._disposables.value = this.setupNewUserExperience();\n\n\t\tthis._setupDone.set(true, undefined);\n\t}\n\n\tprivate setupNewUserExperience(): IDisposable | undefined {\n\t\tif (this.getNewUserType() === UserKind.Active) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\n\t\tlet userHasHoveredOverIcon = false;\n\t\tlet inlineEditHasBeenAccepted = false;\n\t\tlet firstTimeUserAnimationCount = 0;\n\t\tlet secondTimeUserAnimationCount = 0;\n\n\t\t// pulse animation for new users\n\t\tdisposableStore.add(runOnChangeWithCancellationToken(this._activeCompletionId, async (id, _, __, token) => {\n\t\t\tif (id === undefined) { return; }\n\t\t\tlet userType = this.getNewUserType();\n\n\t\t\t// User Kind Transition\n\t\t\tswitch (userType) {\n\t\t\t\tcase UserKind.FirstTime: {\n\t\t\t\t\tif (firstTimeUserAnimationCount++ >= 5 || userHasHoveredOverIcon) {\n\t\t\t\t\t\tuserType = UserKind.SecondTime;\n\t\t\t\t\t\tthis.setNewUserType(userType);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase UserKind.SecondTime: {\n\t\t\t\t\tif (secondTimeUserAnimationCount++ >= 3 && inlineEditHasBeenAccepted) {\n\t\t\t\t\t\tuserType = UserKind.Active;\n\t\t\t\t\t\tthis.setNewUserType(userType);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Animation\n\t\t\tswitch (userType) {\n\t\t\t\tcase UserKind.FirstTime: {\n\t\t\t\t\tfor (let i = 0; i < 3 && !token.isCancellationRequested; i++) {\n\t\t\t\t\t\tawait this._indicator.get()?.triggerAnimation();\n\t\t\t\t\t\tawait timeout(500);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase UserKind.SecondTime: {\n\t\t\t\t\tthis._indicator.get()?.triggerAnimation();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tdisposableStore.add(autorun(reader => {\n\t\t\tif (this._collapsedView.isVisible.read(reader)) {\n\t\t\t\tif (this.getNewUserType() !== UserKind.Active) {\n\t\t\t\t\tthis._collapsedView.triggerAnimation();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// Remember when the user has hovered over the icon\n\t\tdisposableStore.add(autorunWithStore((reader, store) => {\n\t\t\tconst indicator = this._indicator.read(reader);\n\t\t\tif (!indicator) { return; }\n\t\t\tstore.add(runOnChange(indicator.isHoveredOverIcon, async (isHovered) => {\n\t\t\t\tif (isHovered) {\n\t\t\t\t\tuserHasHoveredOverIcon = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}));\n\n\t\t// Remember when the user has accepted an inline edit\n\t\tdisposableStore.add(autorunWithStore((reader, store) => {\n\t\t\tconst host = this._host.read(reader);\n\t\t\tif (!host) { return; }\n\t\t\tstore.add(host.onDidAccept(() => {\n\t\t\t\tinlineEditHasBeenAccepted = true;\n\t\t\t}));\n\t\t}));\n\n\t\treturn disposableStore;\n\t}\n\n\tprivate getNewUserType(): UserKind {\n\t\treturn this._storageService.get('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION, UserKind.FirstTime) as UserKind;\n\t}\n\n\tprivate setNewUserType(value: UserKind): void {\n\t\tswitch (value) {\n\t\t\tcase UserKind.FirstTime:\n\t\t\t\tthrow new BugIndicatingError('UserKind should not be set to first time');\n\t\t\tcase UserKind.SecondTime:\n\t\t\t\tbreak;\n\t\t\tcase UserKind.Active:\n\t\t\t\tthis._disposables.clear();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._storageService.store('inlineEditsGutterIndicatorUserKind', value, StorageScope.APPLICATION, StorageTarget.USER);\n\t}\n\n\tprivate _initializeDebugSetting(): IDisposable {\n\t\t// Debug setting to reset the new user experience\n\t\tconst hiddenDebugSetting = 'editor.inlineSuggest.edits.resetNewUserExperience';\n\t\tif (this._configurationService.getValue(hiddenDebugSetting)) {\n\t\t\tthis._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);\n\t\t}\n\n\t\tconst disposable = this._configurationService.onDidChangeConfiguration(e => {\n\t\t\tif (e.affectsConfiguration(hiddenDebugSetting) && this._configurationService.getValue(hiddenDebugSetting)) {\n\t\t\t\tthis._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);\n\t\t\t\tthis._disposables.value = this.setupNewUserExperience();\n\t\t\t}\n\t\t});\n\n\t\treturn disposable;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { timeout } from '../../../../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, IDisposable, MutableDisposable } from '../../../../../../base/common/lifecycle.js';\nimport { autorun, autorunWithStore, derived, IObservable, observableValue, runOnChange, runOnChangeWithCancellationToken } from '../../../../../../base/common/observable.js';\nimport { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../../../../platform/storage/common/storage.js';\nimport { InlineEditsGutterIndicator } from './components/gutterIndicatorView.js';\nimport { IInlineEditHost, IInlineEditModel } from './inlineEditsViewInterface.js';\nimport { InlineEditsCollapsedView } from './inlineEditsViews/inlineEditsCollapsedView.js';\n\nenum UserKind {\n\tFirstTime = 'firstTime',\n\tSecondTime = 'secondTime',\n\tActive = 'active'\n}\n\nexport class InlineEditsOnboardingExperience extends Disposable {\n\n\tprivate readonly _disposables = this._register(new MutableDisposable());\n\n\tprivate readonly _setupDone = observableValue({ name: 'setupDone' }, false);\n\n\tprivate readonly _activeCompletionId = derived<string | undefined>(reader => {\n\t\tconst model = this._model.read(reader);\n\t\tif (!model) { return undefined; }\n\n\t\tif (!this._setupDone.read(reader)) { return undefined; }\n\n\t\tconst indicator = this._indicator.read(reader);\n\t\tif (!indicator || !indicator.isVisible.read(reader)) { return undefined; }\n\n\t\treturn model.inlineEdit.inlineCompletion.identity.id;\n\t});\n\n\tconstructor(\n\t\tprivate readonly _host: IObservable<IInlineEditHost | undefined>,\n\t\tprivate readonly _model: IObservable<IInlineEditModel | undefined>,\n\t\tprivate readonly _indicator: IObservable<InlineEditsGutterIndicator | undefined>,\n\t\tprivate readonly _collapsedView: InlineEditsCollapsedView,\n\t\t@IStorageService private readonly _storageService: IStorageService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t) {\n\t\tsuper();\n\n\t\tthis._register(this._initializeDebugSetting());\n\n\t\t// Setup the onboarding experience for new users\n\t\tthis._disposables.value = this.setupNewUserExperience();\n\n\t\tthis._setupDone.set(true, undefined);\n\t}\n\n\tprivate setupNewUserExperience(): IDisposable | undefined {\n\t\tif (this.getNewUserType() === UserKind.Active) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\n\t\tlet userHasHoveredOverIcon = false;\n\t\tlet inlineEditHasBeenAccepted = false;\n\t\tlet firstTimeUserAnimationCount = 0;\n\t\tlet secondTimeUserAnimationCount = 0;\n\n\t\t// pulse animation for new users\n\t\tdisposableStore.add(runOnChangeWithCancellationToken(this._activeCompletionId, async (id, _, __, token) => {\n\t\t\tif (id === undefined) { return; }\n\t\t\tlet userType = this.getNewUserType();\n\n\t\t\t// User Kind Transition\n\t\t\tswitch (userType) {\n\t\t\t\tcase UserKind.FirstTime: {\n\t\t\t\t\tif (firstTimeUserAnimationCount++ >= 5 || userHasHoveredOverIcon) {\n\t\t\t\t\t\tuserType = UserKind.SecondTime;\n\t\t\t\t\t\tthis.setNewUserType(userType);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase UserKind.SecondTime: {\n\t\t\t\t\tif (secondTimeUserAnimationCount++ >= 3 && inlineEditHasBeenAccepted) {\n\t\t\t\t\t\tuserType = UserKind.Active;\n\t\t\t\t\t\tthis.setNewUserType(userType);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Animation\n\t\t\tswitch (userType) {\n\t\t\t\tcase UserKind.FirstTime: {\n\t\t\t\t\tfor (let i = 0; i < 3 && !token.isCancellationRequested; i++) {\n\t\t\t\t\t\tawait this._indicator.get()?.triggerAnimation();\n\t\t\t\t\t\tawait timeout(500);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase UserKind.SecondTime: {\n\t\t\t\t\tthis._indicator.get()?.triggerAnimation();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tdisposableStore.add(autorun(reader => {\n\t\t\tif (this._collapsedView.isVisible.read(reader)) {\n\t\t\t\tif (this.getNewUserType() !== UserKind.Active) {\n\t\t\t\t\tthis._collapsedView.triggerAnimation();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// Remember when the user has hovered over the icon\n\t\tdisposableStore.add(autorunWithStore((reader, store) => {\n\t\t\tconst indicator = this._indicator.read(reader);\n\t\t\tif (!indicator) { return; }\n\t\t\tstore.add(runOnChange(indicator.isHoveredOverIcon, async (isHovered) => {\n\t\t\t\tif (isHovered) {\n\t\t\t\t\tuserHasHoveredOverIcon = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}));\n\n\t\t// Remember when the user has accepted an inline edit\n\t\tdisposableStore.add(autorunWithStore((reader, store) => {\n\t\t\tconst host = this._host.read(reader);\n\t\t\tif (!host) { return; }\n\t\t\tstore.add(host.onDidAccept(() => {\n\t\t\t\tinlineEditHasBeenAccepted = true;\n\t\t\t}));\n\t\t}));\n\n\t\treturn disposableStore;\n\t}\n\n\tprivate getNewUserType(): UserKind {\n\t\treturn this._storageService.get('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION, UserKind.FirstTime) as UserKind;\n\t}\n\n\tprivate setNewUserType(value: UserKind): void {\n\t\tswitch (value) {\n\t\t\tcase UserKind.FirstTime:\n\t\t\t\tthrow new BugIndicatingError('UserKind should not be set to first time');\n\t\t\tcase UserKind.SecondTime:\n\t\t\t\tbreak;\n\t\t\tcase UserKind.Active:\n\t\t\t\tthis._disposables.clear();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._storageService.store('inlineEditsGutterIndicatorUserKind', value, StorageScope.APPLICATION, StorageTarget.USER);\n\t}\n\n\tprivate _initializeDebugSetting(): IDisposable {\n\t\t// Debug setting to reset the new user experience\n\t\tconst hiddenDebugSetting = 'editor.inlineSuggest.edits.resetNewUserExperience';\n\t\tif (this._configurationService.getValue(hiddenDebugSetting)) {\n\t\t\tthis._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);\n\t\t}\n\n\t\tconst disposable = this._configurationService.onDidChangeConfiguration(e => {\n\t\t\tif (e.affectsConfiguration(hiddenDebugSetting) && this._configurationService.getValue(hiddenDebugSetting)) {\n\t\t\t\tthis._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);\n\t\t\t\tthis._disposables.value = this.setupNewUserExperience();\n\t\t\t}\n\t\t});\n\n\t\treturn disposable;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AACzH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAe,eAAe,EAAE,WAAW,EAAE,gCAAgC,EAAE,MAAM,6CAA6C,CAAC;AAC5J,OAAO,EAAE,qBAAqB,EAAE,MAAM,kEAAkE,CAAC;AACzG,OAAO,EAAE,eAAe,EAA+B,MAAM,sDAAsD,CAAC;AAKpH,IAAK,QAIJ;AAJD,WAAK,QAAQ;IACZ,mCAAuB,CAAA;IACvB,qCAAyB,CAAA;IACzB,6BAAiB,CAAA;AAClB,CAAC,EAJI,QAAQ,KAAR,QAAQ,QAIZ;AAEM,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,UA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I,CAAC,eAAe,CAAC,MAAM,CAAC,oCAAoC,oCAA2B,CAAC;QAC7F,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE;YAC1E,IAAI,CAAC,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,IAAI,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;gBAC3G,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,oCAAoC,oCAA2B,CAAC;gBAC5F,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;YACzD,CAAC;QACF,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAvJY,+BAA+B;IAsBzC,WAAA,eAAe,CAAA;IACf,WAAA,qBAAqB,CAAA;GAvBX,+BAA+B,CAuJ3C","file":"inlineEditsNewUsers.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 { timeout } from '../../../../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, IDisposable, MutableDisposable } from '../../../../../../base/common/lifecycle.js';\nimport { autorun, derived, IObservable, observableValue, runOnChange, runOnChangeWithCancellationToken } from '../../../../../../base/common/observable.js';\nimport { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../../../../platform/storage/common/storage.js';\nimport { InlineEditsGutterIndicator } from './components/gutterIndicatorView.js';\nimport { ModelPerInlineEdit } from './inlineEditsModel.js';\nimport { InlineEditsCollapsedView } from './inlineEditsViews/inlineEditsCollapsedView.js';\n\nenum UserKind {\n\tFirstTime = 'firstTime',\n\tSecondTime = 'secondTime',\n\tActive = 'active'\n}\n\nexport class InlineEditsOnboardingExperience extends Disposable {\n\n\tprivate readonly _disposables = this._register(new MutableDisposable());\n\n\tprivate readonly _setupDone = observableValue({ name: 'setupDone' }, false);\n\n\tprivate readonly _activeCompletionId = derived<string | undefined>(reader => {\n\t\tconst model = this._model.read(reader);\n\t\tif (!model) { return undefined; }\n\n\t\tif (!this._setupDone.read(reader)) { return undefined; }\n\n\t\tconst indicator = this._indicator.read(reader);\n\t\tif (!indicator || !indicator.isVisible.read(reader)) { return undefined; }\n\n\t\treturn model.inlineEdit.inlineCompletion.identity.id;\n\t});\n\n\tconstructor(\n\t\tprivate readonly _model: IObservable<ModelPerInlineEdit | undefined>,\n\t\tprivate readonly _indicator: IObservable<InlineEditsGutterIndicator | undefined>,\n\t\tprivate readonly _collapsedView: InlineEditsCollapsedView,\n\t\t@IStorageService private readonly _storageService: IStorageService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t) {\n\t\tsuper();\n\n\t\tthis._register(this._initializeDebugSetting());\n\n\t\t// Setup the onboarding experience for new users\n\t\tthis._disposables.value = this.setupNewUserExperience();\n\n\t\tthis._setupDone.set(true, undefined);\n\t}\n\n\tprivate setupNewUserExperience(): IDisposable | undefined {\n\t\tif (this.getNewUserType() === UserKind.Active) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\n\t\tlet userHasHoveredOverIcon = false;\n\t\tlet inlineEditHasBeenAccepted = false;\n\t\tlet firstTimeUserAnimationCount = 0;\n\t\tlet secondTimeUserAnimationCount = 0;\n\n\t\t// pulse animation for new users\n\t\tdisposableStore.add(runOnChangeWithCancellationToken(this._activeCompletionId, async (id, _, __, token) => {\n\t\t\tif (id === undefined) { return; }\n\t\t\tlet userType = this.getNewUserType();\n\n\t\t\t// User Kind Transition\n\t\t\tswitch (userType) {\n\t\t\t\tcase UserKind.FirstTime: {\n\t\t\t\t\tif (firstTimeUserAnimationCount++ >= 5 || userHasHoveredOverIcon) {\n\t\t\t\t\t\tuserType = UserKind.SecondTime;\n\t\t\t\t\t\tthis.setNewUserType(userType);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase UserKind.SecondTime: {\n\t\t\t\t\tif (secondTimeUserAnimationCount++ >= 3 && inlineEditHasBeenAccepted) {\n\t\t\t\t\t\tuserType = UserKind.Active;\n\t\t\t\t\t\tthis.setNewUserType(userType);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Animation\n\t\t\tswitch (userType) {\n\t\t\t\tcase UserKind.FirstTime: {\n\t\t\t\t\tfor (let i = 0; i < 3 && !token.isCancellationRequested; i++) {\n\t\t\t\t\t\tawait this._indicator.get()?.triggerAnimation();\n\t\t\t\t\t\tawait timeout(500);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase UserKind.SecondTime: {\n\t\t\t\t\tthis._indicator.get()?.triggerAnimation();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tdisposableStore.add(autorun(reader => {\n\t\t\tif (this._collapsedView.isVisible.read(reader)) {\n\t\t\t\tif (this.getNewUserType() !== UserKind.Active) {\n\t\t\t\t\tthis._collapsedView.triggerAnimation();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// Remember when the user has hovered over the icon\n\t\tdisposableStore.add(autorun((reader) => {\n\t\t\tconst indicator = this._indicator.read(reader);\n\t\t\tif (!indicator) { return; }\n\t\t\treader.store.add(runOnChange(indicator.isHoveredOverIcon, async (isHovered) => {\n\t\t\t\tif (isHovered) {\n\t\t\t\t\tuserHasHoveredOverIcon = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}));\n\n\t\t// Remember when the user has accepted an inline edit\n\t\tdisposableStore.add(autorun((reader) => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return; }\n\t\t\treader.store.add(model.onDidAccept(() => {\n\t\t\t\tinlineEditHasBeenAccepted = true;\n\t\t\t}));\n\t\t}));\n\n\t\treturn disposableStore;\n\t}\n\n\tprivate getNewUserType(): UserKind {\n\t\treturn this._storageService.get('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION, UserKind.FirstTime) as UserKind;\n\t}\n\n\tprivate setNewUserType(value: UserKind): void {\n\t\tswitch (value) {\n\t\t\tcase UserKind.FirstTime:\n\t\t\t\tthrow new BugIndicatingError('UserKind should not be set to first time');\n\t\t\tcase UserKind.SecondTime:\n\t\t\t\tbreak;\n\t\t\tcase UserKind.Active:\n\t\t\t\tthis._disposables.clear();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._storageService.store('inlineEditsGutterIndicatorUserKind', value, StorageScope.APPLICATION, StorageTarget.USER);\n\t}\n\n\tprivate _initializeDebugSetting(): IDisposable {\n\t\t// Debug setting to reset the new user experience\n\t\tconst hiddenDebugSetting = 'editor.inlineSuggest.edits.resetNewUserExperience';\n\t\tif (this._configurationService.getValue(hiddenDebugSetting)) {\n\t\t\tthis._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);\n\t\t}\n\n\t\tconst disposable = this._configurationService.onDidChangeConfiguration(e => {\n\t\t\tif (e.affectsConfiguration(hiddenDebugSetting) && this._configurationService.getValue(hiddenDebugSetting)) {\n\t\t\t\tthis._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);\n\t\t\t\tthis._disposables.value = this.setupNewUserExperience();\n\t\t\t}\n\t\t});\n\n\t\treturn disposable;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { timeout } from '../../../../../../base/common/async.js';\nimport { BugIndicatingError } from '../../../../../../base/common/errors.js';\nimport { Disposable, DisposableStore, IDisposable, MutableDisposable } from '../../../../../../base/common/lifecycle.js';\nimport { autorun, derived, IObservable, observableValue, runOnChange, runOnChangeWithCancellationToken } from '../../../../../../base/common/observable.js';\nimport { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js';\nimport { IStorageService, StorageScope, StorageTarget } from '../../../../../../platform/storage/common/storage.js';\nimport { InlineEditsGutterIndicator } from './components/gutterIndicatorView.js';\nimport { ModelPerInlineEdit } from './inlineEditsModel.js';\nimport { InlineEditsCollapsedView } from './inlineEditsViews/inlineEditsCollapsedView.js';\n\nenum UserKind {\n\tFirstTime = 'firstTime',\n\tSecondTime = 'secondTime',\n\tActive = 'active'\n}\n\nexport class InlineEditsOnboardingExperience extends Disposable {\n\n\tprivate readonly _disposables = this._register(new MutableDisposable());\n\n\tprivate readonly _setupDone = observableValue({ name: 'setupDone' }, false);\n\n\tprivate readonly _activeCompletionId = derived<string | undefined>(reader => {\n\t\tconst model = this._model.read(reader);\n\t\tif (!model) { return undefined; }\n\n\t\tif (!this._setupDone.read(reader)) { return undefined; }\n\n\t\tconst indicator = this._indicator.read(reader);\n\t\tif (!indicator || !indicator.isVisible.read(reader)) { return undefined; }\n\n\t\treturn model.inlineEdit.inlineCompletion.identity.id;\n\t});\n\n\tconstructor(\n\t\tprivate readonly _model: IObservable<ModelPerInlineEdit | undefined>,\n\t\tprivate readonly _indicator: IObservable<InlineEditsGutterIndicator | undefined>,\n\t\tprivate readonly _collapsedView: InlineEditsCollapsedView,\n\t\t@IStorageService private readonly _storageService: IStorageService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t) {\n\t\tsuper();\n\n\t\tthis._register(this._initializeDebugSetting());\n\n\t\t// Setup the onboarding experience for new users\n\t\tthis._disposables.value = this.setupNewUserExperience();\n\n\t\tthis._setupDone.set(true, undefined);\n\t}\n\n\tprivate setupNewUserExperience(): IDisposable | undefined {\n\t\tif (this.getNewUserType() === UserKind.Active) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst disposableStore = new DisposableStore();\n\n\t\tlet userHasHoveredOverIcon = false;\n\t\tlet inlineEditHasBeenAccepted = false;\n\t\tlet firstTimeUserAnimationCount = 0;\n\t\tlet secondTimeUserAnimationCount = 0;\n\n\t\t// pulse animation for new users\n\t\tdisposableStore.add(runOnChangeWithCancellationToken(this._activeCompletionId, async (id, _, __, token) => {\n\t\t\tif (id === undefined) { return; }\n\t\t\tlet userType = this.getNewUserType();\n\n\t\t\t// User Kind Transition\n\t\t\tswitch (userType) {\n\t\t\t\tcase UserKind.FirstTime: {\n\t\t\t\t\tif (firstTimeUserAnimationCount++ >= 5 || userHasHoveredOverIcon) {\n\t\t\t\t\t\tuserType = UserKind.SecondTime;\n\t\t\t\t\t\tthis.setNewUserType(userType);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase UserKind.SecondTime: {\n\t\t\t\t\tif (secondTimeUserAnimationCount++ >= 3 && inlineEditHasBeenAccepted) {\n\t\t\t\t\t\tuserType = UserKind.Active;\n\t\t\t\t\t\tthis.setNewUserType(userType);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Animation\n\t\t\tswitch (userType) {\n\t\t\t\tcase UserKind.FirstTime: {\n\t\t\t\t\tfor (let i = 0; i < 3 && !token.isCancellationRequested; i++) {\n\t\t\t\t\t\tawait this._indicator.get()?.triggerAnimation();\n\t\t\t\t\t\tawait timeout(500);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase UserKind.SecondTime: {\n\t\t\t\t\tthis._indicator.get()?.triggerAnimation();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\tdisposableStore.add(autorun(reader => {\n\t\t\tif (this._collapsedView.isVisible.read(reader)) {\n\t\t\t\tif (this.getNewUserType() !== UserKind.Active) {\n\t\t\t\t\tthis._collapsedView.triggerAnimation();\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\n\t\t// Remember when the user has hovered over the icon\n\t\tdisposableStore.add(autorun((reader) => {\n\t\t\tconst indicator = this._indicator.read(reader);\n\t\t\tif (!indicator) { return; }\n\t\t\treader.store.add(runOnChange(indicator.isHoveredOverIcon, async (isHovered) => {\n\t\t\t\tif (isHovered) {\n\t\t\t\t\tuserHasHoveredOverIcon = true;\n\t\t\t\t}\n\t\t\t}));\n\t\t}));\n\n\t\t// Remember when the user has accepted an inline edit\n\t\tdisposableStore.add(autorun((reader) => {\n\t\t\tconst model = this._model.read(reader);\n\t\t\tif (!model) { return; }\n\t\t\treader.store.add(model.onDidAccept(() => {\n\t\t\t\tinlineEditHasBeenAccepted = true;\n\t\t\t}));\n\t\t}));\n\n\t\treturn disposableStore;\n\t}\n\n\tprivate getNewUserType(): UserKind {\n\t\treturn this._storageService.get('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION, UserKind.FirstTime) as UserKind;\n\t}\n\n\tprivate setNewUserType(value: UserKind): void {\n\t\tswitch (value) {\n\t\t\tcase UserKind.FirstTime:\n\t\t\t\tthrow new BugIndicatingError('UserKind should not be set to first time');\n\t\t\tcase UserKind.SecondTime:\n\t\t\t\tbreak;\n\t\t\tcase UserKind.Active:\n\t\t\t\tthis._disposables.clear();\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis._storageService.store('inlineEditsGutterIndicatorUserKind', value, StorageScope.APPLICATION, StorageTarget.USER);\n\t}\n\n\tprivate _initializeDebugSetting(): IDisposable {\n\t\t// Debug setting to reset the new user experience\n\t\tconst hiddenDebugSetting = 'editor.inlineSuggest.edits.resetNewUserExperience';\n\t\tif (this._configurationService.getValue(hiddenDebugSetting)) {\n\t\t\tthis._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);\n\t\t}\n\n\t\tconst disposable = this._configurationService.onDidChangeConfiguration(e => {\n\t\t\tif (e.affectsConfiguration(hiddenDebugSetting) && this._configurationService.getValue(hiddenDebugSetting)) {\n\t\t\t\tthis._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);\n\t\t\t\tthis._disposables.value = this.setupNewUserExperience();\n\t\t\t}\n\t\t});\n\n\t\treturn disposable;\n\t}\n}\n"]}
|