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

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 (430) 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 +29 -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/list/rowCache.js +1 -4
  41. package/esm/vs/base/browser/ui/list/rowCache.js.map +1 -1
  42. package/esm/vs/base/browser/ui/menu/menu.js +14 -12
  43. package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
  44. package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
  45. package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
  46. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
  47. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
  48. package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
  49. package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
  50. package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
  51. package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
  52. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  53. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
  54. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  55. package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
  56. package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
  57. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  58. package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
  59. package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
  60. package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
  61. package/esm/vs/base/common/arrays.js +10 -0
  62. package/esm/vs/base/common/arrays.js.map +1 -1
  63. package/esm/vs/base/common/async.js +34 -0
  64. package/esm/vs/base/common/async.js.map +1 -1
  65. package/esm/vs/base/common/buffer.js +1 -1
  66. package/esm/vs/base/common/buffer.js.map +1 -1
  67. package/esm/vs/base/common/cancellation.js.map +1 -1
  68. package/esm/vs/base/common/codiconsLibrary.js +3 -0
  69. package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
  70. package/esm/vs/base/common/collections.js.map +1 -1
  71. package/esm/vs/base/common/equals.js.map +1 -1
  72. package/esm/vs/base/common/event.js +32 -15
  73. package/esm/vs/base/common/event.js.map +1 -1
  74. package/esm/vs/base/common/filters.js +22 -3
  75. package/esm/vs/base/common/filters.js.map +1 -1
  76. package/esm/vs/base/common/hotReload.js +2 -2
  77. package/esm/vs/base/common/hotReload.js.map +1 -1
  78. package/esm/vs/base/common/iterator.js +1 -1
  79. package/esm/vs/base/common/iterator.js.map +1 -1
  80. package/esm/vs/base/common/keyCodes.js +7 -6
  81. package/esm/vs/base/common/keyCodes.js.map +1 -1
  82. package/esm/vs/base/common/linkedList.js.map +1 -1
  83. package/esm/vs/base/common/map.js +8 -5
  84. package/esm/vs/base/common/map.js.map +1 -1
  85. package/esm/vs/base/common/marked/marked.js +0 -1
  86. package/esm/vs/base/common/network.js +26 -1
  87. package/esm/vs/base/common/network.js.map +1 -1
  88. package/esm/vs/base/common/normalization.js +19 -6
  89. package/esm/vs/base/common/normalization.js.map +1 -1
  90. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
  91. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  92. package/esm/vs/base/common/observableInternal/debugName.js +0 -1
  93. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  94. package/esm/vs/base/common/observableInternal/index.js +4 -4
  95. package/esm/vs/base/common/observableInternal/index.js.map +1 -1
  96. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
  97. package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
  98. package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
  99. package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
  100. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +1 -4
  101. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  102. package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
  103. package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
  104. package/esm/vs/base/common/path.js +1 -0
  105. package/esm/vs/base/common/path.js.map +1 -1
  106. package/esm/vs/base/common/strings.js +27 -19
  107. package/esm/vs/base/common/strings.js.map +1 -1
  108. package/esm/vs/base/common/worker/webWorker.js +10 -7
  109. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  110. package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
  111. package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
  112. package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
  113. package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
  114. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  115. package/esm/vs/editor/browser/config/tabFocus.js +4 -2
  116. package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
  117. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
  118. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
  119. package/esm/vs/editor/browser/coreCommands.js +1 -2
  120. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  121. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  122. package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
  123. package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
  124. package/esm/vs/editor/browser/services/contribution.js +9 -0
  125. package/esm/vs/editor/browser/services/contribution.js.map +1 -0
  126. package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
  127. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  128. package/esm/vs/editor/browser/services/openerService.js +5 -1
  129. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  130. package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
  131. package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
  132. package/esm/vs/editor/browser/view/renderingContext.js +1 -1
  133. package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
  134. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
  135. package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
  136. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
  137. package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
  138. package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
  139. package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
  140. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
  141. package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
  142. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
  143. package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
  144. package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
  145. package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
  146. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
  147. package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
  148. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
  149. package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
  150. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
  151. package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
  152. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
  153. package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
  154. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
  155. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  156. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
  157. package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
  158. package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
  159. package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
  160. package/esm/vs/editor/common/config/editorOptions.js +374 -360
  161. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  162. package/esm/vs/editor/common/core/2d/rect.js +7 -0
  163. package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
  164. package/esm/vs/editor/common/core/2d/size.js +20 -0
  165. package/esm/vs/editor/common/core/2d/size.js.map +1 -0
  166. package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
  167. package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
  168. package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
  169. package/esm/vs/editor/common/core/ranges/offsetRange.js.map +1 -1
  170. package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
  171. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  172. package/esm/vs/editor/common/editorContextKeys.js +47 -47
  173. package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
  174. package/esm/vs/editor/common/languages.js +56 -56
  175. package/esm/vs/editor/common/languages.js.map +1 -1
  176. package/esm/vs/editor/common/model/editStack.js +1 -1
  177. package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
  178. package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
  179. package/esm/vs/editor/common/standaloneStrings.js +11 -10
  180. package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
  181. package/esm/vs/editor/common/textModelEditSource.js +1 -1
  182. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  183. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
  184. package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
  185. package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
  186. package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
  187. package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
  188. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
  189. package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
  190. package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
  191. package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
  192. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
  193. package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
  194. package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
  195. package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
  196. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
  197. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  198. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
  199. package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
  200. package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
  201. package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
  202. package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
  203. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
  204. package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
  205. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
  206. package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
  207. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
  208. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
  209. package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
  210. package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
  211. package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
  212. package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
  213. package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
  214. package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
  215. package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
  216. package/esm/vs/editor/contrib/find/browser/findWidgetSearchHistory.js.map +1 -1
  217. package/esm/vs/editor/contrib/find/browser/replaceWidgetHistory.js.map +1 -1
  218. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
  219. package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
  220. package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
  221. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
  222. package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
  223. package/esm/vs/editor/contrib/format/browser/format.js +21 -6
  224. package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
  225. package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
  226. package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
  227. package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
  228. package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
  229. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  230. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
  231. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
  232. package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
  233. package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
  234. package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
  235. package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
  236. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
  237. package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
  238. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
  239. package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
  240. package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
  241. package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
  242. package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
  243. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
  244. package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
  245. package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
  246. package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
  247. package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
  248. package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
  249. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
  250. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
  251. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
  252. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
  253. package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
  254. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
  255. package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
  256. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +42 -37
  257. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  258. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
  259. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
  260. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
  261. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
  262. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
  263. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  264. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +12 -12
  265. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
  266. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +74 -48
  267. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  268. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
  269. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
  270. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
  271. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
  272. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
  273. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
  274. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
  275. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
  276. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
  277. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
  278. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
  279. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
  280. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
  281. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +428 -0
  282. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
  283. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +290 -0
  284. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
  285. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
  286. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
  287. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
  288. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
  289. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
  290. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
  291. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
  292. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +10 -0
  293. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
  294. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
  295. package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
  296. package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
  297. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -31
  298. package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
  299. package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
  300. package/esm/vs/editor/contrib/links/browser/links.js +10 -10
  301. package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
  302. package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
  303. package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
  304. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
  305. package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
  306. package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
  307. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +2 -2
  308. package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
  309. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
  310. package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
  311. package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
  312. package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
  313. package/esm/vs/editor/contrib/rename/browser/rename.js +12 -12
  314. package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
  315. package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
  316. package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
  317. package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
  318. package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
  319. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
  320. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
  321. package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
  322. package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
  323. package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
  324. package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
  325. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
  326. package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
  327. package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
  328. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
  329. package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
  330. package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
  331. package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
  332. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -29
  333. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  334. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
  335. package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
  336. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +4 -4
  337. package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
  338. package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
  339. package/esm/vs/editor/editor.all.js +1 -0
  340. package/esm/vs/editor/editor.all.js.map +1 -1
  341. package/esm/vs/editor/editor.api.d.ts +9 -5
  342. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
  343. package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
  344. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
  345. package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
  346. package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
  347. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  348. package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
  349. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  350. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
  351. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  352. package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
  353. package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
  354. package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
  355. package/esm/vs/platform/actionWidget/browser/actionWidget.css +7 -0
  356. package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
  357. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
  358. package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
  359. package/esm/vs/platform/actions/browser/toolbar.js +2 -2
  360. package/esm/vs/platform/actions/common/actions.js +2 -0
  361. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  362. package/esm/vs/platform/actions/common/menuService.js +2 -2
  363. package/esm/vs/platform/configuration/common/configuration.js +5 -4
  364. package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
  365. package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
  366. package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
  367. package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
  368. package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
  369. package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
  370. package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
  371. package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
  372. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  373. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  374. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  375. package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
  376. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  377. package/esm/vs/platform/hover/browser/hoverService.js +17 -8
  378. package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
  379. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  380. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  381. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
  382. package/esm/vs/platform/list/browser/listService.js +27 -27
  383. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  384. package/esm/vs/platform/markers/common/markerService.js +2 -2
  385. package/esm/vs/platform/markers/common/markers.js +6 -6
  386. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +51 -39
  387. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
  388. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  389. package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
  390. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  391. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  392. package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
  393. package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
  394. package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
  395. package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
  396. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  397. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  398. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +78 -39
  399. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
  400. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
  401. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
  402. package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
  403. package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
  404. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  405. package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
  406. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  407. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  408. package/esm/vs/platform/theme/common/colors/editorColors.js.map +1 -1
  409. package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
  410. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  411. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  412. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  413. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  414. package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
  415. package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
  416. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  417. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  418. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  419. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
  420. package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
  421. package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
  422. package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
  423. package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
  424. package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
  425. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  426. package/monaco.d.ts +9 -5
  427. package/package.json +2 -2
  428. package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
  429. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
  430. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
