monaco-editor-core 0.55.1 → 0.56.0-dev-20251121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) 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 +27 -8
  18. package/esm/vs/base/browser/dom.js +31 -34
  19. package/esm/vs/base/browser/dom.js.map +1 -1
  20. package/esm/vs/base/browser/dompurify/dompurify.js +0 -1
  21. package/esm/vs/base/browser/keyboardEvent.js +3 -3
  22. package/esm/vs/base/browser/keyboardEvent.js.map +1 -1
  23. package/esm/vs/base/browser/markdownRenderer.js +5 -2
  24. package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
  25. package/esm/vs/base/browser/pixelRatio.js +5 -5
  26. package/esm/vs/base/browser/pixelRatio.js.map +1 -1
  27. package/esm/vs/base/browser/trustedTypes.js +1 -1
  28. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  29. package/esm/vs/base/browser/ui/actionbar/actionbar.js +3 -0
  30. package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
  31. package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  32. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +7 -0
  33. package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
  34. package/esm/vs/base/browser/ui/hover/hoverWidget.css +0 -13
  35. package/esm/vs/base/browser/ui/inputbox/inputBox.js +7 -0
  36. package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
  37. package/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +4 -2
  38. package/esm/vs/base/browser/ui/list/listView.js +7 -2
  39. package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
  40. package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
  41. package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
  42. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
  43. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
  44. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
  45. package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
  46. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  47. package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
  48. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  49. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
  50. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  51. package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
  52. package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
  53. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  54. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  55. package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
  56. package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
  57. package/esm/vs/base/common/arrays.js +10 -0
  58. package/esm/vs/base/common/arrays.js.map +1 -1
  59. package/esm/vs/base/common/async.js +34 -0
  60. package/esm/vs/base/common/async.js.map +1 -1
  61. package/esm/vs/base/common/buffer.js +1 -1
  62. package/esm/vs/base/common/buffer.js.map +1 -1
  63. package/esm/vs/base/common/cancellation.js.map +1 -1
  64. package/esm/vs/base/common/codiconsLibrary.js +3 -0
  65. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  66. package/esm/vs/base/common/collections.js.map +1 -1
  67. package/esm/vs/base/common/equals.js.map +1 -1
  68. package/esm/vs/base/common/event.js +32 -15
  69. package/esm/vs/base/common/event.js.map +1 -1
  70. package/esm/vs/base/common/filters.js +22 -3
  71. package/esm/vs/base/common/filters.js.map +1 -1
  72. package/esm/vs/base/common/hotReload.js +2 -2
  73. package/esm/vs/base/common/hotReload.js.map +1 -1
  74. package/esm/vs/base/common/iterator.js +1 -1
  75. package/esm/vs/base/common/iterator.js.map +1 -1
  76. package/esm/vs/base/common/keyCodes.js +7 -6
  77. package/esm/vs/base/common/keyCodes.js.map +1 -1
  78. package/esm/vs/base/common/linkedList.js.map +1 -1
  79. package/esm/vs/base/common/map.js.map +1 -1
  80. package/esm/vs/base/common/marked/marked.js +0 -1
  81. package/esm/vs/base/common/network.js +26 -1
  82. package/esm/vs/base/common/network.js.map +1 -1
  83. package/esm/vs/base/common/normalization.js +19 -6
  84. package/esm/vs/base/common/normalization.js.map +1 -1
  85. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
  86. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  87. package/esm/vs/base/common/observableInternal/debugName.js +0 -1
  88. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  89. package/esm/vs/base/common/observableInternal/index.js +4 -4
  90. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  91. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
  92. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
  93. package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
  94. package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
  95. package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
  96. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  97. package/esm/vs/base/common/path.js +1 -0
  98. package/esm/vs/base/common/path.js.map +1 -1
  99. package/esm/vs/base/common/strings.js +27 -19
  100. package/esm/vs/base/common/strings.js.map +1 -1
  101. package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
  102. package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
  103. package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
  104. package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
  105. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  106. package/esm/vs/editor/browser/config/tabFocus.js +4 -2
  107. package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
  108. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
  109. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  110. package/esm/vs/editor/browser/coreCommands.js +1 -2
  111. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  112. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  113. package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
  114. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  115. package/esm/vs/editor/browser/services/contribution.js +9 -0
  116. package/esm/vs/editor/browser/services/contribution.js.map +1 -0
  117. package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
  118. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  119. package/esm/vs/editor/browser/services/openerService.js +5 -1
  120. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  121. package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
  122. package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
  123. package/esm/vs/editor/browser/view/renderingContext.js +1 -1
  124. package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
  125. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
  126. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
  127. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
  128. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
  129. package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
  130. package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
  131. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
  132. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
  133. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
  134. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
  135. package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
  136. package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
  137. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
  138. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
  139. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
  140. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
  141. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
  142. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
  143. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
  144. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
  145. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
  146. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  147. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
  148. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
  149. package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
  150. package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
  151. package/esm/vs/editor/common/config/editorOptions.js +374 -360
  152. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  153. package/esm/vs/editor/common/core/2d/rect.js +7 -0
  154. package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
  155. package/esm/vs/editor/common/core/2d/size.js +20 -0
  156. package/esm/vs/editor/common/core/2d/size.js.map +1 -0
  157. package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
  158. package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
  159. package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
  160. package/esm/vs/editor/common/core/ranges/offsetRange.js.map +1 -1
  161. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  162. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  163. package/esm/vs/editor/common/editorContextKeys.js +47 -47
  164. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  165. package/esm/vs/editor/common/languages.js +56 -56
  166. package/esm/vs/editor/common/languages.js.map +1 -1
  167. package/esm/vs/editor/common/model/editStack.js +1 -1
  168. package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
  169. package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
  170. package/esm/vs/editor/common/standaloneStrings.js +11 -10
  171. package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
  172. package/esm/vs/editor/common/textModelEditSource.js +1 -1
  173. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  174. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  175. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  176. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  177. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  178. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  179. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  180. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  181. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  182. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  183. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  184. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  185. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  186. package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
  187. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  188. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  189. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  190. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  191. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  192. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  193. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  194. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  195. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  196. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
  197. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
  198. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  199. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  200. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  201. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  202. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  203. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  204. package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
  205. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  206. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  207. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  208. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  209. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  210. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  211. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  212. package/esm/vs/editor/contrib/format/browser/format.js +21 -6
  213. package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
  214. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  215. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  216. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  217. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  218. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  219. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  220. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  221. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  222. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  223. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  224. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  225. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
  226. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
  227. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
  228. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
  229. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  230. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  231. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  232. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
  233. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
  234. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  235. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  236. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  237. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  238. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  239. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
  240. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  241. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
  242. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  243. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  244. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  245. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +42 -37
  246. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  247. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
  248. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
  249. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
  250. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  251. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
  252. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  253. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +12 -12
  254. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  255. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +74 -48
  256. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  257. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
  258. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  259. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
  260. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
  261. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
  262. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  263. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  264. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
  265. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  266. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
  267. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
  268. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
  269. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  270. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +415 -0
  271. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
  272. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +253 -0
  273. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
  274. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  275. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
  276. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
  277. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
  278. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
  279. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
  280. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  281. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
  282. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
  283. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  284. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  285. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -31
  286. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  287. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  288. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  289. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  290. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  291. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  292. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  293. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  294. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  295. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +2 -2
  296. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
  297. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
  298. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  299. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  300. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  301. package/esm/vs/editor/contrib/rename/browser/rename.js +12 -12
  302. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  303. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  304. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  305. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  306. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  307. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  308. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
  309. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  310. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  311. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  312. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  313. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  314. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  315. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  316. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  317. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  318. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  319. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  320. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -29
  321. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  322. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  323. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  324. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +4 -4
  325. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
  326. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  327. package/esm/vs/editor/editor.all.js +1 -0
  328. package/esm/vs/editor/editor.all.js.map +1 -1
  329. package/esm/vs/editor/editor.api.d.ts +9 -5
  330. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
  331. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
  332. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
  333. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
  334. package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
  335. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  336. package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
  337. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  338. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
  339. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  340. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  341. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  342. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  343. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  344. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
  345. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
  346. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  347. package/esm/vs/platform/actions/common/actions.js +2 -0
  348. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  349. package/esm/vs/platform/actions/common/menuService.js +2 -2
  350. package/esm/vs/platform/configuration/common/configuration.js +5 -4
  351. package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
  352. package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
  353. package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
  354. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  355. package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
  356. package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
  357. package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
  358. package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
  359. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  360. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  361. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  362. package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
  363. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  364. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  365. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  366. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  367. package/esm/vs/platform/list/browser/listService.js +27 -27
  368. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  369. package/esm/vs/platform/markers/common/markerService.js +2 -2
  370. package/esm/vs/platform/markers/common/markers.js +6 -6
  371. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +11 -32
  372. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  373. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  374. package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
  375. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  376. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  377. package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
  378. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  379. package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
  380. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  381. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  382. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  383. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +71 -40
  384. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  385. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
  386. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  387. package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
  388. package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
  389. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  390. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  391. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  392. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  393. package/esm/vs/platform/theme/common/colors/editorColors.js.map +1 -1
  394. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  395. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  396. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  397. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  398. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  399. package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
  400. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  401. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  402. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  403. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  404. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
  405. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
  406. package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
  407. package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
  408. package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
  409. package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
  410. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  411. package/monaco.d.ts +9 -5
  412. package/package.json +2 -2
  413. package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
  414. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
  415. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/services/languagesAssociations.ts","vs/editor/common/services/languagesAssociations.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAiB,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CA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,CAAC;oBACxD,cAAc,GAAG,WAAW,CAAC;gBAC9B,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;IAED,mDAAmD;IACnD,IAAI,aAAa,EAAE,CAAC;QACnB,OAAO,aAAa,CAAC;IACtB,CAAC;IAED,uBAAuB;IACvB,IAAI,YAAY,EAAE,CAAC;QAClB,OAAO,YAAY,CAAC;IACrB,CAAC;IAED,oCAAoC;IACpC,IAAI,cAAc,EAAE,CAAC;QACpB,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,SAAS,yBAAyB,CAAC,SAAiB;IACnD,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE,CAAC;QAClC,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAE1B,wGAAwG;QACxG,gGAAgG;QAChG,KAAK,IAAI,CAAC,GAAG,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7D,MAAM,WAAW,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;gBAC5B,SAAS;YACV,CAAC;YAED,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YACvD,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACnC,OAAO,WAAW,CAAC;YACpB,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC","file":"languagesAssociations.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 { ParsedPattern, parse } from '../../../base/common/glob.js';\nimport { Mimes } from '../../../base/common/mime.js';\nimport { Schemas } from '../../../base/common/network.js';\nimport { basename, posix } from '../../../base/common/path.js';\nimport { DataUri } from '../../../base/common/resources.js';\nimport { startsWithUTF8BOM } from '../../../base/common/strings.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../languages/modesRegistry.js';\n\nexport interface ILanguageAssociation {\n\treadonly id: string;\n\treadonly mime: string;\n\treadonly filename?: string;\n\treadonly extension?: string;\n\treadonly filepattern?: string;\n\treadonly firstline?: RegExp;\n}\n\ninterface ILanguageAssociationItem extends ILanguageAssociation {\n\treadonly userConfigured: boolean;\n\treadonly filenameLowercase?: string;\n\treadonly extensionLowercase?: string;\n\treadonly filepatternLowercase?: ParsedPattern;\n\treadonly filepatternOnPath?: boolean;\n}\n\nlet registeredAssociations: ILanguageAssociationItem[] = [];\nlet nonUserRegisteredAssociations: ILanguageAssociationItem[] = [];\nlet userRegisteredAssociations: ILanguageAssociationItem[] = [];\n\n/**\n * Associate a language to the registry (platform).\n * * **NOTE**: This association will lose over associations registered using `registerConfiguredLanguageAssociation`.\n * * **NOTE**: Use `clearPlatformLanguageAssociations` to remove all associations registered using this function.\n */\nexport function registerPlatformLanguageAssociation(association: ILanguageAssociation, warnOnOverwrite = false): void {\n\t_registerLanguageAssociation(association, false, warnOnOverwrite);\n}\n\nfunction _registerLanguageAssociation(association: ILanguageAssociation, userConfigured: boolean, warnOnOverwrite: boolean): void {\n\n\t// Register\n\tconst associationItem = toLanguageAssociationItem(association, userConfigured);\n\tregisteredAssociations.push(associationItem);\n\tif (!associationItem.userConfigured) {\n\t\tnonUserRegisteredAssociations.push(associationItem);\n\t} else {\n\t\tuserRegisteredAssociations.push(associationItem);\n\t}\n\n\t// Check for conflicts unless this is a user configured association\n\tif (warnOnOverwrite && !associationItem.userConfigured) {\n\t\tregisteredAssociations.forEach(a => {\n\t\t\tif (a.mime === associationItem.mime || a.userConfigured) {\n\t\t\t\treturn; // same mime or userConfigured is ok\n\t\t\t}\n\n\t\t\tif (associationItem.extension && a.extension === associationItem.extension) {\n\t\t\t\tconsole.warn(`Overwriting extension <<${associationItem.extension}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.filename && a.filename === associationItem.filename) {\n\t\t\t\tconsole.warn(`Overwriting filename <<${associationItem.filename}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.filepattern && a.filepattern === associationItem.filepattern) {\n\t\t\t\tconsole.warn(`Overwriting filepattern <<${associationItem.filepattern}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.firstline && a.firstline === associationItem.firstline) {\n\t\t\t\tconsole.warn(`Overwriting firstline <<${associationItem.firstline}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction toLanguageAssociationItem(association: ILanguageAssociation, userConfigured: boolean): ILanguageAssociationItem {\n\treturn {\n\t\tid: association.id,\n\t\tmime: association.mime,\n\t\tfilename: association.filename,\n\t\textension: association.extension,\n\t\tfilepattern: association.filepattern,\n\t\tfirstline: association.firstline,\n\t\tuserConfigured: userConfigured,\n\t\tfilenameLowercase: association.filename ? association.filename.toLowerCase() : undefined,\n\t\textensionLowercase: association.extension ? association.extension.toLowerCase() : undefined,\n\t\tfilepatternLowercase: association.filepattern ? parse(association.filepattern.toLowerCase()) : undefined,\n\t\tfilepatternOnPath: association.filepattern ? association.filepattern.indexOf(posix.sep) >= 0 : false\n\t};\n}\n\n/**\n * Clear language associations from the registry (platform).\n */\nexport function clearPlatformLanguageAssociations(): void {\n\tregisteredAssociations = registeredAssociations.filter(a => a.userConfigured);\n\tnonUserRegisteredAssociations = [];\n}\n\ninterface IdAndMime {\n\tid: string;\n\tmime: string;\n}\n\n/**\n * @see `getMimeTypes`\n */\nexport function getLanguageIds(resource: URI | null, firstLine?: string): string[] {\n\treturn getAssociations(resource, firstLine).map(item => item.id);\n}\n\nfunction getAssociations(resource: URI | null, firstLine?: string): IdAndMime[] {\n\tlet path: string | undefined;\n\tif (resource) {\n\t\tswitch (resource.scheme) {\n\t\t\tcase Schemas.file:\n\t\t\t\tpath = resource.fsPath;\n\t\t\t\tbreak;\n\t\t\tcase Schemas.data: {\n\t\t\t\tconst metadata = DataUri.parseMetaData(resource);\n\t\t\t\tpath = metadata.get(DataUri.META_DATA_LABEL);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Schemas.vscodeNotebookCell:\n\t\t\t\t// File path not relevant for language detection of cell\n\t\t\t\tpath = undefined;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpath = resource.path;\n\t\t}\n\t}\n\n\tif (!path) {\n\t\treturn [{ id: 'unknown', mime: Mimes.unknown }];\n\t}\n\n\tpath = path.toLowerCase();\n\n\tconst filename = basename(path);\n\n\t// 1.) User configured mappings have highest priority\n\tconst configuredLanguage = getAssociationByPath(path, filename, userRegisteredAssociations);\n\tif (configuredLanguage) {\n\t\treturn [configuredLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t}\n\n\t// 2.) Registered mappings have middle priority\n\tconst registeredLanguage = getAssociationByPath(path, filename, nonUserRegisteredAssociations);\n\tif (registeredLanguage) {\n\t\treturn [registeredLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t}\n\n\t// 3.) Firstline has lowest priority\n\tif (firstLine) {\n\t\tconst firstlineLanguage = getAssociationByFirstline(firstLine);\n\t\tif (firstlineLanguage) {\n\t\t\treturn [firstlineLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t\t}\n\t}\n\n\treturn [{ id: 'unknown', mime: Mimes.unknown }];\n}\n\nfunction getAssociationByPath(path: string, filename: string, associations: ILanguageAssociationItem[]): ILanguageAssociationItem | undefined {\n\tlet filenameMatch: ILanguageAssociationItem | undefined = undefined;\n\tlet patternMatch: ILanguageAssociationItem | undefined = undefined;\n\tlet extensionMatch: ILanguageAssociationItem | undefined = undefined;\n\n\t// We want to prioritize associations based on the order they are registered so that the last registered\n\t// association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\n\tfor (let i = associations.length - 1; i >= 0; i--) {\n\t\tconst association = associations[i];\n\n\t\t// First exact name match\n\t\tif (filename === association.filenameLowercase) {\n\t\t\tfilenameMatch = association;\n\t\t\tbreak; // take it!\n\t\t}\n\n\t\t// Longest pattern match\n\t\tif (association.filepattern) {\n\t\t\tif (!patternMatch || association.filepattern.length > patternMatch.filepattern!.length) {\n\t\t\t\tconst target = association.filepatternOnPath ? path : filename; // match on full path if pattern contains path separator\n\t\t\t\tif (association.filepatternLowercase?.(target)) {\n\t\t\t\t\tpatternMatch = association;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Longest extension match\n\t\tif (association.extension) {\n\t\t\tif (!extensionMatch || association.extension.length > extensionMatch.extension!.length) {\n\t\t\t\tif (filename.endsWith(association.extensionLowercase!)) {\n\t\t\t\t\textensionMatch = association;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 1.) Exact name match has second highest priority\n\tif (filenameMatch) {\n\t\treturn filenameMatch;\n\t}\n\n\t// 2.) Match on pattern\n\tif (patternMatch) {\n\t\treturn patternMatch;\n\t}\n\n\t// 3.) Match on extension comes next\n\tif (extensionMatch) {\n\t\treturn extensionMatch;\n\t}\n\n\treturn undefined;\n}\n\nfunction getAssociationByFirstline(firstLine: string): ILanguageAssociationItem | undefined {\n\tif (startsWithUTF8BOM(firstLine)) {\n\t\tfirstLine = firstLine.substr(1);\n\t}\n\n\tif (firstLine.length > 0) {\n\n\t\t// We want to prioritize associations based on the order they are registered so that the last registered\n\t\t// association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\n\t\tfor (let i = registeredAssociations.length - 1; i >= 0; i--) {\n\t\t\tconst association = registeredAssociations[i];\n\t\t\tif (!association.firstline) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst matches = firstLine.match(association.firstline);\n\t\t\tif (matches && matches.length > 0) {\n\t\t\t\treturn association;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined;\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 { ParsedPattern, parse } from '../../../base/common/glob.js';\nimport { Mimes } from '../../../base/common/mime.js';\nimport { Schemas } from '../../../base/common/network.js';\nimport { basename, posix } from '../../../base/common/path.js';\nimport { DataUri } from '../../../base/common/resources.js';\nimport { startsWithUTF8BOM } from '../../../base/common/strings.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../languages/modesRegistry.js';\n\nexport interface ILanguageAssociation {\n\treadonly id: string;\n\treadonly mime: string;\n\treadonly filename?: string;\n\treadonly extension?: string;\n\treadonly filepattern?: string;\n\treadonly firstline?: RegExp;\n}\n\ninterface ILanguageAssociationItem extends ILanguageAssociation {\n\treadonly userConfigured: boolean;\n\treadonly filenameLowercase?: string;\n\treadonly extensionLowercase?: string;\n\treadonly filepatternLowercase?: ParsedPattern;\n\treadonly filepatternOnPath?: boolean;\n}\n\nlet registeredAssociations: ILanguageAssociationItem[] = [];\nlet nonUserRegisteredAssociations: ILanguageAssociationItem[] = [];\nlet userRegisteredAssociations: ILanguageAssociationItem[] = [];\n\n/**\n * Associate a language to the registry (platform).\n * * **NOTE**: This association will lose over associations registered using `registerConfiguredLanguageAssociation`.\n * * **NOTE**: Use `clearPlatformLanguageAssociations` to remove all associations registered using this function.\n */\nexport function registerPlatformLanguageAssociation(association: ILanguageAssociation, warnOnOverwrite = false): void {\n\t_registerLanguageAssociation(association, false, warnOnOverwrite);\n}\n\nfunction _registerLanguageAssociation(association: ILanguageAssociation, userConfigured: boolean, warnOnOverwrite: boolean): void {\n\n\t// Register\n\tconst associationItem = toLanguageAssociationItem(association, userConfigured);\n\tregisteredAssociations.push(associationItem);\n\tif (!associationItem.userConfigured) {\n\t\tnonUserRegisteredAssociations.push(associationItem);\n\t} else {\n\t\tuserRegisteredAssociations.push(associationItem);\n\t}\n\n\t// Check for conflicts unless this is a user configured association\n\tif (warnOnOverwrite && !associationItem.userConfigured) {\n\t\tregisteredAssociations.forEach(a => {\n\t\t\tif (a.mime === associationItem.mime || a.userConfigured) {\n\t\t\t\treturn; // same mime or userConfigured is ok\n\t\t\t}\n\n\t\t\tif (associationItem.extension && a.extension === associationItem.extension) {\n\t\t\t\tconsole.warn(`Overwriting extension <<${associationItem.extension}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.filename && a.filename === associationItem.filename) {\n\t\t\t\tconsole.warn(`Overwriting filename <<${associationItem.filename}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.filepattern && a.filepattern === associationItem.filepattern) {\n\t\t\t\tconsole.warn(`Overwriting filepattern <<${associationItem.filepattern}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.firstline && a.firstline === associationItem.firstline) {\n\t\t\t\tconsole.warn(`Overwriting firstline <<${associationItem.firstline}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction toLanguageAssociationItem(association: ILanguageAssociation, userConfigured: boolean): ILanguageAssociationItem {\n\treturn {\n\t\tid: association.id,\n\t\tmime: association.mime,\n\t\tfilename: association.filename,\n\t\textension: association.extension,\n\t\tfilepattern: association.filepattern,\n\t\tfirstline: association.firstline,\n\t\tuserConfigured: userConfigured,\n\t\tfilenameLowercase: association.filename ? association.filename.toLowerCase() : undefined,\n\t\textensionLowercase: association.extension ? association.extension.toLowerCase() : undefined,\n\t\tfilepatternLowercase: association.filepattern ? parse(association.filepattern.toLowerCase()) : undefined,\n\t\tfilepatternOnPath: association.filepattern ? association.filepattern.indexOf(posix.sep) >= 0 : false\n\t};\n}\n\n/**\n * Clear language associations from the registry (platform).\n */\nexport function clearPlatformLanguageAssociations(): void {\n\tregisteredAssociations = registeredAssociations.filter(a => a.userConfigured);\n\tnonUserRegisteredAssociations = [];\n}\n\ninterface IdAndMime {\n\tid: string;\n\tmime: string;\n}\n\n/**\n * @see `getMimeTypes`\n */\nexport function getLanguageIds(resource: URI | null, firstLine?: string): string[] {\n\treturn getAssociations(resource, firstLine).map(item => item.id);\n}\n\nfunction getAssociations(resource: URI | null, firstLine?: string): IdAndMime[] {\n\tlet path: string | undefined;\n\tif (resource) {\n\t\tswitch (resource.scheme) {\n\t\t\tcase Schemas.file:\n\t\t\t\tpath = resource.fsPath;\n\t\t\t\tbreak;\n\t\t\tcase Schemas.data: {\n\t\t\t\tconst metadata = DataUri.parseMetaData(resource);\n\t\t\t\tpath = metadata.get(DataUri.META_DATA_LABEL);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Schemas.vscodeNotebookCell:\n\t\t\t\t// File path not relevant for language detection of cell\n\t\t\t\tpath = undefined;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpath = resource.path;\n\t\t}\n\t}\n\n\tif (!path) {\n\t\treturn [{ id: 'unknown', mime: Mimes.unknown }];\n\t}\n\n\tpath = path.toLowerCase();\n\n\tconst filename = basename(path);\n\n\t// 1.) User configured mappings have highest priority\n\tconst configuredLanguage = getAssociationByPath(path, filename, userRegisteredAssociations);\n\tif (configuredLanguage) {\n\t\treturn [configuredLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t}\n\n\t// 2.) Registered mappings have middle priority\n\tconst registeredLanguage = getAssociationByPath(path, filename, nonUserRegisteredAssociations);\n\tif (registeredLanguage) {\n\t\treturn [registeredLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t}\n\n\t// 3.) Firstline has lowest priority\n\tif (firstLine) {\n\t\tconst firstlineLanguage = getAssociationByFirstline(firstLine);\n\t\tif (firstlineLanguage) {\n\t\t\treturn [firstlineLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t\t}\n\t}\n\n\treturn [{ id: 'unknown', mime: Mimes.unknown }];\n}\n\nfunction getAssociationByPath(path: string, filename: string, associations: ILanguageAssociationItem[]): ILanguageAssociationItem | undefined {\n\tlet filenameMatch: ILanguageAssociationItem | undefined = undefined;\n\tlet patternMatch: ILanguageAssociationItem | undefined = undefined;\n\tlet extensionMatch: ILanguageAssociationItem | undefined = undefined;\n\n\t// We want to prioritize associations based on the order they are registered so that the last registered\n\t// association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\n\tfor (let i = associations.length - 1; i >= 0; i--) {\n\t\tconst association = associations[i];\n\n\t\t// First exact name match\n\t\tif (filename === association.filenameLowercase) {\n\t\t\tfilenameMatch = association;\n\t\t\tbreak; // take it!\n\t\t}\n\n\t\t// Longest pattern match\n\t\tif (association.filepattern) {\n\t\t\tif (!patternMatch || association.filepattern.length > patternMatch.filepattern!.length) {\n\t\t\t\tconst target = association.filepatternOnPath ? path : filename; // match on full path if pattern contains path separator\n\t\t\t\tif (association.filepatternLowercase?.(target)) {\n\t\t\t\t\tpatternMatch = association;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Longest extension match\n\t\tif (association.extension) {\n\t\t\tif (!extensionMatch || association.extension.length > extensionMatch.extension!.length) {\n\t\t\t\tif (filename.endsWith(association.extensionLowercase!)) {\n\t\t\t\t\textensionMatch = association;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 1.) Exact name match has second highest priority\n\tif (filenameMatch) {\n\t\treturn filenameMatch;\n\t}\n\n\t// 2.) Match on pattern\n\tif (patternMatch) {\n\t\treturn patternMatch;\n\t}\n\n\t// 3.) Match on extension comes next\n\tif (extensionMatch) {\n\t\treturn extensionMatch;\n\t}\n\n\treturn undefined;\n}\n\nfunction getAssociationByFirstline(firstLine: string): ILanguageAssociationItem | undefined {\n\tif (startsWithUTF8BOM(firstLine)) {\n\t\tfirstLine = firstLine.substr(1);\n\t}\n\n\tif (firstLine.length > 0) {\n\n\t\t// We want to prioritize associations based on the order they are registered so that the last registered\n\t\t// association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\n\t\tfor (let i = registeredAssociations.length - 1; i >= 0; i--) {\n\t\t\tconst association = registeredAssociations[i];\n\t\t\tif (!association.firstline) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst matches = firstLine.match(association.firstline);\n\t\t\tif (matches && matches.length > 0) {\n\t\t\t\treturn association;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined;\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/services/languagesAssociations.ts","vs/editor/common/services/languagesAssociations.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAiB,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEhG,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAiBtE,IAAI,sBAAsB,GAA+B,EAAE,CAAC;AAC5D,IAAI,6BAA6B,GAA+B,EAAE,CAAC;AACnE,IAAI,0BAA0B,GAA+B,EAAE,CAAC;AAEhE;;;;GAIG;AACH,MAAM,UAAU,mCAAmC,CAAC,WAAiC,EAAE,eAAe,GAAG,KAAK;IAC7G,4BAA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sB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7D,MAAM,WAAW,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC;YAC9C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;gBAC5B,SAAS;YACV,CAAC;YAED,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YACvD,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACnC,OAAO,WAAW,CAAC;YACpB,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC","file":"languagesAssociations.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 { ParsedPattern, parse } from '../../../base/common/glob.js';\nimport { Mimes } from '../../../base/common/mime.js';\nimport { Schemas } from '../../../base/common/network.js';\nimport { basename, posix } from '../../../base/common/path.js';\nimport { DataUri } from '../../../base/common/resources.js';\nimport { endsWithIgnoreCase, equals, startsWithUTF8BOM } from '../../../base/common/strings.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../languages/modesRegistry.js';\n\nexport interface ILanguageAssociation {\n\treadonly id: string;\n\treadonly mime: string;\n\treadonly filename?: string;\n\treadonly extension?: string;\n\treadonly filepattern?: string;\n\treadonly firstline?: RegExp;\n}\n\ninterface ILanguageAssociationItem extends ILanguageAssociation {\n\treadonly userConfigured: boolean;\n\treadonly filepatternParsed?: ParsedPattern;\n\treadonly filepatternOnPath?: boolean;\n}\n\nlet registeredAssociations: ILanguageAssociationItem[] = [];\nlet nonUserRegisteredAssociations: ILanguageAssociationItem[] = [];\nlet userRegisteredAssociations: ILanguageAssociationItem[] = [];\n\n/**\n * Associate a language to the registry (platform).\n * * **NOTE**: This association will lose over associations registered using `registerConfiguredLanguageAssociation`.\n * * **NOTE**: Use `clearPlatformLanguageAssociations` to remove all associations registered using this function.\n */\nexport function registerPlatformLanguageAssociation(association: ILanguageAssociation, warnOnOverwrite = false): void {\n\t_registerLanguageAssociation(association, false, warnOnOverwrite);\n}\n\nfunction _registerLanguageAssociation(association: ILanguageAssociation, userConfigured: boolean, warnOnOverwrite: boolean): void {\n\n\t// Register\n\tconst associationItem = toLanguageAssociationItem(association, userConfigured);\n\tregisteredAssociations.push(associationItem);\n\tif (!associationItem.userConfigured) {\n\t\tnonUserRegisteredAssociations.push(associationItem);\n\t} else {\n\t\tuserRegisteredAssociations.push(associationItem);\n\t}\n\n\t// Check for conflicts unless this is a user configured association\n\tif (warnOnOverwrite && !associationItem.userConfigured) {\n\t\tregisteredAssociations.forEach(a => {\n\t\t\tif (a.mime === associationItem.mime || a.userConfigured) {\n\t\t\t\treturn; // same mime or userConfigured is ok\n\t\t\t}\n\n\t\t\tif (associationItem.extension && a.extension === associationItem.extension) {\n\t\t\t\tconsole.warn(`Overwriting extension <<${associationItem.extension}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.filename && a.filename === associationItem.filename) {\n\t\t\t\tconsole.warn(`Overwriting filename <<${associationItem.filename}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.filepattern && a.filepattern === associationItem.filepattern) {\n\t\t\t\tconsole.warn(`Overwriting filepattern <<${associationItem.filepattern}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.firstline && a.firstline === associationItem.firstline) {\n\t\t\t\tconsole.warn(`Overwriting firstline <<${associationItem.firstline}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction toLanguageAssociationItem(association: ILanguageAssociation, userConfigured: boolean): ILanguageAssociationItem {\n\treturn {\n\t\tid: association.id,\n\t\tmime: association.mime,\n\t\tfilename: association.filename,\n\t\textension: association.extension,\n\t\tfilepattern: association.filepattern,\n\t\tfirstline: association.firstline,\n\t\tuserConfigured: userConfigured,\n\t\tfilepatternParsed: association.filepattern ? parse(association.filepattern, { ignoreCase: true }) : undefined,\n\t\tfilepatternOnPath: association.filepattern ? association.filepattern.indexOf(posix.sep) >= 0 : false\n\t};\n}\n\n/**\n * Clear language associations from the registry (platform).\n */\nexport function clearPlatformLanguageAssociations(): void {\n\tregisteredAssociations = registeredAssociations.filter(a => a.userConfigured);\n\tnonUserRegisteredAssociations = [];\n}\n\ninterface IdAndMime {\n\tid: string;\n\tmime: string;\n}\n\n/**\n * @see `getMimeTypes`\n */\nexport function getLanguageIds(resource: URI | null, firstLine?: string): string[] {\n\treturn getAssociations(resource, firstLine).map(item => item.id);\n}\n\nfunction getAssociations(resource: URI | null, firstLine?: string): IdAndMime[] {\n\tlet path: string | undefined;\n\tif (resource) {\n\t\tswitch (resource.scheme) {\n\t\t\tcase Schemas.file:\n\t\t\t\tpath = resource.fsPath;\n\t\t\t\tbreak;\n\t\t\tcase Schemas.data: {\n\t\t\t\tconst metadata = DataUri.parseMetaData(resource);\n\t\t\t\tpath = metadata.get(DataUri.META_DATA_LABEL);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Schemas.vscodeNotebookCell:\n\t\t\t\t// File path not relevant for language detection of cell\n\t\t\t\tpath = undefined;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpath = resource.path;\n\t\t}\n\t}\n\n\tif (!path) {\n\t\treturn [{ id: 'unknown', mime: Mimes.unknown }];\n\t}\n\n\tpath = path.toLowerCase();\n\n\tconst filename = basename(path);\n\n\t// 1.) User configured mappings have highest priority\n\tconst configuredLanguage = getAssociationByPath(path, filename, userRegisteredAssociations);\n\tif (configuredLanguage) {\n\t\treturn [configuredLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t}\n\n\t// 2.) Registered mappings have middle priority\n\tconst registeredLanguage = getAssociationByPath(path, filename, nonUserRegisteredAssociations);\n\tif (registeredLanguage) {\n\t\treturn [registeredLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t}\n\n\t// 3.) Firstline has lowest priority\n\tif (firstLine) {\n\t\tconst firstlineLanguage = getAssociationByFirstline(firstLine);\n\t\tif (firstlineLanguage) {\n\t\t\treturn [firstlineLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t\t}\n\t}\n\n\treturn [{ id: 'unknown', mime: Mimes.unknown }];\n}\n\nfunction getAssociationByPath(path: string, filename: string, associations: ILanguageAssociationItem[]): ILanguageAssociationItem | undefined {\n\tlet filenameMatch: ILanguageAssociationItem | undefined = undefined;\n\tlet patternMatch: ILanguageAssociationItem | undefined = undefined;\n\tlet extensionMatch: ILanguageAssociationItem | undefined = undefined;\n\n\t// We want to prioritize associations based on the order they are registered so that the last registered\n\t// association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\n\tfor (let i = associations.length - 1; i >= 0; i--) {\n\t\tconst association = associations[i];\n\n\t\t// First exact name match\n\t\tif (equals(filename, association.filename, true)) {\n\t\t\tfilenameMatch = association;\n\t\t\tbreak; // take it!\n\t\t}\n\n\t\t// Longest pattern match\n\t\tif (association.filepattern) {\n\t\t\tif (!patternMatch || association.filepattern.length > patternMatch.filepattern!.length) {\n\t\t\t\tconst target = association.filepatternOnPath ? path : filename; // match on full path if pattern contains path separator\n\t\t\t\tif (association.filepatternParsed?.(target)) {\n\t\t\t\t\tpatternMatch = association;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Longest extension match\n\t\tif (association.extension) {\n\t\t\tif (!extensionMatch || association.extension.length > extensionMatch.extension!.length) {\n\t\t\t\tif (endsWithIgnoreCase(filename, association.extension)) {\n\t\t\t\t\textensionMatch = association;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 1.) Exact name match has second highest priority\n\tif (filenameMatch) {\n\t\treturn filenameMatch;\n\t}\n\n\t// 2.) Match on pattern\n\tif (patternMatch) {\n\t\treturn patternMatch;\n\t}\n\n\t// 3.) Match on extension comes next\n\tif (extensionMatch) {\n\t\treturn extensionMatch;\n\t}\n\n\treturn undefined;\n}\n\nfunction getAssociationByFirstline(firstLine: string): ILanguageAssociationItem | undefined {\n\tif (startsWithUTF8BOM(firstLine)) {\n\t\tfirstLine = firstLine.substring(1);\n\t}\n\n\tif (firstLine.length > 0) {\n\n\t\t// We want to prioritize associations based on the order they are registered so that the last registered\n\t\t// association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\n\t\tfor (let i = registeredAssociations.length - 1; i >= 0; i--) {\n\t\t\tconst association = registeredAssociations[i];\n\t\t\tif (!association.firstline) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst matches = firstLine.match(association.firstline);\n\t\t\tif (matches && matches.length > 0) {\n\t\t\t\treturn association;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined;\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 { ParsedPattern, parse } from '../../../base/common/glob.js';\nimport { Mimes } from '../../../base/common/mime.js';\nimport { Schemas } from '../../../base/common/network.js';\nimport { basename, posix } from '../../../base/common/path.js';\nimport { DataUri } from '../../../base/common/resources.js';\nimport { endsWithIgnoreCase, equals, startsWithUTF8BOM } from '../../../base/common/strings.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { PLAINTEXT_LANGUAGE_ID } from '../languages/modesRegistry.js';\n\nexport interface ILanguageAssociation {\n\treadonly id: string;\n\treadonly mime: string;\n\treadonly filename?: string;\n\treadonly extension?: string;\n\treadonly filepattern?: string;\n\treadonly firstline?: RegExp;\n}\n\ninterface ILanguageAssociationItem extends ILanguageAssociation {\n\treadonly userConfigured: boolean;\n\treadonly filepatternParsed?: ParsedPattern;\n\treadonly filepatternOnPath?: boolean;\n}\n\nlet registeredAssociations: ILanguageAssociationItem[] = [];\nlet nonUserRegisteredAssociations: ILanguageAssociationItem[] = [];\nlet userRegisteredAssociations: ILanguageAssociationItem[] = [];\n\n/**\n * Associate a language to the registry (platform).\n * * **NOTE**: This association will lose over associations registered using `registerConfiguredLanguageAssociation`.\n * * **NOTE**: Use `clearPlatformLanguageAssociations` to remove all associations registered using this function.\n */\nexport function registerPlatformLanguageAssociation(association: ILanguageAssociation, warnOnOverwrite = false): void {\n\t_registerLanguageAssociation(association, false, warnOnOverwrite);\n}\n\nfunction _registerLanguageAssociation(association: ILanguageAssociation, userConfigured: boolean, warnOnOverwrite: boolean): void {\n\n\t// Register\n\tconst associationItem = toLanguageAssociationItem(association, userConfigured);\n\tregisteredAssociations.push(associationItem);\n\tif (!associationItem.userConfigured) {\n\t\tnonUserRegisteredAssociations.push(associationItem);\n\t} else {\n\t\tuserRegisteredAssociations.push(associationItem);\n\t}\n\n\t// Check for conflicts unless this is a user configured association\n\tif (warnOnOverwrite && !associationItem.userConfigured) {\n\t\tregisteredAssociations.forEach(a => {\n\t\t\tif (a.mime === associationItem.mime || a.userConfigured) {\n\t\t\t\treturn; // same mime or userConfigured is ok\n\t\t\t}\n\n\t\t\tif (associationItem.extension && a.extension === associationItem.extension) {\n\t\t\t\tconsole.warn(`Overwriting extension <<${associationItem.extension}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.filename && a.filename === associationItem.filename) {\n\t\t\t\tconsole.warn(`Overwriting filename <<${associationItem.filename}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.filepattern && a.filepattern === associationItem.filepattern) {\n\t\t\t\tconsole.warn(`Overwriting filepattern <<${associationItem.filepattern}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\n\t\t\tif (associationItem.firstline && a.firstline === associationItem.firstline) {\n\t\t\t\tconsole.warn(`Overwriting firstline <<${associationItem.firstline}>> to now point to mime <<${associationItem.mime}>>`);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction toLanguageAssociationItem(association: ILanguageAssociation, userConfigured: boolean): ILanguageAssociationItem {\n\treturn {\n\t\tid: association.id,\n\t\tmime: association.mime,\n\t\tfilename: association.filename,\n\t\textension: association.extension,\n\t\tfilepattern: association.filepattern,\n\t\tfirstline: association.firstline,\n\t\tuserConfigured: userConfigured,\n\t\tfilepatternParsed: association.filepattern ? parse(association.filepattern, { ignoreCase: true }) : undefined,\n\t\tfilepatternOnPath: association.filepattern ? association.filepattern.indexOf(posix.sep) >= 0 : false\n\t};\n}\n\n/**\n * Clear language associations from the registry (platform).\n */\nexport function clearPlatformLanguageAssociations(): void {\n\tregisteredAssociations = registeredAssociations.filter(a => a.userConfigured);\n\tnonUserRegisteredAssociations = [];\n}\n\ninterface IdAndMime {\n\tid: string;\n\tmime: string;\n}\n\n/**\n * @see `getMimeTypes`\n */\nexport function getLanguageIds(resource: URI | null, firstLine?: string): string[] {\n\treturn getAssociations(resource, firstLine).map(item => item.id);\n}\n\nfunction getAssociations(resource: URI | null, firstLine?: string): IdAndMime[] {\n\tlet path: string | undefined;\n\tif (resource) {\n\t\tswitch (resource.scheme) {\n\t\t\tcase Schemas.file:\n\t\t\t\tpath = resource.fsPath;\n\t\t\t\tbreak;\n\t\t\tcase Schemas.data: {\n\t\t\t\tconst metadata = DataUri.parseMetaData(resource);\n\t\t\t\tpath = metadata.get(DataUri.META_DATA_LABEL);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Schemas.vscodeNotebookCell:\n\t\t\t\t// File path not relevant for language detection of cell\n\t\t\t\tpath = undefined;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpath = resource.path;\n\t\t}\n\t}\n\n\tif (!path) {\n\t\treturn [{ id: 'unknown', mime: Mimes.unknown }];\n\t}\n\n\tpath = path.toLowerCase();\n\n\tconst filename = basename(path);\n\n\t// 1.) User configured mappings have highest priority\n\tconst configuredLanguage = getAssociationByPath(path, filename, userRegisteredAssociations);\n\tif (configuredLanguage) {\n\t\treturn [configuredLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t}\n\n\t// 2.) Registered mappings have middle priority\n\tconst registeredLanguage = getAssociationByPath(path, filename, nonUserRegisteredAssociations);\n\tif (registeredLanguage) {\n\t\treturn [registeredLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t}\n\n\t// 3.) Firstline has lowest priority\n\tif (firstLine) {\n\t\tconst firstlineLanguage = getAssociationByFirstline(firstLine);\n\t\tif (firstlineLanguage) {\n\t\t\treturn [firstlineLanguage, { id: PLAINTEXT_LANGUAGE_ID, mime: Mimes.text }];\n\t\t}\n\t}\n\n\treturn [{ id: 'unknown', mime: Mimes.unknown }];\n}\n\nfunction getAssociationByPath(path: string, filename: string, associations: ILanguageAssociationItem[]): ILanguageAssociationItem | undefined {\n\tlet filenameMatch: ILanguageAssociationItem | undefined = undefined;\n\tlet patternMatch: ILanguageAssociationItem | undefined = undefined;\n\tlet extensionMatch: ILanguageAssociationItem | undefined = undefined;\n\n\t// We want to prioritize associations based on the order they are registered so that the last registered\n\t// association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\n\tfor (let i = associations.length - 1; i >= 0; i--) {\n\t\tconst association = associations[i];\n\n\t\t// First exact name match\n\t\tif (equals(filename, association.filename, true)) {\n\t\t\tfilenameMatch = association;\n\t\t\tbreak; // take it!\n\t\t}\n\n\t\t// Longest pattern match\n\t\tif (association.filepattern) {\n\t\t\tif (!patternMatch || association.filepattern.length > patternMatch.filepattern!.length) {\n\t\t\t\tconst target = association.filepatternOnPath ? path : filename; // match on full path if pattern contains path separator\n\t\t\t\tif (association.filepatternParsed?.(target)) {\n\t\t\t\t\tpatternMatch = association;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Longest extension match\n\t\tif (association.extension) {\n\t\t\tif (!extensionMatch || association.extension.length > extensionMatch.extension!.length) {\n\t\t\t\tif (endsWithIgnoreCase(filename, association.extension)) {\n\t\t\t\t\textensionMatch = association;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 1.) Exact name match has second highest priority\n\tif (filenameMatch) {\n\t\treturn filenameMatch;\n\t}\n\n\t// 2.) Match on pattern\n\tif (patternMatch) {\n\t\treturn patternMatch;\n\t}\n\n\t// 3.) Match on extension comes next\n\tif (extensionMatch) {\n\t\treturn extensionMatch;\n\t}\n\n\treturn undefined;\n}\n\nfunction getAssociationByFirstline(firstLine: string): ILanguageAssociationItem | undefined {\n\tif (startsWithUTF8BOM(firstLine)) {\n\t\tfirstLine = firstLine.substring(1);\n\t}\n\n\tif (firstLine.length > 0) {\n\n\t\t// We want to prioritize associations based on the order they are registered so that the last registered\n\t\t// association wins over all other. This is for https://github.com/microsoft/vscode/issues/20074\n\t\tfor (let i = registeredAssociations.length - 1; i >= 0; i--) {\n\t\t\tconst association = registeredAssociations[i];\n\t\t\tif (!association.firstline) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst matches = firstLine.match(association.firstline);\n\t\t\tif (matches && matches.length > 0) {\n\t\t\t\treturn association;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined;\n}\n"]}
@@ -5,36 +5,37 @@
5
5
  import * as nls from '../../nls.js';
6
6
  export var InspectTokensNLS;
7
7
  (function (InspectTokensNLS) {
8
- InspectTokensNLS.inspectTokensAction = nls.localize(786, "Developer: Inspect Tokens");
8
+ InspectTokensNLS.inspectTokensAction = nls.localize(791, "Developer: Inspect Tokens");
9
9
  })(InspectTokensNLS || (InspectTokensNLS = {}));
10
10
  export var GoToLineNLS;
11
11
  (function (GoToLineNLS) {
12
- GoToLineNLS.gotoLineActionLabel = nls.localize(787, "Go to Line/Column...");
12
+ GoToLineNLS.gotoLineActionLabel = nls.localize(792, "Go to Line/Column...");
13
+ GoToLineNLS.gotoOffsetActionLabel = nls.localize(793, "Go to Offset...");
13
14
  })(GoToLineNLS || (GoToLineNLS = {}));
14
15
  export var QuickHelpNLS;
15
16
  (function (QuickHelpNLS) {
16
- QuickHelpNLS.helpQuickAccessActionLabel = nls.localize(788, "Show all Quick Access Providers");
17
+ QuickHelpNLS.helpQuickAccessActionLabel = nls.localize(794, "Show all Quick Access Providers");
17
18
  })(QuickHelpNLS || (QuickHelpNLS = {}));
18
19
  export var QuickCommandNLS;
19
20
  (function (QuickCommandNLS) {
20
- QuickCommandNLS.quickCommandActionLabel = nls.localize(789, "Command Palette");
21
- QuickCommandNLS.quickCommandHelp = nls.localize(790, "Show And Run Commands");
21
+ QuickCommandNLS.quickCommandActionLabel = nls.localize(795, "Command Palette");
22
+ QuickCommandNLS.quickCommandHelp = nls.localize(796, "Show And Run Commands");
22
23
  })(QuickCommandNLS || (QuickCommandNLS = {}));
23
24
  export var QuickOutlineNLS;
24
25
  (function (QuickOutlineNLS) {
25
- QuickOutlineNLS.quickOutlineActionLabel = nls.localize(791, "Go to Symbol...");
26
- QuickOutlineNLS.quickOutlineByCategoryActionLabel = nls.localize(792, "Go to Symbol by Category...");
26
+ QuickOutlineNLS.quickOutlineActionLabel = nls.localize(797, "Go to Symbol...");
27
+ QuickOutlineNLS.quickOutlineByCategoryActionLabel = nls.localize(798, "Go to Symbol by Category...");
27
28
  })(QuickOutlineNLS || (QuickOutlineNLS = {}));
28
29
  export var StandaloneCodeEditorNLS;
29
30
  (function (StandaloneCodeEditorNLS) {
30
- StandaloneCodeEditorNLS.editorViewAccessibleLabel = nls.localize(793, "Editor content");
31
+ StandaloneCodeEditorNLS.editorViewAccessibleLabel = nls.localize(799, "Editor content");
31
32
  })(StandaloneCodeEditorNLS || (StandaloneCodeEditorNLS = {}));
32
33
  export var ToggleHighContrastNLS;
33
34
  (function (ToggleHighContrastNLS) {
34
- ToggleHighContrastNLS.toggleHighContrast = nls.localize(794, "Toggle High Contrast Theme");
35
+ ToggleHighContrastNLS.toggleHighContrast = nls.localize(800, "Toggle High Contrast Theme");
35
36
  })(ToggleHighContrastNLS || (ToggleHighContrastNLS = {}));
36
37
  export var StandaloneServicesNLS;
37
38
  (function (StandaloneServicesNLS) {
38
- StandaloneServicesNLS.bulkEditServiceSummary = nls.localize(795, "Made {0} edits in {1} files");
39
+ StandaloneServicesNLS.bulkEditServiceSummary = nls.localize(801, "Made {0} edits in {1} files");
39
40
  })(StandaloneServicesNLS || (StandaloneServicesNLS = {}));
40
41
  //# sourceMappingURL=standaloneStrings.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/editor/common/standaloneStrings.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAEpC,MAAM,KAAW,gBAAgB,CAEhC;AAFD,WAAiB,gBAAgB;IACnB,oCAAmB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAe,EAAE,2BAA2B,CAAC,CAAC;AAC/F,CAAC,EAFgB,gBAAgB,KAAhB,gBAAgB,QAEhC;AAED,MAAM,KAAW,WAAW,CAE3B;AAFD,WAAiB,WAAW;IACd,+BAAmB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAqB,EAAE,sBAAsB,CAAC,CAAC;AAChG,CAAC,EAFgB,WAAW,KAAX,WAAW,QAE3B;AAED,MAAM,KAAW,YAAY,CAE5B;AAFD,WAAiB,YAAY;IACf,uCAA0B,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAiB,EAAE,iCAAiC,CAAC,CAAC;AAC9G,CAAC,EAFgB,YAAY,KAAZ,YAAY,QAE5B;AAED,MAAM,KAAW,eAAe,CAG/B;AAHD,WAAiB,eAAe;IAClB,uCAAuB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAyB,EAAE,iBAAiB,CAAC,CAAC;IACrF,gCAAgB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAwB,EAAE,uBAAuB,CAAC,CAAC;AACjG,CAAC,EAHgB,eAAe,KAAf,eAAe,QAG/B;AAED,MAAM,KAAW,eAAe,CAG/B;AAHD,WAAiB,eAAe;IAClB,uCAAuB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAyB,EAAE,iBAAiB,CAAC,CAAC;IACrF,iDAAiC,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAmC,EAAE,6BAA6B,CAAC,CAAC;AACnI,CAAC,EAHgB,eAAe,KAAf,eAAe,QAG/B;AAED,MAAM,KAAW,uBAAuB,CAEvC;AAFD,WAAiB,uBAAuB;IAC1B,iDAAyB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAA2B,EAAE,gBAAgB,CAAC,CAAC;AACtG,CAAC,EAFgB,uBAAuB,KAAvB,uBAAuB,QAEvC;AAED,MAAM,KAAW,qBAAqB,CAErC;AAFD,WAAiB,qBAAqB;IACxB,wCAAkB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAoB,EAAE,4BAA4B,CAAC,CAAC;AACpG,CAAC,EAFgB,qBAAqB,KAArB,qBAAqB,QAErC;AAED,MAAM,KAAW,qBAAqB,CAErC;AAFD,WAAiB,qBAAqB;IACxB,4CAAsB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAwB,EAAE,6BAA6B,CAAC,CAAC;AAC7G,CAAC,EAFgB,qBAAqB,KAArB,qBAAqB,QAErC","file":"standaloneStrings.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 * as nls from '../../nls.js';\n\nexport namespace InspectTokensNLS {\n\texport const inspectTokensAction = nls.localize('inspectTokens', \"Developer: Inspect Tokens\");\n}\n\nexport namespace GoToLineNLS {\n\texport const gotoLineActionLabel = nls.localize('gotoLineActionLabel', \"Go to Line/Column...\");\n}\n\nexport namespace QuickHelpNLS {\n\texport const helpQuickAccessActionLabel = nls.localize('helpQuickAccess', \"Show all Quick Access Providers\");\n}\n\nexport namespace QuickCommandNLS {\n\texport const quickCommandActionLabel = nls.localize('quickCommandActionLabel', \"Command Palette\");\n\texport const quickCommandHelp = nls.localize('quickCommandActionHelp', \"Show And Run Commands\");\n}\n\nexport namespace QuickOutlineNLS {\n\texport const quickOutlineActionLabel = nls.localize('quickOutlineActionLabel', \"Go to Symbol...\");\n\texport const quickOutlineByCategoryActionLabel = nls.localize('quickOutlineByCategoryActionLabel', \"Go to Symbol by Category...\");\n}\n\nexport namespace StandaloneCodeEditorNLS {\n\texport const editorViewAccessibleLabel = nls.localize('editorViewAccessibleLabel', \"Editor content\");\n}\n\nexport namespace ToggleHighContrastNLS {\n\texport const toggleHighContrast = nls.localize('toggleHighContrast', \"Toggle High Contrast Theme\");\n}\n\nexport namespace StandaloneServicesNLS {\n\texport const bulkEditServiceSummary = nls.localize('bulkEditServiceSummary', \"Made {0} edits in {1} files\");\n}\n"]}
1
+ {"version":3,"sources":["vs/editor/common/standaloneStrings.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AAEpC,MAAM,KAAW,gBAAgB,CAEhC;AAFD,WAAiB,gBAAgB;IACnB,oCAAmB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAe,EAAE,2BAA2B,CAAC,CAAC;AAC/F,CAAC,EAFgB,gBAAgB,KAAhB,gBAAgB,QAEhC;AAED,MAAM,KAAW,WAAW,CAG3B;AAHD,WAAiB,WAAW;IACd,+BAAmB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAqB,EAAE,sBAAsB,CAAC,CAAC;IAClF,iCAAqB,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAuB,EAAE,iBAAiB,CAAC,CAAC;AAC/F,CAAC,EAHgB,WAAW,KAAX,WAAW,QAG3B;AAED,MAAM,KAAW,YAAY,CAE5B;AAFD,WAAiB,YAAY;IAC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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 * as nls from '../../nls.js';\n\nexport namespace InspectTokensNLS {\n\texport const inspectTokensAction = nls.localize('inspectTokens', \"Developer: Inspect Tokens\");\n}\n\nexport namespace GoToLineNLS {\n\texport const gotoLineActionLabel = nls.localize('gotoLineActionLabel', \"Go to Line/Column...\");\n\texport const gotoOffsetActionLabel = nls.localize('gotoOffsetActionLabel', \"Go to Offset...\");\n}\n\nexport namespace QuickHelpNLS {\n\texport const helpQuickAccessActionLabel = nls.localize('helpQuickAccess', \"Show all Quick Access Providers\");\n}\n\nexport namespace QuickCommandNLS {\n\texport const quickCommandActionLabel = nls.localize('quickCommandActionLabel', \"Command Palette\");\n\texport const quickCommandHelp = nls.localize('quickCommandActionHelp', \"Show And Run Commands\");\n}\n\nexport namespace QuickOutlineNLS {\n\texport const quickOutlineActionLabel = nls.localize('quickOutlineActionLabel', \"Go to Symbol...\");\n\texport const quickOutlineByCategoryActionLabel = nls.localize('quickOutlineByCategoryActionLabel', \"Go to Symbol by Category...\");\n}\n\nexport namespace StandaloneCodeEditorNLS {\n\texport const editorViewAccessibleLabel = nls.localize('editorViewAccessibleLabel', \"Editor content\");\n}\n\nexport namespace ToggleHighContrastNLS {\n\texport const toggleHighContrast = nls.localize('toggleHighContrast', \"Toggle High Contrast Theme\");\n}\n\nexport namespace StandaloneServicesNLS {\n\texport const bulkEditServiceSummary = nls.localize('bulkEditServiceSummary', \"Made {0} edits in {1} files\");\n}\n"]}
@@ -50,7 +50,7 @@ export const EditSources = {
50
50
  name: data.name,
51
51
  });
