monaco-editor-core 0.54.0 → 0.55.0-dev-20251008
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.messages.de.js +1 -1
- package/esm/nls.messages.es.js +1 -1
- package/esm/nls.messages.fr.js +1 -1
- package/esm/nls.messages.it.js +1 -1
- package/esm/nls.messages.ja.js +1 -1
- package/esm/nls.messages.ko.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.zh-cn.js +1 -1
- package/esm/nls.messages.zh-tw.js +1 -1
- package/esm/vs/base/browser/canIUse.js +1 -0
- package/esm/vs/base/browser/canIUse.js.map +1 -1
- package/esm/vs/base/browser/dom.js +9 -0
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/fastDomNode.js.map +1 -1
- package/esm/vs/base/browser/mouseEvent.js +3 -0
- package/esm/vs/base/browser/mouseEvent.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +2 -0
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/sash/sash.css +1 -1
- package/esm/vs/base/browser/ui/sash/sash.js +4 -0
- package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/browser/ui/table/table.css +2 -2
- package/esm/vs/base/browser/ui/tree/abstractTree.js +5 -4
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +6 -4
- package/esm/vs/base/browser/ui/tree/asyncDataTree.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 +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/webWorkerFactory.js +3 -0
- package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/decorators.js +1 -0
- package/esm/vs/base/common/decorators.js.map +1 -1
- package/esm/vs/base/common/errors.js +1 -0
- package/esm/vs/base/common/errors.js.map +1 -1
- package/esm/vs/base/common/glob.js +1 -1
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/hash.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +2 -0
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/hotReloadHelpers.js +1 -0
- package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
- package/esm/vs/base/common/lifecycle.js +19 -0
- package/esm/vs/base/common/lifecycle.js.map +1 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marshalling.js +4 -0
- package/esm/vs/base/common/marshalling.js.map +1 -1
- package/esm/vs/base/common/network.js +1 -0
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/normalization.js +39 -0
- package/esm/vs/base/common/normalization.js.map +1 -0
- package/esm/vs/base/common/objects.js +1 -0
- package/esm/vs/base/common/objects.js.map +1 -1
- package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
- package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +1 -0
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
- package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
- package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
- package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
- package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
- package/esm/vs/base/common/process.js.map +1 -1
- package/esm/vs/base/common/product.js.map +1 -1
- package/esm/vs/base/common/types.js +2 -0
- package/esm/vs/base/common/types.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js +26 -14
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
- package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
- package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
- package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
- package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
- package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
- 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/editorDom.js.map +1 -1
- package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
- package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
- package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
- package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
- package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
- package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
- package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
- package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
- package/esm/vs/editor/browser/view.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
- package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +122 -68
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfo.js +32 -16
- package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
- package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
- package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
- package/esm/vs/editor/common/core/edits/edit.js +1 -0
- package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
- package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
- package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
- package/esm/vs/editor/common/core/position.js +1 -1
- package/esm/vs/editor/common/core/position.js.map +1 -1
- package/esm/vs/editor/common/core/range.js +1 -1
- package/esm/vs/editor/common/core/range.js.map +1 -1
- package/esm/vs/editor/common/core/selection.js +1 -1
- package/esm/vs/editor/common/core/selection.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorCommon.js.map +1 -1
- package/esm/vs/editor/common/languages.js +1 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
- package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
- package/esm/vs/editor/common/model/textModel.js +1 -1
- package/esm/vs/editor/common/model/textModel.js.map +1 -1
- package/esm/vs/editor/common/model.js +1 -1
- package/esm/vs/editor/common/model.js.map +1 -1
- package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
- package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
- package/esm/vs/editor/common/services/modelService.js +14 -21
- package/esm/vs/editor/common/services/modelService.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +2 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
- package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
- package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +5 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +27 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +8 -8
- package/esm/vs/editor/editor.api.js +4 -0
- package/esm/vs/editor/editor.api.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
- package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
- package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
- package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
- package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/commands/common/commands.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -1
- package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js +1 -1
- package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
- package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +5 -0
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/log/common/logService.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
- package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
- package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
- package/esm/vs/platform/product/common/product.js +68 -0
- package/esm/vs/platform/product/common/product.js.map +1 -0
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +26 -2
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/monaco.d.ts +8 -8
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser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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 '../../../../../../browser/services/hoverService/hoverService.js';\nimport { HoverWidget } from '../../../../../../browser/services/hoverService/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, this._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['--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 '../../../../../../browser/services/hoverService/hoverService.js';\nimport { HoverWidget } from '../../../../../../browser/services/hoverService/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, this._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['--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":["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,OAA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-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 '../../../../../../browser/services/hoverService/hoverService.js';\nimport { HoverWidget } from '../../../../../../browser/services/hoverService/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, this._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 '../../../../../../browser/services/hoverService/hoverService.js';\nimport { HoverWidget } from '../../../../../../browser/services/hoverService/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, this._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"]}
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js
CHANGED
|
@@ -13,10 +13,11 @@ export class InlineEditWithChanges {
|
|
|
13
13
|
get displayRange() {
|
|
14
14
|
return this.originalText.lineRange.intersect(this.originalLineRange.join(LineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)));
|
|
15
15
|
}
|
|
16
|
-
constructor(originalText, edit, cursorPosition, commands, inlineCompletion) {
|
|
16
|
+
constructor(originalText, edit, cursorPosition, multiCursorPositions, commands, inlineCompletion) {
|
|
17
17
|
this.originalText = originalText;
|
|
18
18
|
this.edit = edit;
|
|
19
19
|
this.cursorPosition = cursorPosition;
|
|
20
|
+
this.multiCursorPositions = multiCursorPositions;
|
|
20
21
|
this.commands = commands;
|
|
21
22
|
this.inlineCompletion = inlineCompletion;
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAO3E,MAAM,OAAO,qBAAqB;IACjC,IAAW,QAAQ;QAClB,OAAO,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;IAED,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAClE,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3F,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAC3C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAC1B,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CACzF,CACA,CAAC;IACJ,CAAC;IAED,YACiB,YAA0B,EAC1B,IAAc,EACd,cAAwB,EACxB,QAA4C,EAC5C,gBAAsC;
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAO3E,MAAM,OAAO,qBAAqB;IACjC,IAAW,QAAQ;QAClB,OAAO,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;IAED,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAClE,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3F,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAC3C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAC1B,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CACzF,CACA,CAAC;IACJ,CAAC;IAED,YACiB,YAA0B,EAC1B,IAAc,EACd,cAAwB,EACxB,oBAAyC,EACzC,QAA4C,EAC5C,gBAAsC;QALtC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,SAAI,GAAJ,IAAI,CAAU;QACd,mBAAc,GAAd,cAAc,CAAU;QACxB,yBAAoB,GAApB,oBAAoB,CAAqB;QACzC,aAAQ,GAAR,QAAQ,CAAoC;QAC5C,qBAAgB,GAAhB,gBAAgB,CAAsB;IAEvD,CAAC;CACD","file":"inlineEditWithChanges.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 { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { Position } from '../../../../../common/core/position.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { AbstractText } from '../../../../../common/core/text/abstractText.js';\nimport { InlineCompletionCommand } from '../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../model/inlineSuggestionItem.js';\n\nexport class InlineEditWithChanges {\n\tpublic get lineEdit() {\n\t\treturn LineReplacement.fromSingleTextEdit(this.edit.toReplacement(this.originalText), this.originalText);\n\t}\n\n\tpublic get originalLineRange() { return this.lineEdit.lineRange; }\n\tpublic get modifiedLineRange() { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }\n\n\tpublic get displayRange() {\n\t\treturn this.originalText.lineRange.intersect(\n\t\t\tthis.originalLineRange.join(\n\t\t\t\tLineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)\n\t\t\t)\n\t\t)!;\n\t}\n\n\tconstructor(\n\t\tpublic readonly originalText: AbstractText,\n\t\tpublic readonly edit: TextEdit,\n\t\tpublic readonly cursorPosition: Position,\n\t\tpublic readonly multiCursorPositions: readonly Position[],\n\t\tpublic readonly commands: readonly InlineCompletionCommand[],\n\t\tpublic readonly inlineCompletion: InlineSuggestionItem\n\t) {\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 { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { Position } from '../../../../../common/core/position.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { AbstractText } from '../../../../../common/core/text/abstractText.js';\nimport { InlineCompletionCommand } from '../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../model/inlineSuggestionItem.js';\n\nexport class InlineEditWithChanges {\n\tpublic get lineEdit() {\n\t\treturn LineReplacement.fromSingleTextEdit(this.edit.toReplacement(this.originalText), this.originalText);\n\t}\n\n\tpublic get originalLineRange() { return this.lineEdit.lineRange; }\n\tpublic get modifiedLineRange() { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }\n\n\tpublic get displayRange() {\n\t\treturn this.originalText.lineRange.intersect(\n\t\t\tthis.originalLineRange.join(\n\t\t\t\tLineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)\n\t\t\t)\n\t\t)!;\n\t}\n\n\tconstructor(\n\t\tpublic readonly originalText: AbstractText,\n\t\tpublic readonly edit: TextEdit,\n\t\tpublic readonly cursorPosition: Position,\n\t\tpublic readonly multiCursorPositions: readonly Position[],\n\t\tpublic readonly commands: readonly InlineCompletionCommand[],\n\t\tpublic readonly inlineCompletion: InlineSuggestionItem\n\t) {\n\t}\n}\n"]}
|
package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js
CHANGED
|
@@ -55,7 +55,7 @@ export class GhostTextIndicator {
|
|
|
55
55
|
}
|
|
56
56
|
return InlineEditTabAction.Inactive;
|
|
57
57
|
});
|
|
58
|
-
this.model = new InlineEditModel(model, new InlineEditWithChanges(new StringText(''), new TextEdit([inlineCompletion.getSingleTextEdit()]), model.primaryPosition.get(), inlineCompletion.source.inlineSuggestions.commands ?? [], inlineCompletion), tabAction);
|
|
58
|
+
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);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
//# 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,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAI7E,OAAO,EAAyF,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC3J,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,OAAO,eAAe;IAU3B,YACkB,MAA8B,EACtC,UAAiC,EACjC,SAA2C;QAFnC,WAAM,GAAN,MAAM,CAAwB;QACtC,eAAU,GAAV,UAAU,CAAuB;QACjC,cAAS,GAAT,SAAS,CAAkC;QAEpD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC;QACtD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,IAAY,EAAE,aAAa,CAAC,CAAC;QACzH,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,IAAI,EAAE,CAAC;QAClG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAEjD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,eAAe,CAAC;QACxE,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ACnC,CAAC;YACF,CAAC;YACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC;QACrC,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,GAAG,IAAI,eAAe,CAC/B,KAAK,EACL,IAAI,qBAAqB,CACxB,IAAI,UAAU,CAAC,EAAE,CAAC,EAClB,IAAI,QAAQ,CAAC,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAC,EACpD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,EAC3B,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,IAAI,EAAE,EACxD,gBAAgB,CAChB,EACD,SAAS,CACT,CAAC;IACH,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 { localize } from '../../../../../../nls.js';\nimport { ICodeEditor } from '../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../browser/observableCodeEditor.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { StringText } from '../../../../../common/core/text/abstractText.js';\nimport { Command, InlineCompletionCommand, InlineCompletionDisplayLocation } from '../../../../../common/languages.js';\nimport { InlineCompletionsModel } from '../../model/inlineCompletionsModel.js';\nimport { InlineCompletionItem } from '../../model/inlineSuggestionItem.js';\nimport { IInlineEditHost, IInlineEditModel, InlineCompletionViewData, InlineCompletionViewKind, InlineEditTabAction } from './inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from './inlineEditWithChanges.js';\n\nexport class InlineEditModel implements IInlineEditModel {\n\n\treadonly action: Command | undefined;\n\treadonly displayName: string;\n\treadonly extensionCommands: InlineCompletionCommand[];\n\treadonly isInDiffEditor: boolean;\n\n\treadonly displayLocation: InlineCompletionDisplayLocation | undefined;\n\treadonly showCollapsed: IObservable<boolean>;\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.action = this.inlineEdit.inlineCompletion.action;\n\t\tthis.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize('inlineEdit', \"Inline Edit\");\n\t\tthis.extensionCommands = this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands ?? [];\n\t\tthis.isInDiffEditor = this._model.isInDiffEditor;\n\n\t\tthis.displayLocation = this.inlineEdit.inlineCompletion.displayLocation;\n\t\tthis.showCollapsed = this._model.showCollapsed;\n\t}\n\n\taccept() {\n\t\tthis._model.accept();\n\t}\n\n\tjump() {\n\t\tthis._model.jump();\n\t}\n\n\tabort(reason: string) {\n\t\tconsole.error(reason);\n\t\tthis.inlineEdit.inlineCompletion.reportInlineEditError(reason);\n\t\tthis._model.stop();\n\t}\n\n\thandleInlineEditShown(viewKind: InlineCompletionViewKind, viewData: InlineCompletionViewData) {\n\t\tthis._model.handleInlineSuggestionShown(this.inlineEdit.inlineCompletion, viewKind, viewData);\n\t}\n}\n\nexport class InlineEditHost implements IInlineEditHost {\n\treadonly onDidAccept: Event<void>;\n\treadonly inAcceptFlow: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: InlineCompletionsModel,\n\t) {\n\t\tthis.onDidAccept = this._model.onDidAccept;\n\t\tthis.inAcceptFlow = this._model.inAcceptFlow;\n\t}\n}\n\nexport class GhostTextIndicator {\n\n\treadonly model: InlineEditModel;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tmodel: InlineCompletionsModel,\n\t\treadonly lineRange: LineRange,\n\t\tinlineCompletion: InlineCompletionItem,\n\t) {\n\t\tconst editorObs = observableCodeEditor(editor);\n\t\tconst tabAction = derived<InlineEditTabAction>(this, reader => {\n\t\t\tif (editorObs.isFocused.read(reader)) {\n\t\t\t\tif (inlineCompletion.showInlineEditMenu) {\n\t\t\t\t\treturn InlineEditTabAction.Accept;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn InlineEditTabAction.Inactive;\n\t\t});\n\n\t\tthis.model = new InlineEditModel(\n\t\t\tmodel,\n\t\t\tnew InlineEditWithChanges(\n\t\t\t\tnew StringText(''),\n\t\t\t\tnew TextEdit([inlineCompletion.getSingleTextEdit()]),\n\t\t\t\tmodel.primaryPosition.get(),\n\t\t\t\tinlineCompletion.source.inlineSuggestions.commands ?? [],\n\t\t\t\tinlineCompletion\n\t\t\t),\n\t\t\ttabAction,\n\t\t);\n\t}\n}\n"]}
|
|
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,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAI7E,OAAO,EAAyF,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC3J,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,OAAO,eAAe;IAU3B,YACkB,MAA8B,EACtC,UAAiC,EACjC,SAA2C;QAFnC,WAAM,GAAN,MAAM,CAAwB;QACtC,eAAU,GAAV,UAAU,CAAuB;QACjC,cAAS,GAAT,SAAS,CAAkC;QAEpD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAA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C;IAC9C,CAAC;CACD;AAED,MAAM,OAAO,kBAAkB;IAI9B,YACC,MAAmB,EACnB,KAA6B,EACpB,SAAoB,EAC7B,gBAAsC;QAD7B,cAAS,GAAT,SAAS,CAAW;QAG7B,MAAM,SAAS,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,SAAS,GAAG,OAAO,CAAsB,IAAI,EAAE,MAAM,CAAC,EAAE;YAC7D,IAAI,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBACtC,IAAI,gBAAgB,CAAC,kBAAkB,EAAE,CAAC;oBACzC,OAAO,mBAAmB,CAAC,MAAM,CAAC;gBACnC,CAAC;YACF,CAAC;YACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC;QACrC,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,GAAG,IAAI,eAAe,CAC/B,KAAK,EACL,IAAI,qBAAqB,CACxB,IAAI,UAAU,CAAC,EAAE,CAAC,EAClB,IAAI,QAAQ,CAAC,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAC,EACpD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,EAC3B,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,EACxB,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,IAAI,EAAE,EACxD,gBAAgB,CAChB,EACD,SAAS,CACT,CAAC;IACH,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 { localize } from '../../../../../../nls.js';\nimport { ICodeEditor } from '../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../browser/observableCodeEditor.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { StringText } from '../../../../../common/core/text/abstractText.js';\nimport { Command, InlineCompletionCommand, InlineCompletionDisplayLocation } from '../../../../../common/languages.js';\nimport { InlineCompletionsModel } from '../../model/inlineCompletionsModel.js';\nimport { InlineCompletionItem } from '../../model/inlineSuggestionItem.js';\nimport { IInlineEditHost, IInlineEditModel, InlineCompletionViewData, InlineCompletionViewKind, InlineEditTabAction } from './inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from './inlineEditWithChanges.js';\n\nexport class InlineEditModel implements IInlineEditModel {\n\n\treadonly action: Command | undefined;\n\treadonly displayName: string;\n\treadonly extensionCommands: InlineCompletionCommand[];\n\treadonly isInDiffEditor: boolean;\n\n\treadonly displayLocation: InlineCompletionDisplayLocation | undefined;\n\treadonly showCollapsed: IObservable<boolean>;\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.action = this.inlineEdit.inlineCompletion.action;\n\t\tthis.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize('inlineEdit', \"Inline Edit\");\n\t\tthis.extensionCommands = this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands ?? [];\n\t\tthis.isInDiffEditor = this._model.isInDiffEditor;\n\n\t\tthis.displayLocation = this.inlineEdit.inlineCompletion.displayLocation;\n\t\tthis.showCollapsed = this._model.showCollapsed;\n\t}\n\n\taccept() {\n\t\tthis._model.accept();\n\t}\n\n\tjump() {\n\t\tthis._model.jump();\n\t}\n\n\tabort(reason: string) {\n\t\tconsole.error(reason);\n\t\tthis.inlineEdit.inlineCompletion.reportInlineEditError(reason);\n\t\tthis._model.stop();\n\t}\n\n\thandleInlineEditShown(viewKind: InlineCompletionViewKind, viewData: InlineCompletionViewData) {\n\t\tthis._model.handleInlineSuggestionShown(this.inlineEdit.inlineCompletion, viewKind, viewData);\n\t}\n}\n\nexport class InlineEditHost implements IInlineEditHost {\n\treadonly onDidAccept: Event<void>;\n\treadonly inAcceptFlow: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: InlineCompletionsModel,\n\t) {\n\t\tthis.onDidAccept = this._model.onDidAccept;\n\t\tthis.inAcceptFlow = this._model.inAcceptFlow;\n\t}\n}\n\nexport class GhostTextIndicator {\n\n\treadonly model: InlineEditModel;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tmodel: InlineCompletionsModel,\n\t\treadonly lineRange: LineRange,\n\t\tinlineCompletion: InlineCompletionItem,\n\t) {\n\t\tconst editorObs = observableCodeEditor(editor);\n\t\tconst tabAction = derived<InlineEditTabAction>(this, reader => {\n\t\t\tif (editorObs.isFocused.read(reader)) {\n\t\t\t\tif (inlineCompletion.showInlineEditMenu) {\n\t\t\t\t\treturn InlineEditTabAction.Accept;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn InlineEditTabAction.Inactive;\n\t\t});\n\n\t\tthis.model = new InlineEditModel(\n\t\t\tmodel,\n\t\t\tnew InlineEditWithChanges(\n\t\t\t\tnew StringText(''),\n\t\t\t\tnew TextEdit([inlineCompletion.getSingleTextEdit()]),\n\t\t\t\tmodel.primaryPosition.get(),\n\t\t\t\tmodel.allPositions.get(),\n\t\t\t\tinlineCompletion.source.inlineSuggestions.commands ?? [],\n\t\t\t\tinlineCompletion\n\t\t\t),\n\t\t\ttabAction,\n\t\t);\n\t}\n}\n"]}
|
|
@@ -313,7 +313,15 @@ let InlineEditsView = InlineEditsView_1 = class InlineEditsView extends Disposab
|
|
|
313
313
|
}
|
|
314
314
|
determineRenderState(model, reader, diff, newText) {
|
|
315
315
|
const inlineEdit = model.inlineEdit;
|
|
316
|
-
|
|
316
|
+
let view = this.determineView(model, reader, diff, newText);
|
|
317
|
+
if (this._willRenderAboveCursor(reader, inlineEdit, view)) {
|
|
318
|
+
switch (view) {
|
|
319
|
+
case InlineCompletionViewKind.LineReplacement:
|
|
320
|
+
case InlineCompletionViewKind.WordReplacements:
|
|
321
|
+
view = InlineCompletionViewKind.SideBySide;
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
317
325
|
this._previousView = { id: this.getCacheId(model), view, editorWidth: this._editor.getLayoutInfo().width, timestamp: Date.now() };
|
|
318
326
|
const inner = diff.flatMap(d => d.innerChanges ?? []);
|
|
319
327
|
const textModel = this._editor.getModel();
|
|
@@ -386,6 +394,24 @@ let InlineEditsView = InlineEditsView_1 = class InlineEditsView extends Disposab
|
|
|
386
394
|
}
|
|
387
395
|
return undefined;
|
|
388
396
|
}
|
|
397
|
+
_willRenderAboveCursor(reader, inlineEdit, view) {
|
|
398
|
+
const useCodeShifting = this._useCodeShifting.read(reader);
|
|
399
|
+
if (useCodeShifting === 'always') {
|
|
400
|
+
return false;
|
|
401
|
+
}
|
|
402
|
+
for (const cursorPosition of inlineEdit.multiCursorPositions) {
|
|
403
|
+
if (view === InlineCompletionViewKind.WordReplacements &&
|
|
404
|
+
cursorPosition.lineNumber === inlineEdit.originalLineRange.startLineNumber + 1) {
|
|
405
|
+
return true;
|
|
406
|
+
}
|
|
407
|
+
if (view === InlineCompletionViewKind.LineReplacement &&
|
|
408
|
+
cursorPosition.lineNumber >= inlineEdit.originalLineRange.endLineNumberExclusive &&
|
|
409
|
+
cursorPosition.lineNumber < inlineEdit.modifiedLineRange.endLineNumberExclusive + inlineEdit.modifiedLineRange.length) {
|
|
410
|
+
return true;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
389
415
|
_viewHasBeenShownLongerThan(durationMs) {
|
|
390
416
|
const viewCreationTime = this._previousView?.timestamp;
|
|
391
417
|
if (!viewCreationTime) {
|