@@ -12,12 +12,14 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
14
  var AbstractCommandsQuickAccessProvider_1, CommandsHistory_1;
15
+ import { Codicon } from '../../../base/common/codicons.js';
15
16
  import { toErrorMessage } from '../../../base/common/errorMessage.js';
16
17
  import { isCancellationError } from '../../../base/common/errors.js';
17
- import { matchesContiguousSubString, matchesPrefix, matchesWords, or } from '../../../base/common/filters.js';
18
+ import { matchesBaseContiguousSubString, matchesWords, or } from '../../../base/common/filters.js';
18
19
  import { createSingleCallFunction } from '../../../base/common/functional.js';
19
20
  import { Disposable } from '../../../base/common/lifecycle.js';
20
21
  import { LRUCache } from '../../../base/common/map.js';
22
+ import { ThemeIcon } from '../../../base/common/themables.js';
21
23
  import { TfIdfCalculator, normalizeTfIdfScores } from '../../../base/common/tfIdf.js';
22
24
  import { localize } from '../../../nls.js';
23
25
  import { ICommandService } from '../../commands/common/commands.js';
@@ -26,17 +28,16 @@ import { IDialogService } from '../../dialogs/common/dialogs.js';
26
28
  import { IInstantiationService } from '../../instantiation/common/instantiation.js';
27
29
  import { IKeybindingService } from '../../keybinding/common/keybinding.js';
28
30
  import { ILogService } from '../../log/common/log.js';
29
- import { PickerQuickAccessProvider } from './pickerQuickAccess.js';
31
+ import { PickerQuickAccessProvider, TriggerAction } from './pickerQuickAccess.js';
30
32
  import { IStorageService, WillSaveStateReason } from '../../storage/common/storage.js';
31
33
  import { ITelemetryService } from '../../telemetry/common/telemetry.js';
32
- import { removeAccents } from '../../../base/common/normalization.js';
33
34
  import { Categories } from '../../action/common/actionCommonCategories.js';
34
35
  let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider {
35
36
  static { AbstractCommandsQuickAccessProvider_1 = this; }
36
37
  static { this.PREFIX = '>'; }
37
38
  static { this.TFIDF_THRESHOLD = 0.5; }
38
39
  static { this.TFIDF_MAX_RESULTS = 5; }
39
- static { this.WORD_FILTER = or(matchesPrefix, matchesWords, matchesContiguousSubString); }
40
+ static { this.WORD_FILTER = or(matchesBaseContiguousSubString, matchesWords); }
40
41
  constructor(options, instantiationService, keybindingService, commandService, telemetryService, dialogService) {
41
42
  super(AbstractCommandsQuickAccessProvider_1.PREFIX, options);
42
43
  this.keybindingService = keybindingService;
@@ -63,16 +64,13 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
63
64
  .filter(score => score.score > AbstractCommandsQuickAccessProvider_1.TFIDF_THRESHOLD)
64
65
  .slice(0, AbstractCommandsQuickAccessProvider_1.TFIDF_MAX_RESULTS);
65
66
  });
66
- const noAccentsFilter = this.normalizeForFiltering(filter);
67
67
  // Filter
68
68
  const filteredCommandPicks = [];
