monaco-editor-core 0.56.0-dev-20251218 → 0.56.0-dev-20251220
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.cs.js +1 -1
- 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.pl.js +1 -1
- package/esm/nls.messages.pt-br.js +1 -1
- package/esm/nls.messages.ru.js +1 -1
- package/esm/nls.messages.tr.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/common/fuzzyScorer.js +3 -2
- package/esm/vs/base/common/fuzzyScorer.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +3 -3
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +4 -15
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +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 +13 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +5 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +6 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +6 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +14 -9
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +9 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +5 -4
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +3 -37
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputController.js +1 -0
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js.map +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAA2B,MAAM,0CAA0C,CAAC;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,8BAA8B,EAAE,MAAM,yEAAyE,CAAC;AAE1I,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,OAAO,EAAe,mBAAmB,EAAE,qBAAqB,EAAE,eAAe,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;;AAED,SAAS,sBAAsB,CAAC,OAAoB,EAAE,GAAgB;IACrE,IAAI,OAAO,GAAuB,OAAO,CAAC;IAC1C,OAAO,OAAO,EAAE,CAAC;QAChB,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;YACzB,OAAO,OAAO,CAAC,EAAE,CAAC;QACnB,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC","file":"inlineEditsWordReplacementView.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 { $, ModifierKeyEmitter, n, ObserverNodeWithElement } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { KeybindingLabel, unthemedKeybindingLabelOptions } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { IEquatable } from '../../../../../../../base/common/equals.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { constObservable, derived, IObservable, observableFromEvent, observableFromPromise, observableValue } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { editorBackground, editorHoverForeground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { contrastBorder } from '../../../../../../../platform/theme/common/colors/baseColors.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { LineSource, renderLines, RenderOptions } from '../../../../../../browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { StringReplacement } from '../../../../../../common/core/edits/stringEdit.js';\nimport { TextReplacement } from '../../../../../../common/core/edits/textEdit.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { ILanguageService } from '../../../../../../common/languages/language.js';\nimport { LineTokens, TokenArray } from '../../../../../../common/tokens/lineTokens.js';\nimport { inlineSuggestCommitAlternativeActionId } from '../../../controller/commandIds.js';\nimport { InlineSuggestAlternativeAction } from '../../../model/InlineSuggestAlternativeAction.js';\nimport { IInlineEditsView, InlineEditClickEvent, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, modifiedChangedTextOverlayColor, observeColor, originalChangedTextOverlayColor } from '../theme.js';\nimport { getEditorValidOverlayRect, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nexport class WordReplacementsViewData implements IEquatable<WordReplacementsViewData> {\n\tconstructor(\n\t\tpublic readonly edit: TextReplacement,\n\t\tpublic readonly alternativeAction: InlineSuggestAlternativeAction | undefined,\n\t) { }\n\n\tequals(other: WordReplacementsViewData): boolean {\n\t\treturn this.edit.equals(other.edit) && this.alternativeAction === other.alternativeAction;\n\t}\n}\n\nconst BORDER_WIDTH = 1;\nconst DOM_ID_OVERLAY = 'word-replacement-view-overlay';\nconst DOM_ID_WIDGET = 'word-replacement-view-widget';\nconst DOM_ID_REPLACEMENT = 'word-replacement-view-replacement';\nconst DOM_ID_RENAME = 'word-replacement-view-rename';\n\nexport class InlineEditsWordReplacementView extends Disposable implements IInlineEditsView {\n\n\tpublic static MAX_LENGTH = 100;\n\n\tprivate readonly _onDidClick = this._register(new Emitter<InlineEditClickEvent>());\n\treadonly onDidClick = this._onDidClick.event;\n\n\tprivate readonly _start;\n\tprivate readonly _end;\n\n\tprivate readonly _line;\n\n\tprivate readonly _primaryElement;\n\tprivate readonly _secondaryElement;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\tprivate readonly _viewData: WordReplacementsViewData,\n\t\tprotected readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t) {\n\t\tsuper();\n\t\tthis._start = this._editor.observePosition(constObservable(this._viewData.edit.range.getStartPosition()), this._store);\n\t\tthis._end = this._editor.observePosition(constObservable(this._viewData.edit.range.getEndPosition()), this._store);\n\t\tthis._line = document.createElement('div');\n\t\tthis._primaryElement = observableValue<ObserverNodeWithElement | null>(this, null);\n\t\tthis._secondaryElement = observableValue<ObserverNodeWithElement | null>(this, null);\n\t\tthis.isHovered = this._primaryElement.map((e, reader) => e?.didMouseMoveDuringHover.read(reader) ?? false);\n\t\tthis._renderTextEffect = derived(this, _reader => {\n\t\t\tconst tm = this._editor.model.get()!;\n\t\t\tconst origLine = tm.getLineContent(this._viewData.edit.range.startLineNumber);\n\n\t\t\tconst edit = StringReplacement.replace(new OffsetRange(this._viewData.edit.range.startColumn - 1, this._viewData.edit.range.endColumn - 1), this._viewData.edit.text);\n\t\t\tconst lineToTokenize = edit.replace(origLine);\n\t\t\tconst t = tm.tokenization.tokenizeLinesAt(this._viewData.edit.range.startLineNumber, [lineToTokenize])?.[0];\n\t\t\tlet tokens: LineTokens;\n\t\t\tif (t) {\n\t\t\t\ttokens = TokenArray.fromLineTokens(t).slice(edit.getRangeAfterReplace()).toLineTokens(this._viewData.edit.text, this._languageService.languageIdCodec);\n\t\t\t} else {\n\t\t\t\ttokens = LineTokens.createEmpty(this._viewData.edit.text, this._languageService.languageIdCodec);\n\t\t\t}\n\t\t\tconst res = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), [], this._line, true);\n\t\t\tthis._line.style.width = `${res.minWidthInPx}px`;\n\t\t});\n\t\tconst modifiedLineHeight = this._editor.observeLineHeightForPosition(this._viewData.edit.range.getStartPosition());\n\t\tconst altCount = observableFromPromise(this._viewData.alternativeAction?.count ?? new Promise<undefined>(resolve => resolve(undefined))).map(c => c.value);\n\t\tconst altModifierActive = observableFromEvent(this, ModifierKeyEmitter.getInstance().event, () => ModifierKeyEmitter.getInstance().keyStatus.shiftKey);\n\t\tthis._layout = derived(this, reader => {\n\t\t\tthis._renderTextEffect.read(reader);\n\t\t\tconst widgetStart = this._start.read(reader);\n\t\t\tconst widgetEnd = this._end.read(reader);\n\n\t\t\t// TODO@hediet better about widgetStart and widgetEnd in a single transaction!\n\t\t\tif (!widgetStart || !widgetEnd || widgetStart.x > widgetEnd.x || widgetStart.y > widgetEnd.y) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst lineHeight = modifiedLineHeight.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst w = this._editor.getOption(EditorOption.fontInfo).read(reader).typicalHalfwidthCharacterWidth;\n\n\t\t\tconst modifiedLeftOffset = 3 * w;\n\t\t\tconst modifiedTopOffset = 4;\n\t\t\tconst modifiedOffset = new Point(modifiedLeftOffset, modifiedTopOffset);\n\n\t\t\tlet alternativeAction = undefined;\n\t\t\tif (this._viewData.alternativeAction) {\n\t\t\t\tconst label = this._viewData.alternativeAction.label;\n\t\t\t\tconst count = altCount.read(reader);\n\t\t\t\tconst active = altModifierActive.read(reader);\n\t\t\t\tconst occurrencesLabel = count !== undefined ? count === 1 ?\n\t\t\t\t\tlocalize('labelOccurence', \"{0} 1 occurrence\", label) :\n\t\t\t\t\tlocalize('labelOccurences', \"{0} {1} occurrences\", label, count)\n\t\t\t\t\t: label;\n\t\t\t\tconst keybindingTooltip = localize('shiftToSeeOccurences', \"{0} show occurrences\", '[shift]');\n\t\t\t\talternativeAction = {\n\t\t\t\t\tlabel: count !== undefined ? (active ? occurrencesLabel : label) : label,\n\t\t\t\t\ttooltip: occurrencesLabel ? `${occurrencesLabel}\\n${keybindingTooltip}` : undefined,\n\t\t\t\t\ticon: undefined, //this._viewData.alternativeAction.icon, Do not render icon fo the moment\n\t\t\t\t\tcount,\n\t\t\t\t\tkeybinding: this._keybindingService.lookupKeybinding(inlineSuggestCommitAlternativeActionId),\n\t\t\t\t\tactive: altModifierActive,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst originalLine = Rect.fromPoints(widgetStart, widgetEnd).withHeight(lineHeight).translateX(-scrollLeft);\n\t\t\tconst codeLine = Rect.fromPointSize(originalLine.getLeftBottom().add(modifiedOffset), new Point(this._viewData.edit.text.length * w, originalLine.height));\n\t\t\tconst modifiedLine = codeLine.withWidth(codeLine.width + (alternativeAction ? alternativeAction.label.length * w + 8 + 4 + 12 : 0));\n\t\t\tconst lowerBackground = modifiedLine.withLeft(originalLine.left);\n\n\t\t\t// debugView(debugLogRects({ lowerBackground }, this._editor.editor.getContainerDomNode()), reader);\n\n\t\t\treturn {\n\t\t\t\talternativeAction,\n\t\t\t\toriginalLine,\n\t\t\t\tcodeLine,\n\t\t\t\tmodifiedLine,\n\t\t\t\tlowerBackground,\n\t\t\t\tlineHeight,\n\t\t\t};\n\t\t});\n\t\tthis.minEditorScrollHeight = derived(this, reader => {\n\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\tif (!layout) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).modifiedLine.bottom + BORDER_WIDTH + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._root = n.div({\n\t\t\tclass: 'word-replacement',\n\t\t}, [\n\t\t\tderived(this, reader => {\n\t\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\t\tif (!layout) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);\n\t\t\t\tthis._line.style.lineHeight = `${layout.read(reader).modifiedLine.height + 2 * BORDER_WIDTH}px`;\n\n\t\t\t\tconst secondaryElementHovered = constObservable(false);//this._secondaryElement.map((e, r) => e?.isHovered.read(r) ?? false);\n\t\t\t\tconst alternativeAction = layout.map(l => l.alternativeAction);\n\t\t\t\tconst alternativeActionActive = derived(reader => (alternativeAction.read(reader)?.active.read(reader) ?? false) || secondaryElementHovered.read(reader));\n\n\t\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t\t}).read(reader);\n\t\t\t\tconst hcBorderColor = isHighContrast ? observeColor(contrastBorder, this._themeService).read(reader) : null;\n\n\t\t\t\tconst primaryActiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : modifiedBorderColor,\n\t\t\t\t\tbackgroundColor: asCssVariable(modifiedChangedTextOverlayColor),\n\t\t\t\t\tcolor: '',\n\t\t\t\t\topacity: '1',\n\t\t\t\t};\n\n\t\t\t\tconst secondaryActiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : asCssVariable(inlineEditIndicatorPrimaryBorder),\n\t\t\t\t\tbackgroundColor: asCssVariable(inlineEditIndicatorPrimaryBackground),\n\t\t\t\t\tcolor: asCssVariable(inlineEditIndicatorPrimaryForeground),\n\t\t\t\t\topacity: '1',\n\t\t\t\t};\n\n\t\t\t\tconst passiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : observeColor(editorHoverForeground, this._themeService).map(c => c.transparent(0.2).toString()).read(reader),\n\t\t\t\t\tbackgroundColor: asCssVariable(editorBackground),\n\t\t\t\t\tcolor: '',\n\t\t\t\t\topacity: '0.7',\n\t\t\t\t};\n\n\t\t\t\tconst primaryActionStyles = derived(this, r => alternativeActionActive.read(r) ? primaryActiveStyles : primaryActiveStyles);\n\t\t\t\tconst secondaryActionStyles = derived(this, r => alternativeActionActive.read(r) ? secondaryActiveStyles : passiveStyles);\n\t\t\t\t// TODO@benibenj clicking the arrow does not accept suggestion anymore\n\t\t\t\treturn [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tid: DOM_ID_OVERLAY,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t...rectToProps((r) => getEditorValidOverlayRect(this._editor).read(r)),\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t}\n\t\t\t\t\t}, [\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerBackground.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH, BORDER_WIDTH, 0)),\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: (e) => this._mouseDown(e),\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tid: DOM_ID_WIDGET,\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).modifiedLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)),\n\t\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\n\t\t\t\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tjustifyContent: 'left',\n\n\t\t\t\t\t\t\t\toutline: `2px solid ${asCssVariable(editorBackground)}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: (e) => this._mouseDown(e),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\t\tid: DOM_ID_REPLACEMENT,\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tfontFamily: this._editor.getOption(EditorOption.fontFamily),\n\t\t\t\t\t\t\t\t\tfontSize: this._editor.getOption(EditorOption.fontSize),\n\t\t\t\t\t\t\t\t\tfontWeight: this._editor.getOption(EditorOption.fontWeight),\n\t\t\t\t\t\t\t\t\twidth: rectToProps(reader => layout.read(reader).codeLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)).width,\n\t\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\t\tborder: primaryActionStyles.map(s => `${BORDER_WIDTH}px solid ${s.borderColor}`),\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\tpadding: `${BORDER_WIDTH}px`,\n\t\t\t\t\t\t\t\t\topacity: primaryActionStyles.map(s => s.opacity),\n\t\t\t\t\t\t\t\t\tbackground: primaryActionStyles.map(s => s.backgroundColor),\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'left',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tobsRef: (elem) => {\n\t\t\t\t\t\t\t\t\tthis._primaryElement.set(elem, undefined);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, [this._line]),\n\t\t\t\t\t\t\tderived(this, reader => {\n\t\t\t\t\t\t\t\tconst altAction = alternativeAction.read(reader);\n\t\t\t\t\t\t\t\tif (!altAction) {\n\t\t\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconst keybinding = document.createElement('div');\n\t\t\t\t\t\t\t\tconst keybindingLabel = reader.store.add(new KeybindingLabel(keybinding, OS, { ...unthemedKeybindingLabelOptions, disableTitle: true }));\n\t\t\t\t\t\t\t\tkeybindingLabel.set(altAction.keybinding);\n\n\t\t\t\t\t\t\t\treturn n.div({\n\t\t\t\t\t\t\t\t\tid: DOM_ID_RENAME,\n\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\t\t\tborderTop: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderRight: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderBottom: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderLeft: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderColor: secondaryActionStyles.map(s => s.borderColor),\n\t\t\t\t\t\t\t\t\t\topacity: secondaryActionStyles.map(s => s.opacity),\n\t\t\t\t\t\t\t\t\t\tcolor: secondaryActionStyles.map(s => s.color),\n\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\tpadding: '0 4px 0 1px',\n\t\t\t\t\t\t\t\t\t\tmarginLeft: '4px',\n\t\t\t\t\t\t\t\t\t\tbackground: secondaryActionStyles.map(s => s.backgroundColor),\n\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\ttextWrap: 'nowrap',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tclass: 'inline-edit-alternative-action-label',\n\t\t\t\t\t\t\t\t\tobsRef: (elem) => {\n\t\t\t\t\t\t\t\t\t\tthis._secondaryElement.set(elem, undefined);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tref: (elem) => {\n\t\t\t\t\t\t\t\t\t\tif (altAction.tooltip) {\n\t\t\t\t\t\t\t\t\t\t\treader.store.add(this._hoverService.setupDelayedHoverAtMouse(elem, { content: altAction.tooltip, appearance: { compact: true } }));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\tkeybinding,\n\t\t\t\t\t\t\t\t\t$('div.inline-edit-alternative-action-label-separator'),\n\t\t\t\t\t\t\t\t\taltAction.icon ? renderIcon(altAction.icon) : undefined,\n\t\t\t\t\t\t\t\t\taltAction.label,\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).originalLine.withMargin(BORDER_WIDTH)),\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\tborder: `${BORDER_WIDTH}px solid ${originalBorderColor}`,\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalChangedTextOverlayColor),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, []),\n\n\t\t\t\t\t\tn.svg({\n\t\t\t\t\t\t\twidth: 11,\n\t\t\t\t\t\t\theight: 14,\n\t\t\t\t\t\t\tviewBox: '0 0 11 14',\n\t\t\t\t\t\t\tfill: 'none',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\tleft: layout.map(l => l.modifiedLine.left - 16),\n\t\t\t\t\t\t\t\ttop: layout.map(l => l.modifiedLine.top + Math.round((l.lineHeight - 14 - 5) / 2)),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: (e) => this._mouseDown(e),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M1 0C1 2.98966 1 5.92087 1 8.49952C1 9.60409 1.89543 10.5 3 10.5H10.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M6 7.5L9.99999 10.49998L6 13.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._root.element,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate readonly _renderTextEffect;\n\n\tprivate readonly _layout;\n\n\tprivate readonly _root;\n\n\tprivate _mouseDown(e: MouseEvent): void {\n\t\tconst target_id = traverseParentsUntilId(e.target as HTMLElement, new Set([DOM_ID_WIDGET, DOM_ID_REPLACEMENT, DOM_ID_RENAME, DOM_ID_OVERLAY]));\n\t\tif (!target_id) {\n\t\t\treturn;\n\t\t}\n\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\tthis._onDidClick.fire(InlineEditClickEvent.create(e, target_id === DOM_ID_RENAME));\n\t}\n}\n\nfunction traverseParentsUntilId(element: HTMLElement, ids: Set<string>): string | null {\n\tlet current: HTMLElement | null = element;\n\twhile (current) {\n\t\tif (ids.has(current.id)) {\n\t\t\treturn current.id;\n\t\t}\n\t\tcurrent = current.parentElement;\n\t}\n\treturn null;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAA2B,MAAM,0CAA0C,CAAC;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,8BAA8B,EAAE,MAAM,yEAAyE,CAAC;AAE1I,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,OAAO,EAAe,mBAAmB,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACpK,OAAO,EAAE,EAAE,EAAE,MAAM,8CAA8C,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sDAAsD,CAAC;AACrF,O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AC1C,OAAO,OAAO,EAAE,CAAC;QAChB,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;YACzB,OAAO,OAAO,CAAC,EAAE,CAAC;QACnB,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC","file":"inlineEditsWordReplacementView.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 { $, ModifierKeyEmitter, n, ObserverNodeWithElement } from '../../../../../../../base/browser/dom.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { KeybindingLabel, unthemedKeybindingLabelOptions } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { IEquatable } from '../../../../../../../base/common/equals.js';\nimport { Emitter } from '../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../base/common/lifecycle.js';\nimport { constObservable, derived, IObservable, observableFromEvent, observableFromPromise, observableValue } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { editorHoverForeground } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { contrastBorder } from '../../../../../../../platform/theme/common/colors/baseColors.js';\nimport { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';\nimport { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { LineSource, renderLines, RenderOptions } from '../../../../../../browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { Point } from '../../../../../../common/core/2d/point.js';\nimport { Rect } from '../../../../../../common/core/2d/rect.js';\nimport { StringReplacement } from '../../../../../../common/core/edits/stringEdit.js';\nimport { TextReplacement } from '../../../../../../common/core/edits/textEdit.js';\nimport { OffsetRange } from '../../../../../../common/core/ranges/offsetRange.js';\nimport { ILanguageService } from '../../../../../../common/languages/language.js';\nimport { LineTokens, TokenArray } from '../../../../../../common/tokens/lineTokens.js';\nimport { inlineSuggestCommitAlternativeActionId } from '../../../controller/commandIds.js';\nimport { InlineSuggestAlternativeAction } from '../../../model/InlineSuggestAlternativeAction.js';\nimport { InlineCompletionEditorType } from '../../../model/provideInlineCompletions.js';\nimport { IInlineEditsView, InlineEditClickEvent, InlineEditTabAction } from '../inlineEditsViewInterface.js';\nimport { getEditorBackgroundColor, getModifiedBorderColor, getOriginalBorderColor, INLINE_EDITS_BORDER_RADIUS, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, modifiedChangedTextOverlayColor, observeColor, originalChangedTextOverlayColor } from '../theme.js';\nimport { getEditorValidOverlayRect, mapOutFalsy, rectToProps } from '../utils/utils.js';\n\nexport class WordReplacementsViewData implements IEquatable<WordReplacementsViewData> {\n\tconstructor(\n\t\tpublic readonly edit: TextReplacement,\n\t\tpublic readonly editorType: InlineCompletionEditorType,\n\t\tpublic readonly alternativeAction: InlineSuggestAlternativeAction | undefined,\n\t) { }\n\n\tequals(other: WordReplacementsViewData): boolean {\n\t\treturn this.edit.equals(other.edit) && this.alternativeAction === other.alternativeAction;\n\t}\n}\n\nconst BORDER_WIDTH = 1;\nconst DOM_ID_OVERLAY = 'word-replacement-view-overlay';\nconst DOM_ID_WIDGET = 'word-replacement-view-widget';\nconst DOM_ID_REPLACEMENT = 'word-replacement-view-replacement';\nconst DOM_ID_RENAME = 'word-replacement-view-rename';\n\nexport class InlineEditsWordReplacementView extends Disposable implements IInlineEditsView {\n\n\tpublic static MAX_LENGTH = 100;\n\n\tprivate readonly _onDidClick = this._register(new Emitter<InlineEditClickEvent>());\n\treadonly onDidClick = this._onDidClick.event;\n\n\tprivate readonly _start;\n\tprivate readonly _end;\n\n\tprivate readonly _line;\n\n\tprivate readonly _primaryElement;\n\tprivate readonly _secondaryElement;\n\n\treadonly isHovered;\n\n\treadonly minEditorScrollHeight;\n\n\tconstructor(\n\t\tprivate readonly _editor: ObservableCodeEditor,\n\t\tprivate readonly _viewData: WordReplacementsViewData,\n\t\tprotected readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@ILanguageService private readonly _languageService: ILanguageService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t) {\n\t\tsuper();\n\t\tthis._start = this._editor.observePosition(constObservable(this._viewData.edit.range.getStartPosition()), this._store);\n\t\tthis._end = this._editor.observePosition(constObservable(this._viewData.edit.range.getEndPosition()), this._store);\n\t\tthis._line = document.createElement('div');\n\t\tthis._primaryElement = observableValue<ObserverNodeWithElement | null>(this, null);\n\t\tthis._secondaryElement = observableValue<ObserverNodeWithElement | null>(this, null);\n\t\tthis.isHovered = this._primaryElement.map((e, reader) => e?.didMouseMoveDuringHover.read(reader) ?? false);\n\t\tthis._renderTextEffect = derived(this, _reader => {\n\t\t\tconst tm = this._editor.model.get()!;\n\t\t\tconst origLine = tm.getLineContent(this._viewData.edit.range.startLineNumber);\n\n\t\t\tconst edit = StringReplacement.replace(new OffsetRange(this._viewData.edit.range.startColumn - 1, this._viewData.edit.range.endColumn - 1), this._viewData.edit.text);\n\t\t\tconst lineToTokenize = edit.replace(origLine);\n\t\t\tconst t = tm.tokenization.tokenizeLinesAt(this._viewData.edit.range.startLineNumber, [lineToTokenize])?.[0];\n\t\t\tlet tokens: LineTokens;\n\t\t\tif (t) {\n\t\t\t\ttokens = TokenArray.fromLineTokens(t).slice(edit.getRangeAfterReplace()).toLineTokens(this._viewData.edit.text, this._languageService.languageIdCodec);\n\t\t\t} else {\n\t\t\t\ttokens = LineTokens.createEmpty(this._viewData.edit.text, this._languageService.languageIdCodec);\n\t\t\t}\n\t\t\tconst res = renderLines(new LineSource([tokens]), RenderOptions.fromEditor(this._editor.editor).withSetWidth(false).withScrollBeyondLastColumn(0), [], this._line, true);\n\t\t\tthis._line.style.width = `${res.minWidthInPx}px`;\n\t\t});\n\t\tconst modifiedLineHeight = this._editor.observeLineHeightForPosition(this._viewData.edit.range.getStartPosition());\n\t\tconst altCount = observableFromPromise(this._viewData.alternativeAction?.count ?? new Promise<undefined>(resolve => resolve(undefined))).map(c => c.value);\n\t\tconst altModifierActive = observableFromEvent(this, ModifierKeyEmitter.getInstance().event, () => ModifierKeyEmitter.getInstance().keyStatus.shiftKey);\n\t\tthis._layout = derived(this, reader => {\n\t\t\tthis._renderTextEffect.read(reader);\n\t\t\tconst widgetStart = this._start.read(reader);\n\t\t\tconst widgetEnd = this._end.read(reader);\n\n\t\t\t// TODO@hediet better about widgetStart and widgetEnd in a single transaction!\n\t\t\tif (!widgetStart || !widgetEnd || widgetStart.x > widgetEnd.x || widgetStart.y > widgetEnd.y) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst lineHeight = modifiedLineHeight.read(reader);\n\t\t\tconst scrollLeft = this._editor.scrollLeft.read(reader);\n\t\t\tconst w = this._editor.getOption(EditorOption.fontInfo).read(reader).typicalHalfwidthCharacterWidth;\n\n\t\t\tconst modifiedLeftOffset = 3 * w;\n\t\t\tconst modifiedTopOffset = 4;\n\t\t\tconst modifiedOffset = new Point(modifiedLeftOffset, modifiedTopOffset);\n\n\t\t\tlet alternativeAction = undefined;\n\t\t\tif (this._viewData.alternativeAction) {\n\t\t\t\tconst label = this._viewData.alternativeAction.label;\n\t\t\t\tconst count = altCount.read(reader);\n\t\t\t\tconst active = altModifierActive.read(reader);\n\t\t\t\tconst occurrencesLabel = count !== undefined ? count === 1 ?\n\t\t\t\t\tlocalize('labelOccurence', \"{0} 1 occurrence\", label) :\n\t\t\t\t\tlocalize('labelOccurences', \"{0} {1} occurrences\", label, count)\n\t\t\t\t\t: label;\n\t\t\t\tconst keybindingTooltip = localize('shiftToSeeOccurences', \"{0} show occurrences\", '[shift]');\n\t\t\t\talternativeAction = {\n\t\t\t\t\tlabel: count !== undefined ? (active ? occurrencesLabel : label) : label,\n\t\t\t\t\ttooltip: occurrencesLabel ? `${occurrencesLabel}\\n${keybindingTooltip}` : undefined,\n\t\t\t\t\ticon: undefined, //this._viewData.alternativeAction.icon, Do not render icon fo the moment\n\t\t\t\t\tcount,\n\t\t\t\t\tkeybinding: this._keybindingService.lookupKeybinding(inlineSuggestCommitAlternativeActionId),\n\t\t\t\t\tactive: altModifierActive,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst originalLine = Rect.fromPoints(widgetStart, widgetEnd).withHeight(lineHeight).translateX(-scrollLeft);\n\t\t\tconst codeLine = Rect.fromPointSize(originalLine.getLeftBottom().add(modifiedOffset), new Point(this._viewData.edit.text.length * w, originalLine.height));\n\t\t\tconst modifiedLine = codeLine.withWidth(codeLine.width + (alternativeAction ? alternativeAction.label.length * w + 8 + 4 + 12 : 0));\n\t\t\tconst lowerBackground = modifiedLine.withLeft(originalLine.left);\n\n\t\t\t// debugView(debugLogRects({ lowerBackground }, this._editor.editor.getContainerDomNode()), reader);\n\n\t\t\treturn {\n\t\t\t\talternativeAction,\n\t\t\t\toriginalLine,\n\t\t\t\tcodeLine,\n\t\t\t\tmodifiedLine,\n\t\t\t\tlowerBackground,\n\t\t\t\tlineHeight,\n\t\t\t};\n\t\t});\n\t\tthis.minEditorScrollHeight = derived(this, reader => {\n\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\tif (!layout) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn layout.read(reader).modifiedLine.bottom + BORDER_WIDTH + this._editor.editor.getScrollTop();\n\t\t});\n\t\tthis._root = n.div({\n\t\t\tclass: 'word-replacement',\n\t\t}, [\n\t\t\tderived(this, reader => {\n\t\t\t\tconst layout = mapOutFalsy(this._layout).read(reader);\n\t\t\t\tif (!layout) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst originalBorderColor = getOriginalBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);\n\t\t\t\tconst modifiedBorderColor = getModifiedBorderColor(this._tabAction).map(c => asCssVariable(c)).read(reader);\n\t\t\t\tthis._line.style.lineHeight = `${layout.read(reader).modifiedLine.height + 2 * BORDER_WIDTH}px`;\n\n\t\t\t\tconst secondaryElementHovered = constObservable(false);//this._secondaryElement.map((e, r) => e?.isHovered.read(r) ?? false);\n\t\t\t\tconst alternativeAction = layout.map(l => l.alternativeAction);\n\t\t\t\tconst alternativeActionActive = derived(reader => (alternativeAction.read(reader)?.active.read(reader) ?? false) || secondaryElementHovered.read(reader));\n\n\t\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t\t}).read(reader);\n\t\t\t\tconst hcBorderColor = isHighContrast ? observeColor(contrastBorder, this._themeService).read(reader) : null;\n\n\t\t\t\tconst primaryActiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : modifiedBorderColor,\n\t\t\t\t\tbackgroundColor: asCssVariable(modifiedChangedTextOverlayColor),\n\t\t\t\t\tcolor: '',\n\t\t\t\t\topacity: '1',\n\t\t\t\t};\n\n\t\t\t\tconst secondaryActiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : asCssVariable(inlineEditIndicatorPrimaryBorder),\n\t\t\t\t\tbackgroundColor: asCssVariable(inlineEditIndicatorPrimaryBackground),\n\t\t\t\t\tcolor: asCssVariable(inlineEditIndicatorPrimaryForeground),\n\t\t\t\t\topacity: '1',\n\t\t\t\t};\n\n\t\t\t\tconst passiveStyles = {\n\t\t\t\t\tborderColor: hcBorderColor ? hcBorderColor.toString() : observeColor(editorHoverForeground, this._themeService).map(c => c.transparent(0.2).toString()).read(reader),\n\t\t\t\t\tbackgroundColor: getEditorBackgroundColor(this._viewData.editorType),\n\t\t\t\t\tcolor: '',\n\t\t\t\t\topacity: '0.7',\n\t\t\t\t};\n\n\t\t\t\tconst editorBackground = getEditorBackgroundColor(this._viewData.editorType);\n\t\t\t\tconst primaryActionStyles = derived(this, r => alternativeActionActive.read(r) ? primaryActiveStyles : primaryActiveStyles);\n\t\t\t\tconst secondaryActionStyles = derived(this, r => alternativeActionActive.read(r) ? secondaryActiveStyles : passiveStyles);\n\t\t\t\t// TODO@benibenj clicking the arrow does not accept suggestion anymore\n\t\t\t\treturn [\n\t\t\t\t\tn.div({\n\t\t\t\t\t\tid: DOM_ID_OVERLAY,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t...rectToProps((r) => getEditorValidOverlayRect(this._editor).read(r)),\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t}\n\t\t\t\t\t}, [\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).lowerBackground.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH, BORDER_WIDTH, 0)),\n\t\t\t\t\t\t\t\tbackground: editorBackground,\n\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: (e) => this._mouseDown(e),\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tid: DOM_ID_WIDGET,\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).modifiedLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)),\n\t\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\n\t\t\t\t\t\t\t\tbackground: editorBackground,\n\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\tjustifyContent: 'left',\n\n\t\t\t\t\t\t\t\toutline: `2px solid ${editorBackground}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: (e) => this._mouseDown(e),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\t\tid: DOM_ID_REPLACEMENT,\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\tfontFamily: this._editor.getOption(EditorOption.fontFamily),\n\t\t\t\t\t\t\t\t\tfontSize: this._editor.getOption(EditorOption.fontSize),\n\t\t\t\t\t\t\t\t\tfontWeight: this._editor.getOption(EditorOption.fontWeight),\n\t\t\t\t\t\t\t\t\twidth: rectToProps(reader => layout.read(reader).codeLine.withMargin(BORDER_WIDTH, 2 * BORDER_WIDTH)).width,\n\t\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\t\tborder: primaryActionStyles.map(s => `${BORDER_WIDTH}px solid ${s.borderColor}`),\n\t\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\t\tpadding: `${BORDER_WIDTH}px`,\n\t\t\t\t\t\t\t\t\topacity: primaryActionStyles.map(s => s.opacity),\n\t\t\t\t\t\t\t\t\tbackground: primaryActionStyles.map(s => s.backgroundColor),\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tjustifyContent: 'left',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\tpointerEvents: 'auto',\n\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tobsRef: (elem) => {\n\t\t\t\t\t\t\t\t\tthis._primaryElement.set(elem, undefined);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, [this._line]),\n\t\t\t\t\t\t\tderived(this, reader => {\n\t\t\t\t\t\t\t\tconst altAction = alternativeAction.read(reader);\n\t\t\t\t\t\t\t\tif (!altAction) {\n\t\t\t\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconst keybinding = document.createElement('div');\n\t\t\t\t\t\t\t\tconst keybindingLabel = reader.store.add(new KeybindingLabel(keybinding, OS, { ...unthemedKeybindingLabelOptions, disableTitle: true }));\n\t\t\t\t\t\t\t\tkeybindingLabel.set(altAction.keybinding);\n\n\t\t\t\t\t\t\t\treturn n.div({\n\t\t\t\t\t\t\t\t\tid: DOM_ID_RENAME,\n\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\t\t\tborderTop: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderRight: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderBottom: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderLeft: `${BORDER_WIDTH}px solid`,\n\t\t\t\t\t\t\t\t\t\tborderColor: secondaryActionStyles.map(s => s.borderColor),\n\t\t\t\t\t\t\t\t\t\topacity: secondaryActionStyles.map(s => s.opacity),\n\t\t\t\t\t\t\t\t\t\tcolor: secondaryActionStyles.map(s => s.color),\n\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\t\tjustifyContent: 'center',\n\t\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t\t\tpadding: '0 4px 0 1px',\n\t\t\t\t\t\t\t\t\t\tmarginLeft: '4px',\n\t\t\t\t\t\t\t\t\t\tbackground: secondaryActionStyles.map(s => s.backgroundColor),\n\t\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t\t\ttextWrap: 'nowrap',\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tclass: 'inline-edit-alternative-action-label',\n\t\t\t\t\t\t\t\t\tobsRef: (elem) => {\n\t\t\t\t\t\t\t\t\t\tthis._secondaryElement.set(elem, undefined);\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tref: (elem) => {\n\t\t\t\t\t\t\t\t\t\tif (altAction.tooltip) {\n\t\t\t\t\t\t\t\t\t\t\treader.store.add(this._hoverService.setupDelayedHoverAtMouse(elem, { content: altAction.tooltip, appearance: { compact: true } }));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\t\tkeybinding,\n\t\t\t\t\t\t\t\t\t$('div.inline-edit-alternative-action-label-separator'),\n\t\t\t\t\t\t\t\t\taltAction.icon ? renderIcon(altAction.icon) : undefined,\n\t\t\t\t\t\t\t\t\taltAction.label,\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\t\t\t\t\t\tn.div({\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t...rectToProps(reader => layout.read(reader).originalLine.withMargin(BORDER_WIDTH)),\n\t\t\t\t\t\t\t\tboxSizing: 'border-box',\n\t\t\t\t\t\t\t\tborderRadius: `${INLINE_EDITS_BORDER_RADIUS}px`,\n\t\t\t\t\t\t\t\tborder: `${BORDER_WIDTH}px solid ${originalBorderColor}`,\n\t\t\t\t\t\t\t\tbackground: asCssVariable(originalChangedTextOverlayColor),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, []),\n\n\t\t\t\t\t\tn.svg({\n\t\t\t\t\t\t\twidth: 11,\n\t\t\t\t\t\t\theight: 14,\n\t\t\t\t\t\t\tviewBox: '0 0 11 14',\n\t\t\t\t\t\t\tfill: 'none',\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\tleft: layout.map(l => l.modifiedLine.left - 16),\n\t\t\t\t\t\t\t\ttop: layout.map(l => l.modifiedLine.top + Math.round((l.lineHeight - 14 - 5) / 2)),\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonmousedown: (e) => this._mouseDown(e),\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M1 0C1 2.98966 1 5.92087 1 8.49952C1 9.60409 1.89543 10.5 3 10.5H10.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tn.svgElem('path', {\n\t\t\t\t\t\t\t\td: 'M6 7.5L9.99999 10.49998L6 13.5',\n\t\t\t\t\t\t\t\tstroke: asCssVariable(editorHoverForeground),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t]),\n\n\t\t\t\t\t])\n\t\t\t\t];\n\t\t\t})\n\t\t]).keepUpdated(this._store);\n\n\t\tthis._register(this._editor.createOverlayWidget({\n\t\t\tdomNode: this._root.element,\n\t\t\tminContentWidthInPx: constObservable(0),\n\t\t\tposition: constObservable({ preference: { top: 0, left: 0 } }),\n\t\t\tallowEditorOverflow: false,\n\t\t}));\n\t}\n\n\tprivate readonly _renderTextEffect;\n\n\tprivate readonly _layout;\n\n\tprivate readonly _root;\n\n\tprivate _mouseDown(e: MouseEvent): void {\n\t\tconst target_id = traverseParentsUntilId(e.target as HTMLElement, new Set([DOM_ID_WIDGET, DOM_ID_REPLACEMENT, DOM_ID_RENAME, DOM_ID_OVERLAY]));\n\t\tif (!target_id) {\n\t\t\treturn;\n\t\t}\n\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\tthis._onDidClick.fire(InlineEditClickEvent.create(e, target_id === DOM_ID_RENAME));\n\t}\n}\n\nfunction traverseParentsUntilId(element: HTMLElement, ids: Set<string>): string | null {\n\tlet current: HTMLElement | null = element;\n\twhile (current) {\n\t\tif (ids.has(current.id)) {\n\t\t\treturn current.id;\n\t\t}\n\t\tcurrent = current.parentElement;\n\t}\n\treturn null;\n}\n"]}
|
|
@@ -32,12 +32,13 @@ import { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';
|
|
|
32
32
|
import { Point } from '../../../../../../../common/core/2d/point.js';
|
|
33
33
|
import { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';
|
|
34
34
|
import { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';
|
|
35
|
-
import { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';
|
|
36
|
-
import { asCssVariable, descriptionForeground,
|
|
35
|
+
import { getEditorBackgroundColor, getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';
|
|
36
|
+
import { asCssVariable, descriptionForeground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';
|
|
37
37
|
import { editorWidgetBorder } from '../../../../../../../../platform/theme/common/colors/editorColors.js';
|
|
38
38
|
import { LongDistancePreviewEditor } from './longDistancePreviewEditor.js';
|
|
39
39
|
import { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';
|
|
40
40
|
import { splitIntoContinuousLineRanges, WidgetPlacementContext } from './longDistnaceWidgetPlacement.js';
|
|
41
|
+
import { InlineCompletionEditorType } from '../../../../model/provideInlineCompletions.js';
|
|
41
42
|
const BORDER_RADIUS = 6;
|
|
42
43
|
const MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };
|
|
43
44
|
const MIN_WIDGET_WIDTH = 250;
|
|
@@ -229,7 +230,7 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
|
|
|
229
230
|
style: {
|
|
230
231
|
overflow: 'hidden',
|
|
231
232
|
padding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),
|
|
232
|
-
background:
|
|
233
|
+
background: this._styles.map(s => s.background),
|
|
233
234
|
pointerEvents: 'none',
|
|
234
235
|
},
|
|
235
236
|
}, [
|
|
@@ -330,7 +331,7 @@ let InlineEditsLongDistanceHint = class InlineEditsLongDistanceHint extends Disp
|
|
|
330
331
|
}
|
|
331
332
|
return {
|
|
332
333
|
border: borderColor.toString(),
|
|
333
|
-
background:
|
|
334
|
+
background: getEditorBackgroundColor(this._viewState.map(s => s?.editorType ?? InlineCompletionEditorType.TextEditor).read(reader)),
|
|
334
335
|
};
|
|
335
336
|
});
|
|
336
337
|
this._editorObs = observableCodeEditor(this._editor);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;gGAGgG;AAChG,OAAO,EAAa,CAAC,EAAyC,MAAM,6CAA6C,CAAC;AACl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,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;AACrD,CAAC","file":"inlineEditsLongDistanceHint.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 *--------------------------------------------------------------------------------------------*/\nimport { ChildNode, n, ObserverNode, ObserverNodeWithElement } from '../../../../../../../../base/browser/dom.js';\nimport { Event } from '../../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../../base/common/lifecycle.js';\nimport { IObservable, autorun, constObservable, debouncedObservable2, derived, derivedDisposable, observableFromEvent } from '../../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../../common/core/position.js';\nimport { ITextModel } from '../../../../../../../common/model.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../../inlineEditWithChanges.js';\nimport { getContentSizeOfLines, rectToProps } from '../../utils/utils.js';\nimport { DetailedLineRangeMapping } from '../../../../../../../common/diff/rangeMapping.js';\nimport { OffsetRange } from '../../../../../../../common/core/ranges/offsetRange.js';\nimport { LineRange } from '../../../../../../../common/core/ranges/lineRange.js';\nimport { HideUnchangedRegionsFeature } from '../../../../../../../browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js';\nimport { Codicon } from '../../../../../../../../base/common/codicons.js';\nimport { renderIcon } from '../../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { SymbolKinds } from '../../../../../../../common/languages.js';\nimport { debugLogRects, debugView } from '../debugVisualization.js';\nimport { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';\nimport { Point } from '../../../../../../../common/core/2d/point.js';\nimport { Size2D } from '../../../../../../../common/core/2d/size.js';\nimport { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';\nimport { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';\nimport { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';\nimport { asCssVariable, descriptionForeground, editorBackground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';\nimport { editorWidgetBorder } from '../../../../../../../../platform/theme/common/colors/editorColors.js';\nimport { ILongDistancePreviewProps, LongDistancePreviewEditor } from './longDistancePreviewEditor.js';\nimport { InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from '../../components/gutterIndicatorView.js';\nimport { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';\nimport { splitIntoContinuousLineRanges, WidgetLayoutConstants, WidgetOutline, WidgetPlacementContext } from './longDistnaceWidgetPlacement.js';\n\nconst BORDER_RADIUS = 6;\nconst MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };\nconst MIN_WIDGET_WIDTH = 250;\n\nconst DEFAULT_WIDGET_LAYOUT_CONSTANTS: WidgetLayoutConstants = {\n\tpreviewEditorMargin: 2,\n\twidgetPadding: 2,\n\twidgetBorder: 1,\n\tlowerBarHeight: 20,\n\tminWidgetWidth: MIN_WIDGET_WIDTH,\n};\n\nexport class InlineEditsLongDistanceHint extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _editorObs;\n\treadonly onDidClick = Event.None;\n\tprivate _viewWithElement: ObserverNodeWithElement<HTMLDivElement> | undefined = undefined;\n\n\tprivate readonly _previewEditor;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _viewState: IObservable<ILongDistanceViewState | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t) {\n\t\tsuper();\n\n\t\tthis._styles = derived(reader => {\n\t\t\tconst v = this._tabAction.read(reader);\n\n\t\t\t// Check theme type by observing a color - this ensures we react to theme changes\n\t\t\tconst widgetBorderColor = observeColor(editorWidgetBorder, this._themeService).read(reader);\n\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t}).read(reader);\n\n\t\t\tlet borderColor;\n\t\t\tif (isHighContrast) {\n\t\t\t\t// Use editorWidgetBorder in high contrast mode for better visibility\n\t\t\t\tborderColor = widgetBorderColor;\n\t\t\t} else {\n\t\t\t\tlet border;\n\t\t\t\tswitch (v) {\n\t\t\t\t\tcase InlineEditTabAction.Inactive: border = inlineEditIndicatorSecondaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Jump: border = inlineEditIndicatorPrimaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Accept: border = inlineEditIndicatorSuccessfulBackground; break;\n\t\t\t\t}\n\t\t\t\tborderColor = getEditorBlendedColor(border, this._themeService).read(reader);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tborder: borderColor.toString(),\n\t\t\t\tbackground: asCssVariable(editorBackground)\n\t\t\t};\n\t\t});\n\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._previewEditor = this._register(\n\t\t\tthis._instantiationService.createInstance(\n\t\t\t\tLongDistancePreviewEditor,\n\t\t\t\tthis._previewTextModel,\n\t\t\t\tderived(reader => {\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdiff: viewState.diff,\n\t\t\t\t\t\tmodel: viewState.model,\n\t\t\t\t\t\tinlineSuggestInfo: viewState.inlineSuggestInfo,\n\t\t\t\t\t\tnextCursorPosition: viewState.nextCursorPosition,\n\t\t\t\t\t} satisfies ILongDistancePreviewProps;\n\t\t\t\t}),\n\t\t\t\tthis._editor,\n\t\t\t\tthis._tabAction,\n\t\t\t)\n\t\t);\n\n\t\tthis._viewWithElement = this._view.keepUpdated(this._store);\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._viewWithElement.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._widgetContent.get().keepUpdated(this._store);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\tif (!layoutInfo) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._previewEditor.layout(layoutInfo.codeEditorSize.toDimension(), layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _styles;\n\n\tpublic get isHovered() { return this._widgetContent.get().didMouseMoveDuringHover; }\n\n\tprivate readonly _hintTextPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\treturn viewState ? new Position(viewState.hint.lineNumber, Number.MAX_SAFE_INTEGER) : null;\n\t});\n\n\tprivate readonly _lineSizesAroundHintPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tconst p = this._hintTextPosition.read(reader);\n\t\tif (!viewState || !p) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) {\n\t\t\treturn [];\n\t\t}\n\t\tconst range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));\n\n\t\tif (!range) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst sizes = getContentSizeOfLines(this._editorObs, range, reader);\n\t\tconst top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);\n\n\t\treturn splitIntoContinuousLineRanges(range, sizes, top, this._editorObs, reader);\n\t});\n\n\tprivate readonly _isVisibleDelayed = debouncedObservable2(\n\t\tderived(this, reader => this._viewState.read(reader)?.hint.isVisible),\n\t\t(lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0,\n\t);\n\n\tprivate readonly _previewEditorLayoutInfo = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\n\t\tif (!viewState || !this._isVisibleDelayed.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst continousLineRanges = this._lineSizesAroundHintPosition.read(reader);\n\t\tif (continousLineRanges.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst editorScrollTop = this._editorObs.scrollTop.read(reader);\n\t\tconst editorScrollLeft = this._editorObs.scrollLeft.read(reader);\n\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst previewContentHeight = this._previewEditor.contentHeight.read(reader);\n\t\tconst previewEditorContentLayout = this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(reader);\n\n\t\tif (!previewContentHeight || !previewEditorContentLayout) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// const debugRects = stackSizesDown(new Point(editorLayout.contentLeft, lineSizes.top - scrollTop), lineSizes.sizes);\n\n\t\tconst editorTrueContentWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\tconst editorTrueContentRight = editorLayout.contentLeft + editorTrueContentWidth;\n\n\t\t// drawEditorWidths(this._editor, reader);\n\n\t\tconst c = this._editorObs.cursorLineNumber.read(reader);\n\t\tif (!c) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst layoutConstants = DEFAULT_WIDGET_LAYOUT_CONSTANTS;\n\t\tconst extraGutterMarginToAvoidScrollBar = 2;\n\t\tconst previewEditorHeight = previewContentHeight + extraGutterMarginToAvoidScrollBar;\n\n\t\t// Try to find widget placement in available empty space\n\t\tlet possibleWidgetOutline: WidgetOutline | undefined;\n\t\tlet lastPlacementContext: WidgetPlacementContext | undefined;\n\n\t\tconst endOfLinePadding = (lineNumber: number) => lineNumber === viewState.hint.lineNumber ? 40 : 20;\n\n\t\tfor (const continousLineRange of continousLineRanges) {\n\t\t\tconst placementContext = new WidgetPlacementContext(\n\t\t\t\tcontinousLineRange,\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding\n\t\t\t);\n\t\t\tlastPlacementContext = placementContext;\n\n\t\t\tconst showRects = false;\n\t\t\tif (showRects) {\n\t\t\t\tconst rects2 = stackSizesDown(\n\t\t\t\t\tnew Point(editorTrueContentRight, continousLineRange.top - editorScrollTop),\n\t\t\t\t\tplacementContext.availableSpaceSizes as Size2D[],\n\t\t\t\t\t'right'\n\t\t\t\t);\n\t\t\t\tdebugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()!), reader);\n\t\t\t}\n\n\t\t\tpossibleWidgetOutline = placementContext.tryFindWidgetOutline(\n\t\t\t\tviewState.hint.lineNumber,\n\t\t\t\tpreviewEditorHeight,\n\t\t\t\teditorTrueContentRight,\n\t\t\t\tlayoutConstants\n\t\t\t);\n\n\t\t\tif (possibleWidgetOutline) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to overlay position if no empty space was found\n\t\tlet position: 'overlay' | 'empty-space' = 'empty-space';\n\t\tif (!possibleWidgetOutline) {\n\t\t\tposition = 'overlay';\n\t\t\tconst maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);\n\n\t\t\t// Create a fallback placement context for computing overlay vertical position\n\t\t\tconst fallbackPlacementContext = lastPlacementContext ?? new WidgetPlacementContext(\n\t\t\t\tcontinousLineRanges[0],\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding,\n\t\t\t);\n\n\t\t\tpossibleWidgetOutline = {\n\t\t\t\thorizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),\n\t\t\t\tverticalWidgetRange: fallbackPlacementContext.getWidgetVerticalOutline(\n\t\t\t\t\tviewState.hint.lineNumber + 2,\n\t\t\t\t\tpreviewEditorHeight,\n\t\t\t\t\tlayoutConstants\n\t\t\t\t).delta(10),\n\t\t\t};\n\t\t}\n\n\t\tif (!possibleWidgetOutline) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rectAvailableSpace = Rect.fromRanges(\n\t\t\tpossibleWidgetOutline.horizontalWidgetRange,\n\t\t\tpossibleWidgetOutline.verticalWidgetRange\n\t\t).translateX(-editorScrollLeft).translateY(-editorScrollTop);\n\n\t\tconst showAvailableSpace = false;\n\t\tif (showAvailableSpace) {\n\t\t\tdebugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst { previewEditorMargin, widgetPadding, widgetBorder, lowerBarHeight } = layoutConstants;\n\t\tconst maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);\n\n\t\tconst layout = distributeFlexBoxLayout(rectAvailableSpace.width, {\n\t\t\tspaceBefore: { min: 0, max: 10, priority: 1 },\n\t\t\tcontent: { min: 50, rules: [{ max: 150, priority: 2 }, { max: maxWidgetWidth, priority: 1 }] },\n\t\t\tspaceAfter: { min: 10 },\n\t\t});\n\n\t\tif (!layout) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst ranges = lengthsToOffsetRanges([layout.spaceBefore, layout.content, layout.spaceAfter], rectAvailableSpace.left);\n\t\tconst spaceBeforeRect = rectAvailableSpace.withHorizontalRange(ranges[0]);\n\t\tconst widgetRect = rectAvailableSpace.withHorizontalRange(ranges[1]);\n\t\tconst spaceAfterRect = rectAvailableSpace.withHorizontalRange(ranges[2]);\n\n\t\tconst showRects2 = false;\n\t\tif (showRects2) {\n\t\t\tdebugView(debugLogRects({ spaceBeforeRect, widgetRect, spaceAfterRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorRect = widgetRect.withMargin(-widgetPadding - widgetBorder - previewEditorMargin).withMargin(0, 0, -lowerBarHeight, 0);\n\n\t\tconst showEditorRect = false;\n\t\tif (showEditorRect) {\n\t\t\tdebugView(debugLogRects({ previewEditorRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorContentWidth = previewEditorRect.width - previewEditorContentLayout.nonContentWidth;\n\t\tconst maxPrefferedRangeLength = previewEditorContentWidth * 0.8;\n\t\tconst preferredRangeToReveal = previewEditorContentLayout.preferredRangeToReveal.intersect(OffsetRange.ofStartAndLength(\n\t\t\tpreviewEditorContentLayout.preferredRangeToReveal.start,\n\t\t\tmaxPrefferedRangeLength\n\t\t)) ?? previewEditorContentLayout.preferredRangeToReveal;\n\t\tconst desiredPreviewEditorScrollLeft = scrollToReveal(previewEditorContentLayout.indentationEnd, previewEditorContentWidth, preferredRangeToReveal);\n\n\t\treturn {\n\t\t\tcodeEditorSize: previewEditorRect.getSize(),\n\t\t\tcodeScrollLeft: editorScrollLeft,\n\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\twidgetRect,\n\n\t\t\tpreviewEditorMargin,\n\t\t\twidgetPadding,\n\t\t\twidgetBorder,\n\n\t\t\tlowerBarHeight,\n\n\t\t\tdesiredPreviewEditorScrollLeft: desiredPreviewEditorScrollLeft.newScrollPosition,\n\t\t};\n\t});\n\n\tprivate readonly _view = n.div({\n\t\tclass: 'inline-edits-view',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t\ttop: '0px',\n\t\t\tleft: '0px',\n\t\t\tdisplay: derived(this, reader => !!this._previewEditorLayoutInfo.read(reader) ? 'block' : 'none'),\n\t\t},\n\t}, [\n\t\tderived(this, _reader => [this._widgetContent]),\n\t]);\n\n\tprivate readonly _widgetContent = derived(this, reader => // TODO@hediet: remove when n.div lazily creates previewEditor.element node\n\t\tn.div({\n\t\t\tclass: 'inline-edits-long-distance-hint-widget',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tbackground: asCssVariable(editorWidgetBackground),\n\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.widgetPadding),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: BORDER_RADIUS,\n\t\t\t\tborder: derived(reader => `${this._previewEditorLayoutInfo.read(reader)?.widgetBorder}px solid ${this._styles.read(reader).border}`),\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\topacity: derived(reader => this._viewState.read(reader)?.hint.isVisible ? '1' : '0'),\n\t\t\t\ttransition: 'opacity 200ms ease-in-out',\n\t\t\t\t...rectToProps(reader => this._previewEditorLayoutInfo.read(reader)?.widgetRect)\n\t\t\t},\n\t\t\tonmousedown: e => {\n\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t},\n\t\t\tonclick: () => {\n\t\t\t\tthis._viewState.read(undefined)?.model.jump();\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclass: ['editorContainer'],\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),\n\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t},\n\t\t\t}, [\n\t\t\t\tderived(this, r => this._previewEditor.element), // --\n\t\t\t]),\n\t\t\tn.div({ class: 'bar', style: { color: asCssVariable(descriptionForeground), pointerEvents: 'none', margin: '0 4px', height: this._previewEditorLayoutInfo.map(i => i?.lowerBarHeight), display: 'flex', justifyContent: 'space-between', alignItems: 'center' } }, [\n\t\t\t\tderived(this, reader => {\n\t\t\t\t\tconst children: (HTMLElement | ObserverNode<HTMLDivElement>)[] = [];\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn children;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Outline Element\n\t\t\t\t\tconst source = this._originalOutlineSource.read(reader);\n\t\t\t\t\tconst originalTargetLineNumber = this._originalTargetLineNumber.read(reader);\n\t\t\t\t\tconst outlineItems = source?.getAt(originalTargetLineNumber, reader).slice(0, 1) ?? [];\n\t\t\t\t\tconst outlineElements: ChildNode[] = [];\n\t\t\t\t\tif (outlineItems.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < outlineItems.length; i++) {\n\t\t\t\t\t\t\tconst item = outlineItems[i];\n\t\t\t\t\t\t\tconst icon = SymbolKinds.toIcon(item.kind);\n\t\t\t\t\t\t\toutlineElements.push(n.div({\n\t\t\t\t\t\t\t\tclass: 'breadcrumb-item',\n\t\t\t\t\t\t\t\tstyle: { display: 'flex', alignItems: 'center', flex: '1 1 auto', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\trenderIcon(icon),\n\t\t\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\t\t\titem.name,\n\t\t\t\t\t\t\t\t...(i === outlineItems.length - 1\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: [renderIcon(Codicon.chevronRight)]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));\n\n\t\t\t\t\t// Show Edit Direction\n\t\t\t\t\tconst arrowIcon = viewState.hint.lineNumber < originalTargetLineNumber ? Codicon.arrowDown : Codicon.arrowUp;\n\t\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);\n\t\t\t\t\tlet label = 'Go to suggestion';\n\t\t\t\t\tif (keybinding && keybinding.getLabel() === 'Tab') {\n\t\t\t\t\t\tlabel = 'Tab to jump';\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({\n\t\t\t\t\t\tclass: 'go-to-label',\n\t\t\t\t\t\tstyle: { position: 'relative', display: 'flex', alignItems: 'center', flex: '0 0 auto', paddingLeft: '6px' },\n\t\t\t\t\t}, [\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\trenderIcon(arrowIcon),\n\t\t\t\t\t]));\n\n\t\t\t\t\treturn children;\n\t\t\t\t})\n\t\t\t]),\n\t\t])\n\t);\n\n\t// Drives breadcrumbs and symbol icon\n\tprivate readonly _originalTargetLineNumber = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tif (!viewState) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (viewState.edit.action?.kind === 'jumpTo') {\n\t\t\treturn viewState.edit.action.position.lineNumber;\n\t\t}\n\n\t\treturn viewState.diff[0]?.original.startLineNumber ?? -1;\n\t});\n\n\tprivate readonly _originalOutlineSource = derivedDisposable(this, (reader) => {\n\t\tconst m = this._editorObs.model.read(reader);\n\t\tconst factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);\n\t\treturn (!m || !factory) ? undefined : factory(m, this._instantiationService);\n\t});\n}\n\nexport interface ILongDistanceHint {\n\tlineNumber: number;\n\tisVisible: boolean;\n}\n\nexport interface ILongDistanceViewState {\n\thint: ILongDistanceHint;\n\tnewTextLineCount: number;\n\tedit: InlineEditWithChanges;\n\tdiff: DetailedLineRangeMapping[];\n\tnextCursorPosition: Position | null;\n\n\tmodel: SimpleInlineSuggestModel;\n\tinlineSuggestInfo: InlineSuggestionGutterMenuData;\n}\n\nfunction lengthsToOffsetRanges(lengths: number[], initialOffset = 0): OffsetRange[] {\n\tconst result: OffsetRange[] = [];\n\tlet offset = initialOffset;\n\tfor (const length of lengths) {\n\t\tresult.push(new OffsetRange(offset, offset + length));\n\t\toffset += length;\n\t}\n\treturn result;\n}\n\nfunction stackSizesDown(at: Point, sizes: Size2D[], alignment: 'left' | 'right' = 'left'): Rect[] {\n\tconst rects: Rect[] = [];\n\tlet offset = 0;\n\tfor (const s of sizes) {\n\t\trects.push(\n\t\t\tRect.fromLeftTopWidthHeight(\n\t\t\t\tat.x + (alignment === 'left' ? 0 : -s.width),\n\t\t\t\tat.y + offset,\n\t\t\t\ts.width,\n\t\t\t\ts.height\n\t\t\t)\n\t\t);\n\t\toffset += s.height;\n\t}\n\treturn rects;\n}\n\n\n/**\n * Changes the scroll position as little as possible just to reveal the given range in the window.\n*/\nexport function scrollToReveal(currentScrollPosition: number, windowWidth: number, contentRangeToReveal: OffsetRange): { newScrollPosition: number } {\n\tconst visibleRange = new OffsetRange(currentScrollPosition, currentScrollPosition + windowWidth);\n\tif (visibleRange.containsRange(contentRangeToReveal)) {\n\t\treturn { newScrollPosition: currentScrollPosition };\n\t}\n\tif (contentRangeToReveal.length > windowWidth) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\tif (contentRangeToReveal.endExclusive > visibleRange.endExclusive) {\n\t\treturn { newScrollPosition: contentRangeToReveal.endExclusive - windowWidth };\n\t}\n\tif (contentRangeToReveal.start < visibleRange.start) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\treturn { newScrollPosition: currentScrollPosition };\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 *--------------------------------------------------------------------------------------------*/\nimport { ChildNode, n, ObserverNode, ObserverNodeWithElement } from '../../../../../../../../base/browser/dom.js';\nimport { Event } from '../../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../../base/common/lifecycle.js';\nimport { IObservable, autorun, constObservable, debouncedObservable2, derived, derivedDisposable, observableFromEvent } from '../../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../../common/core/position.js';\nimport { ITextModel } from '../../../../../../../common/model.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../../inlineEditWithChanges.js';\nimport { getContentSizeOfLines, rectToProps } from '../../utils/utils.js';\nimport { DetailedLineRangeMapping } from '../../../../../../../common/diff/rangeMapping.js';\nimport { OffsetRange } from '../../../../../../../common/core/ranges/offsetRange.js';\nimport { LineRange } from '../../../../../../../common/core/ranges/lineRange.js';\nimport { HideUnchangedRegionsFeature } from '../../../../../../../browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js';\nimport { Codicon } from '../../../../../../../../base/common/codicons.js';\nimport { renderIcon } from '../../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { SymbolKinds } from '../../../../../../../common/languages.js';\nimport { debugLogRects, debugView } from '../debugVisualization.js';\nimport { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';\nimport { Point } from '../../../../../../../common/core/2d/point.js';\nimport { Size2D } from '../../../../../../../common/core/2d/size.js';\nimport { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';\nimport { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';\nimport { getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';\nimport { asCssVariable, descriptionForeground, editorBackground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';\nimport { editorWidgetBorder } from '../../../../../../../../platform/theme/common/colors/editorColors.js';\nimport { ILongDistancePreviewProps, LongDistancePreviewEditor } from './longDistancePreviewEditor.js';\nimport { InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from '../../components/gutterIndicatorView.js';\nimport { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';\nimport { splitIntoContinuousLineRanges, WidgetLayoutConstants, WidgetOutline, WidgetPlacementContext } from './longDistnaceWidgetPlacement.js';\n\nconst BORDER_RADIUS = 6;\nconst MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };\nconst MIN_WIDGET_WIDTH = 250;\n\nconst DEFAULT_WIDGET_LAYOUT_CONSTANTS: WidgetLayoutConstants = {\n\tpreviewEditorMargin: 2,\n\twidgetPadding: 2,\n\twidgetBorder: 1,\n\tlowerBarHeight: 20,\n\tminWidgetWidth: MIN_WIDGET_WIDTH,\n};\n\nexport class InlineEditsLongDistanceHint extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _editorObs;\n\treadonly onDidClick = Event.None;\n\tprivate _viewWithElement: ObserverNodeWithElement<HTMLDivElement> | undefined = undefined;\n\n\tprivate readonly _previewEditor;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _viewState: IObservable<ILongDistanceViewState | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t) {\n\t\tsuper();\n\n\t\tthis._styles = derived(reader => {\n\t\t\tconst v = this._tabAction.read(reader);\n\n\t\t\t// Check theme type by observing a color - this ensures we react to theme changes\n\t\t\tconst widgetBorderColor = observeColor(editorWidgetBorder, this._themeService).read(reader);\n\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t}).read(reader);\n\n\t\t\tlet borderColor;\n\t\t\tif (isHighContrast) {\n\t\t\t\t// Use editorWidgetBorder in high contrast mode for better visibility\n\t\t\t\tborderColor = widgetBorderColor;\n\t\t\t} else {\n\t\t\t\tlet border;\n\t\t\t\tswitch (v) {\n\t\t\t\t\tcase InlineEditTabAction.Inactive: border = inlineEditIndicatorSecondaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Jump: border = inlineEditIndicatorPrimaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Accept: border = inlineEditIndicatorSuccessfulBackground; break;\n\t\t\t\t}\n\t\t\t\tborderColor = getEditorBlendedColor(border, this._themeService).read(reader);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tborder: borderColor.toString(),\n\t\t\t\tbackground: asCssVariable(editorBackground)\n\t\t\t};\n\t\t});\n\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._previewEditor = this._register(\n\t\t\tthis._instantiationService.createInstance(\n\t\t\t\tLongDistancePreviewEditor,\n\t\t\t\tthis._previewTextModel,\n\t\t\t\tderived(reader => {\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdiff: viewState.diff,\n\t\t\t\t\t\tmodel: viewState.model,\n\t\t\t\t\t\tinlineSuggestInfo: viewState.inlineSuggestInfo,\n\t\t\t\t\t\tnextCursorPosition: viewState.nextCursorPosition,\n\t\t\t\t\t} satisfies ILongDistancePreviewProps;\n\t\t\t\t}),\n\t\t\t\tthis._editor,\n\t\t\t\tthis._tabAction,\n\t\t\t)\n\t\t);\n\n\t\tthis._viewWithElement = this._view.keepUpdated(this._store);\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._viewWithElement.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._widgetContent.get().keepUpdated(this._store);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\tif (!layoutInfo) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._previewEditor.layout(layoutInfo.codeEditorSize.toDimension(), layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _styles;\n\n\tpublic get isHovered() { return this._widgetContent.get().didMouseMoveDuringHover; }\n\n\tprivate readonly _hintTextPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\treturn viewState ? new Position(viewState.hint.lineNumber, Number.MAX_SAFE_INTEGER) : null;\n\t});\n\n\tprivate readonly _lineSizesAroundHintPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tconst p = this._hintTextPosition.read(reader);\n\t\tif (!viewState || !p) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) {\n\t\t\treturn [];\n\t\t}\n\t\tconst range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));\n\n\t\tif (!range) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst sizes = getContentSizeOfLines(this._editorObs, range, reader);\n\t\tconst top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);\n\n\t\treturn splitIntoContinuousLineRanges(range, sizes, top, this._editorObs, reader);\n\t});\n\n\tprivate readonly _isVisibleDelayed = debouncedObservable2(\n\t\tderived(this, reader => this._viewState.read(reader)?.hint.isVisible),\n\t\t(lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0,\n\t);\n\n\tprivate readonly _previewEditorLayoutInfo = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\n\t\tif (!viewState || !this._isVisibleDelayed.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst continousLineRanges = this._lineSizesAroundHintPosition.read(reader);\n\t\tif (continousLineRanges.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst editorScrollTop = this._editorObs.scrollTop.read(reader);\n\t\tconst editorScrollLeft = this._editorObs.scrollLeft.read(reader);\n\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst previewContentHeight = this._previewEditor.contentHeight.read(reader);\n\t\tconst previewEditorContentLayout = this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(reader);\n\n\t\tif (!previewContentHeight || !previewEditorContentLayout) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// const debugRects = stackSizesDown(new Point(editorLayout.contentLeft, lineSizes.top - scrollTop), lineSizes.sizes);\n\n\t\tconst editorTrueContentWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\tconst editorTrueContentRight = editorLayout.contentLeft + editorTrueContentWidth;\n\n\t\t// drawEditorWidths(this._editor, reader);\n\n\t\tconst c = this._editorObs.cursorLineNumber.read(reader);\n\t\tif (!c) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst layoutConstants = DEFAULT_WIDGET_LAYOUT_CONSTANTS;\n\t\tconst extraGutterMarginToAvoidScrollBar = 2;\n\t\tconst previewEditorHeight = previewContentHeight + extraGutterMarginToAvoidScrollBar;\n\n\t\t// Try to find widget placement in available empty space\n\t\tlet possibleWidgetOutline: WidgetOutline | undefined;\n\t\tlet lastPlacementContext: WidgetPlacementContext | undefined;\n\n\t\tconst endOfLinePadding = (lineNumber: number) => lineNumber === viewState.hint.lineNumber ? 40 : 20;\n\n\t\tfor (const continousLineRange of continousLineRanges) {\n\t\t\tconst placementContext = new WidgetPlacementContext(\n\t\t\t\tcontinousLineRange,\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding\n\t\t\t);\n\t\t\tlastPlacementContext = placementContext;\n\n\t\t\tconst showRects = false;\n\t\t\tif (showRects) {\n\t\t\t\tconst rects2 = stackSizesDown(\n\t\t\t\t\tnew Point(editorTrueContentRight, continousLineRange.top - editorScrollTop),\n\t\t\t\t\tplacementContext.availableSpaceSizes as Size2D[],\n\t\t\t\t\t'right'\n\t\t\t\t);\n\t\t\t\tdebugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()!), reader);\n\t\t\t}\n\n\t\t\tpossibleWidgetOutline = placementContext.tryFindWidgetOutline(\n\t\t\t\tviewState.hint.lineNumber,\n\t\t\t\tpreviewEditorHeight,\n\t\t\t\teditorTrueContentRight,\n\t\t\t\tlayoutConstants\n\t\t\t);\n\n\t\t\tif (possibleWidgetOutline) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to overlay position if no empty space was found\n\t\tlet position: 'overlay' | 'empty-space' = 'empty-space';\n\t\tif (!possibleWidgetOutline) {\n\t\t\tposition = 'overlay';\n\t\t\tconst maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);\n\n\t\t\t// Create a fallback placement context for computing overlay vertical position\n\t\t\tconst fallbackPlacementContext = lastPlacementContext ?? new WidgetPlacementContext(\n\t\t\t\tcontinousLineRanges[0],\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding,\n\t\t\t);\n\n\t\t\tpossibleWidgetOutline = {\n\t\t\t\thorizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),\n\t\t\t\tverticalWidgetRange: fallbackPlacementContext.getWidgetVerticalOutline(\n\t\t\t\t\tviewState.hint.lineNumber + 2,\n\t\t\t\t\tpreviewEditorHeight,\n\t\t\t\t\tlayoutConstants\n\t\t\t\t).delta(10),\n\t\t\t};\n\t\t}\n\n\t\tif (!possibleWidgetOutline) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rectAvailableSpace = Rect.fromRanges(\n\t\t\tpossibleWidgetOutline.horizontalWidgetRange,\n\t\t\tpossibleWidgetOutline.verticalWidgetRange\n\t\t).translateX(-editorScrollLeft).translateY(-editorScrollTop);\n\n\t\tconst showAvailableSpace = false;\n\t\tif (showAvailableSpace) {\n\t\t\tdebugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst { previewEditorMargin, widgetPadding, widgetBorder, lowerBarHeight } = layoutConstants;\n\t\tconst maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);\n\n\t\tconst layout = distributeFlexBoxLayout(rectAvailableSpace.width, {\n\t\t\tspaceBefore: { min: 0, max: 10, priority: 1 },\n\t\t\tcontent: { min: 50, rules: [{ max: 150, priority: 2 }, { max: maxWidgetWidth, priority: 1 }] },\n\t\t\tspaceAfter: { min: 10 },\n\t\t});\n\n\t\tif (!layout) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst ranges = lengthsToOffsetRanges([layout.spaceBefore, layout.content, layout.spaceAfter], rectAvailableSpace.left);\n\t\tconst spaceBeforeRect = rectAvailableSpace.withHorizontalRange(ranges[0]);\n\t\tconst widgetRect = rectAvailableSpace.withHorizontalRange(ranges[1]);\n\t\tconst spaceAfterRect = rectAvailableSpace.withHorizontalRange(ranges[2]);\n\n\t\tconst showRects2 = false;\n\t\tif (showRects2) {\n\t\t\tdebugView(debugLogRects({ spaceBeforeRect, widgetRect, spaceAfterRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorRect = widgetRect.withMargin(-widgetPadding - widgetBorder - previewEditorMargin).withMargin(0, 0, -lowerBarHeight, 0);\n\n\t\tconst showEditorRect = false;\n\t\tif (showEditorRect) {\n\t\t\tdebugView(debugLogRects({ previewEditorRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorContentWidth = previewEditorRect.width - previewEditorContentLayout.nonContentWidth;\n\t\tconst maxPrefferedRangeLength = previewEditorContentWidth * 0.8;\n\t\tconst preferredRangeToReveal = previewEditorContentLayout.preferredRangeToReveal.intersect(OffsetRange.ofStartAndLength(\n\t\t\tpreviewEditorContentLayout.preferredRangeToReveal.start,\n\t\t\tmaxPrefferedRangeLength\n\t\t)) ?? previewEditorContentLayout.preferredRangeToReveal;\n\t\tconst desiredPreviewEditorScrollLeft = scrollToReveal(previewEditorContentLayout.indentationEnd, previewEditorContentWidth, preferredRangeToReveal);\n\n\t\treturn {\n\t\t\tcodeEditorSize: previewEditorRect.getSize(),\n\t\t\tcodeScrollLeft: editorScrollLeft,\n\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\twidgetRect,\n\n\t\t\tpreviewEditorMargin,\n\t\t\twidgetPadding,\n\t\t\twidgetBorder,\n\n\t\t\tlowerBarHeight,\n\n\t\t\tdesiredPreviewEditorScrollLeft: desiredPreviewEditorScrollLeft.newScrollPosition,\n\t\t};\n\t});\n\n\tprivate readonly _view = n.div({\n\t\tclass: 'inline-edits-view',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t\ttop: '0px',\n\t\t\tleft: '0px',\n\t\t\tdisplay: derived(this, reader => !!this._previewEditorLayoutInfo.read(reader) ? 'block' : 'none'),\n\t\t},\n\t}, [\n\t\tderived(this, _reader => [this._widgetContent]),\n\t]);\n\n\tprivate readonly _widgetContent = derived(this, reader => // TODO@hediet: remove when n.div lazily creates previewEditor.element node\n\t\tn.div({\n\t\t\tclass: 'inline-edits-long-distance-hint-widget',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tbackground: asCssVariable(editorWidgetBackground),\n\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.widgetPadding),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: BORDER_RADIUS,\n\t\t\t\tborder: derived(reader => `${this._previewEditorLayoutInfo.read(reader)?.widgetBorder}px solid ${this._styles.read(reader).border}`),\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\topacity: derived(reader => this._viewState.read(reader)?.hint.isVisible ? '1' : '0'),\n\t\t\t\ttransition: 'opacity 200ms ease-in-out',\n\t\t\t\t...rectToProps(reader => this._previewEditorLayoutInfo.read(reader)?.widgetRect)\n\t\t\t},\n\t\t\tonmousedown: e => {\n\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t},\n\t\t\tonclick: () => {\n\t\t\t\tthis._viewState.read(undefined)?.model.jump();\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclass: ['editorContainer'],\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),\n\t\t\t\t\tbackground: asCssVariable(editorBackground),\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t},\n\t\t\t}, [\n\t\t\t\tderived(this, r => this._previewEditor.element), // --\n\t\t\t]),\n\t\t\tn.div({ class: 'bar', style: { color: asCssVariable(descriptionForeground), pointerEvents: 'none', margin: '0 4px', height: this._previewEditorLayoutInfo.map(i => i?.lowerBarHeight), display: 'flex', justifyContent: 'space-between', alignItems: 'center' } }, [\n\t\t\t\tderived(this, reader => {\n\t\t\t\t\tconst children: (HTMLElement | ObserverNode<HTMLDivElement>)[] = [];\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn children;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Outline Element\n\t\t\t\t\tconst source = this._originalOutlineSource.read(reader);\n\t\t\t\t\tconst originalTargetLineNumber = this._originalTargetLineNumber.read(reader);\n\t\t\t\t\tconst outlineItems = source?.getAt(originalTargetLineNumber, reader).slice(0, 1) ?? [];\n\t\t\t\t\tconst outlineElements: ChildNode[] = [];\n\t\t\t\t\tif (outlineItems.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < outlineItems.length; i++) {\n\t\t\t\t\t\t\tconst item = outlineItems[i];\n\t\t\t\t\t\t\tconst icon = SymbolKinds.toIcon(item.kind);\n\t\t\t\t\t\t\toutlineElements.push(n.div({\n\t\t\t\t\t\t\t\tclass: 'breadcrumb-item',\n\t\t\t\t\t\t\t\tstyle: { display: 'flex', alignItems: 'center', flex: '1 1 auto', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\trenderIcon(icon),\n\t\t\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\t\t\titem.name,\n\t\t\t\t\t\t\t\t...(i === outlineItems.length - 1\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: [renderIcon(Codicon.chevronRight)]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));\n\n\t\t\t\t\t// Show Edit Direction\n\t\t\t\t\tconst arrowIcon = viewState.hint.lineNumber < originalTargetLineNumber ? Codicon.arrowDown : Codicon.arrowUp;\n\t\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);\n\t\t\t\t\tlet label = 'Go to suggestion';\n\t\t\t\t\tif (keybinding && keybinding.getLabel() === 'Tab') {\n\t\t\t\t\t\tlabel = 'Tab to jump';\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({\n\t\t\t\t\t\tclass: 'go-to-label',\n\t\t\t\t\t\tstyle: { position: 'relative', display: 'flex', alignItems: 'center', flex: '0 0 auto', paddingLeft: '6px' },\n\t\t\t\t\t}, [\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\trenderIcon(arrowIcon),\n\t\t\t\t\t]));\n\n\t\t\t\t\treturn children;\n\t\t\t\t})\n\t\t\t]),\n\t\t])\n\t);\n\n\t// Drives breadcrumbs and symbol icon\n\tprivate readonly _originalTargetLineNumber = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tif (!viewState) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (viewState.edit.action?.kind === 'jumpTo') {\n\t\t\treturn viewState.edit.action.position.lineNumber;\n\t\t}\n\n\t\treturn viewState.diff[0]?.original.startLineNumber ?? -1;\n\t});\n\n\tprivate readonly _originalOutlineSource = derivedDisposable(this, (reader) => {\n\t\tconst m = this._editorObs.model.read(reader);\n\t\tconst factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);\n\t\treturn (!m || !factory) ? undefined : factory(m, this._instantiationService);\n\t});\n}\n\nexport interface ILongDistanceHint {\n\tlineNumber: number;\n\tisVisible: boolean;\n}\n\nexport interface ILongDistanceViewState {\n\thint: ILongDistanceHint;\n\tnewTextLineCount: number;\n\tedit: InlineEditWithChanges;\n\tdiff: DetailedLineRangeMapping[];\n\tnextCursorPosition: Position | null;\n\n\tmodel: SimpleInlineSuggestModel;\n\tinlineSuggestInfo: InlineSuggestionGutterMenuData;\n}\n\nfunction lengthsToOffsetRanges(lengths: number[], initialOffset = 0): OffsetRange[] {\n\tconst result: OffsetRange[] = [];\n\tlet offset = initialOffset;\n\tfor (const length of lengths) {\n\t\tresult.push(new OffsetRange(offset, offset + length));\n\t\toffset += length;\n\t}\n\treturn result;\n}\n\nfunction stackSizesDown(at: Point, sizes: Size2D[], alignment: 'left' | 'right' = 'left'): Rect[] {\n\tconst rects: Rect[] = [];\n\tlet offset = 0;\n\tfor (const s of sizes) {\n\t\trects.push(\n\t\t\tRect.fromLeftTopWidthHeight(\n\t\t\t\tat.x + (alignment === 'left' ? 0 : -s.width),\n\t\t\t\tat.y + offset,\n\t\t\t\ts.width,\n\t\t\t\ts.height\n\t\t\t)\n\t\t);\n\t\toffset += s.height;\n\t}\n\treturn rects;\n}\n\n\n/**\n * Changes the scroll position as little as possible just to reveal the given range in the window.\n*/\nexport function scrollToReveal(currentScrollPosition: number, windowWidth: number, contentRangeToReveal: OffsetRange): { newScrollPosition: number } {\n\tconst visibleRange = new OffsetRange(currentScrollPosition, currentScrollPosition + windowWidth);\n\tif (visibleRange.containsRange(contentRangeToReveal)) {\n\t\treturn { newScrollPosition: currentScrollPosition };\n\t}\n\tif (contentRangeToReveal.length > windowWidth) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\tif (contentRangeToReveal.endExclusive > visibleRange.endExclusive) {\n\t\treturn { newScrollPosition: contentRangeToReveal.endExclusive - windowWidth };\n\t}\n\tif (contentRangeToReveal.start < visibleRange.start) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\treturn { newScrollPosition: currentScrollPosition };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;gGAGgG;AAChG,OAAO,EAAa,CAAC,EAAyC,MAAM,6CAA6C,CAAC;AAClH,OAAO,EAAE,KAAK,EAAE,MAAM,8CAA8C,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAe,OAAO,EAAE,eAAe,EAAE,oBAAoB,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K,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC;QACrD,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;AACrD,CAAC","file":"inlineEditsLongDistanceHint.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 *--------------------------------------------------------------------------------------------*/\nimport { ChildNode, n, ObserverNode, ObserverNodeWithElement } from '../../../../../../../../base/browser/dom.js';\nimport { Event } from '../../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../../base/common/lifecycle.js';\nimport { IObservable, autorun, constObservable, debouncedObservable2, derived, derivedDisposable, observableFromEvent } from '../../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../../common/core/position.js';\nimport { ITextModel } from '../../../../../../../common/model.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../../inlineEditWithChanges.js';\nimport { getContentSizeOfLines, rectToProps } from '../../utils/utils.js';\nimport { DetailedLineRangeMapping } from '../../../../../../../common/diff/rangeMapping.js';\nimport { OffsetRange } from '../../../../../../../common/core/ranges/offsetRange.js';\nimport { LineRange } from '../../../../../../../common/core/ranges/lineRange.js';\nimport { HideUnchangedRegionsFeature } from '../../../../../../../browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js';\nimport { Codicon } from '../../../../../../../../base/common/codicons.js';\nimport { renderIcon } from '../../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { SymbolKinds } from '../../../../../../../common/languages.js';\nimport { debugLogRects, debugView } from '../debugVisualization.js';\nimport { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';\nimport { Point } from '../../../../../../../common/core/2d/point.js';\nimport { Size2D } from '../../../../../../../common/core/2d/size.js';\nimport { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';\nimport { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';\nimport { getEditorBackgroundColor, getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';\nimport { asCssVariable, descriptionForeground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';\nimport { editorWidgetBorder } from '../../../../../../../../platform/theme/common/colors/editorColors.js';\nimport { ILongDistancePreviewProps, LongDistancePreviewEditor } from './longDistancePreviewEditor.js';\nimport { InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from '../../components/gutterIndicatorView.js';\nimport { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';\nimport { splitIntoContinuousLineRanges, WidgetLayoutConstants, WidgetOutline, WidgetPlacementContext } from './longDistnaceWidgetPlacement.js';\nimport { InlineCompletionEditorType } from '../../../../model/provideInlineCompletions.js';\n\nconst BORDER_RADIUS = 6;\nconst MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };\nconst MIN_WIDGET_WIDTH = 250;\n\nconst DEFAULT_WIDGET_LAYOUT_CONSTANTS: WidgetLayoutConstants = {\n\tpreviewEditorMargin: 2,\n\twidgetPadding: 2,\n\twidgetBorder: 1,\n\tlowerBarHeight: 20,\n\tminWidgetWidth: MIN_WIDGET_WIDTH,\n};\n\nexport class InlineEditsLongDistanceHint extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _editorObs;\n\treadonly onDidClick = Event.None;\n\tprivate _viewWithElement: ObserverNodeWithElement<HTMLDivElement> | undefined = undefined;\n\n\tprivate readonly _previewEditor;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _viewState: IObservable<ILongDistanceViewState | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t) {\n\t\tsuper();\n\n\t\tthis._styles = derived(reader => {\n\t\t\tconst v = this._tabAction.read(reader);\n\n\t\t\t// Check theme type by observing a color - this ensures we react to theme changes\n\t\t\tconst widgetBorderColor = observeColor(editorWidgetBorder, this._themeService).read(reader);\n\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t}).read(reader);\n\n\t\t\tlet borderColor;\n\t\t\tif (isHighContrast) {\n\t\t\t\t// Use editorWidgetBorder in high contrast mode for better visibility\n\t\t\t\tborderColor = widgetBorderColor;\n\t\t\t} else {\n\t\t\t\tlet border;\n\t\t\t\tswitch (v) {\n\t\t\t\t\tcase InlineEditTabAction.Inactive: border = inlineEditIndicatorSecondaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Jump: border = inlineEditIndicatorPrimaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Accept: border = inlineEditIndicatorSuccessfulBackground; break;\n\t\t\t\t}\n\t\t\t\tborderColor = getEditorBlendedColor(border, this._themeService).read(reader);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tborder: borderColor.toString(),\n\t\t\t\tbackground: getEditorBackgroundColor(this._viewState.map(s => s?.editorType ?? InlineCompletionEditorType.TextEditor).read(reader)),\n\t\t\t};\n\t\t});\n\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._previewEditor = this._register(\n\t\t\tthis._instantiationService.createInstance(\n\t\t\t\tLongDistancePreviewEditor,\n\t\t\t\tthis._previewTextModel,\n\t\t\t\tderived(reader => {\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdiff: viewState.diff,\n\t\t\t\t\t\tmodel: viewState.model,\n\t\t\t\t\t\tinlineSuggestInfo: viewState.inlineSuggestInfo,\n\t\t\t\t\t\tnextCursorPosition: viewState.nextCursorPosition,\n\t\t\t\t\t} satisfies ILongDistancePreviewProps;\n\t\t\t\t}),\n\t\t\t\tthis._editor,\n\t\t\t\tthis._tabAction,\n\t\t\t)\n\t\t);\n\n\t\tthis._viewWithElement = this._view.keepUpdated(this._store);\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._viewWithElement.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._widgetContent.get().keepUpdated(this._store);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\tif (!layoutInfo) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._previewEditor.layout(layoutInfo.codeEditorSize.toDimension(), layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _styles;\n\n\tpublic get isHovered() { return this._widgetContent.get().didMouseMoveDuringHover; }\n\n\tprivate readonly _hintTextPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\treturn viewState ? new Position(viewState.hint.lineNumber, Number.MAX_SAFE_INTEGER) : null;\n\t});\n\n\tprivate readonly _lineSizesAroundHintPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tconst p = this._hintTextPosition.read(reader);\n\t\tif (!viewState || !p) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) {\n\t\t\treturn [];\n\t\t}\n\t\tconst range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));\n\n\t\tif (!range) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst sizes = getContentSizeOfLines(this._editorObs, range, reader);\n\t\tconst top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);\n\n\t\treturn splitIntoContinuousLineRanges(range, sizes, top, this._editorObs, reader);\n\t});\n\n\tprivate readonly _isVisibleDelayed = debouncedObservable2(\n\t\tderived(this, reader => this._viewState.read(reader)?.hint.isVisible),\n\t\t(lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0,\n\t);\n\n\tprivate readonly _previewEditorLayoutInfo = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\n\t\tif (!viewState || !this._isVisibleDelayed.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst continousLineRanges = this._lineSizesAroundHintPosition.read(reader);\n\t\tif (continousLineRanges.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst editorScrollTop = this._editorObs.scrollTop.read(reader);\n\t\tconst editorScrollLeft = this._editorObs.scrollLeft.read(reader);\n\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst previewContentHeight = this._previewEditor.contentHeight.read(reader);\n\t\tconst previewEditorContentLayout = this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(reader);\n\n\t\tif (!previewContentHeight || !previewEditorContentLayout) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// const debugRects = stackSizesDown(new Point(editorLayout.contentLeft, lineSizes.top - scrollTop), lineSizes.sizes);\n\n\t\tconst editorTrueContentWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\tconst editorTrueContentRight = editorLayout.contentLeft + editorTrueContentWidth;\n\n\t\t// drawEditorWidths(this._editor, reader);\n\n\t\tconst c = this._editorObs.cursorLineNumber.read(reader);\n\t\tif (!c) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst layoutConstants = DEFAULT_WIDGET_LAYOUT_CONSTANTS;\n\t\tconst extraGutterMarginToAvoidScrollBar = 2;\n\t\tconst previewEditorHeight = previewContentHeight + extraGutterMarginToAvoidScrollBar;\n\n\t\t// Try to find widget placement in available empty space\n\t\tlet possibleWidgetOutline: WidgetOutline | undefined;\n\t\tlet lastPlacementContext: WidgetPlacementContext | undefined;\n\n\t\tconst endOfLinePadding = (lineNumber: number) => lineNumber === viewState.hint.lineNumber ? 40 : 20;\n\n\t\tfor (const continousLineRange of continousLineRanges) {\n\t\t\tconst placementContext = new WidgetPlacementContext(\n\t\t\t\tcontinousLineRange,\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding\n\t\t\t);\n\t\t\tlastPlacementContext = placementContext;\n\n\t\t\tconst showRects = false;\n\t\t\tif (showRects) {\n\t\t\t\tconst rects2 = stackSizesDown(\n\t\t\t\t\tnew Point(editorTrueContentRight, continousLineRange.top - editorScrollTop),\n\t\t\t\t\tplacementContext.availableSpaceSizes as Size2D[],\n\t\t\t\t\t'right'\n\t\t\t\t);\n\t\t\t\tdebugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()!), reader);\n\t\t\t}\n\n\t\t\tpossibleWidgetOutline = placementContext.tryFindWidgetOutline(\n\t\t\t\tviewState.hint.lineNumber,\n\t\t\t\tpreviewEditorHeight,\n\t\t\t\teditorTrueContentRight,\n\t\t\t\tlayoutConstants\n\t\t\t);\n\n\t\t\tif (possibleWidgetOutline) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to overlay position if no empty space was found\n\t\tlet position: 'overlay' | 'empty-space' = 'empty-space';\n\t\tif (!possibleWidgetOutline) {\n\t\t\tposition = 'overlay';\n\t\t\tconst maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);\n\n\t\t\t// Create a fallback placement context for computing overlay vertical position\n\t\t\tconst fallbackPlacementContext = lastPlacementContext ?? new WidgetPlacementContext(\n\t\t\t\tcontinousLineRanges[0],\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding,\n\t\t\t);\n\n\t\t\tpossibleWidgetOutline = {\n\t\t\t\thorizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),\n\t\t\t\tverticalWidgetRange: fallbackPlacementContext.getWidgetVerticalOutline(\n\t\t\t\t\tviewState.hint.lineNumber + 2,\n\t\t\t\t\tpreviewEditorHeight,\n\t\t\t\t\tlayoutConstants\n\t\t\t\t).delta(10),\n\t\t\t};\n\t\t}\n\n\t\tif (!possibleWidgetOutline) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rectAvailableSpace = Rect.fromRanges(\n\t\t\tpossibleWidgetOutline.horizontalWidgetRange,\n\t\t\tpossibleWidgetOutline.verticalWidgetRange\n\t\t).translateX(-editorScrollLeft).translateY(-editorScrollTop);\n\n\t\tconst showAvailableSpace = false;\n\t\tif (showAvailableSpace) {\n\t\t\tdebugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst { previewEditorMargin, widgetPadding, widgetBorder, lowerBarHeight } = layoutConstants;\n\t\tconst maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);\n\n\t\tconst layout = distributeFlexBoxLayout(rectAvailableSpace.width, {\n\t\t\tspaceBefore: { min: 0, max: 10, priority: 1 },\n\t\t\tcontent: { min: 50, rules: [{ max: 150, priority: 2 }, { max: maxWidgetWidth, priority: 1 }] },\n\t\t\tspaceAfter: { min: 10 },\n\t\t});\n\n\t\tif (!layout) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst ranges = lengthsToOffsetRanges([layout.spaceBefore, layout.content, layout.spaceAfter], rectAvailableSpace.left);\n\t\tconst spaceBeforeRect = rectAvailableSpace.withHorizontalRange(ranges[0]);\n\t\tconst widgetRect = rectAvailableSpace.withHorizontalRange(ranges[1]);\n\t\tconst spaceAfterRect = rectAvailableSpace.withHorizontalRange(ranges[2]);\n\n\t\tconst showRects2 = false;\n\t\tif (showRects2) {\n\t\t\tdebugView(debugLogRects({ spaceBeforeRect, widgetRect, spaceAfterRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorRect = widgetRect.withMargin(-widgetPadding - widgetBorder - previewEditorMargin).withMargin(0, 0, -lowerBarHeight, 0);\n\n\t\tconst showEditorRect = false;\n\t\tif (showEditorRect) {\n\t\t\tdebugView(debugLogRects({ previewEditorRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorContentWidth = previewEditorRect.width - previewEditorContentLayout.nonContentWidth;\n\t\tconst maxPrefferedRangeLength = previewEditorContentWidth * 0.8;\n\t\tconst preferredRangeToReveal = previewEditorContentLayout.preferredRangeToReveal.intersect(OffsetRange.ofStartAndLength(\n\t\t\tpreviewEditorContentLayout.preferredRangeToReveal.start,\n\t\t\tmaxPrefferedRangeLength\n\t\t)) ?? previewEditorContentLayout.preferredRangeToReveal;\n\t\tconst desiredPreviewEditorScrollLeft = scrollToReveal(previewEditorContentLayout.indentationEnd, previewEditorContentWidth, preferredRangeToReveal);\n\n\t\treturn {\n\t\t\tcodeEditorSize: previewEditorRect.getSize(),\n\t\t\tcodeScrollLeft: editorScrollLeft,\n\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\twidgetRect,\n\n\t\t\tpreviewEditorMargin,\n\t\t\twidgetPadding,\n\t\t\twidgetBorder,\n\n\t\t\tlowerBarHeight,\n\n\t\t\tdesiredPreviewEditorScrollLeft: desiredPreviewEditorScrollLeft.newScrollPosition,\n\t\t};\n\t});\n\n\tprivate readonly _view = n.div({\n\t\tclass: 'inline-edits-view',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t\ttop: '0px',\n\t\t\tleft: '0px',\n\t\t\tdisplay: derived(this, reader => !!this._previewEditorLayoutInfo.read(reader) ? 'block' : 'none'),\n\t\t},\n\t}, [\n\t\tderived(this, _reader => [this._widgetContent]),\n\t]);\n\n\tprivate readonly _widgetContent = derived(this, reader => // TODO@hediet: remove when n.div lazily creates previewEditor.element node\n\t\tn.div({\n\t\t\tclass: 'inline-edits-long-distance-hint-widget',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tbackground: asCssVariable(editorWidgetBackground),\n\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.widgetPadding),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: BORDER_RADIUS,\n\t\t\t\tborder: derived(reader => `${this._previewEditorLayoutInfo.read(reader)?.widgetBorder}px solid ${this._styles.read(reader).border}`),\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\topacity: derived(reader => this._viewState.read(reader)?.hint.isVisible ? '1' : '0'),\n\t\t\t\ttransition: 'opacity 200ms ease-in-out',\n\t\t\t\t...rectToProps(reader => this._previewEditorLayoutInfo.read(reader)?.widgetRect)\n\t\t\t},\n\t\t\tonmousedown: e => {\n\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t},\n\t\t\tonclick: () => {\n\t\t\t\tthis._viewState.read(undefined)?.model.jump();\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclass: ['editorContainer'],\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),\n\t\t\t\t\tbackground: this._styles.map(s => s.background),\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t},\n\t\t\t}, [\n\t\t\t\tderived(this, r => this._previewEditor.element), // --\n\t\t\t]),\n\t\t\tn.div({ class: 'bar', style: { color: asCssVariable(descriptionForeground), pointerEvents: 'none', margin: '0 4px', height: this._previewEditorLayoutInfo.map(i => i?.lowerBarHeight), display: 'flex', justifyContent: 'space-between', alignItems: 'center' } }, [\n\t\t\t\tderived(this, reader => {\n\t\t\t\t\tconst children: (HTMLElement | ObserverNode<HTMLDivElement>)[] = [];\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn children;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Outline Element\n\t\t\t\t\tconst source = this._originalOutlineSource.read(reader);\n\t\t\t\t\tconst originalTargetLineNumber = this._originalTargetLineNumber.read(reader);\n\t\t\t\t\tconst outlineItems = source?.getAt(originalTargetLineNumber, reader).slice(0, 1) ?? [];\n\t\t\t\t\tconst outlineElements: ChildNode[] = [];\n\t\t\t\t\tif (outlineItems.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < outlineItems.length; i++) {\n\t\t\t\t\t\t\tconst item = outlineItems[i];\n\t\t\t\t\t\t\tconst icon = SymbolKinds.toIcon(item.kind);\n\t\t\t\t\t\t\toutlineElements.push(n.div({\n\t\t\t\t\t\t\t\tclass: 'breadcrumb-item',\n\t\t\t\t\t\t\t\tstyle: { display: 'flex', alignItems: 'center', flex: '1 1 auto', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\trenderIcon(icon),\n\t\t\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\t\t\titem.name,\n\t\t\t\t\t\t\t\t...(i === outlineItems.length - 1\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: [renderIcon(Codicon.chevronRight)]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));\n\n\t\t\t\t\t// Show Edit Direction\n\t\t\t\t\tconst arrowIcon = viewState.hint.lineNumber < originalTargetLineNumber ? Codicon.arrowDown : Codicon.arrowUp;\n\t\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);\n\t\t\t\t\tlet label = 'Go to suggestion';\n\t\t\t\t\tif (keybinding && keybinding.getLabel() === 'Tab') {\n\t\t\t\t\t\tlabel = 'Tab to jump';\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({\n\t\t\t\t\t\tclass: 'go-to-label',\n\t\t\t\t\t\tstyle: { position: 'relative', display: 'flex', alignItems: 'center', flex: '0 0 auto', paddingLeft: '6px' },\n\t\t\t\t\t}, [\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\trenderIcon(arrowIcon),\n\t\t\t\t\t]));\n\n\t\t\t\t\treturn children;\n\t\t\t\t})\n\t\t\t]),\n\t\t])\n\t);\n\n\t// Drives breadcrumbs and symbol icon\n\tprivate readonly _originalTargetLineNumber = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tif (!viewState) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (viewState.edit.action?.kind === 'jumpTo') {\n\t\t\treturn viewState.edit.action.position.lineNumber;\n\t\t}\n\n\t\treturn viewState.diff[0]?.original.startLineNumber ?? -1;\n\t});\n\n\tprivate readonly _originalOutlineSource = derivedDisposable(this, (reader) => {\n\t\tconst m = this._editorObs.model.read(reader);\n\t\tconst factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);\n\t\treturn (!m || !factory) ? undefined : factory(m, this._instantiationService);\n\t});\n}\n\nexport interface ILongDistanceHint {\n\tlineNumber: number;\n\tisVisible: boolean;\n}\n\nexport interface ILongDistanceViewState {\n\thint: ILongDistanceHint;\n\tnewTextLineCount: number;\n\tedit: InlineEditWithChanges;\n\tdiff: DetailedLineRangeMapping[];\n\tnextCursorPosition: Position | null;\n\teditorType: InlineCompletionEditorType;\n\n\tmodel: SimpleInlineSuggestModel;\n\tinlineSuggestInfo: InlineSuggestionGutterMenuData;\n}\n\nfunction lengthsToOffsetRanges(lengths: number[], initialOffset = 0): OffsetRange[] {\n\tconst result: OffsetRange[] = [];\n\tlet offset = initialOffset;\n\tfor (const length of lengths) {\n\t\tresult.push(new OffsetRange(offset, offset + length));\n\t\toffset += length;\n\t}\n\treturn result;\n}\n\nfunction stackSizesDown(at: Point, sizes: Size2D[], alignment: 'left' | 'right' = 'left'): Rect[] {\n\tconst rects: Rect[] = [];\n\tlet offset = 0;\n\tfor (const s of sizes) {\n\t\trects.push(\n\t\t\tRect.fromLeftTopWidthHeight(\n\t\t\t\tat.x + (alignment === 'left' ? 0 : -s.width),\n\t\t\t\tat.y + offset,\n\t\t\t\ts.width,\n\t\t\t\ts.height\n\t\t\t)\n\t\t);\n\t\toffset += s.height;\n\t}\n\treturn rects;\n}\n\n\n/**\n * Changes the scroll position as little as possible just to reveal the given range in the window.\n*/\nexport function scrollToReveal(currentScrollPosition: number, windowWidth: number, contentRangeToReveal: OffsetRange): { newScrollPosition: number } {\n\tconst visibleRange = new OffsetRange(currentScrollPosition, currentScrollPosition + windowWidth);\n\tif (visibleRange.containsRange(contentRangeToReveal)) {\n\t\treturn { newScrollPosition: currentScrollPosition };\n\t}\n\tif (contentRangeToReveal.length > windowWidth) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\tif (contentRangeToReveal.endExclusive > visibleRange.endExclusive) {\n\t\treturn { newScrollPosition: contentRangeToReveal.endExclusive - windowWidth };\n\t}\n\tif (contentRangeToReveal.start < visibleRange.start) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\treturn { newScrollPosition: currentScrollPosition };\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 *--------------------------------------------------------------------------------------------*/\nimport { ChildNode, n, ObserverNode, ObserverNodeWithElement } from '../../../../../../../../base/browser/dom.js';\nimport { Event } from '../../../../../../../../base/common/event.js';\nimport { Disposable } from '../../../../../../../../base/common/lifecycle.js';\nimport { IObservable, autorun, constObservable, debouncedObservable2, derived, derivedDisposable, observableFromEvent } from '../../../../../../../../base/common/observable.js';\nimport { IInstantiationService } from '../../../../../../../../platform/instantiation/common/instantiation.js';\nimport { ICodeEditor } from '../../../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../../../browser/observableCodeEditor.js';\nimport { Rect } from '../../../../../../../common/core/2d/rect.js';\nimport { Position } from '../../../../../../../common/core/position.js';\nimport { ITextModel } from '../../../../../../../common/model.js';\nimport { IInlineEditsView, InlineEditTabAction } from '../../inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from '../../inlineEditWithChanges.js';\nimport { getContentSizeOfLines, rectToProps } from '../../utils/utils.js';\nimport { DetailedLineRangeMapping } from '../../../../../../../common/diff/rangeMapping.js';\nimport { OffsetRange } from '../../../../../../../common/core/ranges/offsetRange.js';\nimport { LineRange } from '../../../../../../../common/core/ranges/lineRange.js';\nimport { HideUnchangedRegionsFeature } from '../../../../../../../browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js';\nimport { Codicon } from '../../../../../../../../base/common/codicons.js';\nimport { renderIcon } from '../../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { SymbolKinds } from '../../../../../../../common/languages.js';\nimport { debugLogRects, debugView } from '../debugVisualization.js';\nimport { distributeFlexBoxLayout } from '../../utils/flexBoxLayout.js';\nimport { Point } from '../../../../../../../common/core/2d/point.js';\nimport { Size2D } from '../../../../../../../common/core/2d/size.js';\nimport { IThemeService } from '../../../../../../../../platform/theme/common/themeService.js';\nimport { IKeybindingService } from '../../../../../../../../platform/keybinding/common/keybinding.js';\nimport { getEditorBackgroundColor, getEditorBlendedColor, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSuccessfulBackground, observeColor } from '../../theme.js';\nimport { asCssVariable, descriptionForeground, editorWidgetBackground } from '../../../../../../../../platform/theme/common/colorRegistry.js';\nimport { editorWidgetBorder } from '../../../../../../../../platform/theme/common/colors/editorColors.js';\nimport { ILongDistancePreviewProps, LongDistancePreviewEditor } from './longDistancePreviewEditor.js';\nimport { InlineSuggestionGutterMenuData, SimpleInlineSuggestModel } from '../../components/gutterIndicatorView.js';\nimport { jumpToNextInlineEditId } from '../../../../controller/commandIds.js';\nimport { splitIntoContinuousLineRanges, WidgetLayoutConstants, WidgetOutline, WidgetPlacementContext } from './longDistnaceWidgetPlacement.js';\nimport { InlineCompletionEditorType } from '../../../../model/provideInlineCompletions.js';\n\nconst BORDER_RADIUS = 6;\nconst MAX_WIDGET_WIDTH = { EMPTY_SPACE: 425, OVERLAY: 375 };\nconst MIN_WIDGET_WIDTH = 250;\n\nconst DEFAULT_WIDGET_LAYOUT_CONSTANTS: WidgetLayoutConstants = {\n\tpreviewEditorMargin: 2,\n\twidgetPadding: 2,\n\twidgetBorder: 1,\n\tlowerBarHeight: 20,\n\tminWidgetWidth: MIN_WIDGET_WIDTH,\n};\n\nexport class InlineEditsLongDistanceHint extends Disposable implements IInlineEditsView {\n\n\tprivate readonly _editorObs;\n\treadonly onDidClick = Event.None;\n\tprivate _viewWithElement: ObserverNodeWithElement<HTMLDivElement> | undefined = undefined;\n\n\tprivate readonly _previewEditor;\n\n\tconstructor(\n\t\tprivate readonly _editor: ICodeEditor,\n\t\tprivate readonly _viewState: IObservable<ILongDistanceViewState | undefined>,\n\t\tprivate readonly _previewTextModel: ITextModel,\n\t\tprivate readonly _tabAction: IObservable<InlineEditTabAction>,\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IThemeService private readonly _themeService: IThemeService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t) {\n\t\tsuper();\n\n\t\tthis._styles = derived(reader => {\n\t\t\tconst v = this._tabAction.read(reader);\n\n\t\t\t// Check theme type by observing a color - this ensures we react to theme changes\n\t\t\tconst widgetBorderColor = observeColor(editorWidgetBorder, this._themeService).read(reader);\n\t\t\tconst isHighContrast = observableFromEvent(this._themeService.onDidColorThemeChange, () => {\n\t\t\t\tconst theme = this._themeService.getColorTheme();\n\t\t\t\treturn theme.type === 'hcDark' || theme.type === 'hcLight';\n\t\t\t}).read(reader);\n\n\t\t\tlet borderColor;\n\t\t\tif (isHighContrast) {\n\t\t\t\t// Use editorWidgetBorder in high contrast mode for better visibility\n\t\t\t\tborderColor = widgetBorderColor;\n\t\t\t} else {\n\t\t\t\tlet border;\n\t\t\t\tswitch (v) {\n\t\t\t\t\tcase InlineEditTabAction.Inactive: border = inlineEditIndicatorSecondaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Jump: border = inlineEditIndicatorPrimaryBackground; break;\n\t\t\t\t\tcase InlineEditTabAction.Accept: border = inlineEditIndicatorSuccessfulBackground; break;\n\t\t\t\t}\n\t\t\t\tborderColor = getEditorBlendedColor(border, this._themeService).read(reader);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tborder: borderColor.toString(),\n\t\t\t\tbackground: getEditorBackgroundColor(this._viewState.map(s => s?.editorType ?? InlineCompletionEditorType.TextEditor).read(reader)),\n\t\t\t};\n\t\t});\n\n\t\tthis._editorObs = observableCodeEditor(this._editor);\n\n\t\tthis._previewEditor = this._register(\n\t\t\tthis._instantiationService.createInstance(\n\t\t\t\tLongDistancePreviewEditor,\n\t\t\t\tthis._previewTextModel,\n\t\t\t\tderived(reader => {\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdiff: viewState.diff,\n\t\t\t\t\t\tmodel: viewState.model,\n\t\t\t\t\t\tinlineSuggestInfo: viewState.inlineSuggestInfo,\n\t\t\t\t\t\tnextCursorPosition: viewState.nextCursorPosition,\n\t\t\t\t\t} satisfies ILongDistancePreviewProps;\n\t\t\t\t}),\n\t\t\t\tthis._editor,\n\t\t\t\tthis._tabAction,\n\t\t\t)\n\t\t);\n\n\t\tthis._viewWithElement = this._view.keepUpdated(this._store);\n\t\tthis._register(this._editorObs.createOverlayWidget({\n\t\t\tdomNode: this._viewWithElement.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._widgetContent.get().keepUpdated(this._store);\n\n\t\tthis._register(autorun(reader => {\n\t\t\tconst layoutInfo = this._previewEditorLayoutInfo.read(reader);\n\t\t\tif (!layoutInfo) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._previewEditor.layout(layoutInfo.codeEditorSize.toDimension(), layoutInfo.desiredPreviewEditorScrollLeft);\n\t\t}));\n\n\t\tthis._isVisibleDelayed.recomputeInitiallyAndOnChange(this._store);\n\t}\n\n\tprivate readonly _styles;\n\n\tpublic get isHovered() { return this._widgetContent.get().didMouseMoveDuringHover; }\n\n\tprivate readonly _hintTextPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\treturn viewState ? new Position(viewState.hint.lineNumber, Number.MAX_SAFE_INTEGER) : null;\n\t});\n\n\tprivate readonly _lineSizesAroundHintPosition = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tconst p = this._hintTextPosition.read(reader);\n\t\tif (!viewState || !p) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst model = this._editorObs.model.read(reader);\n\t\tif (!model) {\n\t\t\treturn [];\n\t\t}\n\t\tconst range = LineRange.ofLength(p.lineNumber, 1).addMargin(5, 5).intersect(LineRange.ofLength(1, model.getLineCount()));\n\n\t\tif (!range) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst sizes = getContentSizeOfLines(this._editorObs, range, reader);\n\t\tconst top = this._editorObs.observeTopForLineNumber(range.startLineNumber).read(reader);\n\n\t\treturn splitIntoContinuousLineRanges(range, sizes, top, this._editorObs, reader);\n\t});\n\n\tprivate readonly _isVisibleDelayed = debouncedObservable2(\n\t\tderived(this, reader => this._viewState.read(reader)?.hint.isVisible),\n\t\t(lastValue, newValue) => lastValue === true && newValue === false ? 200 : 0,\n\t);\n\n\tprivate readonly _previewEditorLayoutInfo = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\n\t\tif (!viewState || !this._isVisibleDelayed.read(reader)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst continousLineRanges = this._lineSizesAroundHintPosition.read(reader);\n\t\tif (continousLineRanges.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst editorScrollTop = this._editorObs.scrollTop.read(reader);\n\t\tconst editorScrollLeft = this._editorObs.scrollLeft.read(reader);\n\t\tconst editorLayout = this._editorObs.layoutInfo.read(reader);\n\n\t\tconst previewContentHeight = this._previewEditor.contentHeight.read(reader);\n\t\tconst previewEditorContentLayout = this._previewEditor.horizontalContentRangeInPreviewEditorToShow.read(reader);\n\n\t\tif (!previewContentHeight || !previewEditorContentLayout) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// const debugRects = stackSizesDown(new Point(editorLayout.contentLeft, lineSizes.top - scrollTop), lineSizes.sizes);\n\n\t\tconst editorTrueContentWidth = editorLayout.contentWidth - editorLayout.verticalScrollbarWidth;\n\t\tconst editorTrueContentRight = editorLayout.contentLeft + editorTrueContentWidth;\n\n\t\t// drawEditorWidths(this._editor, reader);\n\n\t\tconst c = this._editorObs.cursorLineNumber.read(reader);\n\t\tif (!c) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst layoutConstants = DEFAULT_WIDGET_LAYOUT_CONSTANTS;\n\t\tconst extraGutterMarginToAvoidScrollBar = 2;\n\t\tconst previewEditorHeight = previewContentHeight + extraGutterMarginToAvoidScrollBar;\n\n\t\t// Try to find widget placement in available empty space\n\t\tlet possibleWidgetOutline: WidgetOutline | undefined;\n\t\tlet lastPlacementContext: WidgetPlacementContext | undefined;\n\n\t\tconst endOfLinePadding = (lineNumber: number) => lineNumber === viewState.hint.lineNumber ? 40 : 20;\n\n\t\tfor (const continousLineRange of continousLineRanges) {\n\t\t\tconst placementContext = new WidgetPlacementContext(\n\t\t\t\tcontinousLineRange,\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding\n\t\t\t);\n\t\t\tlastPlacementContext = placementContext;\n\n\t\t\tconst showRects = false;\n\t\t\tif (showRects) {\n\t\t\t\tconst rects2 = stackSizesDown(\n\t\t\t\t\tnew Point(editorTrueContentRight, continousLineRange.top - editorScrollTop),\n\t\t\t\t\tplacementContext.availableSpaceSizes as Size2D[],\n\t\t\t\t\t'right'\n\t\t\t\t);\n\t\t\t\tdebugView(debugLogRects({ ...rects2 }, this._editor.getDomNode()!), reader);\n\t\t\t}\n\n\t\t\tpossibleWidgetOutline = placementContext.tryFindWidgetOutline(\n\t\t\t\tviewState.hint.lineNumber,\n\t\t\t\tpreviewEditorHeight,\n\t\t\t\teditorTrueContentRight,\n\t\t\t\tlayoutConstants\n\t\t\t);\n\n\t\t\tif (possibleWidgetOutline) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to overlay position if no empty space was found\n\t\tlet position: 'overlay' | 'empty-space' = 'empty-space';\n\t\tif (!possibleWidgetOutline) {\n\t\t\tposition = 'overlay';\n\t\t\tconst maxAvailableWidth = Math.min(editorLayout.width - editorLayout.contentLeft, MAX_WIDGET_WIDTH.OVERLAY);\n\n\t\t\t// Create a fallback placement context for computing overlay vertical position\n\t\t\tconst fallbackPlacementContext = lastPlacementContext ?? new WidgetPlacementContext(\n\t\t\t\tcontinousLineRanges[0],\n\t\t\t\teditorTrueContentWidth,\n\t\t\t\tendOfLinePadding,\n\t\t\t);\n\n\t\t\tpossibleWidgetOutline = {\n\t\t\t\thorizontalWidgetRange: OffsetRange.ofStartAndLength(editorTrueContentRight - maxAvailableWidth, maxAvailableWidth),\n\t\t\t\tverticalWidgetRange: fallbackPlacementContext.getWidgetVerticalOutline(\n\t\t\t\t\tviewState.hint.lineNumber + 2,\n\t\t\t\t\tpreviewEditorHeight,\n\t\t\t\t\tlayoutConstants\n\t\t\t\t).delta(10),\n\t\t\t};\n\t\t}\n\n\t\tif (!possibleWidgetOutline) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst rectAvailableSpace = Rect.fromRanges(\n\t\t\tpossibleWidgetOutline.horizontalWidgetRange,\n\t\t\tpossibleWidgetOutline.verticalWidgetRange\n\t\t).translateX(-editorScrollLeft).translateY(-editorScrollTop);\n\n\t\tconst showAvailableSpace = false;\n\t\tif (showAvailableSpace) {\n\t\t\tdebugView(debugLogRects({ rectAvailableSpace }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst { previewEditorMargin, widgetPadding, widgetBorder, lowerBarHeight } = layoutConstants;\n\t\tconst maxWidgetWidth = Math.min(position === 'overlay' ? MAX_WIDGET_WIDTH.OVERLAY : MAX_WIDGET_WIDTH.EMPTY_SPACE, previewEditorContentLayout.maxEditorWidth + previewEditorMargin + widgetPadding);\n\n\t\tconst layout = distributeFlexBoxLayout(rectAvailableSpace.width, {\n\t\t\tspaceBefore: { min: 0, max: 10, priority: 1 },\n\t\t\tcontent: { min: 50, rules: [{ max: 150, priority: 2 }, { max: maxWidgetWidth, priority: 1 }] },\n\t\t\tspaceAfter: { min: 10 },\n\t\t});\n\n\t\tif (!layout) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst ranges = lengthsToOffsetRanges([layout.spaceBefore, layout.content, layout.spaceAfter], rectAvailableSpace.left);\n\t\tconst spaceBeforeRect = rectAvailableSpace.withHorizontalRange(ranges[0]);\n\t\tconst widgetRect = rectAvailableSpace.withHorizontalRange(ranges[1]);\n\t\tconst spaceAfterRect = rectAvailableSpace.withHorizontalRange(ranges[2]);\n\n\t\tconst showRects2 = false;\n\t\tif (showRects2) {\n\t\t\tdebugView(debugLogRects({ spaceBeforeRect, widgetRect, spaceAfterRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorRect = widgetRect.withMargin(-widgetPadding - widgetBorder - previewEditorMargin).withMargin(0, 0, -lowerBarHeight, 0);\n\n\t\tconst showEditorRect = false;\n\t\tif (showEditorRect) {\n\t\t\tdebugView(debugLogRects({ previewEditorRect }, this._editor.getDomNode()!), reader);\n\t\t}\n\n\t\tconst previewEditorContentWidth = previewEditorRect.width - previewEditorContentLayout.nonContentWidth;\n\t\tconst maxPrefferedRangeLength = previewEditorContentWidth * 0.8;\n\t\tconst preferredRangeToReveal = previewEditorContentLayout.preferredRangeToReveal.intersect(OffsetRange.ofStartAndLength(\n\t\t\tpreviewEditorContentLayout.preferredRangeToReveal.start,\n\t\t\tmaxPrefferedRangeLength\n\t\t)) ?? previewEditorContentLayout.preferredRangeToReveal;\n\t\tconst desiredPreviewEditorScrollLeft = scrollToReveal(previewEditorContentLayout.indentationEnd, previewEditorContentWidth, preferredRangeToReveal);\n\n\t\treturn {\n\t\t\tcodeEditorSize: previewEditorRect.getSize(),\n\t\t\tcodeScrollLeft: editorScrollLeft,\n\t\t\tcontentLeft: editorLayout.contentLeft,\n\n\t\t\twidgetRect,\n\n\t\t\tpreviewEditorMargin,\n\t\t\twidgetPadding,\n\t\t\twidgetBorder,\n\n\t\t\tlowerBarHeight,\n\n\t\t\tdesiredPreviewEditorScrollLeft: desiredPreviewEditorScrollLeft.newScrollPosition,\n\t\t};\n\t});\n\n\tprivate readonly _view = n.div({\n\t\tclass: 'inline-edits-view',\n\t\tstyle: {\n\t\t\tposition: 'absolute',\n\t\t\toverflow: 'visible',\n\t\t\ttop: '0px',\n\t\t\tleft: '0px',\n\t\t\tdisplay: derived(this, reader => !!this._previewEditorLayoutInfo.read(reader) ? 'block' : 'none'),\n\t\t},\n\t}, [\n\t\tderived(this, _reader => [this._widgetContent]),\n\t]);\n\n\tprivate readonly _widgetContent = derived(this, reader => // TODO@hediet: remove when n.div lazily creates previewEditor.element node\n\t\tn.div({\n\t\t\tclass: 'inline-edits-long-distance-hint-widget',\n\t\t\tstyle: {\n\t\t\t\tposition: 'absolute',\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tcursor: 'pointer',\n\t\t\t\tbackground: asCssVariable(editorWidgetBackground),\n\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.widgetPadding),\n\t\t\t\tboxSizing: 'border-box',\n\t\t\t\tborderRadius: BORDER_RADIUS,\n\t\t\t\tborder: derived(reader => `${this._previewEditorLayoutInfo.read(reader)?.widgetBorder}px solid ${this._styles.read(reader).border}`),\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\topacity: derived(reader => this._viewState.read(reader)?.hint.isVisible ? '1' : '0'),\n\t\t\t\ttransition: 'opacity 200ms ease-in-out',\n\t\t\t\t...rectToProps(reader => this._previewEditorLayoutInfo.read(reader)?.widgetRect)\n\t\t\t},\n\t\t\tonmousedown: e => {\n\t\t\t\te.preventDefault(); // This prevents that the editor loses focus\n\t\t\t},\n\t\t\tonclick: () => {\n\t\t\t\tthis._viewState.read(undefined)?.model.jump();\n\t\t\t}\n\t\t}, [\n\t\t\tn.div({\n\t\t\t\tclass: ['editorContainer'],\n\t\t\t\tstyle: {\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\tpadding: this._previewEditorLayoutInfo.map(i => i?.previewEditorMargin),\n\t\t\t\t\tbackground: this._styles.map(s => s.background),\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t},\n\t\t\t}, [\n\t\t\t\tderived(this, r => this._previewEditor.element), // --\n\t\t\t]),\n\t\t\tn.div({ class: 'bar', style: { color: asCssVariable(descriptionForeground), pointerEvents: 'none', margin: '0 4px', height: this._previewEditorLayoutInfo.map(i => i?.lowerBarHeight), display: 'flex', justifyContent: 'space-between', alignItems: 'center' } }, [\n\t\t\t\tderived(this, reader => {\n\t\t\t\t\tconst children: (HTMLElement | ObserverNode<HTMLDivElement>)[] = [];\n\t\t\t\t\tconst viewState = this._viewState.read(reader);\n\t\t\t\t\tif (!viewState) {\n\t\t\t\t\t\treturn children;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Outline Element\n\t\t\t\t\tconst source = this._originalOutlineSource.read(reader);\n\t\t\t\t\tconst originalTargetLineNumber = this._originalTargetLineNumber.read(reader);\n\t\t\t\t\tconst outlineItems = source?.getAt(originalTargetLineNumber, reader).slice(0, 1) ?? [];\n\t\t\t\t\tconst outlineElements: ChildNode[] = [];\n\t\t\t\t\tif (outlineItems.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < outlineItems.length; i++) {\n\t\t\t\t\t\t\tconst item = outlineItems[i];\n\t\t\t\t\t\t\tconst icon = SymbolKinds.toIcon(item.kind);\n\t\t\t\t\t\t\toutlineElements.push(n.div({\n\t\t\t\t\t\t\t\tclass: 'breadcrumb-item',\n\t\t\t\t\t\t\t\tstyle: { display: 'flex', alignItems: 'center', flex: '1 1 auto', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },\n\t\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\t\trenderIcon(icon),\n\t\t\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\t\t\titem.name,\n\t\t\t\t\t\t\t\t...(i === outlineItems.length - 1\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: [renderIcon(Codicon.chevronRight)]\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({ class: 'outline-elements', style: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }, outlineElements));\n\n\t\t\t\t\t// Show Edit Direction\n\t\t\t\t\tconst arrowIcon = viewState.hint.lineNumber < originalTargetLineNumber ? Codicon.arrowDown : Codicon.arrowUp;\n\t\t\t\t\tconst keybinding = this._keybindingService.lookupKeybinding(jumpToNextInlineEditId);\n\t\t\t\t\tlet label = 'Go to suggestion';\n\t\t\t\t\tif (keybinding && keybinding.getLabel() === 'Tab') {\n\t\t\t\t\t\tlabel = 'Tab to jump';\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(n.div({\n\t\t\t\t\t\tclass: 'go-to-label',\n\t\t\t\t\t\tstyle: { position: 'relative', display: 'flex', alignItems: 'center', flex: '0 0 auto', paddingLeft: '6px' },\n\t\t\t\t\t}, [\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t'\\u00a0',\n\t\t\t\t\t\trenderIcon(arrowIcon),\n\t\t\t\t\t]));\n\n\t\t\t\t\treturn children;\n\t\t\t\t})\n\t\t\t]),\n\t\t])\n\t);\n\n\t// Drives breadcrumbs and symbol icon\n\tprivate readonly _originalTargetLineNumber = derived(this, (reader) => {\n\t\tconst viewState = this._viewState.read(reader);\n\t\tif (!viewState) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (viewState.edit.action?.kind === 'jumpTo') {\n\t\t\treturn viewState.edit.action.position.lineNumber;\n\t\t}\n\n\t\treturn viewState.diff[0]?.original.startLineNumber ?? -1;\n\t});\n\n\tprivate readonly _originalOutlineSource = derivedDisposable(this, (reader) => {\n\t\tconst m = this._editorObs.model.read(reader);\n\t\tconst factory = HideUnchangedRegionsFeature._breadcrumbsSourceFactory.read(reader);\n\t\treturn (!m || !factory) ? undefined : factory(m, this._instantiationService);\n\t});\n}\n\nexport interface ILongDistanceHint {\n\tlineNumber: number;\n\tisVisible: boolean;\n}\n\nexport interface ILongDistanceViewState {\n\thint: ILongDistanceHint;\n\tnewTextLineCount: number;\n\tedit: InlineEditWithChanges;\n\tdiff: DetailedLineRangeMapping[];\n\tnextCursorPosition: Position | null;\n\teditorType: InlineCompletionEditorType;\n\n\tmodel: SimpleInlineSuggestModel;\n\tinlineSuggestInfo: InlineSuggestionGutterMenuData;\n}\n\nfunction lengthsToOffsetRanges(lengths: number[], initialOffset = 0): OffsetRange[] {\n\tconst result: OffsetRange[] = [];\n\tlet offset = initialOffset;\n\tfor (const length of lengths) {\n\t\tresult.push(new OffsetRange(offset, offset + length));\n\t\toffset += length;\n\t}\n\treturn result;\n}\n\nfunction stackSizesDown(at: Point, sizes: Size2D[], alignment: 'left' | 'right' = 'left'): Rect[] {\n\tconst rects: Rect[] = [];\n\tlet offset = 0;\n\tfor (const s of sizes) {\n\t\trects.push(\n\t\t\tRect.fromLeftTopWidthHeight(\n\t\t\t\tat.x + (alignment === 'left' ? 0 : -s.width),\n\t\t\t\tat.y + offset,\n\t\t\t\ts.width,\n\t\t\t\ts.height\n\t\t\t)\n\t\t);\n\t\toffset += s.height;\n\t}\n\treturn rects;\n}\n\n\n/**\n * Changes the scroll position as little as possible just to reveal the given range in the window.\n*/\nexport function scrollToReveal(currentScrollPosition: number, windowWidth: number, contentRangeToReveal: OffsetRange): { newScrollPosition: number } {\n\tconst visibleRange = new OffsetRange(currentScrollPosition, currentScrollPosition + windowWidth);\n\tif (visibleRange.containsRange(contentRangeToReveal)) {\n\t\treturn { newScrollPosition: currentScrollPosition };\n\t}\n\tif (contentRangeToReveal.length > windowWidth) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\tif (contentRangeToReveal.endExclusive > visibleRange.endExclusive) {\n\t\treturn { newScrollPosition: contentRangeToReveal.endExclusive - windowWidth };\n\t}\n\tif (contentRangeToReveal.start < visibleRange.start) {\n\t\treturn { newScrollPosition: contentRangeToReveal.start };\n\t}\n\treturn { newScrollPosition: currentScrollPosition };\n}\n"]}
|
|
@@ -13,6 +13,7 @@ import { InjectedTextCursorStops } from '../../../../../../common/model.js';
|
|
|
13
13
|
import { ModelDecorationOptions } from '../../../../../../common/model/textModel.js';
|
|
14
14
|
import { InlineEditClickEvent } from '../inlineEditsViewInterface.js';
|
|
15
15
|
import { classNames } from '../utils/utils.js';
|
|
16
|
+
import { InlineCompletionEditorType } from '../../../model/provideInlineCompletions.js';
|
|
16
17
|
export class OriginalEditorInlineDiffView extends Disposable {
|
|
17
18
|
constructor(_originalEditor, _state, _modifiedTextModel) {
|
|
18
19
|
super();
|
|
@@ -162,7 +163,7 @@ export class OriginalEditorInlineDiffView extends Disposable {
|
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
|
-
if (diff.
|
|
166
|
+
if (diff.editorType === InlineCompletionEditorType.DiffEditor) {
|
|
166
167
|
for (const m of diff.diff) {
|
|
167
168
|
if (!m.original.isEmpty) {
|
|
168
169
|
originalDecorations.push({
|