monaco-editor-core 0.55.0-dev-20251007 → 0.55.0-dev-20251009

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.
Files changed (152) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.de.js +2 -2
  3. package/esm/nls.messages.es.js +2 -2
  4. package/esm/nls.messages.fr.js +2 -2
  5. package/esm/nls.messages.it.js +2 -2
  6. package/esm/nls.messages.ja.js +2 -2
  7. package/esm/nls.messages.js +1 -1
  8. package/esm/nls.messages.json +1 -1
  9. package/esm/nls.messages.ko.js +2 -2
  10. package/esm/nls.messages.ru.js +2 -2
  11. package/esm/nls.messages.zh-cn.js +2 -2
  12. package/esm/nls.messages.zh-tw.js +2 -2
  13. package/esm/nls.metadata.json +3 -1
  14. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  15. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  16. package/esm/vs/base/browser/ui/toolbar/toolbar.js +4 -1
  17. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  18. package/esm/vs/base/browser/ui/tree/abstractTree.js +2 -5
  19. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  20. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +6 -8
  21. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  22. package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
  23. package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -2
  24. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  25. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  26. package/esm/vs/base/common/codiconsLibrary.js +9 -1
  27. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  28. package/esm/vs/base/common/normalization.js +39 -0
  29. package/esm/vs/base/common/normalization.js.map +1 -0
  30. package/esm/vs/base/common/process.js +0 -1
  31. package/esm/vs/base/common/process.js.map +1 -1
  32. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +5 -8
  33. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  34. package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +36 -31
  35. package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js.map +1 -1
  36. package/esm/vs/editor/common/core/text/abstractText.js +5 -1
  37. package/esm/vs/editor/common/core/text/abstractText.js.map +1 -1
  38. package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js +2 -1
  39. package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js.map +1 -1
  40. package/esm/vs/editor/contrib/find/browser/findController.js +54 -61
  41. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  42. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +5 -8
  43. package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
  44. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +18 -23
  45. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  46. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  47. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +10 -12
  48. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js.map +1 -1
  49. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +9 -13
  50. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js.map +1 -1
  51. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -0
  52. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  53. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +8 -1
  54. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  55. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +2 -1
  56. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  57. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +2 -2
  58. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  59. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +27 -1
  60. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  61. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +1 -1
  62. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  63. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  64. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  65. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  66. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +31 -31
  67. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  68. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  69. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  70. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  71. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  72. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +10 -12
  73. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  74. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  75. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  76. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +5 -5
  77. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  78. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  79. package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
  80. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  81. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  82. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  83. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  84. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  85. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  86. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  87. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  88. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -24
  89. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
  90. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +15 -18
  91. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  92. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  93. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  94. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  95. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  96. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  97. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +7 -6
  98. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js.map +1 -1
  99. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -32
  100. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  101. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  102. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  103. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  104. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  105. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  106. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  107. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  108. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  109. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  110. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  111. package/esm/vs/platform/actions/common/menuService.js +2 -2
  112. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  113. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  114. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  115. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  116. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  117. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -2
  118. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
  119. package/esm/vs/platform/dnd/browser/dnd.js +1 -3
  120. package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
  121. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  122. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  123. package/esm/vs/platform/list/browser/listService.js +27 -27
  124. package/esm/vs/platform/markers/common/markerService.js +2 -2
  125. package/esm/vs/platform/markers/common/markers.js +6 -6
  126. package/esm/vs/platform/product/common/product.js +1 -2
  127. package/esm/vs/platform/product/common/product.js.map +1 -1
  128. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +33 -9
  129. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  130. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  131. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  132. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  133. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  134. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  135. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  136. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  137. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  138. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  139. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  140. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  141. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  142. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  143. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  144. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  145. package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
  146. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  147. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  148. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  149. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  150. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  151. package/package.json +2 -2
  152. package/version.txt +1 -1
@@ -92,9 +92,15 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
92
92
  icon: Codicon.collapseAll,
93
93
  commandId: toggleShowCollapsedId
94
94
  })));