69
69
  for (const commandPick of allCommandPicks) {
70
- commandPick.labelNoAccents ??= this.normalizeForFiltering(commandPick.label);
71
- const labelHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(noAccentsFilter, commandPick.labelNoAccents) ?? undefined;
70
+ const labelHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(filter, commandPick.label) ?? undefined;
72
71
  let aliasHighlights;
73
72
  if (commandPick.commandAlias) {
74
- commandPick.aliasNoAccents ??= this.normalizeForFiltering(commandPick.commandAlias);
75
- aliasHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(noAccentsFilter, commandPick.aliasNoAccents) ?? undefined;
73
+ aliasHighlights = AbstractCommandsQuickAccessProvider_1.WORD_FILTER(filter, commandPick.commandAlias) ?? undefined;
76
74
  }
77
75
  // Add if matching in label or alias
78
76
  if (labelHighlights || aliasHighlights) {
@@ -169,28 +167,29 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
169
167
  let addCommonlyUsedSeparator = !!this.options.suggestedCommandIds;
170
168
  for (let i = 0; i < filteredCommandPicks.length; i++) {
171
169
  const commandPick = filteredCommandPicks[i];
170
+ const isInHistory = !!this.commandsHistory.peek(commandPick.commandId);
172
171
  // Separator: recently used
173
- if (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {
174
- commandPicks.push({ type: 'separator', label: localize(1740, "recently used") });
172
+ if (i === 0 && isInHistory) {
173
+ commandPicks.push({ type: 'separator', label: localize(1747, "recently used") });
175
174
  addOtherSeparator = true;
176
175
  }
177
176
  if (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {
178
- commandPicks.push({ type: 'separator', label: localize(1741, "similar commands") });
177
+ commandPicks.push({ type: 'separator', label: localize(1748, "similar commands") });
179
178
  addSuggestedSeparator = false;
180
179
  }
181
180
  // Separator: commonly used
182
- if (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && this.options.suggestedCommandIds?.has(commandPick.commandId)) {
183
- commandPicks.push({ type: 'separator', label: localize(1742, "commonly used") });
181
+ if (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !isInHistory && this.options.suggestedCommandIds?.has(commandPick.commandId)) {
182
+ commandPicks.push({ type: 'separator', label: localize(1749, "commonly used") });
184
183
  addOtherSeparator = true;
185
184
  addCommonlyUsedSeparator = false;
186
185
  }
187
186
  // Separator: other commands
188
- if (addOtherSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {
189
- commandPicks.push({ type: 'separator', label: localize(1743, "other commands") });
187
+ if (addOtherSeparator && commandPick.tfIdfScore === undefined && !isInHistory && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {
188
+ commandPicks.push({ type: 'separator', label: localize(1750, "other commands") });
190
189
  addOtherSeparator = false;
191
190
  }
192
191
  // Command
193
- commandPicks.push(this.toCommandPick(commandPick, runOptions));
192
+ commandPicks.push(this.toCommandPick(commandPick, runOptions, isInHistory));
194
193
  }
195
194
  if (!this.hasAdditionalCommandPicks(filter, token)) {
196
195
  return commandPicks;
@@ -206,25 +205,35 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
206
205
  // Basically, if we haven't already added a separator, we add one before the additional picks so long
207
206
  // as one hasn't been added to the start of the array.
208
207
  if (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {
209
- commandPicks.unshift({ type: 'separator', label: localize(1744, "similar commands") });
208
+ commandPicks.unshift({ type: 'separator', label: localize(1751, "similar commands") });
210
209
  }
211
210
  return commandPicks;
212
211
  })()
213
212
  };
214
213
  }
215
- toCommandPick(commandPick, runOptions) {
214
+ toCommandPick(commandPick, runOptions, isRecentlyUsed = false) {
216
215
  if (commandPick.type === 'separator') {
217
216
  return commandPick;
218
217
  }
219
218
  const keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);
220
219
  const ariaLabel = keybinding ?
221
- localize(1745, "{0}, {1}", commandPick.label, keybinding.getAriaLabel()) :
220
+ localize(1752, "{0}, {1}", commandPick.label, keybinding.getAriaLabel()) :
222
221
  commandPick.label;
222
+ // Add remove button for recently used items (as the last button, to the right)
223
+ const existingButtons = commandPick.buttons || [];
224
+ const buttons = isRecentlyUsed ? [
225
+ ...existingButtons,
226
+ {
227
+ iconClass: ThemeIcon.asClassName(Codicon.close),
228
+ tooltip: localize(1753, "Remove from Recently Used")
229
+ }
230
+ ] : commandPick.buttons;
223
231
  return {
224
232
  ...commandPick,
225
233
  ariaLabel,
226
234
  detail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined,
227
235
  keybinding,
236
+ buttons,
228
237
  accept: async () => {
229
238
  // Add to history
230
239
  this.commandsHistory.push(commandPick.commandId);
@@ -241,10 +250,23 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
241
250
  }
242
251
  catch (error) {
243
252
  if (!isCancellationError(error)) {
244
- this.dialogService.error(localize(1746, "Command '{0}' resulted in an error", commandPick.label), toErrorMessage(error));
253
+ this.dialogService.error(localize(1754, "Command '{0}' resulted in an error", commandPick.label), toErrorMessage(error));
245
254
  }
246
255
  }
247
- }
256
+ },
257
+ trigger: isRecentlyUsed ? (buttonIndex, keyMods) => {
258
+ // The remove button is now the last button
259
+ const removeButtonIndex = existingButtons.length;
260
+ if (buttonIndex === removeButtonIndex) {
261
+ this.commandsHistory.remove(commandPick.commandId);
262
+ return TriggerAction.REMOVE_ITEM;
263
+ }
264
+ // Handle other buttons (e.g., configure keybinding button)
265
+ if (commandPick.trigger) {
266
+ return commandPick.trigger(buttonIndex, keyMods);
267
+ }
268
+ return TriggerAction.NO_ACTION;
269
+ } : commandPick.trigger
248
270
  };
249
271
  }
250
272
  // TF-IDF string to be indexed
@@ -259,23 +281,6 @@ let AbstractCommandsQuickAccessProvider = class AbstractCommandsQuickAccessProvi
259
281
  }
260
282
  return chunk;
261
283
  }
262
- /**
263
- * Normalizes a string for filtering by removing accents, but only if
264
- * the result has the same length, otherwise returns the original string.
265
- */
266
- normalizeForFiltering(value) {
267
- const withoutAccents = removeAccents(value);
268
- if (withoutAccents.length !== value.length) {
269
- this.telemetryService.publicLog2('QuickAccess:FilterLengthMismatch', {
270
- originalLength: value.length,
271
- normalizedLength: withoutAccents.length
272
- });
273
- return value;
274
- }
275
- else {
276
- return withoutAccents;
277
- }
278
- }
279
284
  };
280
285
  AbstractCommandsQuickAccessProvider = AbstractCommandsQuickAccessProvider_1 = __decorate([
281
286
  __param(1, IInstantiationService),
@@ -357,6 +362,13 @@ let CommandsHistory = class CommandsHistory extends Disposable {
357
362
  peek(commandId) {
358
363
  return CommandsHistory_1.cache?.peek(commandId);
359
364
  }
365
+ remove(commandId) {
366
+ if (!CommandsHistory_1.cache) {
367
+ return;
368
+ }
369
+ CommandsHistory_1.cache.delete(commandId);
370
+ CommandsHistory_1.hasChanges = true;
371
+ }
360
372
  saveState() {
361
373
  if (!CommandsHistory_1.cache) {
362
374
  return;
@@ -1 +1 @@
1
- {"version":3,"sources":["vs/platform/quickinput/browser/commandsQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAIhG,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAU,0BAA0B,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACtH,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAgC,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAA6B,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAA+E,yBAAyB,EAAS,MAAM,wBAAwB,CAAC;AAGvJ,OAAO,EAAE,eAAe,EAA+B,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpH,OAA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,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,2DAA2C,CAAC;QACrI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,iBAAe,CAAC,gBAAgB,EAAE,iBAAe,CAAC,OAAO,2DAA2C,CAAC;QAC/H,iBAAe,CAAC,UAAU,GAAG,KAAK,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,iCAAiC,CAAC,oBAA2C;QACnF,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,EAAqC,CAAC;QAElF,MAAM,8BAA8B,GAAG,MAAM,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC;QACjF,IAAI,OAAO,8BAA8B,KAAK,QAAQ,EAAE,CAAC;YACxD,OAAO,8BAA8B,CAAC;QACvC,CAAC;QAED,OAAO,iBAAe,CAAC,+BAA+B,CAAC;IACxD,CAAC;;AAnHW,eAAe;IAczB,WAAA,eAAe,CAAA;IACf,WAAA,qBAAqB,CAAA;IACrB,WAAA,WAAW,CAAA;GAhBD,eAAe,CAoH3B","file":"commandsQuickAccess.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 { WorkbenchActionExecutedClassification, WorkbenchActionExecutedEvent } from '../../../base/common/actions.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { toErrorMessage } from '../../../base/common/errorMessage.js';\nimport { isCancellationError } from '../../../base/common/errors.js';\nimport { IMatch, matchesContiguousSubString, matchesPrefix, matchesWords, or } from '../../../base/common/filters.js';\nimport { createSingleCallFunction } from '../../../base/common/functional.js';\nimport { Disposable, DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';\nimport { LRUCache } from '../../../base/common/map.js';\nimport { TfIdfCalculator, normalizeTfIdfScores } from '../../../base/common/tfIdf.js';\nimport { localize } from '../../../nls.js';\nimport { ILocalizedString } from '../../action/common/action.js';\nimport { ICommandService } from '../../commands/common/commands.js';\nimport { IConfigurationChangeEvent, IConfigurationService } from '../../configuration/common/configuration.js';\nimport { IDialogService } from '../../dialogs/common/dialogs.js';\nimport { IInstantiationService } from '../../instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { FastAndSlowPicks, IPickerQuickAccessItem, IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks } from './pickerQuickAccess.js';\nimport { IQuickAccessProviderRunOptions } from '../common/quickAccess.js';\nimport { IQuickPickSeparator } from '../common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget, WillSaveStateReason } from '../../storage/common/storage.js';\nimport { ITelemetryService } from '../../telemetry/common/telemetry.js';\nimport { removeAccents } from '../../../base/common/normalization.js';\nimport { Categories } from '../../action/common/actionCommonCategories.js';\n\nexport interface ICommandQuickPick extends IPickerQuickAccessItem {\n\treadonly commandId: string;\n\treadonly commandAlias?: string;\n\treadonly commandDescription?: ILocalizedString;\n\treadonly commandCategory?: string;\n\n\treadonly args?: unknown[];\n\n\ttfIdfScore?: number;\n\n\t// These fields are lazy initialized during filtering process.\n\tlabelNoAccents?: string;\n\taliasNoAccents?: string;\n}\n\nexport interface ICommandsQuickAccessOptions extends IPickerQuickAccessProviderOptions<ICommandQuickPick> {\n\treadonly showAlias: boolean;\n\tsuggestedCommandIds?: Set<string>;\n}\n\nexport abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider<ICommandQuickPick> implements IDisposable {\n\n\tstatic PREFIX = '>';\n\n\tprivate static readonly TFIDF_THRESHOLD = 0.5;\n\tprivate static readonly TFIDF_MAX_RESULTS = 5;\n\n\tprivate static WORD_FILTER = or(matchesPrefix, matchesWords, matchesContiguousSubString);\n\n\tprivate readonly commandsHistory: CommandsHistory;\n\n\tprotected override readonly options: ICommandsQuickAccessOptions;\n\n\tconstructor(\n\t\toptions: ICommandsQuickAccessOptions,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IKeybindingService protected readonly keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly commandService: ICommandService,\n\t\t@ITelemetryService private readonly telemetryService: ITelemetryService,\n\t\t@IDialogService private readonly dialogService: IDialogService\n\t) {\n\t\tsuper(AbstractCommandsQuickAccessProvider.PREFIX, options);\n\n\t\tthis.commandsHistory = this._register(instantiationService.createInstance(CommandsHistory));\n\n\t\tthis.options = options;\n\t}\n\n\tprotected async _getPicks(filter: string, _disposables: DisposableStore, token: CancellationToken, runOptions?: IQuickAccessProviderRunOptions): Promise<Picks<ICommandQuickPick> | FastAndSlowPicks<ICommandQuickPick>> {\n\n\t\t// Ask subclass for all command picks\n\t\tconst allCommandPicks = await this.getCommandPicks(token);\n\n\t\tif (token.isCancellationRequested) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst runTfidf = createSingleCallFunction(() => {\n\t\t\tconst tfidf = new TfIdfCalculator();\n\t\t\ttfidf.updateDocuments(allCommandPicks.map(commandPick => ({\n\t\t\t\tkey: commandPick.commandId,\n\t\t\t\ttextChunks: [this.getTfIdfChunk(commandPick)]\n\t\t\t})));\n\t\t\tconst result = tfidf.calculateScores(filter, token);\n\n\t\t\treturn normalizeTfIdfScores(result)\n\t\t\t\t.filter(score => score.score > AbstractCommandsQuickAccessProvider.TFIDF_THRESHOLD)\n\t\t\t\t.slice(0, AbstractCommandsQuickAccessProvider.TFIDF_MAX_RESULTS);\n\t\t});\n\n\t\tconst noAccentsFilter = this.normalizeForFiltering(filter);\n\n\t\t// Filter\n\t\tconst filteredCommandPicks: ICommandQuickPick[] = [];\n\t\tfor (const commandPick of allCommandPicks) {\n\t\t\tcommandPick.labelNoAccents ??= this.normalizeForFiltering(commandPick.label);\n\t\t\tconst labelHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(noAccentsFilter, commandPick.labelNoAccents) ?? undefined;\n\n\t\t\tlet aliasHighlights: IMatch[] | undefined;\n\t\t\tif (commandPick.commandAlias) {\n\t\t\t\tcommandPick.aliasNoAccents ??= this.normalizeForFiltering(commandPick.commandAlias);\n\t\t\t\taliasHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(noAccentsFilter, commandPick.aliasNoAccents) ?? undefined;\n\t\t\t}\n\n\t\t\t// Add if matching in label or alias\n\t\t\tif (labelHighlights || aliasHighlights) {\n\t\t\t\tcommandPick.highlights = {\n\t\t\t\t\tlabel: labelHighlights,\n\t\t\t\t\tdetail: this.options.showAlias ? aliasHighlights : undefined\n\t\t\t\t};\n\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Also add if we have a 100% command ID match\n\t\t\telse if (filter === commandPick.commandId) {\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Handle tf-idf scoring for the rest if there's a filter\n\t\t\telse if (filter.length >= 3) {\n\t\t\t\tconst tfidf = runTfidf();\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// Add if we have a tf-idf score\n\t\t\t\tconst tfidfScore = tfidf.find(score => score.key === commandPick.commandId);\n\t\t\t\tif (tfidfScore) {\n\t\t\t\t\tcommandPick.tfIdfScore = tfidfScore.score;\n\t\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add description to commands that have duplicate labels\n\t\tconst mapLabelToCommand = new Map<string, ICommandQuickPick>();\n\t\tfor (const commandPick of filteredCommandPicks) {\n\t\t\tconst existingCommandForLabel = mapLabelToCommand.get(commandPick.label);\n\t\t\tif (existingCommandForLabel) {\n\t\t\t\tcommandPick.description = commandPick.commandId;\n\t\t\t\texistingCommandForLabel.description = existingCommandForLabel.commandId;\n\t\t\t} else {\n\t\t\t\tmapLabelToCommand.set(commandPick.label, commandPick);\n\t\t\t}\n\t\t}\n\n\t\t// Sort by MRU order and fallback to name otherwise\n\t\tfilteredCommandPicks.sort((commandPickA, commandPickB) => {\n\n\t\t\t// If a result came from tf-idf, we want to put that towards the bottom\n\t\t\tif (commandPickA.tfIdfScore && commandPickB.tfIdfScore) {\n\t\t\t\tif (commandPickA.tfIdfScore === commandPickB.tfIdfScore) {\n\t\t\t\t\treturn commandPickA.label.localeCompare(commandPickB.label); // prefer lexicographically smaller command\n\t\t\t\t}\n\n\t\t\t\treturn commandPickB.tfIdfScore - commandPickA.tfIdfScore; // prefer higher tf-idf score\n\t\t\t} else if (commandPickA.tfIdfScore) {\n\t\t\t\treturn 1; // first command has a score but other doesn't so other wins\n\t\t\t} else if (commandPickB.tfIdfScore) {\n\t\t\t\treturn -1; // other command has a score but first doesn't so first wins\n\t\t\t}\n\n\t\t\tconst commandACounter = this.commandsHistory.peek(commandPickA.commandId);\n\t\t\tconst commandBCounter = this.commandsHistory.peek(commandPickB.commandId);\n\n\t\t\tif (commandACounter && commandBCounter) {\n\t\t\t\treturn commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older\n\t\t\t}\n\n\t\t\tif (commandACounter) {\n\t\t\t\treturn -1; // first command was used, so it wins over the non used one\n\t\t\t}\n\n\t\t\tif (commandBCounter) {\n\t\t\t\treturn 1; // other command was used so it wins over the command\n\t\t\t}\n\n\t\t\tif (this.options.suggestedCommandIds) {\n\t\t\t\tconst commandASuggestion = this.options.suggestedCommandIds.has(commandPickA.commandId);\n\t\t\t\tconst commandBSuggestion = this.options.suggestedCommandIds.has(commandPickB.commandId);\n\t\t\t\tif (commandASuggestion && commandBSuggestion) {\n\t\t\t\t\treturn 0; // honor the order of the array\n\t\t\t\t}\n\n\t\t\t\tif (commandASuggestion) {\n\t\t\t\t\treturn -1; // first command was suggested, so it wins over the non suggested one\n\t\t\t\t}\n\n\t\t\t\tif (commandBSuggestion) {\n\t\t\t\t\treturn 1; // other command was suggested so it wins over the command\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if one is Developer and the other isn't, put non-Developer first\n\t\t\tconst isDeveloperA = commandPickA.commandCategory === Categories.Developer.value;\n\t\t\tconst isDeveloperB = commandPickB.commandCategory === Categories.Developer.value;\n\t\t\tif (isDeveloperA && !isDeveloperB) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!isDeveloperA && isDeveloperB) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// both commands were never used, so we sort by name\n\t\t\treturn commandPickA.label.localeCompare(commandPickB.label);\n\t\t});\n\n\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = [];\n\n\t\tlet addOtherSeparator = false;\n\t\tlet addSuggestedSeparator = true;\n\t\tlet addCommonlyUsedSeparator = !!this.options.suggestedCommandIds;\n\t\tfor (let i = 0; i < filteredCommandPicks.length; i++) {\n\t\t\tconst commandPick = filteredCommandPicks[i];\n\n\t\t\t// Separator: recently used\n\t\t\tif (i === 0 && this.commandsHistory.peek(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('recentlyUsed', \"recently used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t}\n\n\t\t\tif (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\taddSuggestedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: commonly used\n\t\t\tif (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('commonlyUsed', \"commonly used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t\taddCommonlyUsedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: other commands\n\t\t\tif (addOtherSeparator && commandPick.tfIdfScore === undefined && !this.commandsHistory.peek(commandPick.commandId) && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('morecCommands', \"other commands\") });\n\t\t\t\taddOtherSeparator = false;\n\t\t\t}\n\n\t\t\t// Command\n\t\t\tcommandPicks.push(this.toCommandPick(commandPick, runOptions));\n\t\t}\n\n\t\tif (!this.hasAdditionalCommandPicks(filter, token)) {\n\t\t\treturn commandPicks;\n\t\t}\n\n\t\treturn {\n\t\t\tpicks: commandPicks,\n\t\t\tadditionalPicks: (async (): Promise<Picks<ICommandQuickPick>> => {\n\t\t\t\tconst additionalCommandPicks = await this.getAdditionalCommandPicks(allCommandPicks, filteredCommandPicks, filter, token);\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = additionalCommandPicks.map(commandPick => this.toCommandPick(commandPick, runOptions));\n\t\t\t\t// Basically, if we haven't already added a separator, we add one before the additional picks so long\n\t\t\t\t// as one hasn't been added to the start of the array.\n\t\t\t\tif (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {\n\t\t\t\t\tcommandPicks.unshift({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\t}\n\t\t\t\treturn commandPicks;\n\t\t\t})()\n\t\t};\n\t}\n\n\tprivate toCommandPick(commandPick: ICommandQuickPick | IQuickPickSeparator, runOptions?: IQuickAccessProviderRunOptions): ICommandQuickPick | IQuickPickSeparator {\n\t\tif (commandPick.type === 'separator') {\n\t\t\treturn commandPick;\n\t\t}\n\n\t\tconst keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);\n\t\tconst ariaLabel = keybinding ?\n\t\t\tlocalize('commandPickAriaLabelWithKeybinding', \"{0}, {1}\", commandPick.label, keybinding.getAriaLabel()) :\n\t\t\tcommandPick.label;\n\n\t\treturn {\n\t\t\t...commandPick,\n\t\t\tariaLabel,\n\t\t\tdetail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined,\n\t\t\tkeybinding,\n\t\t\taccept: async () => {\n\n\t\t\t\t// Add to history\n\t\t\t\tthis.commandsHistory.push(commandPick.commandId);\n\n\t\t\t\t// Telementry\n\t\t\t\tthis.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', {\n\t\t\t\t\tid: commandPick.commandId,\n\t\t\t\t\tfrom: runOptions?.from ?? 'quick open'\n\t\t\t\t});\n\n\t\t\t\t// Run\n\t\t\t\ttry {\n\t\t\t\t\tcommandPick.args?.length\n\t\t\t\t\t\t? await this.commandService.executeCommand(commandPick.commandId, ...commandPick.args)\n\t\t\t\t\t\t: await this.commandService.executeCommand(commandPick.commandId);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isCancellationError(error)) {\n\t\t\t\t\t\tthis.dialogService.error(localize('canNotRun', \"Command '{0}' resulted in an error\", commandPick.label), toErrorMessage(error));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\t// TF-IDF string to be indexed\n\tprivate getTfIdfChunk({ label, commandAlias, commandDescription }: ICommandQuickPick) {\n\t\tlet chunk = label;\n\t\tif (commandAlias && commandAlias !== label) {\n\t\t\tchunk += ` - ${commandAlias}`;\n\t\t}\n\t\tif (commandDescription && commandDescription.value !== label) {\n\t\t\t// If the original is the same as the value, don't add it\n\t\t\tchunk += ` - ${commandDescription.value === commandDescription.original ? commandDescription.value : `${commandDescription.value} (${commandDescription.original})`}`;\n\t\t}\n\t\treturn chunk;\n\t}\n\n\t/**\n\t * Normalizes a string for filtering by removing accents, but only if\n\t * the result has the same length, otherwise returns the original string.\n\t */\n\tprivate normalizeForFiltering(value: string): string {\n\t\tconst withoutAccents = removeAccents(value);\n\t\tif (withoutAccents.length !== value.length) {\n\t\t\ttype QuickAccessTelemetry = {\n\t\t\t\toriginalLength: number;\n\t\t\t\tnormalizedLength: number;\n\t\t\t};\n\n\t\t\ttype QuickAccessTelemetryMeta = {\n\t\t\t\toriginalLength: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Length of the original filter string' };\n\t\t\t\tnormalizedLength: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Length of the normalized filter string' };\n\t\t\t\towner: 'dmitriv';\n\t\t\t\tcomment: 'Helps to gain insights on cases where the normalized filter string length differs from the original';\n\t\t\t};\n\n\t\t\tthis.telemetryService.publicLog2<QuickAccessTelemetry, QuickAccessTelemetryMeta>('QuickAccess:FilterLengthMismatch', {\n\t\t\t\toriginalLength: value.length,\n\t\t\t\tnormalizedLength: withoutAccents.length\n\t\t\t});\n\n\t\t\treturn value;\n\t\t} else {\n\t\t\treturn withoutAccents;\n\t\t}\n\t}\n\n\tprotected abstract getCommandPicks(token: CancellationToken): Promise<Array<ICommandQuickPick>>;\n\n\tprotected abstract hasAdditionalCommandPicks(filter: string, token: CancellationToken): boolean;\n\tprotected abstract getAdditionalCommandPicks(allPicks: ICommandQuickPick[], picksSoFar: ICommandQuickPick[], filter: string, token: CancellationToken): Promise<Array<ICommandQuickPick | IQuickPickSeparator>>;\n}\n\ninterface ISerializedCommandHistory {\n\treadonly usesLRU?: boolean;\n\treadonly entries: { key: string; value: number }[];\n}\n\ninterface ICommandsQuickAccessConfiguration {\n\treadonly workbench: {\n\t\treadonly commandPalette: {\n\t\t\treadonly history: number;\n\t\t\treadonly preserveInput: boolean;\n\t\t};\n\t};\n}\n\nexport class CommandsHistory extends Disposable {\n\n\tstatic readonly DEFAULT_COMMANDS_HISTORY_LENGTH = 50;\n\n\tprivate static readonly PREF_KEY_CACHE = 'commandPalette.mru.cache';\n\tprivate static readonly PREF_KEY_COUNTER = 'commandPalette.mru.counter';\n\n\tprivate static cache: LRUCache<string, number> | undefined;\n\tprivate static counter = 1;\n\tprivate static hasChanges = false;\n\n\tprivate configuredCommandsHistoryLength = 0;\n\n\tconstructor(\n\t\t@IStorageService private readonly storageService: IStorageService,\n\t\t@IConfigurationService private readonly configurationService: IConfigurationService,\n\t\t@ILogService private readonly logService: ILogService\n\t) {\n\t\tsuper();\n\n\t\tthis.updateConfiguration();\n\t\tthis.load();\n\n\t\tthis.registerListeners();\n\t}\n\n\tprivate registerListeners(): void {\n\t\tthis._register(this.configurationService.onDidChangeConfiguration(e => this.updateConfiguration(e)));\n\t\tthis._register(this.storageService.onWillSaveState(e => {\n\t\t\tif (e.reason === WillSaveStateReason.SHUTDOWN) {\n\t\t\t\t// Commands history is very dynamic and so we limit impact\n\t\t\t\t// on storage to only save on shutdown. This helps reduce\n\t\t\t\t// the overhead of syncing this data across machines.\n\t\t\t\tthis.saveState();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate updateConfiguration(e?: IConfigurationChangeEvent): void {\n\t\tif (e && !e.affectsConfiguration('workbench.commandPalette.history')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService);\n\n\t\tif (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) {\n\t\t\tCommandsHistory.cache.limit = this.configuredCommandsHistoryLength;\n\t\t\tCommandsHistory.hasChanges = true;\n\t\t}\n\t}\n\n\tprivate load(): void {\n\t\tconst raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, StorageScope.PROFILE);\n\t\tlet serializedCache: ISerializedCommandHistory | undefined;\n\t\tif (raw) {\n\t\t\ttry {\n\t\t\t\tserializedCache = JSON.parse(raw);\n\t\t\t} catch (error) {\n\t\t\t\tthis.logService.error(`[CommandsHistory] invalid data: ${error}`);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = CommandsHistory.cache = new LRUCache<string, number>(this.configuredCommandsHistoryLength, 1);\n\t\tif (serializedCache) {\n\t\t\tlet entries: { key: string; value: number }[];\n\t\t\tif (serializedCache.usesLRU) {\n\t\t\t\tentries = serializedCache.entries;\n\t\t\t} else {\n\t\t\t\tentries = serializedCache.entries.sort((a, b) => a.value - b.value);\n\t\t\t}\n\t\t\tentries.forEach(entry => cache.set(entry.key, entry.value));\n\t\t}\n\n\t\tCommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, StorageScope.PROFILE, CommandsHistory.counter);\n\t}\n\n\tpush(commandId: string): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tCommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command\n\t\tCommandsHistory.hasChanges = true;\n\t}\n\n\tpeek(commandId: string): number | undefined {\n\t\treturn CommandsHistory.cache?.peek(commandId);\n\t}\n\n\tprivate saveState(): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!CommandsHistory.hasChanges) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializedCache: ISerializedCommandHistory = { usesLRU: true, entries: [] };\n\t\tCommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value }));\n\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), StorageScope.PROFILE, StorageTarget.USER);\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, StorageScope.PROFILE, StorageTarget.USER);\n\t\tCommandsHistory.hasChanges = false;\n\t}\n\n\tstatic getConfiguredCommandHistoryLength(configurationService: IConfigurationService): number {\n\t\tconst config = configurationService.getValue<ICommandsQuickAccessConfiguration>();\n\n\t\tconst configuredCommandHistoryLength = config.workbench?.commandPalette?.history;\n\t\tif (typeof configuredCommandHistoryLength === 'number') {\n\t\t\treturn configuredCommandHistoryLength;\n\t\t}\n\n\t\treturn CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["vs/platform/quickinput/browser/commandsQuickAccess.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAIhG,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,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C;QAE5F,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,iBAAe,CAAC,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,2DAA2C,CAAC;QACrI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,iBAAe,CAAC,gBAAgB,EAAE,iBAAe,CAAC,OAAO,2DAA2C,CAAC;QAC/H,iBAAe,CAAC,UAAU,GAAG,KAAK,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,iCAAiC,CAAC,oBAA2C;QACnF,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,EAAqC,CAAC;QAElF,MAAM,8BAA8B,GAAG,MAAM,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC;QACjF,IAAI,OAAO,8BAA8B,KAAK,QAAQ,EAAE,CAAC;YACxD,OAAO,8BAA8B,CAAC;QACvC,CAAC;QAED,OAAO,iBAAe,CAAC,+BAA+B,CAAC;IACxD,CAAC;;AA5HW,eAAe;IAczB,WAAA,eAAe,CAAA;IACf,WAAA,qBAAqB,CAAA;IACrB,WAAA,WAAW,CAAA;GAhBD,eAAe,CA6H3B","file":"commandsQuickAccess.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 { WorkbenchActionExecutedClassification, WorkbenchActionExecutedEvent } from '../../../base/common/actions.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { Codicon } from '../../../base/common/codicons.js';\nimport { toErrorMessage } from '../../../base/common/errorMessage.js';\nimport { isCancellationError } from '../../../base/common/errors.js';\nimport { IMatch, matchesBaseContiguousSubString, matchesWords, or } from '../../../base/common/filters.js';\nimport { createSingleCallFunction } from '../../../base/common/functional.js';\nimport { Disposable, DisposableStore, IDisposable } from '../../../base/common/lifecycle.js';\nimport { LRUCache } from '../../../base/common/map.js';\nimport { ThemeIcon } from '../../../base/common/themables.js';\nimport { TfIdfCalculator, normalizeTfIdfScores } from '../../../base/common/tfIdf.js';\nimport { localize } from '../../../nls.js';\nimport { ILocalizedString } from '../../action/common/action.js';\nimport { ICommandService } from '../../commands/common/commands.js';\nimport { IConfigurationChangeEvent, IConfigurationService } from '../../configuration/common/configuration.js';\nimport { IDialogService } from '../../dialogs/common/dialogs.js';\nimport { IInstantiationService } from '../../instantiation/common/instantiation.js';\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\nimport { ILogService } from '../../log/common/log.js';\nimport { FastAndSlowPicks, IPickerQuickAccessItem, IPickerQuickAccessProviderOptions, PickerQuickAccessProvider, Picks, TriggerAction } from './pickerQuickAccess.js';\nimport { IQuickAccessProviderRunOptions } from '../common/quickAccess.js';\nimport { IKeyMods, IQuickPickSeparator } from '../common/quickInput.js';\nimport { IStorageService, StorageScope, StorageTarget, WillSaveStateReason } from '../../storage/common/storage.js';\nimport { ITelemetryService } from '../../telemetry/common/telemetry.js';\nimport { Categories } from '../../action/common/actionCommonCategories.js';\n\nexport interface ICommandQuickPick extends IPickerQuickAccessItem {\n\treadonly commandId: string;\n\treadonly commandAlias?: string;\n\treadonly commandDescription?: ILocalizedString;\n\treadonly commandCategory?: string;\n\n\treadonly args?: unknown[];\n\n\ttfIdfScore?: number;\n}\n\nexport interface ICommandsQuickAccessOptions extends IPickerQuickAccessProviderOptions<ICommandQuickPick> {\n\treadonly showAlias: boolean;\n\tsuggestedCommandIds?: Set<string>;\n}\n\nexport abstract class AbstractCommandsQuickAccessProvider extends PickerQuickAccessProvider<ICommandQuickPick> implements IDisposable {\n\n\tstatic PREFIX = '>';\n\n\tprivate static readonly TFIDF_THRESHOLD = 0.5;\n\tprivate static readonly TFIDF_MAX_RESULTS = 5;\n\n\tprivate static WORD_FILTER = or(matchesBaseContiguousSubString, matchesWords);\n\n\tprivate readonly commandsHistory: CommandsHistory;\n\n\tprotected override readonly options: ICommandsQuickAccessOptions;\n\n\tconstructor(\n\t\toptions: ICommandsQuickAccessOptions,\n\t\t@IInstantiationService instantiationService: IInstantiationService,\n\t\t@IKeybindingService protected readonly keybindingService: IKeybindingService,\n\t\t@ICommandService private readonly commandService: ICommandService,\n\t\t@ITelemetryService private readonly telemetryService: ITelemetryService,\n\t\t@IDialogService private readonly dialogService: IDialogService\n\t) {\n\t\tsuper(AbstractCommandsQuickAccessProvider.PREFIX, options);\n\n\t\tthis.commandsHistory = this._register(instantiationService.createInstance(CommandsHistory));\n\n\t\tthis.options = options;\n\t}\n\n\tprotected async _getPicks(filter: string, _disposables: DisposableStore, token: CancellationToken, runOptions?: IQuickAccessProviderRunOptions): Promise<Picks<ICommandQuickPick> | FastAndSlowPicks<ICommandQuickPick>> {\n\n\t\t// Ask subclass for all command picks\n\t\tconst allCommandPicks = await this.getCommandPicks(token);\n\n\t\tif (token.isCancellationRequested) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst runTfidf = createSingleCallFunction(() => {\n\t\t\tconst tfidf = new TfIdfCalculator();\n\t\t\ttfidf.updateDocuments(allCommandPicks.map(commandPick => ({\n\t\t\t\tkey: commandPick.commandId,\n\t\t\t\ttextChunks: [this.getTfIdfChunk(commandPick)]\n\t\t\t})));\n\t\t\tconst result = tfidf.calculateScores(filter, token);\n\n\t\t\treturn normalizeTfIdfScores(result)\n\t\t\t\t.filter(score => score.score > AbstractCommandsQuickAccessProvider.TFIDF_THRESHOLD)\n\t\t\t\t.slice(0, AbstractCommandsQuickAccessProvider.TFIDF_MAX_RESULTS);\n\t\t});\n\n\t\t// Filter\n\t\tconst filteredCommandPicks: ICommandQuickPick[] = [];\n\t\tfor (const commandPick of allCommandPicks) {\n\t\t\tconst labelHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.label) ?? undefined;\n\n\t\t\tlet aliasHighlights: IMatch[] | undefined;\n\t\t\tif (commandPick.commandAlias) {\n\t\t\t\taliasHighlights = AbstractCommandsQuickAccessProvider.WORD_FILTER(filter, commandPick.commandAlias) ?? undefined;\n\t\t\t}\n\n\t\t\t// Add if matching in label or alias\n\t\t\tif (labelHighlights || aliasHighlights) {\n\t\t\t\tcommandPick.highlights = {\n\t\t\t\t\tlabel: labelHighlights,\n\t\t\t\t\tdetail: this.options.showAlias ? aliasHighlights : undefined\n\t\t\t\t};\n\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Also add if we have a 100% command ID match\n\t\t\telse if (filter === commandPick.commandId) {\n\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t}\n\n\t\t\t// Handle tf-idf scoring for the rest if there's a filter\n\t\t\telse if (filter.length >= 3) {\n\t\t\t\tconst tfidf = runTfidf();\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\t// Add if we have a tf-idf score\n\t\t\t\tconst tfidfScore = tfidf.find(score => score.key === commandPick.commandId);\n\t\t\t\tif (tfidfScore) {\n\t\t\t\t\tcommandPick.tfIdfScore = tfidfScore.score;\n\t\t\t\t\tfilteredCommandPicks.push(commandPick);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add description to commands that have duplicate labels\n\t\tconst mapLabelToCommand = new Map<string, ICommandQuickPick>();\n\t\tfor (const commandPick of filteredCommandPicks) {\n\t\t\tconst existingCommandForLabel = mapLabelToCommand.get(commandPick.label);\n\t\t\tif (existingCommandForLabel) {\n\t\t\t\tcommandPick.description = commandPick.commandId;\n\t\t\t\texistingCommandForLabel.description = existingCommandForLabel.commandId;\n\t\t\t} else {\n\t\t\t\tmapLabelToCommand.set(commandPick.label, commandPick);\n\t\t\t}\n\t\t}\n\n\t\t// Sort by MRU order and fallback to name otherwise\n\t\tfilteredCommandPicks.sort((commandPickA, commandPickB) => {\n\n\t\t\t// If a result came from tf-idf, we want to put that towards the bottom\n\t\t\tif (commandPickA.tfIdfScore && commandPickB.tfIdfScore) {\n\t\t\t\tif (commandPickA.tfIdfScore === commandPickB.tfIdfScore) {\n\t\t\t\t\treturn commandPickA.label.localeCompare(commandPickB.label); // prefer lexicographically smaller command\n\t\t\t\t}\n\n\t\t\t\treturn commandPickB.tfIdfScore - commandPickA.tfIdfScore; // prefer higher tf-idf score\n\t\t\t} else if (commandPickA.tfIdfScore) {\n\t\t\t\treturn 1; // first command has a score but other doesn't so other wins\n\t\t\t} else if (commandPickB.tfIdfScore) {\n\t\t\t\treturn -1; // other command has a score but first doesn't so first wins\n\t\t\t}\n\n\t\t\tconst commandACounter = this.commandsHistory.peek(commandPickA.commandId);\n\t\t\tconst commandBCounter = this.commandsHistory.peek(commandPickB.commandId);\n\n\t\t\tif (commandACounter && commandBCounter) {\n\t\t\t\treturn commandACounter > commandBCounter ? -1 : 1; // use more recently used command before older\n\t\t\t}\n\n\t\t\tif (commandACounter) {\n\t\t\t\treturn -1; // first command was used, so it wins over the non used one\n\t\t\t}\n\n\t\t\tif (commandBCounter) {\n\t\t\t\treturn 1; // other command was used so it wins over the command\n\t\t\t}\n\n\t\t\tif (this.options.suggestedCommandIds) {\n\t\t\t\tconst commandASuggestion = this.options.suggestedCommandIds.has(commandPickA.commandId);\n\t\t\t\tconst commandBSuggestion = this.options.suggestedCommandIds.has(commandPickB.commandId);\n\t\t\t\tif (commandASuggestion && commandBSuggestion) {\n\t\t\t\t\treturn 0; // honor the order of the array\n\t\t\t\t}\n\n\t\t\t\tif (commandASuggestion) {\n\t\t\t\t\treturn -1; // first command was suggested, so it wins over the non suggested one\n\t\t\t\t}\n\n\t\t\t\tif (commandBSuggestion) {\n\t\t\t\t\treturn 1; // other command was suggested so it wins over the command\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if one is Developer and the other isn't, put non-Developer first\n\t\t\tconst isDeveloperA = commandPickA.commandCategory === Categories.Developer.value;\n\t\t\tconst isDeveloperB = commandPickB.commandCategory === Categories.Developer.value;\n\t\t\tif (isDeveloperA && !isDeveloperB) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (!isDeveloperA && isDeveloperB) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// both commands were never used, so we sort by name\n\t\t\treturn commandPickA.label.localeCompare(commandPickB.label);\n\t\t});\n\n\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = [];\n\n\t\tlet addOtherSeparator = false;\n\t\tlet addSuggestedSeparator = true;\n\t\tlet addCommonlyUsedSeparator = !!this.options.suggestedCommandIds;\n\t\tfor (let i = 0; i < filteredCommandPicks.length; i++) {\n\t\t\tconst commandPick = filteredCommandPicks[i];\n\t\t\tconst isInHistory = !!this.commandsHistory.peek(commandPick.commandId);\n\n\t\t\t// Separator: recently used\n\t\t\tif (i === 0 && isInHistory) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('recentlyUsed', \"recently used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t}\n\n\t\t\tif (addSuggestedSeparator && commandPick.tfIdfScore !== undefined) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\taddSuggestedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: commonly used\n\t\t\tif (addCommonlyUsedSeparator && commandPick.tfIdfScore === undefined && !isInHistory && this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('commonlyUsed', \"commonly used\") });\n\t\t\t\taddOtherSeparator = true;\n\t\t\t\taddCommonlyUsedSeparator = false;\n\t\t\t}\n\n\t\t\t// Separator: other commands\n\t\t\tif (addOtherSeparator && commandPick.tfIdfScore === undefined && !isInHistory && !this.options.suggestedCommandIds?.has(commandPick.commandId)) {\n\t\t\t\tcommandPicks.push({ type: 'separator', label: localize('morecCommands', \"other commands\") });\n\t\t\t\taddOtherSeparator = false;\n\t\t\t}\n\n\t\t\t// Command\n\t\t\tcommandPicks.push(this.toCommandPick(commandPick, runOptions, isInHistory));\n\t\t}\n\n\t\tif (!this.hasAdditionalCommandPicks(filter, token)) {\n\t\t\treturn commandPicks;\n\t\t}\n\n\t\treturn {\n\t\t\tpicks: commandPicks,\n\t\t\tadditionalPicks: (async (): Promise<Picks<ICommandQuickPick>> => {\n\t\t\t\tconst additionalCommandPicks = await this.getAdditionalCommandPicks(allCommandPicks, filteredCommandPicks, filter, token);\n\t\t\t\tif (token.isCancellationRequested) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tconst commandPicks: Array<ICommandQuickPick | IQuickPickSeparator> = additionalCommandPicks.map(commandPick => this.toCommandPick(commandPick, runOptions));\n\t\t\t\t// Basically, if we haven't already added a separator, we add one before the additional picks so long\n\t\t\t\t// as one hasn't been added to the start of the array.\n\t\t\t\tif (addSuggestedSeparator && commandPicks[0]?.type !== 'separator') {\n\t\t\t\t\tcommandPicks.unshift({ type: 'separator', label: localize('suggested', \"similar commands\") });\n\t\t\t\t}\n\t\t\t\treturn commandPicks;\n\t\t\t})()\n\t\t};\n\t}\n\n\tprivate toCommandPick(commandPick: ICommandQuickPick | IQuickPickSeparator, runOptions?: IQuickAccessProviderRunOptions, isRecentlyUsed: boolean = false): ICommandQuickPick | IQuickPickSeparator {\n\t\tif (commandPick.type === 'separator') {\n\t\t\treturn commandPick;\n\t\t}\n\n\t\tconst keybinding = this.keybindingService.lookupKeybinding(commandPick.commandId);\n\t\tconst ariaLabel = keybinding ?\n\t\t\tlocalize('commandPickAriaLabelWithKeybinding', \"{0}, {1}\", commandPick.label, keybinding.getAriaLabel()) :\n\t\t\tcommandPick.label;\n\n\t\t// Add remove button for recently used items (as the last button, to the right)\n\t\tconst existingButtons = commandPick.buttons || [];\n\t\tconst buttons = isRecentlyUsed ? [\n\t\t\t...existingButtons,\n\t\t\t{\n\t\t\t\ticonClass: ThemeIcon.asClassName(Codicon.close),\n\t\t\t\ttooltip: localize('removeFromRecentlyUsed', \"Remove from Recently Used\")\n\t\t\t}\n\t\t] : commandPick.buttons;\n\n\t\treturn {\n\t\t\t...commandPick,\n\t\t\tariaLabel,\n\t\t\tdetail: this.options.showAlias && commandPick.commandAlias !== commandPick.label ? commandPick.commandAlias : undefined,\n\t\t\tkeybinding,\n\t\t\tbuttons,\n\t\t\taccept: async () => {\n\n\t\t\t\t// Add to history\n\t\t\t\tthis.commandsHistory.push(commandPick.commandId);\n\n\t\t\t\t// Telementry\n\t\t\t\tthis.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', {\n\t\t\t\t\tid: commandPick.commandId,\n\t\t\t\t\tfrom: runOptions?.from ?? 'quick open'\n\t\t\t\t});\n\n\t\t\t\t// Run\n\t\t\t\ttry {\n\t\t\t\t\tcommandPick.args?.length\n\t\t\t\t\t\t? await this.commandService.executeCommand(commandPick.commandId, ...commandPick.args)\n\t\t\t\t\t\t: await this.commandService.executeCommand(commandPick.commandId);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isCancellationError(error)) {\n\t\t\t\t\t\tthis.dialogService.error(localize('canNotRun', \"Command '{0}' resulted in an error\", commandPick.label), toErrorMessage(error));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\ttrigger: isRecentlyUsed ? (buttonIndex: number, keyMods: IKeyMods): TriggerAction | Promise<TriggerAction> => {\n\t\t\t\t// The remove button is now the last button\n\t\t\t\tconst removeButtonIndex = existingButtons.length;\n\t\t\t\tif (buttonIndex === removeButtonIndex) {\n\t\t\t\t\tthis.commandsHistory.remove(commandPick.commandId);\n\t\t\t\t\treturn TriggerAction.REMOVE_ITEM;\n\t\t\t\t}\n\t\t\t\t// Handle other buttons (e.g., configure keybinding button)\n\t\t\t\tif (commandPick.trigger) {\n\t\t\t\t\treturn commandPick.trigger(buttonIndex, keyMods);\n\t\t\t\t}\n\t\t\t\treturn TriggerAction.NO_ACTION;\n\t\t\t} : commandPick.trigger\n\t\t};\n\t}\n\n\t// TF-IDF string to be indexed\n\tprivate getTfIdfChunk({ label, commandAlias, commandDescription }: ICommandQuickPick) {\n\t\tlet chunk = label;\n\t\tif (commandAlias && commandAlias !== label) {\n\t\t\tchunk += ` - ${commandAlias}`;\n\t\t}\n\t\tif (commandDescription && commandDescription.value !== label) {\n\t\t\t// If the original is the same as the value, don't add it\n\t\t\tchunk += ` - ${commandDescription.value === commandDescription.original ? commandDescription.value : `${commandDescription.value} (${commandDescription.original})`}`;\n\t\t}\n\t\treturn chunk;\n\t}\n\n\tprotected abstract getCommandPicks(token: CancellationToken): Promise<Array<ICommandQuickPick>>;\n\n\tprotected abstract hasAdditionalCommandPicks(filter: string, token: CancellationToken): boolean;\n\tprotected abstract getAdditionalCommandPicks(allPicks: ICommandQuickPick[], picksSoFar: ICommandQuickPick[], filter: string, token: CancellationToken): Promise<Array<ICommandQuickPick | IQuickPickSeparator>>;\n}\n\ninterface ISerializedCommandHistory {\n\treadonly usesLRU?: boolean;\n\treadonly entries: { key: string; value: number }[];\n}\n\ninterface ICommandsQuickAccessConfiguration {\n\treadonly workbench: {\n\t\treadonly commandPalette: {\n\t\t\treadonly history: number;\n\t\t\treadonly preserveInput: boolean;\n\t\t};\n\t};\n}\n\nexport class CommandsHistory extends Disposable {\n\n\tstatic readonly DEFAULT_COMMANDS_HISTORY_LENGTH = 50;\n\n\tprivate static readonly PREF_KEY_CACHE = 'commandPalette.mru.cache';\n\tprivate static readonly PREF_KEY_COUNTER = 'commandPalette.mru.counter';\n\n\tprivate static cache: LRUCache<string, number> | undefined;\n\tprivate static counter = 1;\n\tprivate static hasChanges = false;\n\n\tprivate configuredCommandsHistoryLength = 0;\n\n\tconstructor(\n\t\t@IStorageService private readonly storageService: IStorageService,\n\t\t@IConfigurationService private readonly configurationService: IConfigurationService,\n\t\t@ILogService private readonly logService: ILogService\n\t) {\n\t\tsuper();\n\n\t\tthis.updateConfiguration();\n\t\tthis.load();\n\n\t\tthis.registerListeners();\n\t}\n\n\tprivate registerListeners(): void {\n\t\tthis._register(this.configurationService.onDidChangeConfiguration(e => this.updateConfiguration(e)));\n\t\tthis._register(this.storageService.onWillSaveState(e => {\n\t\t\tif (e.reason === WillSaveStateReason.SHUTDOWN) {\n\t\t\t\t// Commands history is very dynamic and so we limit impact\n\t\t\t\t// on storage to only save on shutdown. This helps reduce\n\t\t\t\t// the overhead of syncing this data across machines.\n\t\t\t\tthis.saveState();\n\t\t\t}\n\t\t}));\n\t}\n\n\tprivate updateConfiguration(e?: IConfigurationChangeEvent): void {\n\t\tif (e && !e.affectsConfiguration('workbench.commandPalette.history')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.configuredCommandsHistoryLength = CommandsHistory.getConfiguredCommandHistoryLength(this.configurationService);\n\n\t\tif (CommandsHistory.cache && CommandsHistory.cache.limit !== this.configuredCommandsHistoryLength) {\n\t\t\tCommandsHistory.cache.limit = this.configuredCommandsHistoryLength;\n\t\t\tCommandsHistory.hasChanges = true;\n\t\t}\n\t}\n\n\tprivate load(): void {\n\t\tconst raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE, StorageScope.PROFILE);\n\t\tlet serializedCache: ISerializedCommandHistory | undefined;\n\t\tif (raw) {\n\t\t\ttry {\n\t\t\t\tserializedCache = JSON.parse(raw);\n\t\t\t} catch (error) {\n\t\t\t\tthis.logService.error(`[CommandsHistory] invalid data: ${error}`);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = CommandsHistory.cache = new LRUCache<string, number>(this.configuredCommandsHistoryLength, 1);\n\t\tif (serializedCache) {\n\t\t\tlet entries: { key: string; value: number }[];\n\t\t\tif (serializedCache.usesLRU) {\n\t\t\t\tentries = serializedCache.entries;\n\t\t\t} else {\n\t\t\t\tentries = serializedCache.entries.sort((a, b) => a.value - b.value);\n\t\t\t}\n\t\t\tentries.forEach(entry => cache.set(entry.key, entry.value));\n\t\t}\n\n\t\tCommandsHistory.counter = this.storageService.getNumber(CommandsHistory.PREF_KEY_COUNTER, StorageScope.PROFILE, CommandsHistory.counter);\n\t}\n\n\tpush(commandId: string): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tCommandsHistory.cache.set(commandId, CommandsHistory.counter++); // set counter to command\n\t\tCommandsHistory.hasChanges = true;\n\t}\n\n\tpeek(commandId: string): number | undefined {\n\t\treturn CommandsHistory.cache?.peek(commandId);\n\t}\n\n\tremove(commandId: string): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tCommandsHistory.cache.delete(commandId);\n\t\tCommandsHistory.hasChanges = true;\n\t}\n\n\tprivate saveState(): void {\n\t\tif (!CommandsHistory.cache) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!CommandsHistory.hasChanges) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializedCache: ISerializedCommandHistory = { usesLRU: true, entries: [] };\n\t\tCommandsHistory.cache.forEach((value, key) => serializedCache.entries.push({ key, value }));\n\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(serializedCache), StorageScope.PROFILE, StorageTarget.USER);\n\t\tthis.storageService.store(CommandsHistory.PREF_KEY_COUNTER, CommandsHistory.counter, StorageScope.PROFILE, StorageTarget.USER);\n\t\tCommandsHistory.hasChanges = false;\n\t}\n\n\tstatic getConfiguredCommandHistoryLength(configurationService: IConfigurationService): number {\n\t\tconst config = configurationService.getValue<ICommandsQuickAccessConfiguration>();\n\n\t\tconst configuredCommandHistoryLength = config.workbench?.commandPalette?.history;\n\t\tif (typeof configuredCommandHistoryLength === 'number') {\n\t\t\treturn configuredCommandHistoryLength;\n\t\t}\n\n\t\treturn CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH;\n\t}\n}\n"]}
@@ -62,7 +62,7 @@ let HelpQuickAccessProvider = class HelpQuickAccessProvider {
62
62
  prefix,
63
63
  label,
64
64
  keybinding: helpEntry.commandId ? this.keybindingService.lookupKeybinding(helpEntry.commandId) : undefined,
65
- ariaLabel: localize(1747, "{0}, {1}", label, helpEntry.description),
65
+ ariaLabel: localize(1755, "{0}, {1}", label, helpEntry.description),
66
66
  description: helpEntry.description
67
67
  };
68
68
  });
@@ -23,7 +23,6 @@
23
23
  .quick-input-left-action-bar {
24
24
  display: flex;
25
25
  margin-left: 4px;
26
- flex: 1;
27
26
  }
28
27
 
29
28
  /* give some space between input and action bar */
@@ -42,12 +41,12 @@
42
41
  text-align: center;
43
42
  text-overflow: ellipsis;
44
43
  overflow: hidden;
44
+ flex: 1;
45
45
  }
46
46
 
47
47
  .quick-input-right-action-bar {
48
48
  display: flex;
49
49
  margin-right: 4px;
50
- flex: 1;
51
50
  }
52
51
 
53
52
  .quick-input-right-action-bar > .actions-container {
@@ -349,6 +348,8 @@
349
348
 
350
349
  .quick-input-list .monaco-list-row.focused .monaco-keybinding-key {
351
350
  background: none;
351
+ border-color: inherit;
352
+ opacity: 0.8;
352
353
  }
353
354
 
354
355
  .quick-input-list .quick-input-list-separator-as-item {
@@ -389,11 +390,16 @@
389
390
  padding-bottom: 5px;
390
391
  }
391
392
 
393
+ .quick-input-tree.quick-input-tree-flat .monaco-tl-indent,
394
+ .quick-input-tree.quick-input-tree-flat .monaco-tl-twistie {
395
+ display: none !important;
396
+ }
397
+
392
398
  .quick-input-tree .quick-input-tree-entry {
393
399
  box-sizing: border-box;
394
400
  overflow: hidden;
395
401
  display: flex;
396
- padding: 0 6px;
402
+ padding-right: 6px;
397
403
  }
398
404
 
399
405
  .quick-input-tree .quick-input-tree-label {
@@ -31,22 +31,22 @@ import { IHoverService, WorkbenchHoverDelegate } from '../../hover/browser/hover
31
31
  import { ContextKeyExpr, RawContextKey } from '../../contextkey/common/contextkey.js';
32
32
  import { observableValue } from '../../../base/common/observable.js';
33
33
  export const inQuickInputContextKeyValue = 'inQuickInput';
34
- export const InQuickInputContextKey = new RawContextKey(inQuickInputContextKeyValue, false, localize(1748, "Whether keyboard focus is inside the quick input control"));
34
+ export const InQuickInputContextKey = new RawContextKey(inQuickInputContextKeyValue, false, localize(1756, "Whether keyboard focus is inside the quick input control"));
35
35
  export const inQuickInputContext = ContextKeyExpr.has(inQuickInputContextKeyValue);
36
36
  export const quickInputAlignmentContextKeyValue = 'quickInputAlignment';
37
- export const QuickInputAlignmentContextKey = new RawContextKey(quickInputAlignmentContextKeyValue, 'top', localize(1749, "The alignment of the quick input"));
37
+ export const QuickInputAlignmentContextKey = new RawContextKey(quickInputAlignmentContextKeyValue, 'top', localize(1757, "The alignment of the quick input"));
38
38
  export const quickInputTypeContextKeyValue = 'quickInputType';
39
- export const QuickInputTypeContextKey = new RawContextKey(quickInputTypeContextKeyValue, undefined, localize(1750, "The type of the currently visible quick input"));
39
+ export const QuickInputTypeContextKey = new RawContextKey(quickInputTypeContextKeyValue, undefined, localize(1758, "The type of the currently visible quick input"));
40
40
  export const endOfQuickInputBoxContextKeyValue = 'cursorAtEndOfQuickInputBox';
41
- export const EndOfQuickInputBoxContextKey = new RawContextKey(endOfQuickInputBoxContextKeyValue, false, localize(1751, "Whether the cursor in the quick input is at the end of the input box"));
41
+ export const EndOfQuickInputBoxContextKey = new RawContextKey(endOfQuickInputBoxContextKeyValue, false, localize(1759, "Whether the cursor in the quick input is at the end of the input box"));
42
42
  export const endOfQuickInputBoxContext = ContextKeyExpr.has(endOfQuickInputBoxContextKeyValue);
43
43
  export const backButton = {
44
44
  iconClass: ThemeIcon.asClassName(Codicon.quickInputBack),
45
- tooltip: localize(1752, "Back"),
45
+ tooltip: localize(1760, "Back"),
46
46
  handle: -1 // TODO
47
47
  };
48
48
  export class QuickInput extends Disposable {
49
- static { this.noPromptMessage = localize(1753, "Press 'Enter' to confirm your input or 'Escape' to cancel"); }
49
+ static { this.noPromptMessage = localize(1761, "Press 'Enter' to confirm your input or 'Escape' to cancel"); }
50
50
  constructor(ui) {
51
51
  super();
52
52
  this.ui = ui;
@@ -322,7 +322,7 @@ export class QuickInput extends Disposable {
322
322
  }
323
323
  getSteps() {
324
324
  if (this.step && this.totalSteps) {
325
- return localize(1754, "{0}/{1}", this.step, this.totalSteps);
325
+ return localize(1762, "{0}/{1}", this.step, this.totalSteps);
326
326
  }
327
327
  if (this.step) {
328
328
  return String(this.step);
@@ -352,7 +352,7 @@ export class QuickInput extends Disposable {
352
352
  }
353
353
  }
354
354
  export class QuickPick extends QuickInput {
355
- static { this.DEFAULT_ARIA_LABEL = localize(1755, "Type to narrow down results."); }
355
+ static { this.DEFAULT_ARIA_LABEL = localize(1763, "Type to narrow down results."); }
356
356
  constructor(ui) {
357
357
  super(ui);
358
358
  this._value = '';
@@ -586,7 +586,7 @@ export class QuickPick extends QuickInput {
586
586
  this.update();
587
587
  }
588
588
  get okLabel() {
589
- return this._okLabel ?? localize(1756, "OK");
589
+ return this._okLabel ?? localize(1764, "OK");
590
590
  }
591
591
  set okLabel(okLabel) {
592
592
  this._okLabel = okLabel;
@@ -932,7 +932,7 @@ export class InputBox extends QuickInput {
932
932
  set prompt(prompt) {
933
933
  this._prompt = prompt;
934
934
  this.noValidationMessage = prompt
935
- ? localize(1757, "{0} (Press 'Enter' to confirm or 'Escape' to cancel)", prompt)
935
+ ? localize(1765, "{0} (Press 'Enter' to confirm or 'Escape' to cancel)", prompt)
936
936
  : QuickInput.noPromptMessage;
937
937
  this.update();
938
938
  }
@@ -13,7 +13,7 @@ function registerQuickInputCommandAndKeybindingRule(rule, options = {}) {
13
13
  KeybindingsRegistry.registerCommandAndKeybindingRule({
14
14
  weight: 200 /* KeybindingWeight.WorkbenchContrib */,
15
15
  when: inQuickInputContext,
16
- metadata: { description: localize(1758, "Used while in the context of any kind of quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
16
+ metadata: { description: localize(1766, "Used while in the context of any kind of quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
17
17
  ...rule,
18
18
  secondary: getSecondary(rule.primary, rule.secondary ?? [], options)
19
19
  });
@@ -24,7 +24,7 @@ function registerQuickPickCommandAndKeybindingRule(rule, options = {}) {
24
24
  when: ContextKeyExpr.and(ContextKeyExpr.or(
25
25
  // Only things that use Tree widgets
26
26
  ContextKeyExpr.equals(quickInputTypeContextKeyValue, "quickPick" /* QuickInputType.QuickPick */), ContextKeyExpr.equals(quickInputTypeContextKeyValue, "quickTree" /* QuickInputType.QuickTree */)), inQuickInputContext),
27
- metadata: { description: localize(1759, "Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
27
+ metadata: { description: localize(1767, "Used while in the context of the quick pick. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
28
28
  ...rule,
29
29
  secondary: getSecondary(rule.primary, rule.secondary ?? [], options)
30
30
  });
@@ -79,8 +79,8 @@ registerQuickPickCommandAndKeybindingRule({ id: 'quickInput.previous', primary:
79
79
  // In this case, we want that modifier key+up/down to navigate to the next/previous item, not the next/previous separator.
80
80
  // To handle this, we have a separate command for navigating to the next/previous separator when we are not in quick access mode.
81
81
  // If, however, we are in quick access mode, and you hold down an additional modifier key, we will navigate to the next/previous separator.
82
- const nextSeparatorFallbackDesc = localize(1760, "If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator.");
83
- const prevSeparatorFallbackDesc = localize(1761, "If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");
82
+ const nextSeparatorFallbackDesc = localize(1768, "If we're in quick access mode, this will navigate to the next item. If we are not in quick access mode, this will navigate to the next separator.");
83
+ const prevSeparatorFallbackDesc = localize(1769, "If we're in quick access mode, this will navigate to the previous item. If we are not in quick access mode, this will navigate to the previous separator.");
84
84
  if (isMacintosh) {
85
85
  registerQuickPickCommandAndKeybindingRule({
86
86
  id: 'quickInput.nextSeparatorWithQuickAccessFallback',
@@ -145,7 +145,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
145
145
  // All other kinds of Quick things handle Accept, except Widget. In other words, Accepting is a detail on the things
146
146
  // that extend IQuickInput
147
147
  ContextKeyExpr.notEquals(quickInputTypeContextKeyValue, "quickWidget" /* QuickInputType.QuickWidget */), inQuickInputContext, ContextKeyExpr.not('isComposing')),
148
- metadata: { description: localize(1762, "Used while in the context of some quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
148
+ metadata: { description: localize(1770, "Used while in the context of some quick input. If you change one keybinding for this command, you should change all of the other keybindings (modifier variants) of this command as well.") },
149
149
  handler: (accessor) => {
150
150
  const currentQuickPick = accessor.get(IQuickInputService).currentQuickInput;
151
151
  currentQuickPick?.accept();