52
52
  },
53
- rename: () => createEditSource({ source: 'rename' }),
53
+ rename: (oldName, newName) => createEditSource({ source: 'rename', $$$oldName: oldName, $$$newName: newName }),
54
54
  chatApplyEdits(data) {
55
55
  return createEditSource({
56
56
  source: 'Chat.applyEdits',
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/textModelEditSource.ts","vs/editor/common/textModelEditSource.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,MAAM,aAAa,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAEpD,MAAM,OAAO,mBAAmB;IAC/B,YACiB,QAAsC,EACtD,iBAAuC;QADvB,aAAQ,GAAR,QAAQ,CAA8B;IAEnD,CAAC;IAEE,QAAQ;QACd,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC;IAEM,OAAO;QACb,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC;YACzB,KAAK,QAAQ;gBACZ,OAAO,QAAQ,CAAC,IAAI,CAAC;YACtB,KAAK,wBAAwB;gBAC5B,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACxD,KAAK,SAAS;gBACb,OAAO,QAAQ,CAAC,IAAI,IAAI,SAAS,CAAC;YACnC;gBACC,OAAO,QAAQ,CAAC,MAAM,CAAC;QACzB,CAAC;IACF,CAAC;IAED;;;MAGE;IACK,KAAK,CAAC,KAAa,EAAE,SAAmE,EAAE;QAChG,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC7D,MAAM,SAAS,GAAI,MAAkC,CAAC,GAAG,CAAC,CAAC;YAC3D,I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1E,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAHe,sBAAK,QAGpB,CAAA;AACF,CAAC,EARgB,gBAAgB,KAAhB,gBAAgB,QAQhC;AAED,SAAS,cAAc,CAAC,EAAU;IACjC,OAAO,EAAiC,CAAC;AAC1C,CAAC","file":"textModelEditSource.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { prefixedUuid } from '../../base/common/uuid.js';\nimport { TextLength } from './core/text/textLength.js';\nimport { ProviderId, VersionedExtensionId } from './languages.js';\n\nconst privateSymbol = Symbol('TextModelEditSource');\n\nexport class TextModelEditSource {\n\tconstructor(\n\t\tpublic readonly metadata: ITextModelEditSourceMetadata,\n\t\t_privateCtorGuard: typeof privateSymbol,\n\t) { }\n\n\tpublic toString(): string {\n\t\treturn `${this.metadata.source}`;\n\t}\n\n\tpublic getType(): string {\n\t\tconst metadata = this.metadata;\n\t\tswitch (metadata.source) {\n\t\t\tcase 'cursor':\n\t\t\t\treturn metadata.kind;\n\t\t\tcase 'inlineCompletionAccept':\n\t\t\t\treturn metadata.source + (metadata.$nes ? ':nes' : '');\n\t\t\tcase 'unknown':\n\t\t\t\treturn metadata.name || 'unknown';\n\t\t\tdefault:\n\t\t\t\treturn metadata.source;\n\t\t}\n\t}\n\n\t/**\n\t * Converts the metadata to a key string.\n\t * Only includes properties/values that have `level` many `$` prefixes or less.\n\t*/\n\tpublic toKey(level: number, filter: { [TKey in ITextModelEditSourceMetadataKeys]?: boolean } = {}): string {\n\t\tconst metadata = this.metadata;\n\t\tconst keys = Object.entries(metadata).filter(([key, value]) => {\n\t\t\tconst filterVal = (filter as Record<string, boolean>)[key];\n\t\t\tif (filterVal !== undefined) {\n\t\t\t\treturn filterVal;\n\t\t\t}\n\n\t\t\tconst prefixCount = (key.match(/\\$/g) || []).length;\n\t\t\treturn prefixCount <= level && value !== undefined && value !== null && value !== '';\n\t\t}).map(([key, value]) => `${key}:${value}`);\n\t\treturn keys.join('-');\n\t}\n}\n\ntype TextModelEditSourceT<T> = TextModelEditSource & {\n\tmetadataT: T;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createEditSource<T extends Record<string, any>>(metadata: T): TextModelEditSourceT<T> {\n\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\treturn new TextModelEditSource(metadata as any, privateSymbol) as any;\n}\n\nexport const EditSources = {\n\tunknown(data: { name?: string | null }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'unknown',\n\t\t\tname: data.name,\n\t\t} as const);\n\t},\n\n\trename: () => createEditSource({ source: 'rename' } as const),\n\n\tchatApplyEdits(data: {\n\t\tmodelId: string | undefined;\n\t\tsessionId: string | undefined;\n\t\trequestId: string | undefined;\n\t\tlanguageId: string;\n\t\tmode: string | undefined;\n\t\textensionId: VersionedExtensionId | undefined;\n\t\tcodeBlockSuggestionId: EditSuggestionId | undefined;\n\t}) {\n\t\treturn createEditSource({\n\t\t\tsource: 'Chat.applyEdits',\n\t\t\t$modelId: avoidPathRedaction(data.modelId),\n\t\t\t$extensionId: data.extensionId?.extensionId,\n\t\t\t$extensionVersion: data.extensionId?.version,\n\t\t\t$$languageId: data.languageId,\n\t\t\t$$sessionId: data.sessionId,\n\t\t\t$$requestId: data.requestId,\n\t\t\t$$mode: data.mode,\n\t\t\t$$codeBlockSuggestionId: data.codeBlockSuggestionId,\n\t\t} as const);\n\t},\n\n\tchatUndoEdits: () => createEditSource({ source: 'Chat.undoEdits' } as const),\n\tchatReset: () => createEditSource({ source: 'Chat.reset' } as const),\n\n\tinlineCompletionAccept(data: { nes: boolean; requestUuid: string; languageId: string; providerId?: ProviderId }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineCompletionAccept',\n\t\t\t$nes: data.nes,\n\t\t\t...toProperties(data.providerId),\n\t\t\t$$requestUuid: data.requestUuid,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\tinlineCompletionPartialAccept(data: { nes: boolean; requestUuid: string; languageId: string; providerId?: ProviderId; type: 'word' | 'line' }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineCompletionPartialAccept',\n\t\t\ttype: data.type,\n\t\t\t$nes: data.nes,\n\t\t\t...toProperties(data.providerId),\n\t\t\t$$requestUuid: data.requestUuid,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\tinlineChatApplyEdit(data: { modelId: string | undefined; requestId: string | undefined; sessionId: string | undefined; languageId: string; extensionId: VersionedExtensionId | undefined }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineChat.applyEdits',\n\t\t\t$modelId: avoidPathRedaction(data.modelId),\n\t\t\t$extensionId: data.extensionId?.extensionId,\n\t\t\t$extensionVersion: data.extensionId?.version,\n\t\t\t$$sessionId: data.sessionId,\n\t\t\t$$requestId: data.requestId,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\treloadFromDisk: () => createEditSource({ source: 'reloadFromDisk' } as const),\n\n\tcursor(data: { kind: 'compositionType' | 'compositionEnd' | 'type' | 'paste' | 'cut' | 'executeCommands' | 'executeCommand'; detailedSource?: string | null }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'cursor',\n\t\t\tkind: data.kind,\n\t\t\tdetailedSource: data.detailedSource,\n\t\t} as const);\n\t},\n\n\tsetValue: () => createEditSource({ source: 'setValue' } as const),\n\teolChange: () => createEditSource({ source: 'eolChange' } as const),\n\tapplyEdits: () => createEditSource({ source: 'applyEdits' } as const),\n\tsnippet: () => createEditSource({ source: 'snippet' } as const),\n\tsuggest: (data: { providerId: ProviderId | undefined }) => createEditSource({ source: 'suggest', ...toProperties(data.providerId) } as const),\n\n\tcodeAction: (data: { kind: string | undefined; providerId: ProviderId | undefined }) => createEditSource({ source: 'codeAction', $kind: data.kind, ...toProperties(data.providerId) } as const)\n};\n\nfunction toProperties(version: ProviderId | undefined) {\n\tif (!version) {\n\t\treturn {};\n\t}\n\treturn {\n\t\t$extensionId: version.extensionId,\n\t\t$extensionVersion: version.extensionVersion,\n\t\t$providerId: version.providerId,\n\t};\n}\n\ntype Values<T> = T[keyof T];\nexport type ITextModelEditSourceMetadata = Values<{ [TKey in keyof typeof EditSources]: ReturnType<typeof EditSources[TKey]>['metadataT'] }>;\ntype ITextModelEditSourceMetadataKeys = Values<{ [TKey in keyof typeof EditSources]: keyof ReturnType<typeof EditSources[TKey]>['metadataT'] }>;\n\n\nfunction avoidPathRedaction(str: string | undefined): string | undefined {\n\tif (str === undefined) {\n\t\treturn undefined;\n\t}\n\t// To avoid false-positive file path redaction.\n\treturn str.replaceAll('/', '|');\n}\n\n\nexport class EditDeltaInfo {\n\tpublic static fromText(text: string): EditDeltaInfo {\n\t\tconst linesAdded = TextLength.ofText(text).lineCount;\n\t\tconst charsAdded = text.length;\n\t\treturn new EditDeltaInfo(linesAdded, 0, charsAdded, 0);\n\t}\n\n\tpublic static tryCreate(\n\t\tlinesAdded: number | undefined,\n\t\tlinesRemoved: number | undefined,\n\t\tcharsAdded: number | undefined,\n\t\tcharsRemoved: number | undefined\n\t): EditDeltaInfo | undefined {\n\t\tif (linesAdded === undefined || linesRemoved === undefined || charsAdded === undefined || charsRemoved === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn new EditDeltaInfo(linesAdded, linesRemoved, charsAdded, charsRemoved);\n\t}\n\n\tconstructor(\n\t\tpublic readonly linesAdded: number,\n\t\tpublic readonly linesRemoved: number,\n\t\tpublic readonly charsAdded: number,\n\t\tpublic readonly charsRemoved: number\n\t) { }\n}\n\n\n/**\n * This is an opaque serializable type that represents a unique identity for an edit.\n */\nexport interface EditSuggestionId {\n}\n\nexport namespace EditSuggestionId {\n\t/**\n\t * Use AiEditTelemetryServiceImpl to create a new id!\n\t*/\n\texport function newId(genPrefixedUuid?: (ns: string) => string): EditSuggestionId {\n\t\tconst id = genPrefixedUuid ? genPrefixedUuid('sgt') : prefixedUuid('sgt');\n\t\treturn toEditIdentity(id);\n\t}\n}\n\nfunction toEditIdentity(id: string): EditSuggestionId {\n\treturn id as unknown as EditSuggestionId;\n}\n","\nimport { prefixedUuid } from '../../base/common/uuid.js';\nimport { TextLength } from './core/text/textLength.js';\nimport { ProviderId, VersionedExtensionId } from './languages.js';\n\nconst privateSymbol = Symbol('TextModelEditSource');\n\nexport class TextModelEditSource {\n\tconstructor(\n\t\tpublic readonly metadata: ITextModelEditSourceMetadata,\n\t\t_privateCtorGuard: typeof privateSymbol,\n\t) { }\n\n\tpublic toString(): string {\n\t\treturn `${this.metadata.source}`;\n\t}\n\n\tpublic getType(): string {\n\t\tconst metadata = this.metadata;\n\t\tswitch (metadata.source) {\n\t\t\tcase 'cursor':\n\t\t\t\treturn metadata.kind;\n\t\t\tcase 'inlineCompletionAccept':\n\t\t\t\treturn metadata.source + (metadata.$nes ? ':nes' : '');\n\t\t\tcase 'unknown':\n\t\t\t\treturn metadata.name || 'unknown';\n\t\t\tdefault:\n\t\t\t\treturn metadata.source;\n\t\t}\n\t}\n\n\t/**\n\t * Converts the metadata to a key string.\n\t * Only includes properties/values that have `level` many `$` prefixes or less.\n\t*/\n\tpublic toKey(level: number, filter: { [TKey in ITextModelEditSourceMetadataKeys]?: boolean } = {}): string {\n\t\tconst metadata = this.metadata;\n\t\tconst keys = Object.entries(metadata).filter(([key, value]) => {\n\t\t\tconst filterVal = (filter as Record<string, boolean>)[key];\n\t\t\tif (filterVal !== undefined) {\n\t\t\t\treturn filterVal;\n\t\t\t}\n\n\t\t\tconst prefixCount = (key.match(/\\$/g) || []).length;\n\t\t\treturn prefixCount <= level && value !== undefined && value !== null && value !== '';\n\t\t}).map(([key, value]) => `${key}:${value}`);\n\t\treturn keys.join('-');\n\t}\n}\n\ntype TextModelEditSourceT<T> = TextModelEditSource & {\n\tmetadataT: T;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createEditSource<T extends Record<string, any>>(metadata: T): TextModelEditSourceT<T> {\n\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\treturn new TextModelEditSource(metadata as any, privateSymbol) as any;\n}\n\nexport const EditSources = {\n\tunknown(data: { name?: string | null }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'unknown',\n\t\t\tname: data.name,\n\t\t} as const);\n\t},\n\n\trename: () => createEditSource({ source: 'rename' } as const),\n\n\tchatApplyEdits(data: {\n\t\tmodelId: string | undefined;\n\t\tsessionId: string | undefined;\n\t\trequestId: string | undefined;\n\t\tlanguageId: string;\n\t\tmode: string | undefined;\n\t\textensionId: VersionedExtensionId | undefined;\n\t\tcodeBlockSuggestionId: EditSuggestionId | undefined;\n\t}) {\n\t\treturn createEditSource({\n\t\t\tsource: 'Chat.applyEdits',\n\t\t\t$modelId: avoidPathRedaction(data.modelId),\n\t\t\t$extensionId: data.extensionId?.extensionId,\n\t\t\t$extensionVersion: data.extensionId?.version,\n\t\t\t$$languageId: data.languageId,\n\t\t\t$$sessionId: data.sessionId,\n\t\t\t$$requestId: data.requestId,\n\t\t\t$$mode: data.mode,\n\t\t\t$$codeBlockSuggestionId: data.codeBlockSuggestionId,\n\t\t} as const);\n\t},\n\n\tchatUndoEdits: () => createEditSource({ source: 'Chat.undoEdits' } as const),\n\tchatReset: () => createEditSource({ source: 'Chat.reset' } as const),\n\n\tinlineCompletionAccept(data: { nes: boolean; requestUuid: string; languageId: string; providerId?: ProviderId }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineCompletionAccept',\n\t\t\t$nes: data.nes,\n\t\t\t...toProperties(data.providerId),\n\t\t\t$$requestUuid: data.requestUuid,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\tinlineCompletionPartialAccept(data: { nes: boolean; requestUuid: string; languageId: string; providerId?: ProviderId; type: 'word' | 'line' }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineCompletionPartialAccept',\n\t\t\ttype: data.type,\n\t\t\t$nes: data.nes,\n\t\t\t...toProperties(data.providerId),\n\t\t\t$$requestUuid: data.requestUuid,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\tinlineChatApplyEdit(data: { modelId: string | undefined; requestId: string | undefined; sessionId: string | undefined; languageId: string; extensionId: VersionedExtensionId | undefined }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineChat.applyEdits',\n\t\t\t$modelId: avoidPathRedaction(data.modelId),\n\t\t\t$extensionId: data.extensionId?.extensionId,\n\t\t\t$extensionVersion: data.extensionId?.version,\n\t\t\t$$sessionId: data.sessionId,\n\t\t\t$$requestId: data.requestId,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\treloadFromDisk: () => createEditSource({ source: 'reloadFromDisk' } as const),\n\n\tcursor(data: { kind: 'compositionType' | 'compositionEnd' | 'type' | 'paste' | 'cut' | 'executeCommands' | 'executeCommand'; detailedSource?: string | null }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'cursor',\n\t\t\tkind: data.kind,\n\t\t\tdetailedSource: data.detailedSource,\n\t\t} as const);\n\t},\n\n\tsetValue: () => createEditSource({ source: 'setValue' } as const),\n\teolChange: () => createEditSource({ source: 'eolChange' } as const),\n\tapplyEdits: () => createEditSource({ source: 'applyEdits' } as const),\n\tsnippet: () => createEditSource({ source: 'snippet' } as const),\n\tsuggest: (data: { providerId: ProviderId | undefined }) => createEditSource({ source: 'suggest', ...toProperties(data.providerId) } as const),\n\n\tcodeAction: (data: { kind: string | undefined; providerId: ProviderId | undefined }) => createEditSource({ source: 'codeAction', $kind: data.kind, ...toProperties(data.providerId) } as const)\n};\n\nfunction toProperties(version: ProviderId | undefined) {\n\tif (!version) {\n\t\treturn {};\n\t}\n\treturn {\n\t\t$extensionId: version.extensionId,\n\t\t$extensionVersion: version.extensionVersion,\n\t\t$providerId: version.providerId,\n\t};\n}\n\ntype Values<T> = T[keyof T];\nexport type ITextModelEditSourceMetadata = Values<{ [TKey in keyof typeof EditSources]: ReturnType<typeof EditSources[TKey]>['metadataT'] }>;\ntype ITextModelEditSourceMetadataKeys = Values<{ [TKey in keyof typeof EditSources]: keyof ReturnType<typeof EditSources[TKey]>['metadataT'] }>;\n\n\nfunction avoidPathRedaction(str: string | undefined): string | undefined {\n\tif (str === undefined) {\n\t\treturn undefined;\n\t}\n\t// To avoid false-positive file path redaction.\n\treturn str.replaceAll('/', '|');\n}\n\n\nexport class EditDeltaInfo {\n\tpublic static fromText(text: string): EditDeltaInfo {\n\t\tconst linesAdded = TextLength.ofText(text).lineCount;\n\t\tconst charsAdded = text.length;\n\t\treturn new EditDeltaInfo(linesAdded, 0, charsAdded, 0);\n\t}\n\n\tpublic static tryCreate(\n\t\tlinesAdded: number | undefined,\n\t\tlinesRemoved: number | undefined,\n\t\tcharsAdded: number | undefined,\n\t\tcharsRemoved: number | undefined\n\t): EditDeltaInfo | undefined {\n\t\tif (linesAdded === undefined || linesRemoved === undefined || charsAdded === undefined || charsRemoved === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn new EditDeltaInfo(linesAdded, linesRemoved, charsAdded, charsRemoved);\n\t}\n\n\tconstructor(\n\t\tpublic readonly linesAdded: number,\n\t\tpublic readonly linesRemoved: number,\n\t\tpublic readonly charsAdded: number,\n\t\tpublic readonly charsRemoved: number\n\t) { }\n}\n\n\n/**\n * This is an opaque serializable type that represents a unique identity for an edit.\n */\nexport interface EditSuggestionId {\n}\n\nexport namespace EditSuggestionId {\n\t/**\n\t * Use AiEditTelemetryServiceImpl to create a new id!\n\t*/\n\texport function newId(genPrefixedUuid?: (ns: string) => string): EditSuggestionId {\n\t\tconst id = genPrefixedUuid ? genPrefixedUuid('sgt') : prefixedUuid('sgt');\n\t\treturn toEditIdentity(id);\n\t}\n}\n\nfunction toEditIdentity(id: string): EditSuggestionId {\n\treturn id as unknown as EditSuggestionId;\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/common/textModelEditSource.ts","vs/editor/common/textModelEditSource.ts"],"names":[],"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He,sBAAK,QAGpB,CAAA;AACF,CAAC,EARgB,gBAAgB,KAAhB,gBAAgB,QAQhC;AAED,SAAS,cAAc,CAAC,EAAU;IACjC,OAAO,EAAiC,CAAC;AAC1C,CAAC","file":"textModelEditSource.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["\nimport { prefixedUuid } from '../../base/common/uuid.js';\nimport { TextLength } from './core/text/textLength.js';\nimport { ProviderId, VersionedExtensionId } from './languages.js';\n\nconst privateSymbol = Symbol('TextModelEditSource');\n\nexport class TextModelEditSource {\n\tconstructor(\n\t\tpublic readonly metadata: ITextModelEditSourceMetadata,\n\t\t_privateCtorGuard: typeof privateSymbol,\n\t) { }\n\n\tpublic toString(): string {\n\t\treturn `${this.metadata.source}`;\n\t}\n\n\tpublic getType(): string {\n\t\tconst metadata = this.metadata;\n\t\tswitch (metadata.source) {\n\t\t\tcase 'cursor':\n\t\t\t\treturn metadata.kind;\n\t\t\tcase 'inlineCompletionAccept':\n\t\t\t\treturn metadata.source + (metadata.$nes ? ':nes' : '');\n\t\t\tcase 'unknown':\n\t\t\t\treturn metadata.name || 'unknown';\n\t\t\tdefault:\n\t\t\t\treturn metadata.source;\n\t\t}\n\t}\n\n\t/**\n\t * Converts the metadata to a key string.\n\t * Only includes properties/values that have `level` many `$` prefixes or less.\n\t*/\n\tpublic toKey(level: number, filter: { [TKey in ITextModelEditSourceMetadataKeys]?: boolean } = {}): string {\n\t\tconst metadata = this.metadata;\n\t\tconst keys = Object.entries(metadata).filter(([key, value]) => {\n\t\t\tconst filterVal = (filter as Record<string, boolean>)[key];\n\t\t\tif (filterVal !== undefined) {\n\t\t\t\treturn filterVal;\n\t\t\t}\n\n\t\t\tconst prefixCount = (key.match(/\\$/g) || []).length;\n\t\t\treturn prefixCount <= level && value !== undefined && value !== null && value !== '';\n\t\t}).map(([key, value]) => `${key}:${value}`);\n\t\treturn keys.join('-');\n\t}\n}\n\ntype TextModelEditSourceT<T> = TextModelEditSource & {\n\tmetadataT: T;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createEditSource<T extends Record<string, any>>(metadata: T): TextModelEditSourceT<T> {\n\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\treturn new TextModelEditSource(metadata as any, privateSymbol) as any;\n}\n\nexport const EditSources = {\n\tunknown(data: { name?: string | null }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'unknown',\n\t\t\tname: data.name,\n\t\t} as const);\n\t},\n\n\trename: (oldName: string | undefined, newName: string) => createEditSource({ source: 'rename', $$$oldName: oldName, $$$newName: newName } as const),\n\n\tchatApplyEdits(data: {\n\t\tmodelId: string | undefined;\n\t\tsessionId: string | undefined;\n\t\trequestId: string | undefined;\n\t\tlanguageId: string;\n\t\tmode: string | undefined;\n\t\textensionId: VersionedExtensionId | undefined;\n\t\tcodeBlockSuggestionId: EditSuggestionId | undefined;\n\t}) {\n\t\treturn createEditSource({\n\t\t\tsource: 'Chat.applyEdits',\n\t\t\t$modelId: avoidPathRedaction(data.modelId),\n\t\t\t$extensionId: data.extensionId?.extensionId,\n\t\t\t$extensionVersion: data.extensionId?.version,\n\t\t\t$$languageId: data.languageId,\n\t\t\t$$sessionId: data.sessionId,\n\t\t\t$$requestId: data.requestId,\n\t\t\t$$mode: data.mode,\n\t\t\t$$codeBlockSuggestionId: data.codeBlockSuggestionId,\n\t\t} as const);\n\t},\n\n\tchatUndoEdits: () => createEditSource({ source: 'Chat.undoEdits' } as const),\n\tchatReset: () => createEditSource({ source: 'Chat.reset' } as const),\n\n\tinlineCompletionAccept(data: { nes: boolean; requestUuid: string; languageId: string; providerId?: ProviderId }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineCompletionAccept',\n\t\t\t$nes: data.nes,\n\t\t\t...toProperties(data.providerId),\n\t\t\t$$requestUuid: data.requestUuid,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\tinlineCompletionPartialAccept(data: { nes: boolean; requestUuid: string; languageId: string; providerId?: ProviderId; type: 'word' | 'line' }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineCompletionPartialAccept',\n\t\t\ttype: data.type,\n\t\t\t$nes: data.nes,\n\t\t\t...toProperties(data.providerId),\n\t\t\t$$requestUuid: data.requestUuid,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\tinlineChatApplyEdit(data: { modelId: string | undefined; requestId: string | undefined; sessionId: string | undefined; languageId: string; extensionId: VersionedExtensionId | undefined }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineChat.applyEdits',\n\t\t\t$modelId: avoidPathRedaction(data.modelId),\n\t\t\t$extensionId: data.extensionId?.extensionId,\n\t\t\t$extensionVersion: data.extensionId?.version,\n\t\t\t$$sessionId: data.sessionId,\n\t\t\t$$requestId: data.requestId,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\treloadFromDisk: () => createEditSource({ source: 'reloadFromDisk' } as const),\n\n\tcursor(data: { kind: 'compositionType' | 'compositionEnd' | 'type' | 'paste' | 'cut' | 'executeCommands' | 'executeCommand'; detailedSource?: string | null }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'cursor',\n\t\t\tkind: data.kind,\n\t\t\tdetailedSource: data.detailedSource,\n\t\t} as const);\n\t},\n\n\tsetValue: () => createEditSource({ source: 'setValue' } as const),\n\teolChange: () => createEditSource({ source: 'eolChange' } as const),\n\tapplyEdits: () => createEditSource({ source: 'applyEdits' } as const),\n\tsnippet: () => createEditSource({ source: 'snippet' } as const),\n\tsuggest: (data: { providerId: ProviderId | undefined }) => createEditSource({ source: 'suggest', ...toProperties(data.providerId) } as const),\n\n\tcodeAction: (data: { kind: string | undefined; providerId: ProviderId | undefined }) => createEditSource({ source: 'codeAction', $kind: data.kind, ...toProperties(data.providerId) } as const)\n};\n\nfunction toProperties(version: ProviderId | undefined) {\n\tif (!version) {\n\t\treturn {};\n\t}\n\treturn {\n\t\t$extensionId: version.extensionId,\n\t\t$extensionVersion: version.extensionVersion,\n\t\t$providerId: version.providerId,\n\t};\n}\n\ntype Values<T> = T[keyof T];\nexport type ITextModelEditSourceMetadata = Values<{ [TKey in keyof typeof EditSources]: ReturnType<typeof EditSources[TKey]>['metadataT'] }>;\ntype ITextModelEditSourceMetadataKeys = Values<{ [TKey in keyof typeof EditSources]: keyof ReturnType<typeof EditSources[TKey]>['metadataT'] }>;\n\n\nfunction avoidPathRedaction(str: string | undefined): string | undefined {\n\tif (str === undefined) {\n\t\treturn undefined;\n\t}\n\t// To avoid false-positive file path redaction.\n\treturn str.replaceAll('/', '|');\n}\n\n\nexport class EditDeltaInfo {\n\tpublic static fromText(text: string): EditDeltaInfo {\n\t\tconst linesAdded = TextLength.ofText(text).lineCount;\n\t\tconst charsAdded = text.length;\n\t\treturn new EditDeltaInfo(linesAdded, 0, charsAdded, 0);\n\t}\n\n\tpublic static tryCreate(\n\t\tlinesAdded: number | undefined,\n\t\tlinesRemoved: number | undefined,\n\t\tcharsAdded: number | undefined,\n\t\tcharsRemoved: number | undefined\n\t): EditDeltaInfo | undefined {\n\t\tif (linesAdded === undefined || linesRemoved === undefined || charsAdded === undefined || charsRemoved === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn new EditDeltaInfo(linesAdded, linesRemoved, charsAdded, charsRemoved);\n\t}\n\n\tconstructor(\n\t\tpublic readonly linesAdded: number,\n\t\tpublic readonly linesRemoved: number,\n\t\tpublic readonly charsAdded: number,\n\t\tpublic readonly charsRemoved: number\n\t) { }\n}\n\n\n/**\n * This is an opaque serializable type that represents a unique identity for an edit.\n */\nexport interface EditSuggestionId {\n}\n\nexport namespace EditSuggestionId {\n\t/**\n\t * Use AiEditTelemetryServiceImpl to create a new id!\n\t*/\n\texport function newId(genPrefixedUuid?: (ns: string) => string): EditSuggestionId {\n\t\tconst id = genPrefixedUuid ? genPrefixedUuid('sgt') : prefixedUuid('sgt');\n\t\treturn toEditIdentity(id);\n\t}\n}\n\nfunction toEditIdentity(id: string): EditSuggestionId {\n\treturn id as unknown as EditSuggestionId;\n}\n","\nimport { prefixedUuid } from '../../base/common/uuid.js';\nimport { TextLength } from './core/text/textLength.js';\nimport { ProviderId, VersionedExtensionId } from './languages.js';\n\nconst privateSymbol = Symbol('TextModelEditSource');\n\nexport class TextModelEditSource {\n\tconstructor(\n\t\tpublic readonly metadata: ITextModelEditSourceMetadata,\n\t\t_privateCtorGuard: typeof privateSymbol,\n\t) { }\n\n\tpublic toString(): string {\n\t\treturn `${this.metadata.source}`;\n\t}\n\n\tpublic getType(): string {\n\t\tconst metadata = this.metadata;\n\t\tswitch (metadata.source) {\n\t\t\tcase 'cursor':\n\t\t\t\treturn metadata.kind;\n\t\t\tcase 'inlineCompletionAccept':\n\t\t\t\treturn metadata.source + (metadata.$nes ? ':nes' : '');\n\t\t\tcase 'unknown':\n\t\t\t\treturn metadata.name || 'unknown';\n\t\t\tdefault:\n\t\t\t\treturn metadata.source;\n\t\t}\n\t}\n\n\t/**\n\t * Converts the metadata to a key string.\n\t * Only includes properties/values that have `level` many `$` prefixes or less.\n\t*/\n\tpublic toKey(level: number, filter: { [TKey in ITextModelEditSourceMetadataKeys]?: boolean } = {}): string {\n\t\tconst metadata = this.metadata;\n\t\tconst keys = Object.entries(metadata).filter(([key, value]) => {\n\t\t\tconst filterVal = (filter as Record<string, boolean>)[key];\n\t\t\tif (filterVal !== undefined) {\n\t\t\t\treturn filterVal;\n\t\t\t}\n\n\t\t\tconst prefixCount = (key.match(/\\$/g) || []).length;\n\t\t\treturn prefixCount <= level && value !== undefined && value !== null && value !== '';\n\t\t}).map(([key, value]) => `${key}:${value}`);\n\t\treturn keys.join('-');\n\t}\n}\n\ntype TextModelEditSourceT<T> = TextModelEditSource & {\n\tmetadataT: T;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createEditSource<T extends Record<string, any>>(metadata: T): TextModelEditSourceT<T> {\n\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\treturn new TextModelEditSource(metadata as any, privateSymbol) as any;\n}\n\nexport const EditSources = {\n\tunknown(data: { name?: string | null }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'unknown',\n\t\t\tname: data.name,\n\t\t} as const);\n\t},\n\n\trename: (oldName: string | undefined, newName: string) => createEditSource({ source: 'rename', $$$oldName: oldName, $$$newName: newName } as const),\n\n\tchatApplyEdits(data: {\n\t\tmodelId: string | undefined;\n\t\tsessionId: string | undefined;\n\t\trequestId: string | undefined;\n\t\tlanguageId: string;\n\t\tmode: string | undefined;\n\t\textensionId: VersionedExtensionId | undefined;\n\t\tcodeBlockSuggestionId: EditSuggestionId | undefined;\n\t}) {\n\t\treturn createEditSource({\n\t\t\tsource: 'Chat.applyEdits',\n\t\t\t$modelId: avoidPathRedaction(data.modelId),\n\t\t\t$extensionId: data.extensionId?.extensionId,\n\t\t\t$extensionVersion: data.extensionId?.version,\n\t\t\t$$languageId: data.languageId,\n\t\t\t$$sessionId: data.sessionId,\n\t\t\t$$requestId: data.requestId,\n\t\t\t$$mode: data.mode,\n\t\t\t$$codeBlockSuggestionId: data.codeBlockSuggestionId,\n\t\t} as const);\n\t},\n\n\tchatUndoEdits: () => createEditSource({ source: 'Chat.undoEdits' } as const),\n\tchatReset: () => createEditSource({ source: 'Chat.reset' } as const),\n\n\tinlineCompletionAccept(data: { nes: boolean; requestUuid: string; languageId: string; providerId?: ProviderId }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineCompletionAccept',\n\t\t\t$nes: data.nes,\n\t\t\t...toProperties(data.providerId),\n\t\t\t$$requestUuid: data.requestUuid,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\tinlineCompletionPartialAccept(data: { nes: boolean; requestUuid: string; languageId: string; providerId?: ProviderId; type: 'word' | 'line' }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineCompletionPartialAccept',\n\t\t\ttype: data.type,\n\t\t\t$nes: data.nes,\n\t\t\t...toProperties(data.providerId),\n\t\t\t$$requestUuid: data.requestUuid,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\tinlineChatApplyEdit(data: { modelId: string | undefined; requestId: string | undefined; sessionId: string | undefined; languageId: string; extensionId: VersionedExtensionId | undefined }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'inlineChat.applyEdits',\n\t\t\t$modelId: avoidPathRedaction(data.modelId),\n\t\t\t$extensionId: data.extensionId?.extensionId,\n\t\t\t$extensionVersion: data.extensionId?.version,\n\t\t\t$$sessionId: data.sessionId,\n\t\t\t$$requestId: data.requestId,\n\t\t\t$$languageId: data.languageId,\n\t\t} as const);\n\t},\n\n\treloadFromDisk: () => createEditSource({ source: 'reloadFromDisk' } as const),\n\n\tcursor(data: { kind: 'compositionType' | 'compositionEnd' | 'type' | 'paste' | 'cut' | 'executeCommands' | 'executeCommand'; detailedSource?: string | null }) {\n\t\treturn createEditSource({\n\t\t\tsource: 'cursor',\n\t\t\tkind: data.kind,\n\t\t\tdetailedSource: data.detailedSource,\n\t\t} as const);\n\t},\n\n\tsetValue: () => createEditSource({ source: 'setValue' } as const),\n\teolChange: () => createEditSource({ source: 'eolChange' } as const),\n\tapplyEdits: () => createEditSource({ source: 'applyEdits' } as const),\n\tsnippet: () => createEditSource({ source: 'snippet' } as const),\n\tsuggest: (data: { providerId: ProviderId | undefined }) => createEditSource({ source: 'suggest', ...toProperties(data.providerId) } as const),\n\n\tcodeAction: (data: { kind: string | undefined; providerId: ProviderId | undefined }) => createEditSource({ source: 'codeAction', $kind: data.kind, ...toProperties(data.providerId) } as const)\n};\n\nfunction toProperties(version: ProviderId | undefined) {\n\tif (!version) {\n\t\treturn {};\n\t}\n\treturn {\n\t\t$extensionId: version.extensionId,\n\t\t$extensionVersion: version.extensionVersion,\n\t\t$providerId: version.providerId,\n\t};\n}\n\ntype Values<T> = T[keyof T];\nexport type ITextModelEditSourceMetadata = Values<{ [TKey in keyof typeof EditSources]: ReturnType<typeof EditSources[TKey]>['metadataT'] }>;\ntype ITextModelEditSourceMetadataKeys = Values<{ [TKey in keyof typeof EditSources]: keyof ReturnType<typeof EditSources[TKey]>['metadataT'] }>;\n\n\nfunction avoidPathRedaction(str: string | undefined): string | undefined {\n\tif (str === undefined) {\n\t\treturn undefined;\n\t}\n\t// To avoid false-positive file path redaction.\n\treturn str.replaceAll('/', '|');\n}\n\n\nexport class EditDeltaInfo {\n\tpublic static fromText(text: string): EditDeltaInfo {\n\t\tconst linesAdded = TextLength.ofText(text).lineCount;\n\t\tconst charsAdded = text.length;\n\t\treturn new EditDeltaInfo(linesAdded, 0, charsAdded, 0);\n\t}\n\n\tpublic static tryCreate(\n\t\tlinesAdded: number | undefined,\n\t\tlinesRemoved: number | undefined,\n\t\tcharsAdded: number | undefined,\n\t\tcharsRemoved: number | undefined\n\t): EditDeltaInfo | undefined {\n\t\tif (linesAdded === undefined || linesRemoved === undefined || charsAdded === undefined || charsRemoved === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn new EditDeltaInfo(linesAdded, linesRemoved, charsAdded, charsRemoved);\n\t}\n\n\tconstructor(\n\t\tpublic readonly linesAdded: number,\n\t\tpublic readonly linesRemoved: number,\n\t\tpublic readonly charsAdded: number,\n\t\tpublic readonly charsRemoved: number\n\t) { }\n}\n\n\n/**\n * This is an opaque serializable type that represents a unique identity for an edit.\n */\nexport interface EditSuggestionId {\n}\n\nexport namespace EditSuggestionId {\n\t/**\n\t * Use AiEditTelemetryServiceImpl to create a new id!\n\t*/\n\texport function newId(genPrefixedUuid?: (ns: string) => string): EditSuggestionId {\n\t\tconst id = genPrefixedUuid ? genPrefixedUuid('sgt') : prefixedUuid('sgt');\n\t\treturn toEditIdentity(id);\n\t}\n}\n\nfunction toEditIdentity(id: string): EditSuggestionId {\n\treturn id as unknown as EditSuggestionId;\n}\n"]}
@@ -925,7 +925,7 @@ function _renderLine(input, sb) {
925
925
  }
926
926
  if (isOverflowing) {
927
927
  sb.appendString('<span class="mtkoverflow">');
928
- sb.appendString(nls.localize(796, "Show more ({0})", renderOverflowingCharCount(overflowingCharCount)));
928
+ sb.appendString(nls.localize(802, "Show more ({0})", renderOverflowingCharCount(overflowingCharCount)));
929
929
  sb.appendString('</span>');
930
930
  }
931
931
  sb.appendString('</span>');
@@ -936,7 +936,7 @@ function to4CharHex(n) {
936
936
  }
937
937
  function renderOverflowingCharCount(n) {
938
938
  if (n < 1024) {
939
- return nls.localize(797, "{0} chars", n);
939
+ return nls.localize(803, "{0} chars", n);
940
940
  }
941
941
  if (n < 1024 * 1024) {
942
942
  return `${(n / 1024).toFixed(1)} KB`;
@@ -43,12 +43,12 @@ let SelectionAnchorController = class SelectionAnchorController {
43
43
  this.decorationId = accessor.addDecoration(Selection.fromPositions(position, position), {
44
44
  description: 'selection-anchor',
45
45
  stickiness: 1 /* TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges */,
46
- hoverMessage: new MarkdownString().appendText(localize(798, "Selection Anchor")),
46
+ hoverMessage: new MarkdownString().appendText(localize(804, "Selection Anchor")),
47
47
  className: 'selection-anchor'
48
48
  });
49
49
  });
50
50
  this.selectionAnchorSetContextKey.set(!!this.decorationId);
51
- alert(localize(799, "Anchor set at {0}:{1}", position.lineNumber, position.column));
51
+ alert(localize(805, "Anchor set at {0}:{1}", position.lineNumber, position.column));
52
52
  }
53
53
  }
54
54
  goToSelectionAnchor() {
@@ -91,7 +91,7 @@ class SetSelectionAnchor extends EditorAction {
91
91
  constructor() {
92
92
  super({
93
93
  id: 'editor.action.setSelectionAnchor',
94
- label: localize2(800, "Set Selection Anchor"),
94
+ label: localize2(806, "Set Selection Anchor"),
95
95
  precondition: undefined,
96
96
  kbOpts: {
97
97
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -108,7 +108,7 @@ class GoToSelectionAnchor extends EditorAction {
108
108
  constructor() {
109
109
  super({
110
110
  id: 'editor.action.goToSelectionAnchor',
111
- label: localize2(801, "Go to Selection Anchor"),
111
+ label: localize2(807, "Go to Selection Anchor"),
112
112
  precondition: SelectionAnchorSet,
113
113
  });
114
114
  }
@@ -120,7 +120,7 @@ class SelectFromAnchorToCursor extends EditorAction {
120
120
  constructor() {
121
121
  super({
122
122
  id: 'editor.action.selectFromAnchorToCursor',
123
- label: localize2(802, "Select from Anchor to Cursor"),
123
+ label: localize2(808, "Select from Anchor to Cursor"),
124
124
  precondition: SelectionAnchorSet,
125
125
  kbOpts: {
126
126
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -137,7 +137,7 @@ class CancelSelectionAnchor extends EditorAction {
137
137
  constructor() {
138
138
  super({
139
139
  id: 'editor.action.cancelSelectionAnchor',
140
- label: localize2(803, "Cancel Selection Anchor"),
140
+ label: localize2(809, "Cancel Selection Anchor"),
141
141
  precondition: SelectionAnchorSet,
142
142
  kbOpts: {
143
143
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -16,12 +16,12 @@ import * as nls from '../../../../nls.js';
16
16
  import { MenuId, MenuRegistry } from '../../../../platform/actions/common/actions.js';
17
17
  import { registerColor } from '../../../../platform/theme/common/colorRegistry.js';
18
18
  import { themeColorFromId } from '../../../../platform/theme/common/themeService.js';
19
- const overviewRulerBracketMatchForeground = registerColor('editorOverviewRuler.bracketMatchForeground', '#A0A0A0', nls.localize(804, 'Overview ruler marker color for matching brackets.'));
19
+ const overviewRulerBracketMatchForeground = registerColor('editorOverviewRuler.bracketMatchForeground', '#A0A0A0', nls.localize(810, 'Overview ruler marker color for matching brackets.'));
20
20
  class JumpToBracketAction extends EditorAction {
21
21
  constructor() {
22
22
  super({
23
23
  id: 'editor.action.jumpToBracket',
24
- label: nls.localize2(806, "Go to Bracket"),
24
+ label: nls.localize2(812, "Go to Bracket"),
25
25
  precondition: undefined,
26
26
  kbOpts: {
27
27
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -38,10 +38,10 @@ class SelectToBracketAction extends EditorAction {
38
38
  constructor() {
39
39
  super({
40
40
  id: 'editor.action.selectToBracket',
41
- label: nls.localize2(807, "Select to Bracket"),
41
+ label: nls.localize2(813, "Select to Bracket"),
42
42
  precondition: undefined,
43
43
  metadata: {
44
- description: nls.localize2(808, "Select the text inside and including the brackets or curly braces"),
44
+ description: nls.localize2(814, "Select the text inside and including the brackets or curly braces"),
45
45
  args: [{
46
46
  name: 'args',
47
47
  schema: {
@@ -69,7 +69,7 @@ class RemoveBracketsAction extends EditorAction {
69
69
  constructor() {
70
70
  super({
71
71
  id: 'editor.action.removeBrackets',
72
- label: nls.localize2(809, "Remove Brackets"),
72
+ label: nls.localize2(815, "Remove Brackets"),
73
73
  precondition: undefined,
74
74
  kbOpts: {
75
75
  kbExpr: EditorContextKeys.editorTextFocus,
@@ -340,7 +340,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
340
340
  group: '5_infile_nav',
341
341
  command: {
342
342
  id: 'editor.action.jumpToBracket',
343
- title: nls.localize(805, "Go to &&Bracket")
343
+ title: nls.localize(811, "Go to &&Bracket")
344
344
  },
345
345
  order: 2
346
346
  });
@@ -29,7 +29,7 @@ class MoveCaretLeftAction extends MoveCaretAction {
29
29
  constructor() {
30
30
  super(true, {
31
31
  id: 'editor.action.moveCarretLeftAction',
32
- label: nls.localize2(810, "Move Selected Text Left"),
32
+ label: nls.localize2(816, "Move Selected Text Left"),
33
33
  precondition: EditorContextKeys.writable
34
34
  });
35
35
  }
@@ -38,7 +38,7 @@ class MoveCaretRightAction extends MoveCaretAction {
38
38
  constructor() {
39
39
  super(false, {
40
40
  id: 'editor.action.moveCarretRightAction',
41
- label: nls.localize2(811, "Move Selected Text Right"),
41
+ label: nls.localize2(817, "Move Selected Text Right"),
42
42
  precondition: EditorContextKeys.writable
43
43
  });
44
44
  }
@@ -12,7 +12,7 @@ class TransposeLettersAction extends EditorAction {
12
12
  constructor() {
13
13
  super({
14
14
  id: 'editor.action.transposeLetters',
15
- label: nls.localize2(812, "Transpose Letters"),
15
+ label: nls.localize2(818, "Transpose Letters"),
16
16
  precondition: EditorContextKeys.writable,
17
17
  kbOpts: {
18
18
  kbExpr: EditorContextKeys.textInputFocus,
@@ -44,23 +44,23 @@ export const CutAction = supportsCut ? registerCommand(new MultiCommand({
44
44
  menuOpts: [{
45
45
  menuId: MenuId.MenubarEditMenu,
46
46
  group: '2_ccp',
47
- title: nls.localize(813, "Cu&&t"),
47
+ title: nls.localize(819, "Cu&&t"),
48
48
  order: 1
49
49
  }, {
50
50
  menuId: MenuId.EditorContext,
51
51
  group: CLIPBOARD_CONTEXT_MENU_GROUP,
52
- title: nls.localize(814, "Cut"),
52
+ title: nls.localize(820, "Cut"),
53
53
  when: EditorContextKeys.writable,
54
54
  order: 1,
55
55
  }, {
56
56
  menuId: MenuId.CommandPalette,
57
57
  group: '',
58
- title: nls.localize(815, "Cut"),
58
+ title: nls.localize(821, "Cut"),
59
59
  order: 1
60
60
  }, {
61
61
  menuId: MenuId.SimpleEditorContext,
62
62
  group: CLIPBOARD_CONTEXT_MENU_GROUP,
63
- title: nls.localize(816, "Cut"),
63
+ title: nls.localize(822, "Cut"),
64
64
  when: EditorContextKeys.writable,
65
65
  order: 1,
66
66
  }]
@@ -79,29 +79,29 @@ export const CopyAction = supportsCopy ? registerCommand(new MultiCommand({
79
79
  menuOpts: [{
80
80
  menuId: MenuId.MenubarEditMenu,
81
81
  group: '2_ccp',
82
- title: nls.localize(817, "&&Copy"),
82
+ title: nls.localize(823, "&&Copy"),
83
83
  order: 2
84
84
  }, {
85
85
  menuId: MenuId.EditorContext,
86
86
  group: CLIPBOARD_CONTEXT_MENU_GROUP,
87
- title: nls.localize(818, "Copy"),
87
+ title: nls.localize(824, "Copy"),
88
88
  order: 2,
89
89
  }, {
90
90
  menuId: MenuId.CommandPalette,
91
91
  group: '',
92
- title: nls.localize(819, "Copy"),
92
+ title: nls.localize(825, "Copy"),
93
93
  order: 1
94
94
  }, {
95
95
  menuId: MenuId.SimpleEditorContext,
96
96
  group: CLIPBOARD_CONTEXT_MENU_GROUP,
97
- title: nls.localize(820, "Copy"),
97
+ title: nls.localize(826, "Copy"),
98
98
  order: 2,
99
99
  }]
100
100
  })) : undefined;
101
- MenuRegistry.appendMenuItem(MenuId.MenubarEditMenu, { submenu: MenuId.MenubarCopy, title: nls.localize2(825, "Copy As"), group: '2_ccp', order: 3 });
102
- MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextCopy, title: nls.localize2(826, "Copy As"), group: CLIPBOARD_CONTEXT_MENU_GROUP, order: 3 });
103
- MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextShare, title: nls.localize2(827, "Share"), group: '11_share', order: -1, when: ContextKeyExpr.and(ContextKeyExpr.notEquals('resourceScheme', 'output'), EditorContextKeys.editorTextFocus) });
104
- MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { submenu: MenuId.ExplorerContextShare, title: nls.localize2(828, "Share"), group: '11_share', order: -1 });
101
+ MenuRegistry.appendMenuItem(MenuId.MenubarEditMenu, { submenu: MenuId.MenubarCopy, title: nls.localize2(831, "Copy As"), group: '2_ccp', order: 3 });
102
+ MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextCopy, title: nls.localize2(832, "Copy As"), group: CLIPBOARD_CONTEXT_MENU_GROUP, order: 3 });
103
+ MenuRegistry.appendMenuItem(MenuId.EditorContext, { submenu: MenuId.EditorContextShare, title: nls.localize2(833, "Share"), group: '11_share', order: -1, when: ContextKeyExpr.and(ContextKeyExpr.notEquals('resourceScheme', 'output'), EditorContextKeys.editorTextFocus) });
104
+ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, { submenu: MenuId.ExplorerContextShare, title: nls.localize2(834, "Share"), group: '11_share', order: -1 });
105
105
  export const PasteAction = supportsPaste ? registerCommand(new MultiCommand({
106
106
  id: 'editor.action.clipboardPasteAction',
107
107
  precondition: undefined,
@@ -117,23 +117,23 @@ export const PasteAction = supportsPaste ? registerCommand(new MultiCommand({
117
117
  menuOpts: [{
118
118
  menuId: MenuId.MenubarEditMenu,
119
119
  group: '2_ccp',
120
- title: nls.localize(821, "&&Paste"),
120
+ title: nls.localize(827, "&&Paste"),
121
121
  order: 4
122
122
  }, {
123
123
  menuId: MenuId.EditorContext,
124
124
  group: CLIPBOARD_CONTEXT_MENU_GROUP,
125
- title: nls.localize(822, "Paste"),
125
+ title: nls.localize(828, "Paste"),
126
126
  when: EditorContextKeys.writable,
127
127
  order: 4,
128
128
  }, {
129
129
  menuId: MenuId.CommandPalette,
130
130
  group: '',
131
- title: nls.localize(823, "Paste"),
131
+ title: nls.localize(829, "Paste"),
132
132
  order: 1
133
133
  }, {
134
134
  menuId: MenuId.SimpleEditorContext,
135
135
  group: CLIPBOARD_CONTEXT_MENU_GROUP,
136
- title: nls.localize(824, "Paste"),
136
+ title: nls.localize(830, "Paste"),
137
137
  when: EditorContextKeys.writable,
138
138
  order: 4,
139
139
  }]
@@ -142,7 +142,7 @@ class ExecCommandCopyWithSyntaxHighlightingAction extends EditorAction {
142
142
  constructor() {
143
143
  super({
144
144
  id: 'editor.action.clipboardCopyWithSyntaxHighlightingAction',
145
- label: nls.localize2(829, "Copy with Syntax Highlighting"),
145
+ label: nls.localize2(835, "Copy with Syntax Highlighting"),
146
146
  precondition: undefined,
147
147
  kbOpts: {
148
148
  kbExpr: EditorContextKeys.textInputFocus,
@@ -252,7 +252,7 @@ export async function applyCodeAction(accessor, item, codeActionReason, options,
252
252
  const message = asMessage(err);
253
253
  notificationService.error(typeof message === 'string'
254
254
  ? message
255
- : nls.localize(830, "An unknown error occurred while applying the code action"));
255
+ : nls.localize(836, "An unknown error occurred while applying the code action"));
256
256
  }
257
257
  }
258
258
  // ensure the start sound and end sound do not overlap