95
+ const snooze = option(createOptionArgs({
96
+ id: 'snooze',
97
+ title: localize(1208, "Snooze"),
98
+ icon: Codicon.bellSlash,
99
+ commandId: 'editor.action.inlineSuggest.snooze'
100
+ }));
95
101
  const settings = option(createOptionArgs({
96
102
  id: 'settings',
97
- title: localize(1208, "Settings"),
103
+ title: localize(1209, "Settings"),
98
104
  icon: Codicon.gear,
99
105
  commandId: 'workbench.action.openSettings',
100
106
  commandArgs: ['@tag:nextEditSuggestions']
@@ -114,6 +120,7 @@ let GutterIndicatorMenuContent = class GutterIndicatorMenuContent {
114
120
  reject,
115
121
  toggleCollapsedMode,
116
122
  extensionCommands.length ? separator() : undefined,
123
+ snooze,
117
124
  settings,
118
125
  ...extensionCommands,
119
126
  actionBarFooter ? separator() : undefined,
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAA0B,CAAC,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,SAAS,EAAqB,MAAM,6DAA6D,CAAC;AAC3G,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,yEAAyE,CAAC;AAE1G,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AAEvE,OAAO,EAAe,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtJ,OAAO,EAAE,EAAE,EAAE,MAAM,8CAA8C,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAE,4BAA4B,EAAE,MAAM,8DAA8D,CAAC;AAC5G,OAAO,EA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aAAa,aAAa,CAAC,iBAAiB,CAAC,EAAE;SAC7D;KACD,CAAC,CAAC,CAAC;AACL,CAAC","file":"gutterIndicatorMenu.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/*---------------------------------------------------------------------------------------------\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 { ChildNode, LiveElement, n } from '../../../../../../../base/browser/dom.js';\nimport { ActionBar, IActionBarOptions } from '../../../../../../../base/browser/ui/actionbar/actionbar.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { KeybindingLabel } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { IAction } from '../../../../../../../base/common/actions.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { ResolvedKeybinding } from '../../../../../../../base/common/keybindings.js';\nimport { IObservable, autorun, constObservable, derived, observableFromEvent, observableValue } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { ThemeIcon } from '../../../../../../../base/common/themables.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { ICommandService } from '../../../../../../../platform/commands/common/commands.js';\nimport { IContextKeyService } from '../../../../../../../platform/contextkey/common/contextkey.js';\nimport { nativeHoverDelegate } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { defaultKeybindingLabelStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js';\nimport { asCssVariable, descriptionForeground, editorActionListForeground, editorHoverBorder } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { hideInlineCompletionId, inlineSuggestCommitId, toggleShowCollapsedId } from '../../../controller/commandIds.js';\nimport { IInlineEditModel } from '../inlineEditsViewInterface.js';\nimport { FirstFnArg } from '../utils/utils.js';\n\nexport class GutterIndicatorMenuContent {\n\n\tprivate readonly _inlineEditsShowCollapsed: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: IInlineEditModel,\n\t\tprivate readonly _close: (focusEditor: boolean) => void,\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly _commandService: ICommandService,\n\t) {\n\t\tthis._inlineEditsShowCollapsed = this._editorObs.getOption(EditorOption.inlineSuggest).map(s => s.edits.showCollapsed);\n\t}\n\n\tpublic toDisposableLiveElement(): LiveElement {\n\t\treturn this._createHoverContent().toDisposableLiveElement();\n\t}\n\n\tprivate _createHoverContent() {\n\t\tconst activeElement = observableValue<string | undefined>('active', undefined);\n\n\t\tconst createOptionArgs = (options: { id: string; title: string; icon: IObservable<ThemeIcon> | ThemeIcon; commandId: string | IObservable<string>; commandArgs?: unknown[] }): FirstFnArg<typeof option> => {\n\t\t\treturn {\n\t\t\t\ttitle: options.title,\n\t\t\t\ticon: options.icon,\n\t\t\t\tkeybinding: typeof options.commandId === 'string' ? this._getKeybinding(options.commandArgs ? undefined : options.commandId) : derived(this, reader => typeof options.commandId === 'string' ? undefined : this._getKeybinding(options.commandArgs ? undefined : options.commandId.read(reader)).read(reader)),\n\t\t\t\tisActive: activeElement.map(v => v === options.id),\n\t\t\t\tonHoverChange: v => activeElement.set(v ? options.id : undefined, undefined),\n\t\t\t\tonAction: () => {\n\t\t\t\t\tthis._close(true);\n\t\t\t\t\treturn this._commandService.executeCommand(typeof options.commandId === 'string' ? options.commandId : options.commandId.get(), ...(options.commandArgs ?? []));\n\t\t\t\t},\n\t\t\t};\n\t\t};\n\n\t\tconst title = header(this._model.displayName);\n\n\t\tconst gotoAndAccept = option(createOptionArgs({\n\t\t\tid: 'gotoAndAccept',\n\t\t\ttitle: `${localize('goto', \"Go To\")} / ${localize('accept', \"Accept\")}`,\n\t\t\ticon: Codicon.check,\n\t\t\tcommandId: inlineSuggestCommitId\n\t\t}));\n\n\t\tconst reject = option(createOptionArgs({\n\t\t\tid: 'reject',\n\t\t\ttitle: localize('reject', \"Reject\"),\n\t\t\ticon: Codicon.close,\n\t\t\tcommandId: hideInlineCompletionId\n\t\t}));\n\n\t\tconst extensionCommands = this._model.extensionCommands.map((c, idx) => option(createOptionArgs({\n\t\t\tid: c.command.id + '_' + idx,\n\t\t\ttitle: c.command.title,\n\t\t\ticon: c.icon ?? Codicon.symbolEvent,\n\t\t\tcommandId: c.command.id,\n\t\t\tcommandArgs: c.command.arguments\n\t\t})));\n\n\t\tconst toggleCollapsedMode = this._inlineEditsShowCollapsed.map(showCollapsed => showCollapsed ?\n\t\t\toption(createOptionArgs({\n\t\t\t\tid: 'showExpanded',\n\t\t\t\ttitle: localize('showExpanded', \"Show Expanded\"),\n\t\t\t\ticon: Codicon.expandAll,\n\t\t\t\tcommandId: toggleShowCollapsedId\n\t\t\t}))\n\t\t\t: option(createOptionArgs({\n\t\t\t\tid: 'showCollapsed',\n\t\t\t\ttitle: localize('showCollapsed', \"Show Collapsed\"),\n\t\t\t\ticon: Codicon.collapseAll,\n\t\t\t\tcommandId: toggleShowCollapsedId\n\t\t\t}))\n\t\t);\n\n\t\tconst settings = option(createOptionArgs({\n\t\t\tid: 'settings',\n\t\t\ttitle: localize('settings', \"Settings\"),\n\t\t\ticon: Codicon.gear,\n\t\t\tcommandId: 'workbench.action.openSettings',\n\t\t\tcommandArgs: ['@tag:nextEditSuggestions']\n\t\t}));\n\n\t\tconst actions = this._model.action ? [this._model.action] : [];\n\t\tconst actionBarFooter = actions.length > 0 ? actionBar(\n\t\t\tactions.map(action => ({\n\t\t\t\tid: action.id,\n\t\t\t\tlabel: action.title + '...',\n\t\t\t\tenabled: true,\n\t\t\t\trun: () => this._commandService.executeCommand(action.id, ...(action.arguments ?? [])),\n\t\t\t\tclass: undefined,\n\t\t\t\ttooltip: action.tooltip ?? action.title\n\t\t\t})),\n\t\t\t{ hoverDelegate: nativeHoverDelegate /* unable to show hover inside another hover */ }\n\t\t) : undefined;\n\n\t\treturn hoverContent([\n\t\t\ttitle,\n\t\t\tgotoAndAccept,\n\t\t\treject,\n\t\t\ttoggleCollapsedMode,\n\t\t\textensionCommands.length ? separator() : undefined,\n\t\t\tsettings,\n\n\t\t\t...extensionCommands,\n\n\t\t\tactionBarFooter ? separator() : undefined,\n\t\t\tactionBarFooter\n\t\t]);\n\t}\n\n\tprivate _getKeybinding(commandId: string | undefined) {\n\t\tif (!commandId) {\n\t\t\treturn constObservable(undefined);\n\t\t}\n\t\treturn observableFromEvent(this._contextKeyService.onDidChangeContext, () => this._keybindingService.lookupKeybinding(commandId)); // TODO: use contextkeyservice to use different renderings\n\t}\n}\n\nfunction hoverContent(content: ChildNode) {\n\treturn n.div({\n\t\tclass: 'content',\n\t\tstyle: {\n\t\t\tmargin: 4,\n\t\t\tminWidth: 180,\n\t\t}\n\t}, content);\n}\n\nfunction header(title: string | IObservable<string>) {\n\treturn n.div({\n\t\tclass: 'header',\n\t\tstyle: {\n\t\t\tcolor: asCssVariable(descriptionForeground),\n\t\t\tfontSize: '13px',\n\t\t\tfontWeight: '600',\n\t\t\tpadding: '0 4px',\n\t\t\tlineHeight: 28,\n\t\t}\n\t}, [title]);\n}\n\nfunction option(props: {\n\ttitle: string;\n\ticon: IObservable<ThemeIcon> | ThemeIcon;\n\tkeybinding: IObservable<ResolvedKeybinding | undefined>;\n\tisActive?: IObservable<boolean>;\n\tonHoverChange?: (isHovered: boolean) => void;\n\tonAction?: () => void;\n}) {\n\treturn derived({ name: 'inlineEdits.option' }, (_reader) => n.div({\n\t\tclass: ['monaco-menu-option', props.isActive?.map(v => v && 'active')],\n\t\tonmouseenter: () => props.onHoverChange?.(true),\n\t\tonmouseleave: () => props.onHoverChange?.(false),\n\t\tonclick: props.onAction,\n\t\tonkeydown: e => {\n\t\t\tif (e.key === 'Enter') {\n\t\t\t\tprops.onAction?.();\n\t\t\t}\n\t\t},\n\t\ttabIndex: 0,\n\t\tstyle: {\n\t\t\tborderRadius: 3, // same as hover widget border radius\n\t\t}\n\t}, [\n\t\tn.elem('span', {\n\t\t\tstyle: {\n\t\t\t\tfontSize: 16,\n\t\t\t\tdisplay: 'flex',\n\t\t\t}\n\t\t}, [ThemeIcon.isThemeIcon(props.icon) ? renderIcon(props.icon) : props.icon.map(icon => renderIcon(icon))]),\n\t\tn.elem('span', {}, [props.title]),\n\t\tn.div({\n\t\t\tstyle: { marginLeft: 'auto' },\n\t\t\tref: elem => {\n\t\t\t\tconst keybindingLabel = _reader.store.add(new KeybindingLabel(elem, OS, {\n\t\t\t\t\tdisableTitle: true,\n\t\t\t\t\t...defaultKeybindingLabelStyles,\n\t\t\t\t\tkeybindingLabelShadow: undefined,\n\t\t\t\t\tkeybindingLabelForeground: asCssVariable(descriptionForeground),\n\t\t\t\t\tkeybindingLabelBackground: 'transparent',\n\t\t\t\t\tkeybindingLabelBorder: 'transparent',\n\t\t\t\t\tkeybindingLabelBottomBorder: undefined,\n\t\t\t\t}));\n\t\t\t\t_reader.store.add(autorun(reader => {\n\t\t\t\t\tkeybindingLabel.set(props.keybinding.read(reader));\n\t\t\t\t}));\n\t\t\t}\n\t\t})\n\t]));\n}\n\n// TODO: make this observable\nfunction actionBar(actions: IAction[], options: IActionBarOptions) {\n\treturn derived({ name: 'inlineEdits.actionBar' }, (_reader) => n.div({\n\t\tclass: ['action-widget-action-bar'],\n\t\tstyle: {\n\t\t\tpadding: '3px 24px',\n\t\t}\n\t}, [\n\t\tn.div({\n\t\t\tref: elem => {\n\t\t\t\tconst actionBar = _reader.store.add(new ActionBar(elem, options));\n\t\t\t\tactionBar.push(actions, { icon: false, label: true });\n\t\t\t}\n\t\t})\n\t]));\n}\n\nfunction separator() {\n\treturn n.div({\n\t\tid: 'inline-edit-gutter-indicator-menu-separator',\n\t\tclass: 'menu-separator',\n\t\tstyle: {\n\t\t\tcolor: asCssVariable(editorActionListForeground),\n\t\t\tpadding: '2px 0',\n\t\t}\n\t}, n.div({\n\t\tstyle: {\n\t\t\tborderBottom: `1px solid ${asCssVariable(editorHoverBorder)}`,\n\t\t}\n\t}));\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAA0B,CAAC,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,SAAS,EAAqB,MAAM,6DAA6D,CAAC;AAC3G,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,yEAAyE,CAAC;AAE1G,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AAEvE,OAAO,EAAe,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtJ,OAAO,EAAE,EAAE,EAAE,MAAM,8CAA8C,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AACnG,OAAO,EAAE,4BAA4B,EAAE,MAAM,8DAA8D,CAAC;AAC5G,OAAO,EA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AC,CAAC,GAAG,CAAC;QACZ,EAAE,EAAE,6CAA6C;QACjD,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE;YACN,KAAK,EAAE,aAAa,CAAC,0BAA0B,CAAC;YAChD,OAAO,EAAE,OAAO;SAChB;KACD,EAAE,CAAC,CAAC,GAAG,CAAC;QACR,KAAK,EAAE;YACN,YAAY,EAAE,aAAa,aAAa,CAAC,iBAAiB,CAAC,EAAE;SAC7D;KACD,CAAC,CAAC,CAAC;AACL,CAAC","file":"gutterIndicatorMenu.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/*---------------------------------------------------------------------------------------------\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 { ChildNode, LiveElement, n } from '../../../../../../../base/browser/dom.js';\nimport { ActionBar, IActionBarOptions } from '../../../../../../../base/browser/ui/actionbar/actionbar.js';\nimport { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';\nimport { KeybindingLabel } from '../../../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js';\nimport { IAction } from '../../../../../../../base/common/actions.js';\nimport { Codicon } from '../../../../../../../base/common/codicons.js';\nimport { ResolvedKeybinding } from '../../../../../../../base/common/keybindings.js';\nimport { IObservable, autorun, constObservable, derived, observableFromEvent, observableValue } from '../../../../../../../base/common/observable.js';\nimport { OS } from '../../../../../../../base/common/platform.js';\nimport { ThemeIcon } from '../../../../../../../base/common/themables.js';\nimport { localize } from '../../../../../../../nls.js';\nimport { ICommandService } from '../../../../../../../platform/commands/common/commands.js';\nimport { IContextKeyService } from '../../../../../../../platform/contextkey/common/contextkey.js';\nimport { nativeHoverDelegate } from '../../../../../../../platform/hover/browser/hover.js';\nimport { IKeybindingService } from '../../../../../../../platform/keybinding/common/keybinding.js';\nimport { defaultKeybindingLabelStyles } from '../../../../../../../platform/theme/browser/defaultStyles.js';\nimport { asCssVariable, descriptionForeground, editorActionListForeground, editorHoverBorder } from '../../../../../../../platform/theme/common/colorRegistry.js';\nimport { ObservableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';\nimport { EditorOption } from '../../../../../../common/config/editorOptions.js';\nimport { hideInlineCompletionId, inlineSuggestCommitId, toggleShowCollapsedId } from '../../../controller/commandIds.js';\nimport { IInlineEditModel } from '../inlineEditsViewInterface.js';\nimport { FirstFnArg } from '../utils/utils.js';\n\nexport class GutterIndicatorMenuContent {\n\n\tprivate readonly _inlineEditsShowCollapsed: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: IInlineEditModel,\n\t\tprivate readonly _close: (focusEditor: boolean) => void,\n\t\tprivate readonly _editorObs: ObservableCodeEditor,\n\t\t@IContextKeyService private readonly _contextKeyService: IContextKeyService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly _commandService: ICommandService,\n\t) {\n\t\tthis._inlineEditsShowCollapsed = this._editorObs.getOption(EditorOption.inlineSuggest).map(s => s.edits.showCollapsed);\n\t}\n\n\tpublic toDisposableLiveElement(): LiveElement {\n\t\treturn this._createHoverContent().toDisposableLiveElement();\n\t}\n\n\tprivate _createHoverContent() {\n\t\tconst activeElement = observableValue<string | undefined>('active', undefined);\n\n\t\tconst createOptionArgs = (options: { id: string; title: string; icon: IObservable<ThemeIcon> | ThemeIcon; commandId: string | IObservable<string>; commandArgs?: unknown[] }): FirstFnArg<typeof option> => {\n\t\t\treturn {\n\t\t\t\ttitle: options.title,\n\t\t\t\ticon: options.icon,\n\t\t\t\tkeybinding: typeof options.commandId === 'string' ? this._getKeybinding(options.commandArgs ? undefined : options.commandId) : derived(this, reader => typeof options.commandId === 'string' ? undefined : this._getKeybinding(options.commandArgs ? undefined : options.commandId.read(reader)).read(reader)),\n\t\t\t\tisActive: activeElement.map(v => v === options.id),\n\t\t\t\tonHoverChange: v => activeElement.set(v ? options.id : undefined, undefined),\n\t\t\t\tonAction: () => {\n\t\t\t\t\tthis._close(true);\n\t\t\t\t\treturn this._commandService.executeCommand(typeof options.commandId === 'string' ? options.commandId : options.commandId.get(), ...(options.commandArgs ?? []));\n\t\t\t\t},\n\t\t\t};\n\t\t};\n\n\t\tconst title = header(this._model.displayName);\n\n\t\tconst gotoAndAccept = option(createOptionArgs({\n\t\t\tid: 'gotoAndAccept',\n\t\t\ttitle: `${localize('goto', \"Go To\")} / ${localize('accept', \"Accept\")}`,\n\t\t\ticon: Codicon.check,\n\t\t\tcommandId: inlineSuggestCommitId\n\t\t}));\n\n\t\tconst reject = option(createOptionArgs({\n\t\t\tid: 'reject',\n\t\t\ttitle: localize('reject', \"Reject\"),\n\t\t\ticon: Codicon.close,\n\t\t\tcommandId: hideInlineCompletionId\n\t\t}));\n\n\t\tconst extensionCommands = this._model.extensionCommands.map((c, idx) => option(createOptionArgs({\n\t\t\tid: c.command.id + '_' + idx,\n\t\t\ttitle: c.command.title,\n\t\t\ticon: c.icon ?? Codicon.symbolEvent,\n\t\t\tcommandId: c.command.id,\n\t\t\tcommandArgs: c.command.arguments\n\t\t})));\n\n\t\tconst toggleCollapsedMode = this._inlineEditsShowCollapsed.map(showCollapsed => showCollapsed ?\n\t\t\toption(createOptionArgs({\n\t\t\t\tid: 'showExpanded',\n\t\t\t\ttitle: localize('showExpanded', \"Show Expanded\"),\n\t\t\t\ticon: Codicon.expandAll,\n\t\t\t\tcommandId: toggleShowCollapsedId\n\t\t\t}))\n\t\t\t: option(createOptionArgs({\n\t\t\t\tid: 'showCollapsed',\n\t\t\t\ttitle: localize('showCollapsed', \"Show Collapsed\"),\n\t\t\t\ticon: Codicon.collapseAll,\n\t\t\t\tcommandId: toggleShowCollapsedId\n\t\t\t}))\n\t\t);\n\n\t\tconst snooze = option(createOptionArgs({\n\t\t\tid: 'snooze',\n\t\t\ttitle: localize('snooze', \"Snooze\"),\n\t\t\ticon: Codicon.bellSlash,\n\t\t\tcommandId: 'editor.action.inlineSuggest.snooze'\n\t\t}));\n\n\t\tconst settings = option(createOptionArgs({\n\t\t\tid: 'settings',\n\t\t\ttitle: localize('settings', \"Settings\"),\n\t\t\ticon: Codicon.gear,\n\t\t\tcommandId: 'workbench.action.openSettings',\n\t\t\tcommandArgs: ['@tag:nextEditSuggestions']\n\t\t}));\n\n\t\tconst actions = this._model.action ? [this._model.action] : [];\n\t\tconst actionBarFooter = actions.length > 0 ? actionBar(\n\t\t\tactions.map(action => ({\n\t\t\t\tid: action.id,\n\t\t\t\tlabel: action.title + '...',\n\t\t\t\tenabled: true,\n\t\t\t\trun: () => this._commandService.executeCommand(action.id, ...(action.arguments ?? [])),\n\t\t\t\tclass: undefined,\n\t\t\t\ttooltip: action.tooltip ?? action.title\n\t\t\t})),\n\t\t\t{ hoverDelegate: nativeHoverDelegate /* unable to show hover inside another hover */ }\n\t\t) : undefined;\n\n\t\treturn hoverContent([\n\t\t\ttitle,\n\t\t\tgotoAndAccept,\n\t\t\treject,\n\t\t\ttoggleCollapsedMode,\n\t\t\textensionCommands.length ? separator() : undefined,\n\t\t\tsnooze,\n\t\t\tsettings,\n\n\t\t\t...extensionCommands,\n\n\t\t\tactionBarFooter ? separator() : undefined,\n\t\t\tactionBarFooter\n\t\t]);\n\t}\n\n\tprivate _getKeybinding(commandId: string | undefined) {\n\t\tif (!commandId) {\n\t\t\treturn constObservable(undefined);\n\t\t}\n\t\treturn observableFromEvent(this._contextKeyService.onDidChangeContext, () => this._keybindingService.lookupKeybinding(commandId)); // TODO: use contextkeyservice to use different renderings\n\t}\n}\n\nfunction hoverContent(content: ChildNode) {\n\treturn n.div({\n\t\tclass: 'content',\n\t\tstyle: {\n\t\t\tmargin: 4,\n\t\t\tminWidth: 180,\n\t\t}\n\t}, content);\n}\n\nfunction header(title: string | IObservable<string>) {\n\treturn n.div({\n\t\tclass: 'header',\n\t\tstyle: {\n\t\t\tcolor: asCssVariable(descriptionForeground),\n\t\t\tfontSize: '13px',\n\t\t\tfontWeight: '600',\n\t\t\tpadding: '0 4px',\n\t\t\tlineHeight: 28,\n\t\t}\n\t}, [title]);\n}\n\nfunction option(props: {\n\ttitle: string;\n\ticon: IObservable<ThemeIcon> | ThemeIcon;\n\tkeybinding: IObservable<ResolvedKeybinding | undefined>;\n\tisActive?: IObservable<boolean>;\n\tonHoverChange?: (isHovered: boolean) => void;\n\tonAction?: () => void;\n}) {\n\treturn derived({ name: 'inlineEdits.option' }, (_reader) => n.div({\n\t\tclass: ['monaco-menu-option', props.isActive?.map(v => v && 'active')],\n\t\tonmouseenter: () => props.onHoverChange?.(true),\n\t\tonmouseleave: () => props.onHoverChange?.(false),\n\t\tonclick: props.onAction,\n\t\tonkeydown: e => {\n\t\t\tif (e.key === 'Enter') {\n\t\t\t\tprops.onAction?.();\n\t\t\t}\n\t\t},\n\t\ttabIndex: 0,\n\t\tstyle: {\n\t\t\tborderRadius: 3, // same as hover widget border radius\n\t\t}\n\t}, [\n\t\tn.elem('span', {\n\t\t\tstyle: {\n\t\t\t\tfontSize: 16,\n\t\t\t\tdisplay: 'flex',\n\t\t\t}\n\t\t}, [ThemeIcon.isThemeIcon(props.icon) ? renderIcon(props.icon) : props.icon.map(icon => renderIcon(icon))]),\n\t\tn.elem('span', {}, [props.title]),\n\t\tn.div({\n\t\t\tstyle: { marginLeft: 'auto' },\n\t\t\tref: elem => {\n\t\t\t\tconst keybindingLabel = _reader.store.add(new KeybindingLabel(elem, OS, {\n\t\t\t\t\tdisableTitle: true,\n\t\t\t\t\t...defaultKeybindingLabelStyles,\n\t\t\t\t\tkeybindingLabelShadow: undefined,\n\t\t\t\t\tkeybindingLabelForeground: asCssVariable(descriptionForeground),\n\t\t\t\t\tkeybindingLabelBackground: 'transparent',\n\t\t\t\t\tkeybindingLabelBorder: 'transparent',\n\t\t\t\t\tkeybindingLabelBottomBorder: undefined,\n\t\t\t\t}));\n\t\t\t\t_reader.store.add(autorun(reader => {\n\t\t\t\t\tkeybindingLabel.set(props.keybinding.read(reader));\n\t\t\t\t}));\n\t\t\t}\n\t\t})\n\t]));\n}\n\n// TODO: make this observable\nfunction actionBar(actions: IAction[], options: IActionBarOptions) {\n\treturn derived({ name: 'inlineEdits.actionBar' }, (_reader) => n.div({\n\t\tclass: ['action-widget-action-bar'],\n\t\tstyle: {\n\t\t\tpadding: '3px 24px',\n\t\t}\n\t}, [\n\t\tn.div({\n\t\t\tref: elem => {\n\t\t\t\tconst actionBar = _reader.store.add(new ActionBar(elem, options));\n\t\t\t\tactionBar.push(actions, { icon: false, label: true });\n\t\t\t}\n\t\t})\n\t]));\n}\n\nfunction separator() {\n\treturn n.div({\n\t\tid: 'inline-edit-gutter-indicator-menu-separator',\n\t\tclass: 'menu-separator',\n\t\tstyle: {\n\t\t\tcolor: asCssVariable(editorActionListForeground),\n\t\t\tpadding: '2px 0',\n\t\t}\n\t}, n.div({\n\t\tstyle: {\n\t\t\tborderBottom: `1px solid ${asCssVariable(editorHoverBorder)}`,\n\t\t}\n\t}));\n}\n"]}
@@ -13,10 +13,11 @@ export class InlineEditWithChanges {
13
13
  get displayRange() {
14
14
  return this.originalText.lineRange.intersect(this.originalLineRange.join(LineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)));
15
15
  }
16
- constructor(originalText, edit, cursorPosition, commands, inlineCompletion) {
16
+ constructor(originalText, edit, cursorPosition, multiCursorPositions, commands, inlineCompletion) {
17
17
  this.originalText = originalText;
18
18
  this.edit = edit;
19
19
  this.cursorPosition = cursorPosition;
20
+ this.multiCursorPositions = multiCursorPositions;
20
21
  this.commands = commands;
21
22
  this.inlineCompletion = inlineCompletion;
22
23
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAO3E,MAAM,OAAO,qBAAqB;IACjC,IAAW,QAAQ;QAClB,OAAO,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;IAED,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAClE,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3F,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAC3C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAC1B,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CACzF,CACA,CAAC;IACJ,CAAC;IAED,YACiB,YAA0B,EAC1B,IAAc,EACd,cAAwB,EACxB,QAA4C,EAC5C,gBAAsC;QAJtC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,SAAI,GAAJ,IAAI,CAAU;QACd,mBAAc,GAAd,cAAc,CAAU;QACxB,aAAQ,GAAR,QAAQ,CAAoC;QAC5C,qBAAgB,GAAhB,gBAAgB,CAAsB;IAEvD,CAAC;CACD","file":"inlineEditWithChanges.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { Position } from '../../../../../common/core/position.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { AbstractText } from '../../../../../common/core/text/abstractText.js';\nimport { InlineCompletionCommand } from '../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../model/inlineSuggestionItem.js';\n\nexport class InlineEditWithChanges {\n\tpublic get lineEdit() {\n\t\treturn LineReplacement.fromSingleTextEdit(this.edit.toReplacement(this.originalText), this.originalText);\n\t}\n\n\tpublic get originalLineRange() { return this.lineEdit.lineRange; }\n\tpublic get modifiedLineRange() { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }\n\n\tpublic get displayRange() {\n\t\treturn this.originalText.lineRange.intersect(\n\t\t\tthis.originalLineRange.join(\n\t\t\t\tLineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)\n\t\t\t)\n\t\t)!;\n\t}\n\n\tconstructor(\n\t\tpublic readonly originalText: AbstractText,\n\t\tpublic readonly edit: TextEdit,\n\t\tpublic readonly cursorPosition: Position,\n\t\tpublic readonly commands: readonly InlineCompletionCommand[],\n\t\tpublic readonly inlineCompletion: InlineSuggestionItem\n\t) {\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { Position } from '../../../../../common/core/position.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { AbstractText } from '../../../../../common/core/text/abstractText.js';\nimport { InlineCompletionCommand } from '../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../model/inlineSuggestionItem.js';\n\nexport class InlineEditWithChanges {\n\tpublic get lineEdit() {\n\t\treturn LineReplacement.fromSingleTextEdit(this.edit.toReplacement(this.originalText), this.originalText);\n\t}\n\n\tpublic get originalLineRange() { return this.lineEdit.lineRange; }\n\tpublic get modifiedLineRange() { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }\n\n\tpublic get displayRange() {\n\t\treturn this.originalText.lineRange.intersect(\n\t\t\tthis.originalLineRange.join(\n\t\t\t\tLineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)\n\t\t\t)\n\t\t)!;\n\t}\n\n\tconstructor(\n\t\tpublic readonly originalText: AbstractText,\n\t\tpublic readonly edit: TextEdit,\n\t\tpublic readonly cursorPosition: Position,\n\t\tpublic readonly commands: readonly InlineCompletionCommand[],\n\t\tpublic readonly inlineCompletion: InlineSuggestionItem\n\t) {\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts","vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAO3E,MAAM,OAAO,qBAAqB;IACjC,IAAW,QAAQ;QAClB,OAAO,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;IAED,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAClE,IAAW,iBAAiB,KAAK,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3F,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAC3C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAC1B,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CACzF,CACA,CAAC;IACJ,CAAC;IAED,YACiB,YAA0B,EAC1B,IAAc,EACd,cAAwB,EACxB,oBAAyC,EACzC,QAA4C,EAC5C,gBAAsC;QALtC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,SAAI,GAAJ,IAAI,CAAU;QACd,mBAAc,GAAd,cAAc,CAAU;QACxB,yBAAoB,GAApB,oBAAoB,CAAqB;QACzC,aAAQ,GAAR,QAAQ,CAAoC;QAC5C,qBAAgB,GAAhB,gBAAgB,CAAsB;IAEvD,CAAC;CACD","file":"inlineEditWithChanges.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { Position } from '../../../../../common/core/position.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { AbstractText } from '../../../../../common/core/text/abstractText.js';\nimport { InlineCompletionCommand } from '../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../model/inlineSuggestionItem.js';\n\nexport class InlineEditWithChanges {\n\tpublic get lineEdit() {\n\t\treturn LineReplacement.fromSingleTextEdit(this.edit.toReplacement(this.originalText), this.originalText);\n\t}\n\n\tpublic get originalLineRange() { return this.lineEdit.lineRange; }\n\tpublic get modifiedLineRange() { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }\n\n\tpublic get displayRange() {\n\t\treturn this.originalText.lineRange.intersect(\n\t\t\tthis.originalLineRange.join(\n\t\t\t\tLineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)\n\t\t\t)\n\t\t)!;\n\t}\n\n\tconstructor(\n\t\tpublic readonly originalText: AbstractText,\n\t\tpublic readonly edit: TextEdit,\n\t\tpublic readonly cursorPosition: Position,\n\t\tpublic readonly multiCursorPositions: readonly Position[],\n\t\tpublic readonly commands: readonly InlineCompletionCommand[],\n\t\tpublic readonly inlineCompletion: InlineSuggestionItem\n\t) {\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { LineReplacement } from '../../../../../common/core/edits/lineEdit.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { Position } from '../../../../../common/core/position.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { AbstractText } from '../../../../../common/core/text/abstractText.js';\nimport { InlineCompletionCommand } from '../../../../../common/languages.js';\nimport { InlineSuggestionItem } from '../../model/inlineSuggestionItem.js';\n\nexport class InlineEditWithChanges {\n\tpublic get lineEdit() {\n\t\treturn LineReplacement.fromSingleTextEdit(this.edit.toReplacement(this.originalText), this.originalText);\n\t}\n\n\tpublic get originalLineRange() { return this.lineEdit.lineRange; }\n\tpublic get modifiedLineRange() { return this.lineEdit.toLineEdit().getNewLineRanges()[0]; }\n\n\tpublic get displayRange() {\n\t\treturn this.originalText.lineRange.intersect(\n\t\t\tthis.originalLineRange.join(\n\t\t\t\tLineRange.ofLength(this.originalLineRange.startLineNumber, this.lineEdit.newLines.length)\n\t\t\t)\n\t\t)!;\n\t}\n\n\tconstructor(\n\t\tpublic readonly originalText: AbstractText,\n\t\tpublic readonly edit: TextEdit,\n\t\tpublic readonly cursorPosition: Position,\n\t\tpublic readonly multiCursorPositions: readonly Position[],\n\t\tpublic readonly commands: readonly InlineCompletionCommand[],\n\t\tpublic readonly inlineCompletion: InlineSuggestionItem\n\t) {\n\t}\n}\n"]}
@@ -15,7 +15,7 @@ export class InlineEditModel {
15
15
  this.inlineEdit = inlineEdit;
16
16
  this.tabAction = tabAction;
17
17
  this.action = this.inlineEdit.inlineCompletion.action;
18
- this.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize(1209, "Inline Edit");
18
+ this.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize(1210, "Inline Edit");
19
19
  this.extensionCommands = this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands ?? [];
20
20
  this.isInDiffEditor = this._model.isInDiffEditor;
21
21
  this.displayLocation = this.inlineEdit.inlineCompletion.displayLocation;
@@ -55,7 +55,7 @@ export class GhostTextIndicator {
55
55
  }
56
56
  return InlineEditTabAction.Inactive;
57
57
  });
58
- this.model = new InlineEditModel(model, new InlineEditWithChanges(new StringText(''), new TextEdit([inlineCompletion.getSingleTextEdit()]), model.primaryPosition.get(), inlineCompletion.source.inlineSuggestions.commands ?? [], inlineCompletion), tabAction);
58
+ this.model = new InlineEditModel(model, new InlineEditWithChanges(new StringText(''), new TextEdit([inlineCompletion.getSingleTextEdit()]), model.primaryPosition.get(), model.allPositions.get(), inlineCompletion.source.inlineSuggestions.commands ?? [], inlineCompletion), tabAction);
59
59
  }
60
60
  }
61
61
  //# sourceMappingURL=inlineEditsModel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,OAAO,EAAe,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EAAE,QAAQ,EAAE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,EACxD,gBAAgB,CAChB,EACD,SAAS,CACT,CAAC;IACH,CAAC;CACD","file":"inlineEditsModel.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Event } from '../../../../../../base/common/event.js';\nimport { derived, IObservable } from '../../../../../../base/common/observable.js';\nimport { localize } from '../../../../../../nls.js';\nimport { ICodeEditor } from '../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../browser/observableCodeEditor.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { StringText } from '../../../../../common/core/text/abstractText.js';\nimport { Command, InlineCompletionCommand, InlineCompletionDisplayLocation } from '../../../../../common/languages.js';\nimport { InlineCompletionsModel } from '../../model/inlineCompletionsModel.js';\nimport { InlineCompletionItem } from '../../model/inlineSuggestionItem.js';\nimport { IInlineEditHost, IInlineEditModel, InlineCompletionViewData, InlineCompletionViewKind, InlineEditTabAction } from './inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from './inlineEditWithChanges.js';\n\nexport class InlineEditModel implements IInlineEditModel {\n\n\treadonly action: Command | undefined;\n\treadonly displayName: string;\n\treadonly extensionCommands: InlineCompletionCommand[];\n\treadonly isInDiffEditor: boolean;\n\n\treadonly displayLocation: InlineCompletionDisplayLocation | undefined;\n\treadonly showCollapsed: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: InlineCompletionsModel,\n\t\treadonly inlineEdit: InlineEditWithChanges,\n\t\treadonly tabAction: IObservable<InlineEditTabAction>,\n\t) {\n\t\tthis.action = this.inlineEdit.inlineCompletion.action;\n\t\tthis.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize('inlineEdit', \"Inline Edit\");\n\t\tthis.extensionCommands = this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands ?? [];\n\t\tthis.isInDiffEditor = this._model.isInDiffEditor;\n\n\t\tthis.displayLocation = this.inlineEdit.inlineCompletion.displayLocation;\n\t\tthis.showCollapsed = this._model.showCollapsed;\n\t}\n\n\taccept() {\n\t\tthis._model.accept();\n\t}\n\n\tjump() {\n\t\tthis._model.jump();\n\t}\n\n\tabort(reason: string) {\n\t\tconsole.error(reason);\n\t\tthis.inlineEdit.inlineCompletion.reportInlineEditError(reason);\n\t\tthis._model.stop();\n\t}\n\n\thandleInlineEditShown(viewKind: InlineCompletionViewKind, viewData: InlineCompletionViewData) {\n\t\tthis._model.handleInlineSuggestionShown(this.inlineEdit.inlineCompletion, viewKind, viewData);\n\t}\n}\n\nexport class InlineEditHost implements IInlineEditHost {\n\treadonly onDidAccept: Event<void>;\n\treadonly inAcceptFlow: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: InlineCompletionsModel,\n\t) {\n\t\tthis.onDidAccept = this._model.onDidAccept;\n\t\tthis.inAcceptFlow = this._model.inAcceptFlow;\n\t}\n}\n\nexport class GhostTextIndicator {\n\n\treadonly model: InlineEditModel;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tmodel: InlineCompletionsModel,\n\t\treadonly lineRange: LineRange,\n\t\tinlineCompletion: InlineCompletionItem,\n\t) {\n\t\tconst editorObs = observableCodeEditor(editor);\n\t\tconst tabAction = derived<InlineEditTabAction>(this, reader => {\n\t\t\tif (editorObs.isFocused.read(reader)) {\n\t\t\t\tif (inlineCompletion.showInlineEditMenu) {\n\t\t\t\t\treturn InlineEditTabAction.Accept;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn InlineEditTabAction.Inactive;\n\t\t});\n\n\t\tthis.model = new InlineEditModel(\n\t\t\tmodel,\n\t\t\tnew InlineEditWithChanges(\n\t\t\t\tnew StringText(''),\n\t\t\t\tnew TextEdit([inlineCompletion.getSingleTextEdit()]),\n\t\t\t\tmodel.primaryPosition.get(),\n\t\t\t\tinlineCompletion.source.inlineSuggestions.commands ?? [],\n\t\t\t\tinlineCompletion\n\t\t\t),\n\t\t\ttabAction,\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,OAAO,EAAe,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEtF,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAI7E,OAAO,EAAyF,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC3J,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,OAAO,eAAe;IAU3B,YACkB,MAA8B,EACtC,UAAiC,EACjC,SAA2C;QAFnC,WAAM,GAAN,MAAM,CAAwB;QACtC,eAAU,GAAV,UAAU,CAAuB;QACjC,cAAS,GAAT,SAAS,CAAkC;QAEpD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC;QACtD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,IAAY,EAAE,aAAa,CAAC,CAAC;QACzH,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,IAAI,EAAE,CAAC;QAClG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAEjD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC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AC;oBACzC,OAAO,mBAAmB,CAAC,MAAM,CAAC;gBACnC,CAAC;YACF,CAAC;YACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC;QACrC,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,GAAG,IAAI,eAAe,CAC/B,KAAK,EACL,IAAI,qBAAqB,CACxB,IAAI,UAAU,CAAC,EAAE,CAAC,EAClB,IAAI,QAAQ,CAAC,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,CAAC,CAAC,EACpD,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE,EAC3B,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,EACxB,gBAAgB,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,IAAI,EAAE,EACxD,gBAAgB,CAChB,EACD,SAAS,CACT,CAAC;IACH,CAAC;CACD","file":"inlineEditsModel.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { Event } from '../../../../../../base/common/event.js';\nimport { derived, IObservable } from '../../../../../../base/common/observable.js';\nimport { localize } from '../../../../../../nls.js';\nimport { ICodeEditor } from '../../../../../browser/editorBrowser.js';\nimport { observableCodeEditor } from '../../../../../browser/observableCodeEditor.js';\nimport { LineRange } from '../../../../../common/core/ranges/lineRange.js';\nimport { TextEdit } from '../../../../../common/core/edits/textEdit.js';\nimport { StringText } from '../../../../../common/core/text/abstractText.js';\nimport { Command, InlineCompletionCommand, InlineCompletionDisplayLocation } from '../../../../../common/languages.js';\nimport { InlineCompletionsModel } from '../../model/inlineCompletionsModel.js';\nimport { InlineCompletionItem } from '../../model/inlineSuggestionItem.js';\nimport { IInlineEditHost, IInlineEditModel, InlineCompletionViewData, InlineCompletionViewKind, InlineEditTabAction } from './inlineEditsViewInterface.js';\nimport { InlineEditWithChanges } from './inlineEditWithChanges.js';\n\nexport class InlineEditModel implements IInlineEditModel {\n\n\treadonly action: Command | undefined;\n\treadonly displayName: string;\n\treadonly extensionCommands: InlineCompletionCommand[];\n\treadonly isInDiffEditor: boolean;\n\n\treadonly displayLocation: InlineCompletionDisplayLocation | undefined;\n\treadonly showCollapsed: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: InlineCompletionsModel,\n\t\treadonly inlineEdit: InlineEditWithChanges,\n\t\treadonly tabAction: IObservable<InlineEditTabAction>,\n\t) {\n\t\tthis.action = this.inlineEdit.inlineCompletion.action;\n\t\tthis.displayName = this.inlineEdit.inlineCompletion.source.provider.displayName ?? localize('inlineEdit', \"Inline Edit\");\n\t\tthis.extensionCommands = this.inlineEdit.inlineCompletion.source.inlineSuggestions.commands ?? [];\n\t\tthis.isInDiffEditor = this._model.isInDiffEditor;\n\n\t\tthis.displayLocation = this.inlineEdit.inlineCompletion.displayLocation;\n\t\tthis.showCollapsed = this._model.showCollapsed;\n\t}\n\n\taccept() {\n\t\tthis._model.accept();\n\t}\n\n\tjump() {\n\t\tthis._model.jump();\n\t}\n\n\tabort(reason: string) {\n\t\tconsole.error(reason);\n\t\tthis.inlineEdit.inlineCompletion.reportInlineEditError(reason);\n\t\tthis._model.stop();\n\t}\n\n\thandleInlineEditShown(viewKind: InlineCompletionViewKind, viewData: InlineCompletionViewData) {\n\t\tthis._model.handleInlineSuggestionShown(this.inlineEdit.inlineCompletion, viewKind, viewData);\n\t}\n}\n\nexport class InlineEditHost implements IInlineEditHost {\n\treadonly onDidAccept: Event<void>;\n\treadonly inAcceptFlow: IObservable<boolean>;\n\n\tconstructor(\n\t\tprivate readonly _model: InlineCompletionsModel,\n\t) {\n\t\tthis.onDidAccept = this._model.onDidAccept;\n\t\tthis.inAcceptFlow = this._model.inAcceptFlow;\n\t}\n}\n\nexport class GhostTextIndicator {\n\n\treadonly model: InlineEditModel;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tmodel: InlineCompletionsModel,\n\t\treadonly lineRange: LineRange,\n\t\tinlineCompletion: InlineCompletionItem,\n\t) {\n\t\tconst editorObs = observableCodeEditor(editor);\n\t\tconst tabAction = derived<InlineEditTabAction>(this, reader => {\n\t\t\tif (editorObs.isFocused.read(reader)) {\n\t\t\t\tif (inlineCompletion.showInlineEditMenu) {\n\t\t\t\t\treturn InlineEditTabAction.Accept;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn InlineEditTabAction.Inactive;\n\t\t});\n\n\t\tthis.model = new InlineEditModel(\n\t\t\tmodel,\n\t\t\tnew InlineEditWithChanges(\n\t\t\t\tnew StringText(''),\n\t\t\t\tnew TextEdit([inlineCompletion.getSingleTextEdit()]),\n\t\t\t\tmodel.primaryPosition.get(),\n\t\t\t\tmodel.allPositions.get(),\n\t\t\t\tinlineCompletion.source.inlineSuggestions.commands ?? [],\n\t\t\t\tinlineCompletion\n\t\t\t),\n\t\t\ttabAction,\n\t\t);\n\t}\n}\n"]}
@@ -313,7 +313,15 @@ let InlineEditsView = InlineEditsView_1 = class InlineEditsView extends Disposab
313
313
  }
314
314
  determineRenderState(model, reader, diff, newText) {
315
315
  const inlineEdit = model.inlineEdit;
316
- const view = this.determineView(model, reader, diff, newText);
316
+ let view = this.determineView(model, reader, diff, newText);
317
+ if (this._willRenderAboveCursor(reader, inlineEdit, view)) {
318
+ switch (view) {
319
+ case InlineCompletionViewKind.LineReplacement:
320
+ case InlineCompletionViewKind.WordReplacements:
321
+ view = InlineCompletionViewKind.SideBySide;
322
+ break;
323
+ }
324
+ }
317
325
  this._previousView = { id: this.getCacheId(model), view, editorWidth: this._editor.getLayoutInfo().width, timestamp: Date.now() };
318
326
  const inner = diff.flatMap(d => d.innerChanges ?? []);
319
327
  const textModel = this._editor.getModel();
@@ -386,6 +394,24 @@ let InlineEditsView = InlineEditsView_1 = class InlineEditsView extends Disposab
386
394
  }
387
395
  return undefined;
388
396
  }
397
+ _willRenderAboveCursor(reader, inlineEdit, view) {
398
+ const useCodeShifting = this._useCodeShifting.read(reader);
399
+ if (useCodeShifting === 'always') {
400
+ return false;
401
+ }
402
+ for (const cursorPosition of inlineEdit.multiCursorPositions) {
403
+ if (view === InlineCompletionViewKind.WordReplacements &&
404
+ cursorPosition.lineNumber === inlineEdit.originalLineRange.startLineNumber + 1) {
405
+ return true;
406
+ }
407
+ if (view === InlineCompletionViewKind.LineReplacement &&
408
+ cursorPosition.lineNumber >= inlineEdit.originalLineRange.endLineNumberExclusive &&
409
+ cursorPosition.lineNumber < inlineEdit.modifiedLineRange.endLineNumberExclusive + inlineEdit.modifiedLineRange.length) {
410
+ return true;
411
+ }
412
+ }
413
+ return false;
414
+ }
389
415
  _viewHasBeenShownLongerThan(durationMs) {
390
416
  const viewCreationTime = this._previousView?.timestamp;
391
417
  if (!viewCreationTime) {