monaco-editor-core 0.56.0-dev-20251125 → 0.56.0-dev-20251218

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 (410) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +34 -6
  18. package/esm/vs/base/browser/dom.js +1 -4
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/markdownRenderer.js +25 -11
  21. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  22. package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
  23. package/esm/vs/base/browser/ui/button/button.js +15 -8
  24. package/esm/vs/base/browser/ui/button/button.js.map +1 -1
  25. package/esm/vs/base/browser/ui/codicons/codicon/codicon-modifiers.css +3 -8
  26. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  27. package/esm/vs/base/browser/ui/findinput/findInput.js +6 -1
  28. package/esm/vs/base/browser/ui/findinput/findInput.js.map +1 -1
  29. package/esm/vs/base/browser/ui/inputbox/inputBox.js +17 -1
  30. package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
  31. package/esm/vs/base/browser/ui/list/list.css +1 -0
  32. package/esm/vs/base/browser/ui/toggle/toggle.js +78 -6
  33. package/esm/vs/base/browser/ui/toggle/toggle.js.map +1 -1
  34. package/esm/vs/base/browser/ui/toolbar/toolbar.js +3 -0
  35. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  36. package/esm/vs/base/common/codiconsLibrary.js +11 -2
  37. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  38. package/esm/vs/base/common/defaultAccount.js +6 -0
  39. package/esm/vs/base/common/defaultAccount.js.map +1 -0
  40. package/esm/vs/base/common/equals.js +73 -24
  41. package/esm/vs/base/common/equals.js.map +1 -1
  42. package/esm/vs/base/common/event.js +14 -4
  43. package/esm/vs/base/common/event.js.map +1 -1
  44. package/esm/vs/base/common/iterator.js.map +1 -1
  45. package/esm/vs/base/common/keybindings.js +0 -8
  46. package/esm/vs/base/common/keybindings.js.map +1 -1
  47. package/esm/vs/base/common/lifecycle.js +2 -2
  48. package/esm/vs/base/common/lifecycle.js.map +1 -1
  49. package/esm/vs/base/common/marshallingIds.js.map +1 -1
  50. package/esm/vs/base/common/observableInternal/index.js +1 -1
  51. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  52. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -1
  53. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  54. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +16 -0
  55. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  56. package/esm/vs/base/common/observableInternal/utils/utils.js +11 -0
  57. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  58. package/esm/vs/base/common/product.js.map +1 -1
  59. package/esm/vs/base/common/strings.js +3 -1
  60. package/esm/vs/base/common/strings.js.map +1 -1
  61. package/esm/vs/editor/browser/controller/dragScrolling.js +2 -1
  62. package/esm/vs/editor/browser/controller/dragScrolling.js.map +1 -1
  63. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +73 -2
  64. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
  65. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +7 -51
  66. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  67. package/esm/vs/editor/browser/controller/editContext/screenReaderUtils.js.map +1 -1
  68. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +7 -20
  69. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
  70. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +14 -44
  71. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js.map +1 -1
  72. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js +19 -0
  73. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextRegistry.js.map +1 -0
  74. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js +14 -1
  75. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextState.js.map +1 -1
  76. package/esm/vs/editor/browser/controller/mouseHandler.js +5 -2
  77. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  78. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  79. package/esm/vs/editor/browser/observableCodeEditor.js +32 -15
  80. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  81. package/esm/vs/editor/browser/services/editorWorkerService.js +6 -2
  82. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  83. package/esm/vs/editor/browser/view.js +11 -2
  84. package/esm/vs/editor/browser/view.js.map +1 -1
  85. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +5 -2
  86. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  87. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -0
  88. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  89. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  90. package/esm/vs/editor/browser/widget/multiDiffEditor/style.css +48 -0
  91. package/esm/vs/editor/common/config/editorConfigurationSchema.js +49 -47
  92. package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
  93. package/esm/vs/editor/common/config/editorOptions.js +410 -410
  94. package/esm/vs/editor/common/config/fontInfo.js +1 -1
  95. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  96. package/esm/vs/editor/common/core/editorColorRegistry.js +69 -69
  97. package/esm/vs/editor/common/core/edits/edit.js +19 -0
  98. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  99. package/esm/vs/editor/common/core/edits/stringEdit.js +13 -0
  100. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  101. package/esm/vs/editor/common/core/edits/textEdit.js +0 -3
  102. package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
  103. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js +24 -10
  104. package/esm/vs/editor/common/core/text/positionToOffsetImpl.js.map +1 -1
  105. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  106. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  107. package/esm/vs/editor/common/cursor/cursorWordOperations.js +6 -3
  108. package/esm/vs/editor/common/cursor/cursorWordOperations.js.map +1 -1
  109. package/esm/vs/editor/common/editorContextKeys.js +47 -47
  110. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js +2 -2
  111. package/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js.map +1 -1
  112. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  113. package/esm/vs/editor/common/languages/nullTokenize.js +1 -1
  114. package/esm/vs/editor/common/languages/nullTokenize.js.map +1 -1
  115. package/esm/vs/editor/common/languages/supports/tokenization.js +3 -0
  116. package/esm/vs/editor/common/languages/supports/tokenization.js.map +1 -1
  117. package/esm/vs/editor/common/languages.js +58 -57
  118. package/esm/vs/editor/common/languages.js.map +1 -1
  119. package/esm/vs/editor/common/model/decorationProvider.js +21 -1
  120. package/esm/vs/editor/common/model/decorationProvider.js.map +1 -1
  121. package/esm/vs/editor/common/model/editStack.js +1 -1
  122. package/esm/vs/editor/common/model/textModel.js +49 -30
  123. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  124. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js +6 -3
  125. package/esm/vs/editor/common/model/tokens/abstractSyntaxTokenBackend.js.map +1 -1
  126. package/esm/vs/editor/common/model/tokens/annotations.js +177 -0
  127. package/esm/vs/editor/common/model/tokens/annotations.js.map +1 -0
  128. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +131 -0
  129. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js.map +1 -0
  130. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js +9 -0
  131. package/esm/vs/editor/common/model/tokens/tokenizationTextModelPart.js.map +1 -1
  132. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js +9 -0
  133. package/esm/vs/editor/common/model/tokens/tokenizerSyntaxTokenBackend.js.map +1 -1
  134. package/esm/vs/editor/common/standaloneStrings.js +11 -11
  135. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  136. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  137. package/esm/vs/editor/common/textModelEvents.js.map +1 -1
  138. package/esm/vs/editor/common/viewLayout/lineDecorations.js.map +1 -1
  139. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +3 -3
  140. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  141. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  142. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  143. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  144. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  145. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +71 -53
  146. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
  147. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  148. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  149. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  150. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  151. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  152. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  153. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  154. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  155. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  156. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  157. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  158. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  159. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  160. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  161. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  162. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +23 -10
  163. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
  164. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  165. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  166. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  167. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  168. package/esm/vs/editor/contrib/find/browser/findController.js +16 -16
  169. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  170. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  171. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  172. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  173. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  174. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  175. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  176. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  177. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  178. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  179. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  180. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  181. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  182. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  183. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  184. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  185. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  186. package/esm/vs/editor/contrib/hover/browser/hover.css +1 -1
  187. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  188. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  189. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  190. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -10
  191. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
  192. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  193. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  194. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  195. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -0
  196. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  197. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js +1 -0
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commandIds.js.map +1 -1
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +50 -21
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js.map +1 -1
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -12
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js.map +1 -1
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -1
  205. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  206. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  207. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  208. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js +2 -1
  209. package/esm/vs/editor/contrib/inlineCompletions/browser/inlineCompletions.contribution.js.map +1 -1
  210. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js +8 -0
  211. package/esm/vs/editor/contrib/inlineCompletions/browser/model/InlineSuggestAlternativeAction.js.map +1 -0
  212. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js +198 -0
  213. package/esm/vs/editor/contrib/inlineCompletions/browser/model/editKind.js.map +1 -0
  214. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js +40 -0
  215. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionIsVisible.js.map +1 -0
  216. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +128 -70
  217. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  218. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +59 -11
  219. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  220. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +152 -95
  221. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  222. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js +113 -54
  223. package/esm/vs/editor/contrib/inlineCompletions/browser/model/provideInlineCompletions.js.map +1 -1
  224. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +317 -75
  225. package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js.map +1 -1
  226. package/esm/vs/editor/contrib/inlineCompletions/browser/telemetry.js.map +1 -1
  227. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js +20 -0
  228. package/esm/vs/editor/contrib/inlineCompletions/browser/utils.js.map +1 -1
  229. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +59 -42
  230. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  231. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +29 -8
  232. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  233. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +78 -46
  234. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  235. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js +9 -4
  236. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditWithChanges.js.map +1 -1
  237. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +11 -4
  238. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  239. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +81 -41
  240. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  241. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js +48 -0
  242. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  243. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +18 -15
  244. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  245. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js +3 -4
  246. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCollapsedView.js.map +1 -1
  247. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +6 -7
  248. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js.map +1 -1
  249. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js +4 -5
  250. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsDeletionView.js.map +1 -1
  251. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +4 -3
  252. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  253. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +8 -8
  254. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js.map +1 -1
  255. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js +9 -7
  256. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsSideBySideView.js.map +1 -1
  257. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +203 -41
  258. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js.map +1 -1
  259. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js +189 -0
  260. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/jumpToView.js.map +1 -0
  261. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +85 -102
  262. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
  263. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +75 -32
  264. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
  265. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js +121 -0
  266. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistnaceWidgetPlacement.js.map +1 -0
  267. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js +2 -1
  268. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/originalEditorInlineDiffView.js.map +1 -1
  269. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +22 -20
  270. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js.map +1 -1
  271. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +15 -5
  272. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  273. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +39 -6
  274. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +10 -5
  275. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -1
  276. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  277. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  278. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
  279. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  280. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  281. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  282. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  283. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  284. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  285. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  286. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  287. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  288. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +25 -27
  289. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  290. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  291. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  292. package/esm/vs/editor/contrib/rename/browser/rename.js +19 -15
  293. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  294. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  295. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +3 -2
  296. package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js.map +1 -1
  297. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  298. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  299. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js +33 -0
  300. package/esm/vs/editor/contrib/snippet/browser/snippetParser.js.map +1 -1
  301. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  302. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  303. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +12 -4
  304. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
  305. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -0
  306. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  307. package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -8
  308. package/esm/vs/editor/contrib/suggest/browser/suggest.js.map +1 -1
  309. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +39 -28
  310. package/esm/vs/editor/contrib/suggest/browser/suggestController.js.map +1 -1
  311. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +1 -0
  312. package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js.map +1 -1
  313. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +22 -18
  314. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
  315. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +28 -6
  316. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
  317. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  318. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  319. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  320. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  321. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  322. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  323. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +24 -24
  324. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  325. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  326. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
  327. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +19 -2
  328. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js.map +1 -1
  329. package/esm/vs/editor/editor.api.d.ts +34 -3
  330. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +2 -2
  331. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  332. package/esm/vs/editor/standalone/browser/standaloneServices.js +11 -1
  333. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  334. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js +1 -1
  335. package/esm/vs/editor/standalone/common/monarch/monarchLexer.js.map +1 -1
  336. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  337. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  338. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  339. package/esm/vs/platform/actionWidget/browser/actionWidget.css +11 -8
  340. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  341. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +5 -5
  342. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  343. package/esm/vs/platform/actions/common/actions.js +11 -5
  344. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  345. package/esm/vs/platform/actions/common/menuService.js +2 -2
  346. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  347. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  348. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  349. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  350. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  351. package/esm/vs/platform/{product/common/productService.js → defaultAccount/common/defaultAccount.js} +2 -2
  352. package/esm/vs/platform/defaultAccount/common/defaultAccount.js.map +1 -0
  353. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  354. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  355. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  356. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  357. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -8
  358. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  359. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  360. package/esm/vs/platform/list/browser/listService.js +27 -27
  361. package/esm/vs/platform/log/common/log.js +1 -1
  362. package/esm/vs/platform/log/common/log.js.map +1 -1
  363. package/esm/vs/platform/markers/common/markerService.js +6 -6
  364. package/esm/vs/platform/markers/common/markerService.js.map +1 -1
  365. package/esm/vs/platform/markers/common/markers.js +6 -6
  366. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  367. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  368. package/esm/vs/platform/quickinput/browser/media/quickInput.css +45 -7
  369. package/esm/vs/platform/quickinput/browser/quickInput.js +51 -15
  370. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  371. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  372. package/esm/vs/platform/quickinput/browser/quickInputBox.js +13 -1
  373. package/esm/vs/platform/quickinput/browser/quickInputBox.js.map +1 -1
  374. package/esm/vs/platform/quickinput/browser/quickInputController.js +22 -12
  375. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  376. package/esm/vs/platform/quickinput/browser/quickInputList.js +17 -12
  377. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  378. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +36 -8
  379. package/esm/vs/platform/quickinput/browser/quickInputUtils.js.map +1 -1
  380. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  381. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +3 -3
  382. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  383. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +8 -4
  384. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  385. package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
  386. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  387. package/esm/vs/platform/theme/common/colors/baseColors.js +18 -17
  388. package/esm/vs/platform/theme/common/colors/baseColors.js.map +1 -1
  389. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  390. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  391. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  392. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  393. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  394. package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
  395. package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
  396. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  397. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  398. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  399. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  400. package/esm/vs/platform/undoRedo/common/undoRedoService.js +21 -21
  401. package/esm/vs/platform/undoRedo/common/undoRedoService.js.map +1 -1
  402. package/esm/vs/platform/window/common/window.js +1 -1
  403. package/esm/vs/platform/window/common/window.js.map +1 -1
  404. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  405. package/monaco.d.ts +34 -3
  406. package/package.json +2 -2
  407. package/version.txt +1 -1
  408. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +0 -16
  409. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +0 -1
  410. package/esm/vs/platform/product/common/productService.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/telemetry.ts","vs/editor/contrib/inlineCompletions/browser/telemetry.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAIhG,MAAM,UAAU,uCAAuC,CAAC,WAAkD,EAAE,gBAAgD;IAC3J,WAAW,CAAC,UAAU,CAA2E,4BAA4B,EAAE,gBAAgB,CAAC,CAAC;AAClJ,CAAC","file":"telemetry.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 { DataChannelForwardingTelemetryService } from '../../../../platform/dataChannel/browser/forwardingTelemetryService.js';\n\nexport function sendInlineCompletionsEndOfLifeTelemetry(dataChannel: DataChannelForwardingTelemetryService, endOfLifeSummary: InlineCompletionEndOfLifeEvent) {\n\tdataChannel.publicLog2<InlineCompletionEndOfLifeEvent, InlineCompletionsEndOfLifeClassification>('inlineCompletion.endOfLife', endOfLifeSummary);\n}\n\nexport type InlineCompletionEndOfLifeEvent = {\n\t// request\n\topportunityId: string;\n\trequestReason: string;\n\teditorType: string;\n\tlanguageId: string;\n\ttypingInterval: number;\n\ttypingIntervalCharacterCount: number;\n\tselectedSuggestionInfo: boolean;\n\tavailableProviders: string;\n\t// response\n\tcorrelationId: string | undefined;\n\textensionId: string;\n\textensionVersion: string;\n\tgroupId: string | undefined;\n\t// behavior\n\tshown: boolean;\n\tshownDuration: number | undefined;\n\tshownDurationUncollapsed: number | undefined;\n\ttimeUntilShown: number | undefined;\n\ttimeUntilProviderRequest: number | undefined;\n\ttimeUntilProviderResponse: number | undefined;\n\treason: 'accepted' | 'rejected' | 'ignored' | undefined;\n\tpartiallyAccepted: number | undefined;\n\tpartiallyAcceptedCountSinceOriginal: number | undefined;\n\tpartiallyAcceptedRatioSinceOriginal: number | undefined;\n\tpartiallyAcceptedCharactersSinceOriginal: number | undefined;\n\tpreceeded: boolean | undefined;\n\tsuperseded: boolean | undefined;\n\tnotShownReason: string | undefined;\n\trenameCreated: boolean;\n\trenameDuration: number | undefined;\n\trenameTimedOut: boolean;\n\t// rendering\n\tviewKind: string | undefined;\n\tcursorColumnDistance: number | undefined;\n\tcursorLineDistance: number | undefined;\n\tlineCountOriginal: number | undefined;\n\tlineCountModified: number | undefined;\n\tcharacterCountOriginal: number | undefined;\n\tcharacterCountModified: number | undefined;\n\tdisjointReplacements: number | undefined;\n\tsameShapeReplacements: boolean | undefined;\n\t// empty\n\tnoSuggestionReason: string | undefined;\n};\n\ntype InlineCompletionsEndOfLifeClassification = {\n\towner: 'benibenj';\n\tcomment: 'Inline completions ended. @sentToGitHub';\n\topportunityId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Unique identifier for an opportunity to show an inline completion or NES' };\n\tcorrelationId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The correlation identifier for the inline completion' };\n\textensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The identifier for the extension that contributed the inline completion' };\n\textensionVersion: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The version of the extension that contributed the inline completion' };\n\tgroupId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The group ID of the extension that contributed the inline completion' };\n\tavailableProviders: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The list of available inline completion providers at the time of the request' };\n\tshown: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was shown to the user' };\n\tshownDuration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration for which the inline completion was shown' };\n\tshownDurationUncollapsed: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration for which the inline completion was shown without collapsing' };\n\ttimeUntilShown: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be shown after the request' };\n\ttimeUntilProviderRequest: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be requested from the provider' };\n\ttimeUntilProviderResponse: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be shown after the request' };\n\treason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason for the inline completion ending' };\n\tselectedSuggestionInfo: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was requested with a selected suggestion' };\n\tpartiallyAccepted: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How often the inline completion was partially accepted by the user' };\n\tpartiallyAcceptedCountSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How often the inline completion was partially accepted since the original request' };\n\tpartiallyAcceptedRatioSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The percentage of characters accepted since the original request' };\n\tpartiallyAcceptedCharactersSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The character count accepted since the original request' };\n\tpreceeded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was preceeded by another one' };\n\tlanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The language ID of the document where the inline completion was shown' };\n\trequestReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason for the inline completion request' };\n\ttypingInterval: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The average typing interval of the user at the moment the inline completion was requested' };\n\ttypingIntervalCharacterCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The character count involved in the typing interval calculation' };\n\trenameCreated: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether a rename operation was created' };\n\trenameDuration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration of the rename processor' };\n\trenameTimedOut: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the rename prepare operation timed out' };\n\tsuperseded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was superseded by another one' };\n\teditorType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of the editor where the inline completion was shown' };\n\tviewKind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The kind of the view where the inline completion was shown' };\n\tcursorColumnDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The distance in columns from the cursor to the inline suggestion' };\n\tcursorLineDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The distance in lines from the cursor to the inline suggestion' };\n\tlineCountOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of lines in the original text' };\n\tlineCountModified: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of lines in the modified text' };\n\tcharacterCountOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of characters in the original text' };\n\tcharacterCountModified: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of characters in the modified text' };\n\tdisjointReplacements: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of inner replacements made by the inline completion' };\n\tsameShapeReplacements: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether all inner replacements are the same shape' };\n\tnoSuggestionReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason why no inline completion was provided' };\n\tnotShownReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason why the inline completion was not shown' };\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 { DataChannelForwardingTelemetryService } from '../../../../platform/dataChannel/browser/forwardingTelemetryService.js';\n\nexport function sendInlineCompletionsEndOfLifeTelemetry(dataChannel: DataChannelForwardingTelemetryService, endOfLifeSummary: InlineCompletionEndOfLifeEvent) {\n\tdataChannel.publicLog2<InlineCompletionEndOfLifeEvent, InlineCompletionsEndOfLifeClassification>('inlineCompletion.endOfLife', endOfLifeSummary);\n}\n\nexport type InlineCompletionEndOfLifeEvent = {\n\t// request\n\topportunityId: string;\n\trequestReason: string;\n\teditorType: string;\n\tlanguageId: string;\n\ttypingInterval: number;\n\ttypingIntervalCharacterCount: number;\n\tselectedSuggestionInfo: boolean;\n\tavailableProviders: string;\n\t// response\n\tcorrelationId: string | undefined;\n\textensionId: string;\n\textensionVersion: string;\n\tgroupId: string | undefined;\n\t// behavior\n\tshown: boolean;\n\tshownDuration: number | undefined;\n\tshownDurationUncollapsed: number | undefined;\n\ttimeUntilShown: number | undefined;\n\ttimeUntilProviderRequest: number | undefined;\n\ttimeUntilProviderResponse: number | undefined;\n\treason: 'accepted' | 'rejected' | 'ignored' | undefined;\n\tpartiallyAccepted: number | undefined;\n\tpartiallyAcceptedCountSinceOriginal: number | undefined;\n\tpartiallyAcceptedRatioSinceOriginal: number | undefined;\n\tpartiallyAcceptedCharactersSinceOriginal: number | undefined;\n\tpreceeded: boolean | undefined;\n\tsuperseded: boolean | undefined;\n\tnotShownReason: string | undefined;\n\trenameCreated: boolean;\n\trenameDuration: number | undefined;\n\trenameTimedOut: boolean;\n\t// rendering\n\tviewKind: string | undefined;\n\tcursorColumnDistance: number | undefined;\n\tcursorLineDistance: number | undefined;\n\tlineCountOriginal: number | undefined;\n\tlineCountModified: number | undefined;\n\tcharacterCountOriginal: number | undefined;\n\tcharacterCountModified: number | undefined;\n\tdisjointReplacements: number | undefined;\n\tsameShapeReplacements: boolean | undefined;\n\t// empty\n\tnoSuggestionReason: string | undefined;\n};\n\ntype InlineCompletionsEndOfLifeClassification = {\n\towner: 'benibenj';\n\tcomment: 'Inline completions ended. @sentToGitHub';\n\topportunityId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Unique identifier for an opportunity to show an inline completion or NES' };\n\tcorrelationId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The correlation identifier for the inline completion' };\n\textensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The identifier for the extension that contributed the inline completion' };\n\textensionVersion: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The version of the extension that contributed the inline completion' };\n\tgroupId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The group ID of the extension that contributed the inline completion' };\n\tavailableProviders: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The list of available inline completion providers at the time of the request' };\n\tshown: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was shown to the user' };\n\tshownDuration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration for which the inline completion was shown' };\n\tshownDurationUncollapsed: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration for which the inline completion was shown without collapsing' };\n\ttimeUntilShown: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be shown after the request' };\n\ttimeUntilProviderRequest: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be requested from the provider' };\n\ttimeUntilProviderResponse: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be shown after the request' };\n\treason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason for the inline completion ending' };\n\tselectedSuggestionInfo: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was requested with a selected suggestion' };\n\tpartiallyAccepted: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How often the inline completion was partially accepted by the user' };\n\tpartiallyAcceptedCountSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How often the inline completion was partially accepted since the original request' };\n\tpartiallyAcceptedRatioSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The percentage of characters accepted since the original request' };\n\tpartiallyAcceptedCharactersSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The character count accepted since the original request' };\n\tpreceeded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was preceeded by another one' };\n\tlanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The language ID of the document where the inline completion was shown' };\n\trequestReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason for the inline completion request' };\n\ttypingInterval: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The average typing interval of the user at the moment the inline completion was requested' };\n\ttypingIntervalCharacterCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The character count involved in the typing interval calculation' };\n\trenameCreated: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether a rename operation was created' };\n\trenameDuration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration of the rename processor' };\n\trenameTimedOut: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the rename prepare operation timed out' };\n\tsuperseded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was superseded by another one' };\n\teditorType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of the editor where the inline completion was shown' };\n\tviewKind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The kind of the view where the inline completion was shown' };\n\tcursorColumnDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The distance in columns from the cursor to the inline suggestion' };\n\tcursorLineDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The distance in lines from the cursor to the inline suggestion' };\n\tlineCountOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of lines in the original text' };\n\tlineCountModified: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of lines in the modified text' };\n\tcharacterCountOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of characters in the original text' };\n\tcharacterCountModified: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of characters in the modified text' };\n\tdisjointReplacements: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of inner replacements made by the inline completion' };\n\tsameShapeReplacements: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether all inner replacements are the same shape' };\n\tnoSuggestionReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason why no inline completion was provided' };\n\tnotShownReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason why the inline completion was not shown' };\n};\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/telemetry.ts","vs/editor/contrib/inlineCompletions/browser/telemetry.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAIhG,MAAM,UAAU,uCAAuC,CAAC,WAAkD,EAAE,gBAAgD;IAC3J,WAAW,CAAC,UAAU,CAA2E,4BAA4B,EAAE,gBAAgB,CAAC,CAAC;AAClJ,CAAC","file":"telemetry.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 { DataChannelForwardingTelemetryService } from '../../../../platform/dataChannel/browser/forwardingTelemetryService.js';\n\nexport function sendInlineCompletionsEndOfLifeTelemetry(dataChannel: DataChannelForwardingTelemetryService, endOfLifeSummary: InlineCompletionEndOfLifeEvent) {\n\tdataChannel.publicLog2<InlineCompletionEndOfLifeEvent, InlineCompletionsEndOfLifeClassification>('inlineCompletion.endOfLife', endOfLifeSummary);\n}\n\nexport type InlineCompletionEndOfLifeEvent = {\n\t// request\n\topportunityId: string;\n\trequestReason: string;\n\teditorType: string;\n\tlanguageId: string;\n\ttypingInterval: number;\n\ttypingIntervalCharacterCount: number;\n\tselectedSuggestionInfo: boolean;\n\tavailableProviders: string;\n\tskuPlan: string | undefined;\n\tskuType: string | undefined;\n\t// response\n\tcorrelationId: string | undefined;\n\textensionId: string;\n\textensionVersion: string;\n\tgroupId: string | undefined;\n\t// behavior\n\tshown: boolean;\n\tshownDuration: number | undefined;\n\tshownDurationUncollapsed: number | undefined;\n\ttimeUntilShown: number | undefined;\n\ttimeUntilProviderRequest: number | undefined;\n\ttimeUntilProviderResponse: number | undefined;\n\treason: 'accepted' | 'rejected' | 'ignored' | undefined;\n\tacceptedAlternativeAction: boolean | undefined;\n\tpartiallyAccepted: number | undefined;\n\tpartiallyAcceptedCountSinceOriginal: number | undefined;\n\tpartiallyAcceptedRatioSinceOriginal: number | undefined;\n\tpartiallyAcceptedCharactersSinceOriginal: number | undefined;\n\tpreceeded: boolean | undefined;\n\tsuperseded: boolean | undefined;\n\tnotShownReason: string | undefined;\n\trenameCreated: boolean | undefined;\n\trenameDuration: number | undefined;\n\trenameTimedOut: boolean | undefined;\n\trenameDroppedOtherEdits: number | undefined;\n\trenameDroppedRenameEdits: number | undefined;\n\tperformanceMarkers: string | undefined;\n\t// rendering\n\tviewKind: string | undefined;\n\tcursorColumnDistance: number | undefined;\n\tcursorLineDistance: number | undefined;\n\tlineCountOriginal: number | undefined;\n\tlineCountModified: number | undefined;\n\tcharacterCountOriginal: number | undefined;\n\tcharacterCountModified: number | undefined;\n\tdisjointReplacements: number | undefined;\n\tsameShapeReplacements: boolean | undefined;\n\tlongDistanceHintVisible: boolean | undefined;\n\tlongDistanceHintDistance: number | undefined;\n\t// empty\n\tnoSuggestionReason: string | undefined;\n\t// shape\n\teditKind: string | undefined;\n};\n\ntype InlineCompletionsEndOfLifeClassification = {\n\towner: 'benibenj';\n\tcomment: 'Inline completions ended. @sentToGitHub';\n\topportunityId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Unique identifier for an opportunity to show an inline completion or NES' };\n\tcorrelationId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The correlation identifier for the inline completion' };\n\textensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The identifier for the extension that contributed the inline completion' };\n\textensionVersion: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The version of the extension that contributed the inline completion' };\n\tgroupId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The group ID of the extension that contributed the inline completion' };\n\tavailableProviders: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The list of available inline completion providers at the time of the request' };\n\tskuPlan: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The the plan the user is subscribed to' };\n\tskuType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The sku type of the user' };\n\tshown: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was shown to the user' };\n\tshownDuration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration for which the inline completion was shown' };\n\tshownDurationUncollapsed: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration for which the inline completion was shown without collapsing' };\n\ttimeUntilShown: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be shown after the request' };\n\ttimeUntilProviderRequest: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be requested from the provider' };\n\ttimeUntilProviderResponse: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be shown after the request' };\n\treason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason for the inline completion ending' };\n\tacceptedAlternativeAction: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the user performed an alternative action when accepting the inline completion' };\n\tselectedSuggestionInfo: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was requested with a selected suggestion' };\n\tpartiallyAccepted: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How often the inline completion was partially accepted by the user' };\n\tpartiallyAcceptedCountSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How often the inline completion was partially accepted since the original request' };\n\tpartiallyAcceptedRatioSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The percentage of characters accepted since the original request' };\n\tpartiallyAcceptedCharactersSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The character count accepted since the original request' };\n\tpreceeded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was preceeded by another one' };\n\tlanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The language ID of the document where the inline completion was shown' };\n\trequestReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason for the inline completion request' };\n\ttypingInterval: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The average typing interval of the user at the moment the inline completion was requested' };\n\ttypingIntervalCharacterCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The character count involved in the typing interval calculation' };\n\trenameCreated: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether a rename operation was created' };\n\trenameDuration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration of the rename processor' };\n\trenameTimedOut: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the rename prepare operation timed out' };\n\trenameDroppedOtherEdits: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of non-rename edits dropped due to rename processing' };\n\trenameDroppedRenameEdits: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of rename edits dropped due to rename processing' };\n\tsuperseded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was superseded by another one' };\n\teditorType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of the editor where the inline completion was shown' };\n\tviewKind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The kind of the view where the inline completion was shown' };\n\tcursorColumnDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The distance in columns from the cursor to the inline suggestion' };\n\tcursorLineDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The distance in lines from the cursor to the inline suggestion' };\n\tlineCountOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of lines in the original text' };\n\tlineCountModified: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of lines in the modified text' };\n\tcharacterCountOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of characters in the original text' };\n\tcharacterCountModified: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of characters in the modified text' };\n\tdisjointReplacements: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of inner replacements made by the inline completion' };\n\tsameShapeReplacements: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether all inner replacements are the same shape' };\n\tlongDistanceHintVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether a long distance hint was rendered' };\n\tlongDistanceHintDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The distance in lines between the long distance hint and the inline edit' };\n\tnoSuggestionReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason why no inline completion was provided' };\n\tnotShownReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason why the inline completion was not shown' };\n\tperformanceMarkers: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Performance markers for the inline completion lifecycle' };\n\teditKind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The kind of edit made by the inline completion' };\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 { DataChannelForwardingTelemetryService } from '../../../../platform/dataChannel/browser/forwardingTelemetryService.js';\n\nexport function sendInlineCompletionsEndOfLifeTelemetry(dataChannel: DataChannelForwardingTelemetryService, endOfLifeSummary: InlineCompletionEndOfLifeEvent) {\n\tdataChannel.publicLog2<InlineCompletionEndOfLifeEvent, InlineCompletionsEndOfLifeClassification>('inlineCompletion.endOfLife', endOfLifeSummary);\n}\n\nexport type InlineCompletionEndOfLifeEvent = {\n\t// request\n\topportunityId: string;\n\trequestReason: string;\n\teditorType: string;\n\tlanguageId: string;\n\ttypingInterval: number;\n\ttypingIntervalCharacterCount: number;\n\tselectedSuggestionInfo: boolean;\n\tavailableProviders: string;\n\tskuPlan: string | undefined;\n\tskuType: string | undefined;\n\t// response\n\tcorrelationId: string | undefined;\n\textensionId: string;\n\textensionVersion: string;\n\tgroupId: string | undefined;\n\t// behavior\n\tshown: boolean;\n\tshownDuration: number | undefined;\n\tshownDurationUncollapsed: number | undefined;\n\ttimeUntilShown: number | undefined;\n\ttimeUntilProviderRequest: number | undefined;\n\ttimeUntilProviderResponse: number | undefined;\n\treason: 'accepted' | 'rejected' | 'ignored' | undefined;\n\tacceptedAlternativeAction: boolean | undefined;\n\tpartiallyAccepted: number | undefined;\n\tpartiallyAcceptedCountSinceOriginal: number | undefined;\n\tpartiallyAcceptedRatioSinceOriginal: number | undefined;\n\tpartiallyAcceptedCharactersSinceOriginal: number | undefined;\n\tpreceeded: boolean | undefined;\n\tsuperseded: boolean | undefined;\n\tnotShownReason: string | undefined;\n\trenameCreated: boolean | undefined;\n\trenameDuration: number | undefined;\n\trenameTimedOut: boolean | undefined;\n\trenameDroppedOtherEdits: number | undefined;\n\trenameDroppedRenameEdits: number | undefined;\n\tperformanceMarkers: string | undefined;\n\t// rendering\n\tviewKind: string | undefined;\n\tcursorColumnDistance: number | undefined;\n\tcursorLineDistance: number | undefined;\n\tlineCountOriginal: number | undefined;\n\tlineCountModified: number | undefined;\n\tcharacterCountOriginal: number | undefined;\n\tcharacterCountModified: number | undefined;\n\tdisjointReplacements: number | undefined;\n\tsameShapeReplacements: boolean | undefined;\n\tlongDistanceHintVisible: boolean | undefined;\n\tlongDistanceHintDistance: number | undefined;\n\t// empty\n\tnoSuggestionReason: string | undefined;\n\t// shape\n\teditKind: string | undefined;\n};\n\ntype InlineCompletionsEndOfLifeClassification = {\n\towner: 'benibenj';\n\tcomment: 'Inline completions ended. @sentToGitHub';\n\topportunityId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Unique identifier for an opportunity to show an inline completion or NES' };\n\tcorrelationId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The correlation identifier for the inline completion' };\n\textensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The identifier for the extension that contributed the inline completion' };\n\textensionVersion: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The version of the extension that contributed the inline completion' };\n\tgroupId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The group ID of the extension that contributed the inline completion' };\n\tavailableProviders: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The list of available inline completion providers at the time of the request' };\n\tskuPlan: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The the plan the user is subscribed to' };\n\tskuType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The sku type of the user' };\n\tshown: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was shown to the user' };\n\tshownDuration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration for which the inline completion was shown' };\n\tshownDurationUncollapsed: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration for which the inline completion was shown without collapsing' };\n\ttimeUntilShown: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be shown after the request' };\n\ttimeUntilProviderRequest: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be requested from the provider' };\n\ttimeUntilProviderResponse: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The time it took for the inline completion to be shown after the request' };\n\treason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason for the inline completion ending' };\n\tacceptedAlternativeAction: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the user performed an alternative action when accepting the inline completion' };\n\tselectedSuggestionInfo: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was requested with a selected suggestion' };\n\tpartiallyAccepted: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How often the inline completion was partially accepted by the user' };\n\tpartiallyAcceptedCountSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How often the inline completion was partially accepted since the original request' };\n\tpartiallyAcceptedRatioSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The percentage of characters accepted since the original request' };\n\tpartiallyAcceptedCharactersSinceOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The character count accepted since the original request' };\n\tpreceeded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was preceeded by another one' };\n\tlanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The language ID of the document where the inline completion was shown' };\n\trequestReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason for the inline completion request' };\n\ttypingInterval: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The average typing interval of the user at the moment the inline completion was requested' };\n\ttypingIntervalCharacterCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The character count involved in the typing interval calculation' };\n\trenameCreated: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether a rename operation was created' };\n\trenameDuration: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The duration of the rename processor' };\n\trenameTimedOut: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the rename prepare operation timed out' };\n\trenameDroppedOtherEdits: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of non-rename edits dropped due to rename processing' };\n\trenameDroppedRenameEdits: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of rename edits dropped due to rename processing' };\n\tsuperseded: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the inline completion was superseded by another one' };\n\teditorType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The type of the editor where the inline completion was shown' };\n\tviewKind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The kind of the view where the inline completion was shown' };\n\tcursorColumnDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The distance in columns from the cursor to the inline suggestion' };\n\tcursorLineDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The distance in lines from the cursor to the inline suggestion' };\n\tlineCountOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of lines in the original text' };\n\tlineCountModified: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of lines in the modified text' };\n\tcharacterCountOriginal: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of characters in the original text' };\n\tcharacterCountModified: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of characters in the modified text' };\n\tdisjointReplacements: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The number of inner replacements made by the inline completion' };\n\tsameShapeReplacements: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether all inner replacements are the same shape' };\n\tlongDistanceHintVisible: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether a long distance hint was rendered' };\n\tlongDistanceHintDistance: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The distance in lines between the long distance hint and the inline edit' };\n\tnoSuggestionReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason why no inline completion was provided' };\n\tnotShownReason: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The reason why the inline completion was not shown' };\n\tperformanceMarkers: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Performance markers for the inline completion lifecycle' };\n\teditKind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The kind of edit made by the inline completion' };\n};\n"]}
@@ -77,4 +77,24 @@ export function wait(ms, cancellationToken) {
77
77
  }
78
78
  });
79
79
  }
80
+ export class ErrorResult {
81
+ static message(message) {
82
+ return new ErrorResult(undefined, message);
83
+ }
84
+ constructor(error, message = undefined) {
85
+ this.error = error;
86
+ this.message = message;
87
+ }
88
+ static is(obj) {
89
+ return obj instanceof ErrorResult;
90
+ }
91
+ logError() {
92
+ if (this.message) {
93
+ console.error(`ErrorResult: ${this.message}`, this.error);
94
+ }
95
+ else {
96
+ console.error(`ErrorResult: An unexpected error-case occurred, usually caused by invalid input.`, this.error);
97
+ }
98
+ }
99
+ }
80
100
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/inlineCompletions/browser/utils.ts","vs/editor/contrib/inlineCompletions/browser/utils.ts"],"names":[],"mappings":"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","file":"utils.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 { Permutation, compareBy } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';\nimport { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TextReplacement, TextEdit } from '../../../common/core/edits/textEdit.js';\nimport { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';\nimport { ITextModel } from '../../../common/model.js';\n\nconst array: ReadonlyArray<any> = [];\nexport function getReadonlyEmptyArray<T>(): readonly T[] {\n\treturn array;\n}\n\nexport function getEndPositionsAfterApplying(edits: readonly TextReplacement[]): Position[] {\n\tconst newRanges = getModifiedRangesAfterApplying(edits);\n\treturn newRanges.map(range => range.getEndPosition());\n}\n\nexport function getModifiedRangesAfterApplying(edits: readonly TextReplacement[]): Range[] {\n\tconst sortPerm = Permutation.createSortPermutation(edits, compareBy(e => e.range, Range.compareRangesUsingStarts));\n\tconst edit = new TextEdit(sortPerm.apply(edits));\n\tconst sortedNewRanges = edit.getNewRanges();\n\treturn sortPerm.inverse().apply(sortedNewRanges);\n}\n\nexport function removeTextReplacementCommonSuffixPrefix(edits: readonly TextReplacement[], textModel: ITextModel): TextReplacement[] {\n\tconst transformer = getPositionOffsetTransformerFromTextModel(textModel);\n\tconst text = textModel.getValue();\n\tconst stringReplacements = edits.map(edit => transformer.getStringReplacement(edit));\n\tconst minimalStringReplacements = stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text));\n\treturn minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement));\n}\n\nexport function convertItemsToStableObservables<T>(items: IObservable<readonly T[]>, store: DisposableStore): IObservable<IObservable<T>[]> {\n\tconst result = observableValue<IObservable<T>[]>('result', []);\n\tconst innerObservables: ISettableObservable<T>[] = [];\n\n\tstore.add(autorun(reader => {\n\t\tconst itemsValue = items.read(reader);\n\n\t\ttransaction(tx => {\n\t\t\tif (itemsValue.length !== innerObservables.length) {\n\t\t\t\tinnerObservables.length = itemsValue.length;\n\t\t\t\tfor (let i = 0; i < innerObservables.length; i++) {\n\t\t\t\t\tif (!innerObservables[i]) {\n\t\t\t\t\t\tinnerObservables[i] = observableValue<T>('item', itemsValue[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.set([...innerObservables], tx);\n\t\t\t}\n\t\t\tinnerObservables.forEach((o, i) => o.set(itemsValue[i], tx));\n\t\t});\n\t}));\n\n\treturn result;\n}\n\nexport class ObservableContextKeyService {\n\tconstructor(\n\t\tprivate readonly _contextKeyService: IContextKeyService,\n\t) {\n\t}\n\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T>): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, fn: (reader: IReader) => T): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T> | ((reader: IReader) => T)): IDisposable {\n\t\treturn bindContextKey(key, this._contextKeyService, obs instanceof Function ? obs : reader => obs.read(reader));\n\t}\n}\n\nexport function wait(ms: number, cancellationToken?: CancellationToken): Promise<void> {\n\treturn new Promise(resolve => {\n\t\tlet d: IDisposable | undefined = undefined;\n\t\tconst handle = setTimeout(() => {\n\t\t\tif (d) { d.dispose(); }\n\t\t\tresolve();\n\t\t}, ms);\n\t\tif (cancellationToken) {\n\t\t\td = cancellationToken.onCancellationRequested(() => {\n\t\t\t\tclearTimeout(handle);\n\t\t\t\tif (d) { d.dispose(); }\n\t\t\t\tresolve();\n\t\t\t});\n\t\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 { Permutation, compareBy } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';\nimport { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TextReplacement, TextEdit } from '../../../common/core/edits/textEdit.js';\nimport { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';\nimport { ITextModel } from '../../../common/model.js';\n\nconst array: ReadonlyArray<any> = [];\nexport function getReadonlyEmptyArray<T>(): readonly T[] {\n\treturn array;\n}\n\nexport function getEndPositionsAfterApplying(edits: readonly TextReplacement[]): Position[] {\n\tconst newRanges = getModifiedRangesAfterApplying(edits);\n\treturn newRanges.map(range => range.getEndPosition());\n}\n\nexport function getModifiedRangesAfterApplying(edits: readonly TextReplacement[]): Range[] {\n\tconst sortPerm = Permutation.createSortPermutation(edits, compareBy(e => e.range, Range.compareRangesUsingStarts));\n\tconst edit = new TextEdit(sortPerm.apply(edits));\n\tconst sortedNewRanges = edit.getNewRanges();\n\treturn sortPerm.inverse().apply(sortedNewRanges);\n}\n\nexport function removeTextReplacementCommonSuffixPrefix(edits: readonly TextReplacement[], textModel: ITextModel): TextReplacement[] {\n\tconst transformer = getPositionOffsetTransformerFromTextModel(textModel);\n\tconst text = textModel.getValue();\n\tconst stringReplacements = edits.map(edit => transformer.getStringReplacement(edit));\n\tconst minimalStringReplacements = stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text));\n\treturn minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement));\n}\n\nexport function convertItemsToStableObservables<T>(items: IObservable<readonly T[]>, store: DisposableStore): IObservable<IObservable<T>[]> {\n\tconst result = observableValue<IObservable<T>[]>('result', []);\n\tconst innerObservables: ISettableObservable<T>[] = [];\n\n\tstore.add(autorun(reader => {\n\t\tconst itemsValue = items.read(reader);\n\n\t\ttransaction(tx => {\n\t\t\tif (itemsValue.length !== innerObservables.length) {\n\t\t\t\tinnerObservables.length = itemsValue.length;\n\t\t\t\tfor (let i = 0; i < innerObservables.length; i++) {\n\t\t\t\t\tif (!innerObservables[i]) {\n\t\t\t\t\t\tinnerObservables[i] = observableValue<T>('item', itemsValue[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.set([...innerObservables], tx);\n\t\t\t}\n\t\t\tinnerObservables.forEach((o, i) => o.set(itemsValue[i], tx));\n\t\t});\n\t}));\n\n\treturn result;\n}\n\nexport class ObservableContextKeyService {\n\tconstructor(\n\t\tprivate readonly _contextKeyService: IContextKeyService,\n\t) {\n\t}\n\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T>): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, fn: (reader: IReader) => T): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T> | ((reader: IReader) => T)): IDisposable {\n\t\treturn bindContextKey(key, this._contextKeyService, obs instanceof Function ? obs : reader => obs.read(reader));\n\t}\n}\n\nexport function wait(ms: number, cancellationToken?: CancellationToken): Promise<void> {\n\treturn new Promise(resolve => {\n\t\tlet d: IDisposable | undefined = undefined;\n\t\tconst handle = setTimeout(() => {\n\t\t\tif (d) { d.dispose(); }\n\t\t\tresolve();\n\t\t}, ms);\n\t\tif (cancellationToken) {\n\t\t\td = cancellationToken.onCancellationRequested(() => {\n\t\t\t\tclearTimeout(handle);\n\t\t\t\tif (d) { d.dispose(); }\n\t\t\t\tresolve();\n\t\t\t});\n\t\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/utils.ts","vs/editor/contrib/inlineCompletions/browser/utils.ts"],"names":[],"mappings":"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","file":"utils.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 { Permutation, compareBy } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';\nimport { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TextReplacement, TextEdit } from '../../../common/core/edits/textEdit.js';\nimport { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';\nimport { ITextModel } from '../../../common/model.js';\n\nconst array: ReadonlyArray<any> = [];\nexport function getReadonlyEmptyArray<T>(): readonly T[] {\n\treturn array;\n}\n\nexport function getEndPositionsAfterApplying(edits: readonly TextReplacement[]): Position[] {\n\tconst newRanges = getModifiedRangesAfterApplying(edits);\n\treturn newRanges.map(range => range.getEndPosition());\n}\n\nexport function getModifiedRangesAfterApplying(edits: readonly TextReplacement[]): Range[] {\n\tconst sortPerm = Permutation.createSortPermutation(edits, compareBy(e => e.range, Range.compareRangesUsingStarts));\n\tconst edit = new TextEdit(sortPerm.apply(edits));\n\tconst sortedNewRanges = edit.getNewRanges();\n\treturn sortPerm.inverse().apply(sortedNewRanges);\n}\n\nexport function removeTextReplacementCommonSuffixPrefix(edits: readonly TextReplacement[], textModel: ITextModel): TextReplacement[] {\n\tconst transformer = getPositionOffsetTransformerFromTextModel(textModel);\n\tconst text = textModel.getValue();\n\tconst stringReplacements = edits.map(edit => transformer.getStringReplacement(edit));\n\tconst minimalStringReplacements = stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text));\n\treturn minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement));\n}\n\nexport function convertItemsToStableObservables<T>(items: IObservable<readonly T[]>, store: DisposableStore): IObservable<IObservable<T>[]> {\n\tconst result = observableValue<IObservable<T>[]>('result', []);\n\tconst innerObservables: ISettableObservable<T>[] = [];\n\n\tstore.add(autorun(reader => {\n\t\tconst itemsValue = items.read(reader);\n\n\t\ttransaction(tx => {\n\t\t\tif (itemsValue.length !== innerObservables.length) {\n\t\t\t\tinnerObservables.length = itemsValue.length;\n\t\t\t\tfor (let i = 0; i < innerObservables.length; i++) {\n\t\t\t\t\tif (!innerObservables[i]) {\n\t\t\t\t\t\tinnerObservables[i] = observableValue<T>('item', itemsValue[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.set([...innerObservables], tx);\n\t\t\t}\n\t\t\tinnerObservables.forEach((o, i) => o.set(itemsValue[i], tx));\n\t\t});\n\t}));\n\n\treturn result;\n}\n\nexport class ObservableContextKeyService {\n\tconstructor(\n\t\tprivate readonly _contextKeyService: IContextKeyService,\n\t) {\n\t}\n\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T>): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, fn: (reader: IReader) => T): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T> | ((reader: IReader) => T)): IDisposable {\n\t\treturn bindContextKey(key, this._contextKeyService, obs instanceof Function ? obs : reader => obs.read(reader));\n\t}\n}\n\nexport function wait(ms: number, cancellationToken?: CancellationToken): Promise<void> {\n\treturn new Promise(resolve => {\n\t\tlet d: IDisposable | undefined = undefined;\n\t\tconst handle = setTimeout(() => {\n\t\t\tif (d) { d.dispose(); }\n\t\t\tresolve();\n\t\t}, ms);\n\t\tif (cancellationToken) {\n\t\t\td = cancellationToken.onCancellationRequested(() => {\n\t\t\t\tclearTimeout(handle);\n\t\t\t\tif (d) { d.dispose(); }\n\t\t\t\tresolve();\n\t\t\t});\n\t\t}\n\t});\n}\n\nexport class ErrorResult<T = void> {\n\tpublic static message(message: string): ErrorResult {\n\t\treturn new ErrorResult(undefined, message);\n\t}\n\n\tconstructor(public readonly error: T, public readonly message: string | undefined = undefined) { }\n\n\tpublic static is<TOther>(obj: TOther | ErrorResult): obj is ErrorResult {\n\t\treturn obj instanceof ErrorResult;\n\t}\n\n\tpublic logError(): void {\n\t\tif (this.message) {\n\t\t\tconsole.error(`ErrorResult: ${this.message}`, this.error);\n\t\t} else {\n\t\t\tconsole.error(`ErrorResult: An unexpected error-case occurred, usually caused by invalid input.`, this.error);\n\t\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 { Permutation, compareBy } from '../../../../base/common/arrays.js';\nimport { CancellationToken } from '../../../../base/common/cancellation.js';\nimport { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';\nimport { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';\nimport { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';\nimport { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { TextReplacement, TextEdit } from '../../../common/core/edits/textEdit.js';\nimport { getPositionOffsetTransformerFromTextModel } from '../../../common/core/text/getPositionOffsetTransformerFromTextModel.js';\nimport { ITextModel } from '../../../common/model.js';\n\nconst array: ReadonlyArray<any> = [];\nexport function getReadonlyEmptyArray<T>(): readonly T[] {\n\treturn array;\n}\n\nexport function getEndPositionsAfterApplying(edits: readonly TextReplacement[]): Position[] {\n\tconst newRanges = getModifiedRangesAfterApplying(edits);\n\treturn newRanges.map(range => range.getEndPosition());\n}\n\nexport function getModifiedRangesAfterApplying(edits: readonly TextReplacement[]): Range[] {\n\tconst sortPerm = Permutation.createSortPermutation(edits, compareBy(e => e.range, Range.compareRangesUsingStarts));\n\tconst edit = new TextEdit(sortPerm.apply(edits));\n\tconst sortedNewRanges = edit.getNewRanges();\n\treturn sortPerm.inverse().apply(sortedNewRanges);\n}\n\nexport function removeTextReplacementCommonSuffixPrefix(edits: readonly TextReplacement[], textModel: ITextModel): TextReplacement[] {\n\tconst transformer = getPositionOffsetTransformerFromTextModel(textModel);\n\tconst text = textModel.getValue();\n\tconst stringReplacements = edits.map(edit => transformer.getStringReplacement(edit));\n\tconst minimalStringReplacements = stringReplacements.map(replacement => replacement.removeCommonSuffixPrefix(text));\n\treturn minimalStringReplacements.map(replacement => transformer.getTextReplacement(replacement));\n}\n\nexport function convertItemsToStableObservables<T>(items: IObservable<readonly T[]>, store: DisposableStore): IObservable<IObservable<T>[]> {\n\tconst result = observableValue<IObservable<T>[]>('result', []);\n\tconst innerObservables: ISettableObservable<T>[] = [];\n\n\tstore.add(autorun(reader => {\n\t\tconst itemsValue = items.read(reader);\n\n\t\ttransaction(tx => {\n\t\t\tif (itemsValue.length !== innerObservables.length) {\n\t\t\t\tinnerObservables.length = itemsValue.length;\n\t\t\t\tfor (let i = 0; i < innerObservables.length; i++) {\n\t\t\t\t\tif (!innerObservables[i]) {\n\t\t\t\t\t\tinnerObservables[i] = observableValue<T>('item', itemsValue[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult.set([...innerObservables], tx);\n\t\t\t}\n\t\t\tinnerObservables.forEach((o, i) => o.set(itemsValue[i], tx));\n\t\t});\n\t}));\n\n\treturn result;\n}\n\nexport class ObservableContextKeyService {\n\tconstructor(\n\t\tprivate readonly _contextKeyService: IContextKeyService,\n\t) {\n\t}\n\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T>): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, fn: (reader: IReader) => T): IDisposable;\n\tbind<T extends ContextKeyValue>(key: RawContextKey<T>, obs: IObservable<T> | ((reader: IReader) => T)): IDisposable {\n\t\treturn bindContextKey(key, this._contextKeyService, obs instanceof Function ? obs : reader => obs.read(reader));\n\t}\n}\n\nexport function wait(ms: number, cancellationToken?: CancellationToken): Promise<void> {\n\treturn new Promise(resolve => {\n\t\tlet d: IDisposable | undefined = undefined;\n\t\tconst handle = setTimeout(() => {\n\t\t\tif (d) { d.dispose(); }\n\t\t\tresolve();\n\t\t}, ms);\n\t\tif (cancellationToken) {\n\t\t\td = cancellationToken.onCancellationRequested(() => {\n\t\t\t\tclearTimeout(handle);\n\t\t\t\tif (d) { d.dispose(); }\n\t\t\t\tresolve();\n\t\t\t});\n\t\t}\n\t});\n}\n\nexport class ErrorResult<T = void> {\n\tpublic static message(message: string): ErrorResult {\n\t\treturn new ErrorResult(undefined, message);\n\t}\n\n\tconstructor(public readonly error: T, public readonly message: string | undefined = undefined) { }\n\n\tpublic static is<TOther>(obj: TOther | ErrorResult): obj is ErrorResult {\n\t\treturn obj instanceof ErrorResult;\n\t}\n\n\tpublic logError(): void {\n\t\tif (this.message) {\n\t\t\tconsole.error(`ErrorResult: ${this.message}`, this.error);\n\t\t} else {\n\t\t\tconsole.error(`ErrorResult: An unexpected error-case occurred, usually caused by invalid input.`, this.error);\n\t\t}\n\t}\n}\n"]}
@@ -16,7 +16,7 @@ import { renderIcon } from '../../../../../../base/browser/ui/iconLabel/iconLabe
16
16
  import { Codicon } from '../../../../../../base/common/codicons.js';
17
17
  import { Emitter, Event } from '../../../../../../base/common/event.js';
18
18
  import { Disposable, DisposableStore, MutableDisposable, toDisposable } from '../../../../../../base/common/lifecycle.js';
19
- import { autorun, autorunWithStore, constObservable, derived, observableSignalFromEvent, observableValue } from '../../../../../../base/common/observable.js';
19
+ import { autorun, autorunWithStore, constObservable, derived, derivedOpts, observableSignalFromEvent, observableValue } from '../../../../../../base/common/observable.js';
20
20
  import * as strings from '../../../../../../base/common/strings.js';
21
21
  import { applyFontInfo } from '../../../../../browser/config/domFontInfo.js';
22
22
  import { observableCodeEditor } from '../../../../../browser/observableCodeEditor.js';
@@ -38,7 +38,9 @@ import './ghostTextView.css';
38
38
  import { StandardMouseEvent } from '../../../../../../base/browser/mouseEvent.js';
39
39
  import { CodeEditorWidget } from '../../../../../browser/widget/codeEditor/codeEditorWidget.js';
40
40
  import { TokenWithTextArray } from '../../../../../common/tokens/tokenWithTextArray.js';
41
- import { sum } from '../../../../../../base/common/arrays.js';
41
+ import { InlineCompletionViewData } from '../inlineEdits/inlineEditsViewInterface.js';
42
+ import { equals, sum } from '../../../../../../base/common/arrays.js';
43
+ import { equalsIfDefinedC, thisEqualsC } from '../../../../../../base/common/equals.js';
42
44
  export class GhostTextWidgetWarning {
43
45
  static from(warning) {
44
46
  if (!warning) {
@@ -110,24 +112,12 @@ let GhostTextView = class GhostTextView extends Disposable {
110
112
  const existingContent = t.slice(additionalLinesOriginalSuffix.columnRange.toZeroBasedOffsetRange());
111
113
  content = TokenWithTextArray.fromLineTokens(content).append(existingContent).toLineTokens(content.languageIdCodec);
112
114
  }
113
- return {
114
- content,
115
- decorations: l.decorations,
116
- };
115
+ return new LineData(content, l.decorations);
117
116
  });
118
117
  const cursorColumn = this._editor.getSelection()?.getStartPosition().column;
119
118
  const disjointInlineTexts = inlineTextsWithTokens.filter(inline => inline.text !== '');
120
119
  const hasInsertionOnCurrentLine = disjointInlineTexts.length !== 0;
121
- const telemetryViewData = {
122
- cursorColumnDistance: (hasInsertionOnCurrentLine ? disjointInlineTexts[0].column : 1) - cursorColumn,
123
- cursorLineDistance: hasInsertionOnCurrentLine ? 0 : (additionalLines.findIndex(line => line.content !== '') + 1),
124
- lineCountOriginal: hasInsertionOnCurrentLine ? 1 : 0,
125
- lineCountModified: additionalLines.length + (hasInsertionOnCurrentLine ? 1 : 0),
126
- characterCountOriginal: 0,
127
- characterCountModified: sum(disjointInlineTexts.map(inline => inline.text.length)) + sum(tokenizedAdditionalLines.map(line => line.content.getTextLength())),
128
- disjointReplacements: disjointInlineTexts.length + (additionalLines.length > 0 ? 1 : 0),
129
- sameShapeReplacements: disjointInlineTexts.length > 1 && tokenizedAdditionalLines.length === 0 ? disjointInlineTexts.every(inline => inline.text === disjointInlineTexts[0].text) : undefined,
130
- };
120
+ const telemetryViewData = new InlineCompletionViewData((hasInsertionOnCurrentLine ? disjointInlineTexts[0].column : 1) - cursorColumn, hasInsertionOnCurrentLine ? 0 : (additionalLines.findIndex(line => line.content !== '') + 1), hasInsertionOnCurrentLine ? 1 : 0, additionalLines.length + (hasInsertionOnCurrentLine ? 1 : 0), 0, sum(disjointInlineTexts.map(inline => inline.text.length)) + sum(tokenizedAdditionalLines.map(line => line.content.getTextLength())), disjointInlineTexts.length + (additionalLines.length > 0 ? 1 : 0), disjointInlineTexts.length > 1 && tokenizedAdditionalLines.length === 0 ? disjointInlineTexts.every(inline => inline.text === disjointInlineTexts[0].text) : undefined);
131
121
  return {
132
122
  replacedRange,
133
123
  inlineTexts: inlineTextsWithTokens,
@@ -197,14 +187,10 @@ let GhostTextView = class GhostTextView extends Disposable {
197
187
  this._minReservedLineCount = options.minReservedLineCount ?? constObservable(0);
198
188
  this._useSyntaxHighlighting = options.useSyntaxHighlighting ?? constObservable(true);
199
189
  this._editorObs = observableCodeEditor(this._editor);
200
- this._additionalLinesWidget = this._register(new AdditionalLinesWidget(this._editor, derived(reader => {
190
+ this._additionalLinesWidget = this._register(new AdditionalLinesWidget(this._editor, derivedOpts({ owner: this, equalsFn: equalsIfDefinedC(thisEqualsC()) }, reader => {
201
191
  /** @description lines */
202
192
  const uiState = this._state.read(reader);
203
- return uiState ? {
204
- lineNumber: uiState.lineNumber,
205
- additionalLines: uiState.additionalLines,
206
- minReservedLineCount: uiState.additionalReservedLineCount,
207
- } : undefined;
193
+ return uiState ? new AdditionalLinesData(uiState.lineNumber, uiState.additionalLines, uiState.additionalReservedLineCount) : undefined;
208
194
  }), this._shouldKeepCursorStable, this._isClickable));
209
195
  this._isInlineTextHovered = this._editorObs.isTargetHovered(p => p.target.type === 6 /* MouseTargetType.CONTENT_TEXT */ &&
210
196
  p.target.detail.injectedText?.options.attachedData instanceof GhostTextAttachedData &&
@@ -345,6 +331,22 @@ function computeGhostTextViewData(ghostText, textModel, ghostTextClassName) {
345
331
  additionalLinesOriginalSuffix,
346
332
  };
347
333
  }
334
+ class AdditionalLinesData {
335
+ constructor(lineNumber, additionalLines, minReservedLineCount) {
336
+ this.lineNumber = lineNumber;
337
+ this.additionalLines = additionalLines;
338
+ this.minReservedLineCount = minReservedLineCount;
339
+ }
340
+ equals(other) {
341
+ if (this.lineNumber !== other.lineNumber) {
342
+ return false;
343
+ }
344
+ if (this.minReservedLineCount !== other.minReservedLineCount) {
345
+ return false;
346
+ }
347
+ return equals(this.additionalLines, other.additionalLines, thisEqualsC());
348
+ }
349
+ }
348
350
  export class AdditionalLinesWidget extends Disposable {
349
351
  get viewZoneId() { return this._viewZoneInfo?.viewZoneId; }
350
352
  get viewZoneHeight() { return this._viewZoneHeight; }
@@ -399,26 +401,28 @@ export class AdditionalLinesWidget extends Disposable {
399
401
  return;
400
402
  }
401
403
  const { tabSize } = textModel.getOptions();
402
- this._editor.changeViewZones((changeAccessor) => {
403
- const store = new DisposableStore();
404
- this.removeActiveViewZone(changeAccessor);
405
- const heightInLines = Math.max(additionalLines.length, minReservedLineCount);
406
- if (heightInLines > 0) {
407
- const domNode = document.createElement('div');
408
- renderLines(domNode, tabSize, additionalLines, this._editor.getOptions(), this._isClickable);
409
- if (this._isClickable) {
410
- store.add(addDisposableListener(domNode, 'mousedown', (e) => {
411
- e.preventDefault(); // This prevents that the editor loses focus
412
- }));
413
- store.add(addDisposableListener(domNode, 'click', (e) => {
414
- if (isTargetGhostText(e.target)) {
415
- this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e));
416
- }
417
- }));
404
+ observableCodeEditor(this._editor).transaction(_ => {
405
+ this._editor.changeViewZones((changeAccessor) => {
406
+ const store = new DisposableStore();
407
+ this.removeActiveViewZone(changeAccessor);
408
+ const heightInLines = Math.max(additionalLines.length, minReservedLineCount);
409
+ if (heightInLines > 0) {
410
+ const domNode = document.createElement('div');
411
+ renderLines(domNode, tabSize, additionalLines, this._editor.getOptions(), this._isClickable);
412
+ if (this._isClickable) {
413
+ store.add(addDisposableListener(domNode, 'mousedown', (e) => {
414
+ e.preventDefault(); // This prevents that the editor loses focus
415
+ }));
416
+ store.add(addDisposableListener(domNode, 'click', (e) => {
417
+ if (isTargetGhostText(e.target)) {
418
+ this._onDidClick.fire(new StandardMouseEvent(getWindow(e), e));
419
+ }
420
+ }));
421
+ }
422
+ this.addViewZone(changeAccessor, lineNumber, heightInLines, domNode);
418
423
  }
419
- this.addViewZone(changeAccessor, lineNumber, heightInLines, domNode);
420
- }
421
- this._viewZoneListener.value = store;
424
+ this._viewZoneListener.value = store;
425
+ });
422
426
  });
423
427
  }
424
428
  addViewZone(changeAccessor, afterLineNumber, heightInLines, domNode) {
@@ -457,6 +461,19 @@ export class AdditionalLinesWidget extends Disposable {
457
461
  function isTargetGhostText(target) {
458
462
  return isHTMLElement(target) && target.classList.contains(GHOST_TEXT_CLASS_NAME);
459
463
  }
464
+ export class LineData {
465
+ constructor(content, // Must not contain a linebreak!
466
+ decorations) {
467
+ this.content = content;
468
+ this.decorations = decorations;
469
+ }
470
+ equals(other) {
471
+ if (!this.content.equals(other.content)) {
472
+ return false;
473
+ }
474
+ return LineDecoration.equalsArr(this.decorations, other.decorations);
475
+ }
476
+ }
460
477
  function renderLines(domNode, tabSize, lines, opts, isClickable) {
461
478
  const disableMonospaceOptimizations = opts.get(40 /* EditorOption.disableMonospaceOptimizations */);
462
479
  const stopRenderingLineAfter = opts.get(133 /* EditorOption.stopRenderingLineAfter */);
@@ -482,7 +499,7 @@ function renderLines(domNode, tabSize, lines, opts, isClickable) {
482
499
  const line = lineTokens.getLineContent();
483
500
  const isBasicASCII = strings.isBasicASCII(line);
484
501
  const containsRTL = strings.containsRTL(line);
485
- renderViewLine(new RenderLineInput((fontInfo.isMonospace && !disableMonospaceOptimizations), fontInfo.canUseHalfwidthRightwardsArrow, line, false, isBasicASCII, containsRTL, 0, lineTokens, lineData.decorations, tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures !== EditorFontLigatures.OFF, null, null, 0), sb);
502
+ renderViewLine(new RenderLineInput((fontInfo.isMonospace && !disableMonospaceOptimizations), fontInfo.canUseHalfwidthRightwardsArrow, line, false, isBasicASCII, containsRTL, 0, lineTokens, lineData.decorations.slice(), tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, stopRenderingLineAfter, renderWhitespace, renderControlCharacters, fontLigatures !== EditorFontLigatures.OFF, null, null, 0), sb);
486
503
  sb.appendString('</div>');
487
504
  }
488
505
  sb.appendString('</div>');