@codingame/monaco-vscode-api 6.0.3 → 7.0.1

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 (447) hide show
  1. package/README.md +150 -117
  2. package/api.js +1 -1
  3. package/debugProtocol.d.ts +10 -1
  4. package/extensions.d.ts +2 -0
  5. package/missing-services.js +21 -2
  6. package/package.json +9 -9
  7. package/service-override/extensions.d.ts +1 -2
  8. package/services.js +4 -2
  9. package/vscode/src/vs/base/browser/dnd.js +1 -1
  10. package/vscode/src/vs/base/browser/dom.js +116 -5
  11. package/vscode/src/vs/base/browser/domObservable.js +16 -0
  12. package/vscode/src/vs/base/browser/markdownRenderer.js +5 -3
  13. package/vscode/src/vs/base/browser/trustedTypes.js +1 -2
  14. package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +1 -1
  15. package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +1 -1
  16. package/vscode/src/vs/base/browser/ui/button/button.js +2 -2
  17. package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -4
  18. package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +1 -1
  19. package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -1
  20. package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +1 -1
  21. package/vscode/src/vs/base/browser/ui/hover/hover.d.ts +32 -16
  22. package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +2 -2
  23. package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +2 -2
  24. package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css.js +1 -1
  25. package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +2 -0
  26. package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +1 -1
  27. package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +1 -1
  28. package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +1 -1
  29. package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +1 -1
  30. package/vscode/src/vs/base/browser/ui/list/listView.js +3 -5
  31. package/vscode/src/vs/base/browser/ui/list/rowCache.js +1 -8
  32. package/vscode/src/vs/base/browser/ui/sash/sash.js +1 -1
  33. package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +7 -11
  34. package/vscode/src/vs/base/browser/ui/splitview/paneview.js +1 -1
  35. package/vscode/src/vs/base/browser/ui/splitview/splitview.js +1 -1
  36. package/vscode/src/vs/base/browser/ui/table/tableWidget.js +1 -1
  37. package/vscode/src/vs/base/browser/ui/toggle/toggle.js +1 -1
  38. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +8 -1
  39. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +2 -3
  40. package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +1 -1
  41. package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +0 -3
  42. package/vscode/src/vs/base/common/assert.js +1 -1
  43. package/vscode/src/vs/base/common/collections.js +49 -1
  44. package/vscode/src/vs/base/common/equals.js +55 -5
  45. package/vscode/src/vs/base/common/errors.js +14 -1
  46. package/vscode/src/vs/base/common/event.js +2 -1
  47. package/vscode/src/vs/base/common/history.js +7 -4
  48. package/vscode/src/vs/base/common/iterator.js +9 -1
  49. package/vscode/src/vs/base/common/map.d.ts +41 -0
  50. package/vscode/src/vs/base/common/numbers.js +18 -1
  51. package/vscode/src/vs/base/common/observableInternal/api.js +11 -0
  52. package/vscode/src/vs/base/common/observableInternal/autorun.js +18 -1
  53. package/vscode/src/vs/base/common/observableInternal/base.d.ts +8 -1
  54. package/vscode/src/vs/base/common/observableInternal/base.js +2 -5
  55. package/vscode/src/vs/base/common/observableInternal/derived.js +13 -3
  56. package/vscode/src/vs/base/common/observableInternal/lazyObservableValue.js +109 -0
  57. package/vscode/src/vs/base/common/observableInternal/promise.js +3 -0
  58. package/vscode/src/vs/base/common/observableInternal/utils.d.ts +7 -0
  59. package/vscode/src/vs/base/common/observableInternal/utils.js +64 -12
  60. package/vscode/src/vs/base/common/prefixTree.d.ts +52 -0
  61. package/vscode/src/vs/base/common/product.d.ts +1 -0
  62. package/vscode/src/vs/base/parts/ipc/common/ipc.js +1 -1
  63. package/vscode/src/vs/editor/browser/config/charWidthReader.js +1 -1
  64. package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +1 -1
  65. package/vscode/src/vs/editor/browser/coreCommands.js +2 -1
  66. package/vscode/src/vs/editor/browser/observableCodeEditor.js +230 -0
  67. package/vscode/src/vs/editor/browser/services/abstractCodeEditorService.js +1 -1
  68. package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +26 -26
  69. package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +2 -2
  70. package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
  71. package/vscode/src/vs/editor/browser/view/viewLayer.js +4 -12
  72. package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -1
  73. package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +1 -1
  74. package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
  75. package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +15 -4
  76. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +8 -8
  77. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +4 -4
  78. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -1
  79. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +1 -1
  80. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +14 -2
  81. package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
  82. package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
  83. package/vscode/src/vs/editor/browser/widget/diffEditor/registrations.contribution.js +2 -2
  84. package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +3 -3
  85. package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +2 -2
  86. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/colors.js +1 -1
  87. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +2 -2
  88. package/vscode/src/vs/editor/common/config/editorOptions.d.ts +5 -0
  89. package/vscode/src/vs/editor/common/config/editorOptions.js +83 -65
  90. package/vscode/src/vs/editor/common/core/editorColorRegistry.js +43 -43
  91. package/vscode/src/vs/editor/common/cursor/cursor.js +3 -2
  92. package/vscode/src/vs/editor/common/cursor/cursorTypeEditOperations.js +911 -0
  93. package/vscode/src/vs/editor/common/cursor/cursorTypeOperations.js +36 -799
  94. package/vscode/src/vs/editor/common/cursor/cursorWordOperations.js +6 -5
  95. package/vscode/src/vs/editor/common/languageFeatureRegistry.d.ts +1 -0
  96. package/vscode/src/vs/editor/common/languageFeatureRegistry.js +3 -0
  97. package/vscode/src/vs/editor/common/languages/autoIndent.js +23 -1
  98. package/vscode/src/vs/editor/common/languages.d.ts +20 -3
  99. package/vscode/src/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js +6 -6
  100. package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js +19 -0
  101. package/vscode/src/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer.js +3 -0
  102. package/vscode/src/vs/editor/common/model/textModel.js +6 -2
  103. package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +5 -5
  104. package/vscode/src/vs/editor/common/model.d.ts +4 -0
  105. package/vscode/src/vs/editor/common/services/getIconClasses.js +1 -1
  106. package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +2 -15
  107. package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +63 -62
  108. package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +11 -8
  109. package/vscode/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +1 -1
  110. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +2 -17
  111. package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.css.js +1 -1
  112. package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +18 -5
  113. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +55 -27
  114. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +7 -4
  115. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +9 -9
  116. package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -1
  117. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +103 -47
  118. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -2
  119. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +18 -10
  120. package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +2 -4
  121. package/vscode/src/vs/editor/contrib/folding/browser/folding.css.js +1 -1
  122. package/vscode/src/vs/editor/contrib/folding/browser/folding.js +33 -13
  123. package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +12 -7
  124. package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +1 -1
  125. package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +2 -2
  126. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +161 -185
  127. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverRendered.js +321 -0
  128. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverStatusBar.js +4 -1
  129. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +6 -21
  130. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +39 -40
  131. package/vscode/src/vs/editor/contrib/hover/browser/hoverAccessibleViews.js +55 -46
  132. package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +12 -2
  133. package/vscode/src/vs/editor/contrib/hover/browser/hoverController.js +15 -9
  134. package/vscode/src/vs/editor/contrib/hover/browser/hoverTypes.js +11 -1
  135. package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +141 -93
  136. package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +24 -7
  137. package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +36 -1
  138. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +5 -3
  139. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +1 -1
  140. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +25 -12
  141. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +88 -118
  142. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +1 -1
  143. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +34 -33
  144. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +2 -2
  145. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/provideInlineCompletions.js +11 -4
  146. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +10 -19
  147. package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -1
  148. package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +45 -27
  149. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +4 -4
  150. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +1 -1
  151. package/vscode/src/vs/editor/contrib/inlineEdits/browser/commands.js +126 -0
  152. package/vscode/src/vs/editor/contrib/inlineEdits/browser/consts.js +9 -0
  153. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEdits.contribution.js +9 -0
  154. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsController.js +82 -0
  155. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsModel.js +240 -0
  156. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.css.js +4 -0
  157. package/vscode/src/vs/editor/contrib/inlineEdits/browser/inlineEditsWidget.js +322 -0
  158. package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgress.js +8 -4
  159. package/vscode/src/vs/editor/contrib/linesOperations/browser/linesOperations.js +3 -2
  160. package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  161. package/vscode/src/vs/editor/contrib/peekView/browser/peekView.js +2 -2
  162. package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +60 -0
  163. package/vscode/src/vs/editor/contrib/placeholderText/browser/placeholderText.css.js +4 -0
  164. package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +1 -1
  165. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +1 -1
  166. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +38 -20
  167. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +3 -0
  168. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +9 -9
  169. package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetStatus.js +10 -32
  170. package/vscode/src/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +23 -138
  171. package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +3 -0
  172. package/vscode/src/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +5 -5
  173. package/vscode/src/vs/editor/contrib/wordOperations/browser/wordOperations.js +13 -12
  174. package/vscode/src/vs/editor/contrib/wordPartOperations/browser/wordPartOperations.js +3 -3
  175. package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +21 -0
  176. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +5 -6
  177. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +1 -1
  178. package/vscode/src/vs/platform/actions/browser/buttonbar.js +27 -6
  179. package/vscode/src/vs/platform/actions/browser/floatingMenu.js +1 -1
  180. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css.js +1 -1
  181. package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +33 -3
  182. package/vscode/src/vs/platform/actions/browser/toolbar.js +2 -1
  183. package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -0
  184. package/vscode/src/vs/platform/actions/common/actions.js +3 -0
  185. package/vscode/src/vs/platform/actions/common/menuService.js +3 -2
  186. package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +1 -1
  187. package/vscode/src/vs/platform/configuration/common/configurationRegistry.d.ts +7 -5
  188. package/vscode/src/vs/platform/configuration/common/configurationRegistry.js +109 -13
  189. package/vscode/src/vs/platform/diagnostics/common/diagnostics.d.ts +2 -0
  190. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +12 -6
  191. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -0
  192. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.service.d.ts +3 -3
  193. package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +20 -10
  194. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +46 -8
  195. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1 -1
  196. package/vscode/src/vs/platform/extensions/common/extensions.js +12 -3
  197. package/vscode/src/vs/platform/extensions/common/extensionsApiProposals.js +368 -0
  198. package/vscode/src/vs/platform/files/common/watcher.js +21 -24
  199. package/vscode/src/vs/platform/list/browser/listService.js +2 -1
  200. package/vscode/src/vs/platform/observable/common/platformObservableUtils.js +2 -2
  201. package/vscode/src/vs/platform/opener/browser/link.js +1 -1
  202. package/vscode/src/vs/platform/product/common/product.js +1 -1
  203. package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +1 -1
  204. package/vscode/src/vs/platform/remote/common/remoteExtensionsScanner.service.d.ts +0 -2
  205. package/vscode/src/vs/platform/request/common/request.js +18 -8
  206. package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +2 -6
  207. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +8 -1
  208. package/vscode/src/vs/platform/theme/common/colorUtils.d.ts +1 -1
  209. package/vscode/src/vs/platform/theme/common/colorUtils.js +25 -5
  210. package/vscode/src/vs/platform/theme/common/colors/baseColors.js +1 -1
  211. package/vscode/src/vs/platform/theme/common/colors/chartsColors.js +6 -6
  212. package/vscode/src/vs/platform/theme/common/colors/editorColors.js +35 -35
  213. package/vscode/src/vs/platform/theme/common/colors/inputColors.js +9 -9
  214. package/vscode/src/vs/platform/theme/common/colors/listColors.js +11 -11
  215. package/vscode/src/vs/platform/theme/common/colors/menuColors.js +4 -4
  216. package/vscode/src/vs/platform/theme/common/colors/minimapColors.js +5 -5
  217. package/vscode/src/vs/platform/theme/common/colors/miscColors.js +1 -1
  218. package/vscode/src/vs/platform/theme/common/colors/quickpickColors.js +5 -5
  219. package/vscode/src/vs/platform/tunnel/common/tunnel.js +4 -1
  220. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +75 -19
  221. package/vscode/src/vs/platform/window/common/window.d.ts +2 -2
  222. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +32 -25
  223. package/vscode/src/vs/workbench/api/common/extHost.common.services.js +2 -0
  224. package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -0
  225. package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +5 -11
  226. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +5 -15
  227. package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +2 -5
  228. package/vscode/src/vs/workbench/api/common/extHostComments.js +9 -3
  229. package/vscode/src/vs/workbench/api/common/extHostDebugService.js +32 -22
  230. package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +3 -3
  231. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +109 -40
  232. package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +46 -0
  233. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +84 -35
  234. package/vscode/src/vs/workbench/api/common/extHostNotebook.js +2 -2
  235. package/vscode/src/vs/workbench/api/common/extHostSCM.js +50 -41
  236. package/vscode/src/vs/workbench/api/common/extHostSearch.js +2 -2
  237. package/vscode/src/vs/workbench/api/common/extHostSecrets.js +11 -8
  238. package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +7 -6
  239. package/vscode/src/vs/workbench/api/common/extHostTesting.js +63 -70
  240. package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +5 -3
  241. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +75 -16
  242. package/vscode/src/vs/workbench/api/common/extHostTypes.js +29 -4
  243. package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +1 -1
  244. package/vscode/src/vs/workbench/browser/actions/developerActions.js +1 -1
  245. package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +127 -107
  246. package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +2 -2
  247. package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +1 -1
  248. package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +33 -21
  249. package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +1 -1
  250. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +5 -5
  251. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsToasts.js +1 -1
  252. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +2 -2
  253. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +2 -2
  254. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +23 -6
  255. package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +3 -1
  256. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +3 -3
  257. package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +1 -1
  258. package/vscode/src/vs/workbench/browser/web.api.js +8 -0
  259. package/vscode/src/vs/workbench/browser/workbench.contribution.js +199 -194
  260. package/vscode/src/vs/workbench/common/configuration.js +1 -1
  261. package/vscode/src/vs/workbench/common/contributions.js +8 -1
  262. package/vscode/src/vs/workbench/common/editor.js +5 -1
  263. package/vscode/src/vs/workbench/common/theme.js +79 -454
  264. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +221 -239
  265. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +17 -15
  266. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +1 -0
  267. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +4 -0
  268. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +27 -0
  269. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +35 -0
  270. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +51 -0
  271. package/vscode/src/vs/workbench/contrib/chat/browser/{chatConfirmationWidget.js → chatContentParts/chatConfirmationWidget.js} +9 -9
  272. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +131 -0
  273. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +37 -0
  274. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +263 -0
  275. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +37 -0
  276. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +160 -0
  277. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +171 -0
  278. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatWarningContentPart.js +34 -0
  279. package/vscode/src/vs/workbench/contrib/chat/browser/{media → chatContentParts/media}/chatConfirmationWidget.css.js +1 -1
  280. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +91 -44
  281. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +292 -1019
  282. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +2 -2
  283. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownRenderer.js +1 -1
  284. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +22 -7
  285. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
  286. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +61 -54
  287. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +23 -16
  288. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
  289. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css.js +1 -1
  290. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +8 -0
  291. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +1 -1
  292. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +3 -3
  293. package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +5 -4
  294. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +16 -0
  295. package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.service.js +3 -0
  296. package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +2 -2
  297. package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +43 -16
  298. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +1 -1
  299. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +1 -3
  300. package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +1 -1
  301. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +7 -5
  302. package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +7 -7
  303. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +3 -3
  304. package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +3 -3
  305. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +2 -2
  306. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +1 -1
  307. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +2 -1
  308. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +2 -1
  309. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +1 -1
  310. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +8 -5
  311. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +1 -1
  312. package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +1 -1
  313. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
  314. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +1 -1
  315. package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +5 -5
  316. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +14 -7
  317. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +4 -4
  318. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +8 -7
  319. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +19 -16
  320. package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +13 -12
  321. package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +19 -2
  322. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +9 -4
  323. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +10 -5
  324. package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +4 -4
  325. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +235 -173
  326. package/vscode/src/vs/workbench/contrib/extensions/browser/media/extensionActions.css.js +1 -1
  327. package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +2 -1
  328. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +17 -5
  329. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._configuration.js +62 -44
  330. package/vscode/src/vs/workbench/contrib/files/browser/files.contribution._editorPane.js +2 -2
  331. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +2 -2
  332. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +114 -107
  333. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +33 -25
  334. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +71 -101
  335. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +38 -43
  336. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +11 -33
  337. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +3 -4
  338. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +49 -86
  339. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +60 -71
  340. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
  341. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +1 -1
  342. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +116 -113
  343. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +6 -10
  344. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +2 -2
  345. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +1 -0
  346. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +2 -2
  347. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +12 -23
  348. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
  349. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +7 -9
  350. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +88 -61
  351. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +1 -3
  352. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +39 -3
  353. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +2 -1
  354. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +12 -11
  355. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +1 -1
  356. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +1 -1
  357. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +3 -2
  358. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +40 -105
  359. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +27 -26
  360. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +14 -5
  361. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +1 -1
  362. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +43 -46
  363. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +1 -1
  364. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +4 -4
  365. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +12 -9
  366. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +19 -14
  367. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +2 -2
  368. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +9 -6
  369. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +1 -1
  370. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +5 -3
  371. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +3 -3
  372. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +1 -1
  373. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +16 -6
  374. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +8 -8
  375. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service.js +3 -0
  376. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +11 -12
  377. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +12 -13
  378. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +1 -1
  379. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +5 -3
  380. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +9 -2
  381. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +37 -36
  382. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +18 -8
  383. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +1 -1
  384. package/vscode/src/vs/workbench/contrib/preferences/browser/settingsTreeModels.js +14 -5
  385. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +17 -22
  386. package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +1 -1
  387. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +7 -10
  388. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +7 -27
  389. package/vscode/src/vs/workbench/contrib/search/browser/anythingQuickAccess.js +3 -4
  390. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +2 -2
  391. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +4 -0
  392. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +3 -3
  393. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +3 -0
  394. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +0 -1
  395. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +13 -37
  396. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.d.ts +88 -0
  397. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +48 -31
  398. package/vscode/src/vs/workbench/contrib/testing/common/testId.d.ts +115 -0
  399. package/vscode/src/vs/workbench/contrib/testing/common/testResult.d.ts +226 -0
  400. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.d.ts +319 -0
  401. package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +2 -3
  402. package/vscode/src/vs/workbench/contrib/testing/common/testingStates.d.ts +10 -0
  403. package/vscode/src/vs/workbench/contrib/webview/browser/webviewWindowDragMonitor.js +21 -2
  404. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +7 -8
  405. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +3 -3
  406. package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +10 -5
  407. package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +54 -21
  408. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +1 -0
  409. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +1 -2
  410. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -4
  411. package/vscode/src/vs/workbench/services/extensions/common/extensions.js +5 -3
  412. package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +3 -1
  413. package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +59 -41
  414. package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +1 -1
  415. package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +3 -2
  416. package/vscode/src/vs/workbench/services/host/browser/host.service.d.ts +1 -0
  417. package/vscode/src/vs/workbench/services/language/common/languageService.js +7 -0
  418. package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +1 -1
  419. package/vscode/src/vs/workbench/services/preferences/common/preferences.d.ts +2 -2
  420. package/vscode/src/vs/workbench/services/search/common/search.js +2 -1
  421. package/vscode/src/vs/workbench/services/search/common/textSearchManager.js +2 -2
  422. package/vscode/src/vs/workbench/services/statusbar/browser/statusbar.d.ts +2 -2
  423. package/vscode/src/vs/workbench/services/textfile/common/encoding.js +69 -26
  424. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +23 -4
  425. package/vscode/src/vs/workbench/services/textfile/common/textfiles.d.ts +5 -1
  426. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +1 -1
  427. package/vscode/src/vs/workbench/services/views/browser/viewsService.js +12 -5
  428. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +38 -19
  429. package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.service.d.ts +2 -1
  430. package/vscode-dts/vscode.proposed.aiTextSearchProvider.d.ts +0 -196
  431. package/vscode-dts/vscode.proposed.attributableCoverage.d.ts +28 -10
  432. package/vscode-dts/vscode.proposed.authGetSessions.d.ts +30 -22
  433. package/vscode-dts/vscode.proposed.chatProvider.d.ts +17 -8
  434. package/vscode-dts/vscode.proposed.chatVariableResolver.d.ts +0 -9
  435. package/vscode-dts/vscode.proposed.commentReveal.d.ts +32 -0
  436. package/vscode-dts/vscode.proposed.commentThreadApplicability.d.ts +10 -0
  437. package/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts +1 -1
  438. package/vscode-dts/vscode.proposed.fileComments.d.ts +12 -53
  439. package/vscode-dts/vscode.proposed.fileSearchProvider.d.ts +6 -0
  440. package/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts +6 -0
  441. package/vscode-dts/vscode.proposed.lmTools.d.ts +91 -0
  442. package/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts +1 -1
  443. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +10 -6
  444. package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +38 -13
  445. package/vscode/src/vs/editor/browser/observableUtilities.js +0 -58
  446. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service.js +0 -3
  447. package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +0 -122
@@ -1,27 +1,20 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
2
  import { addStandardDisposableListener } from '../../../../base/browser/dom.js';
3
3
  import { KeyCode } from '../../../../base/common/keyCodes.js';
4
- import { Disposable, toDisposable, DisposableStore } from '../../../../base/common/lifecycle.js';
4
+ import { Disposable } from '../../../../base/common/lifecycle.js';
5
5
  import { MouseTargetType } from '../../../browser/editorBrowser.js';
6
6
  import { EditorOption } from '../../../common/config/editorOptions.js';
7
- import { Position } from '../../../common/core/position.js';
8
- import { Range } from '../../../common/core/range.js';
9
- import { ModelDecorationOptions } from '../../../common/model/textModel.js';
10
7
  import { TokenizationRegistry } from '../../../common/languages.js';
11
8
  import { HoverOperation, HoverStartMode, HoverStartSource } from './hoverOperation.js';
12
9
  import { HoverParticipantRegistry, HoverRangeAnchor } from './hoverTypes.js';
13
10
  import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
14
11
  import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
15
- import { MarkdownHoverParticipant } from './markdownHoverParticipant.js';
16
- import { InlayHintsHover } from '../../inlayHints/browser/inlayHintsHover.js';
17
12
  import { ContentHoverWidget } from './contentHoverWidget.js';
18
13
  import { ContentHoverComputer } from './contentHoverComputer.js';
19
- import { HoverResult, ContentHoverVisibleData } from './contentHoverTypes.js';
20
- import { EditorHoverStatusBar } from './contentHoverStatusBar.js';
14
+ import { HoverResult } from './contentHoverTypes.js';
21
15
  import { Emitter } from '../../../../base/common/event.js';
22
- var ContentHoverController_1;
16
+ import { RenderedContentHover } from './contentHoverRendered.js';
23
17
  let ContentHoverController = class ContentHoverController extends Disposable {
24
- static { ContentHoverController_1 = this; }
25
18
  constructor(_editor, _instantiationService, _keybindingService) {
26
19
  super();
27
20
  this._editor = _editor;
@@ -30,18 +23,25 @@ let ContentHoverController = class ContentHoverController extends Disposable {
30
23
  this._currentResult = null;
31
24
  this._onContentsChanged = this._register(( new Emitter()));
32
25
  this.onContentsChanged = this._onContentsChanged.event;
33
- this._widget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor));
34
- this._participants = [];
26
+ this._contentHoverWidget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor));
27
+ this._participants = this._initializeHoverParticipants();
28
+ this._computer = ( new ContentHoverComputer(this._editor, this._participants));
29
+ this._hoverOperation = this._register(( new HoverOperation(this._editor, this._computer)));
30
+ this._registerListeners();
31
+ }
32
+ _initializeHoverParticipants() {
33
+ const participants = [];
35
34
  for (const participant of HoverParticipantRegistry.getAll()) {
36
35
  const participantInstance = this._instantiationService.createInstance(participant, this._editor);
37
- if (participantInstance instanceof MarkdownHoverParticipant && !(participantInstance instanceof InlayHintsHover)) {
38
- this._markdownHoverParticipant = participantInstance;
39
- }
40
- this._participants.push(participantInstance);
36
+ participants.push(participantInstance);
41
37
  }
42
- this._participants.sort((p1, p2) => p1.hoverOrdinal - p2.hoverOrdinal);
43
- this._computer = ( new ContentHoverComputer(this._editor, this._participants));
44
- this._hoverOperation = this._register(( new HoverOperation(this._editor, this._computer)));
38
+ participants.sort((p1, p2) => p1.hoverOrdinal - p2.hoverOrdinal);
39
+ this._register(this._contentHoverWidget.onDidResize(() => {
40
+ this._participants.forEach(participant => participant.handleResize?.());
41
+ }));
42
+ return participants;
43
+ }
44
+ _registerListeners() {
45
45
  this._register(this._hoverOperation.onResult((result) => {
46
46
  if (!this._computer.anchor) {
47
47
  return;
@@ -49,19 +49,20 @@ let ContentHoverController = class ContentHoverController extends Disposable {
49
49
  const messages = (result.hasLoadingMessage ? this._addLoadingMessage(result.value) : result.value);
50
50
  this._withResult(( new HoverResult(this._computer.anchor, messages, result.isComplete)));
51
51
  }));
52
- this._register(addStandardDisposableListener(this._widget.getDomNode(), 'keydown', (e) => {
52
+ this._register(addStandardDisposableListener(this._contentHoverWidget.getDomNode(), 'keydown', (e) => {
53
53
  if (e.equals(KeyCode.Escape)) {
54
54
  this.hide();
55
55
  }
56
56
  }));
57
57
  this._register(TokenizationRegistry.onDidChange(() => {
58
- if (this._widget.position && this._currentResult) {
58
+ if (this._contentHoverWidget.position && this._currentResult) {
59
59
  this._setCurrentResult(this._currentResult);
60
60
  }
61
61
  }));
62
62
  }
63
63
  _startShowingOrUpdateHover(anchor, mode, source, focus, mouseEvent) {
64
- if (!this._widget.position || !this._currentResult) {
64
+ const contentHoverIsVisible = this._contentHoverWidget.position && this._currentResult;
65
+ if (!contentHoverIsVisible) {
65
66
  if (anchor) {
66
67
  this._startHoverOperationIfNecessary(anchor, mode, source, focus, false);
67
68
  return true;
@@ -69,10 +70,9 @@ let ContentHoverController = class ContentHoverController extends Disposable {
69
70
  return false;
70
71
  }
71
72
  const isHoverSticky = this._editor.getOption(EditorOption.hover).sticky;
72
- const isGettingCloser = (isHoverSticky
73
- && mouseEvent
74
- && this._widget.isMouseGettingCloser(mouseEvent.event.posx, mouseEvent.event.posy));
75
- if (isGettingCloser) {
73
+ const isMouseGettingCloser = mouseEvent && this._contentHoverWidget.isMouseGettingCloser(mouseEvent.event.posx, mouseEvent.event.posy);
74
+ const isHoverStickyAndIsMouseGettingCloser = isHoverSticky && isMouseGettingCloser;
75
+ if (isHoverStickyAndIsMouseGettingCloser) {
76
76
  if (anchor) {
77
77
  this._startHoverOperationIfNecessary(anchor, mode, source, focus, true);
78
78
  }
@@ -82,10 +82,12 @@ let ContentHoverController = class ContentHoverController extends Disposable {
82
82
  this._setCurrentResult(null);
83
83
  return false;
84
84
  }
85
- if (anchor && this._currentResult.anchor.equals(anchor)) {
85
+ const currentAnchorEqualsPreviousAnchor = this._currentResult.anchor.equals(anchor);
86
+ if (currentAnchorEqualsPreviousAnchor) {
86
87
  return true;
87
88
  }
88
- if (!anchor.canAdoptVisibleHover(this._currentResult.anchor, this._widget.position)) {
89
+ const currentAnchorCompatibleWithPreviousAnchor = anchor.canAdoptVisibleHover(this._currentResult.anchor, this._contentHoverWidget.position);
90
+ if (!currentAnchorCompatibleWithPreviousAnchor) {
89
91
  this._setCurrentResult(null);
90
92
  this._startHoverOperationIfNecessary(anchor, mode, source, focus, false);
91
93
  return true;
@@ -95,7 +97,8 @@ let ContentHoverController = class ContentHoverController extends Disposable {
95
97
  return true;
96
98
  }
97
99
  _startHoverOperationIfNecessary(anchor, mode, source, focus, insistOnKeepingHoverVisible) {
98
- if (this._computer.anchor && this._computer.anchor.equals(anchor)) {
100
+ const currentAnchorEqualToPreviousHover = this._computer.anchor && this._computer.anchor.equals(anchor);
101
+ if (currentAnchorEqualToPreviousHover) {
99
102
  return;
100
103
  }
101
104
  this._hoverOperation.cancel();
@@ -106,219 +109,192 @@ let ContentHoverController = class ContentHoverController extends Disposable {
106
109
  this._hoverOperation.start(mode);
107
110
  }
108
111
  _setCurrentResult(hoverResult) {
109
- if (this._currentResult === hoverResult) {
112
+ let currentHoverResult = hoverResult;
113
+ const currentResultEqualToPreviousResult = this._currentResult === currentHoverResult;
114
+ if (currentResultEqualToPreviousResult) {
110
115
  return;
111
116
  }
112
- if (hoverResult && hoverResult.messages.length === 0) {
113
- hoverResult = null;
117
+ const currentHoverResultIsEmpty = currentHoverResult && currentHoverResult.hoverParts.length === 0;
118
+ if (currentHoverResultIsEmpty) {
119
+ currentHoverResult = null;
114
120
  }
115
- this._currentResult = hoverResult;
121
+ this._currentResult = currentHoverResult;
116
122
  if (this._currentResult) {
117
- this._renderMessages(this._currentResult.anchor, this._currentResult.messages);
123
+ this._showHover(this._currentResult);
118
124
  }
119
125
  else {
120
- this._widget.hide();
126
+ this._hideHover();
121
127
  }
122
128
  }
123
129
  _addLoadingMessage(result) {
124
- if (this._computer.anchor) {
125
- for (const participant of this._participants) {
126
- if (participant.createLoadingMessage) {
127
- const loadingMessage = participant.createLoadingMessage(this._computer.anchor);
128
- if (loadingMessage) {
129
- return result.slice(0).concat([loadingMessage]);
130
- }
131
- }
130
+ if (!this._computer.anchor) {
131
+ return result;
132
+ }
133
+ for (const participant of this._participants) {
134
+ if (!participant.createLoadingMessage) {
135
+ continue;
132
136
  }
137
+ const loadingMessage = participant.createLoadingMessage(this._computer.anchor);
138
+ if (!loadingMessage) {
139
+ continue;
140
+ }
141
+ return result.slice(0).concat([loadingMessage]);
133
142
  }
134
143
  return result;
135
144
  }
136
145
  _withResult(hoverResult) {
137
- if (this._widget.position && this._currentResult && this._currentResult.isComplete) {
138
- if (!hoverResult.isComplete) {
139
- return;
140
- }
141
- if (this._computer.insistOnKeepingHoverVisible && hoverResult.messages.length === 0) {
142
- return;
143
- }
146
+ const previousHoverIsVisibleWithCompleteResult = this._contentHoverWidget.position && this._currentResult && this._currentResult.isComplete;
147
+ if (!previousHoverIsVisibleWithCompleteResult) {
148
+ this._setCurrentResult(hoverResult);
144
149
  }
145
- this._setCurrentResult(hoverResult);
146
- }
147
- _renderMessages(anchor, messages) {
148
- const { showAtPosition, showAtSecondaryPosition, highlightRange } = ContentHoverController_1.computeHoverRanges(this._editor, anchor.range, messages);
149
- const disposables = ( new DisposableStore());
150
- const statusBar = disposables.add(( new EditorHoverStatusBar(this._keybindingService)));
151
- const fragment = document.createDocumentFragment();
152
- let colorPicker = null;
153
- const context = {
154
- fragment,
155
- statusBar,
156
- setColorPicker: (widget) => colorPicker = widget,
157
- onContentsChanged: () => this._doOnContentsChanged(),
158
- setMinimumDimensions: (dimensions) => this._widget.setMinimumDimensions(dimensions),
159
- hide: () => this.hide()
160
- };
161
- for (const participant of this._participants) {
162
- const hoverParts = messages.filter(msg => msg.owner === participant);
163
- if (hoverParts.length > 0) {
164
- disposables.add(participant.renderHoverParts(context, hoverParts));
165
- }
150
+ const isCurrentHoverResultComplete = hoverResult.isComplete;
151
+ if (!isCurrentHoverResultComplete) {
152
+ return;
166
153
  }
167
- const isBeforeContent = ( messages.some(m => m.isBeforeContent));
168
- if (statusBar.hasContent) {
169
- fragment.appendChild(statusBar.hoverElement);
154
+ const currentHoverResultIsEmpty = hoverResult.hoverParts.length === 0;
155
+ const insistOnKeepingPreviousHoverVisible = this._computer.insistOnKeepingHoverVisible;
156
+ const shouldKeepPreviousHoverVisible = currentHoverResultIsEmpty && insistOnKeepingPreviousHoverVisible;
157
+ if (shouldKeepPreviousHoverVisible) {
158
+ return;
170
159
  }
171
- if (fragment.hasChildNodes()) {
172
- if (highlightRange) {
173
- const highlightDecoration = this._editor.createDecorationsCollection();
174
- highlightDecoration.set([{
175
- range: highlightRange,
176
- options: ContentHoverController_1._DECORATION_OPTIONS
177
- }]);
178
- disposables.add(toDisposable(() => {
179
- highlightDecoration.clear();
180
- }));
181
- }
182
- this._widget.showAt(fragment, ( new ContentHoverVisibleData(
183
- anchor.initialMousePosX,
184
- anchor.initialMousePosY,
185
- colorPicker,
186
- showAtPosition,
187
- showAtSecondaryPosition,
188
- this._editor.getOption(EditorOption.hover).above,
189
- this._computer.shouldFocus,
190
- this._computer.source,
191
- isBeforeContent,
192
- disposables
193
- )));
160
+ this._setCurrentResult(hoverResult);
161
+ }
162
+ _showHover(hoverResult) {
163
+ const context = this._getHoverContext();
164
+ this._renderedContentHover = ( new RenderedContentHover(
165
+ this._editor,
166
+ hoverResult,
167
+ this._participants,
168
+ this._computer,
169
+ context,
170
+ this._keybindingService
171
+ ));
172
+ if (this._renderedContentHover.domNodeHasChildren) {
173
+ this._contentHoverWidget.show(this._renderedContentHover);
194
174
  }
195
175
  else {
196
- disposables.dispose();
176
+ this._renderedContentHover.dispose();
197
177
  }
198
178
  }
199
- _doOnContentsChanged() {
200
- this._onContentsChanged.fire();
201
- this._widget.onContentsChanged();
202
- }
203
- static { this._DECORATION_OPTIONS = ModelDecorationOptions.register({
204
- description: 'content-hover-highlight',
205
- className: 'hoverHighlight'
206
- }); }
207
- static computeHoverRanges(editor, anchorRange, messages) {
208
- let startColumnBoundary = 1;
209
- if (editor.hasModel()) {
210
- const viewModel = editor._getViewModel();
211
- const coordinatesConverter = viewModel.coordinatesConverter;
212
- const anchorViewRange = coordinatesConverter.convertModelRangeToViewRange(anchorRange);
213
- const anchorViewRangeStart = ( new Position(
214
- anchorViewRange.startLineNumber,
215
- viewModel.getLineMinColumn(anchorViewRange.startLineNumber)
216
- ));
217
- startColumnBoundary = coordinatesConverter.convertViewPositionToModelPosition(anchorViewRangeStart).column;
218
- }
219
- const anchorLineNumber = anchorRange.startLineNumber;
220
- let renderStartColumn = anchorRange.startColumn;
221
- let highlightRange = messages[0].range;
222
- let forceShowAtRange = null;
223
- for (const msg of messages) {
224
- highlightRange = Range.plusRange(highlightRange, msg.range);
225
- if (msg.range.startLineNumber === anchorLineNumber && msg.range.endLineNumber === anchorLineNumber) {
226
- renderStartColumn = Math.max(Math.min(renderStartColumn, msg.range.startColumn), startColumnBoundary);
227
- }
228
- if (msg.forceShowAtRange) {
229
- forceShowAtRange = msg.range;
230
- }
231
- }
232
- const showAtPosition = forceShowAtRange ? forceShowAtRange.getStartPosition() : ( new Position(anchorLineNumber, anchorRange.startColumn));
233
- const showAtSecondaryPosition = forceShowAtRange ? forceShowAtRange.getStartPosition() : ( new Position(anchorLineNumber, renderStartColumn));
234
- return {
235
- showAtPosition,
236
- showAtSecondaryPosition,
237
- highlightRange
179
+ _hideHover() {
180
+ this._contentHoverWidget.hide();
181
+ }
182
+ _getHoverContext() {
183
+ const hide = () => {
184
+ this.hide();
238
185
  };
186
+ const onContentsChanged = () => {
187
+ this._onContentsChanged.fire();
188
+ this._contentHoverWidget.onContentsChanged();
189
+ };
190
+ const setMinimumDimensions = (dimensions) => {
191
+ this._contentHoverWidget.setMinimumDimensions(dimensions);
192
+ };
193
+ return { hide, onContentsChanged, setMinimumDimensions };
239
194
  }
240
195
  showsOrWillShow(mouseEvent) {
241
- if (this._widget.isResizing) {
196
+ const isContentWidgetResizing = this._contentHoverWidget.isResizing;
197
+ if (isContentWidgetResizing) {
242
198
  return true;
243
199
  }
200
+ const anchorCandidates = this._findHoverAnchorCandidates(mouseEvent);
201
+ const anchorCandidatesExist = anchorCandidates.length > 0;
202
+ if (!anchorCandidatesExist) {
203
+ return this._startShowingOrUpdateHover(null, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);
204
+ }
205
+ const anchor = anchorCandidates[0];
206
+ return this._startShowingOrUpdateHover(anchor, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);
207
+ }
208
+ _findHoverAnchorCandidates(mouseEvent) {
244
209
  const anchorCandidates = [];
245
210
  for (const participant of this._participants) {
246
- if (participant.suggestHoverAnchor) {
247
- const anchor = participant.suggestHoverAnchor(mouseEvent);
248
- if (anchor) {
249
- anchorCandidates.push(anchor);
250
- }
211
+ if (!participant.suggestHoverAnchor) {
212
+ continue;
213
+ }
214
+ const anchor = participant.suggestHoverAnchor(mouseEvent);
215
+ if (!anchor) {
216
+ continue;
251
217
  }
218
+ anchorCandidates.push(anchor);
252
219
  }
253
220
  const target = mouseEvent.target;
254
- if (target.type === MouseTargetType.CONTENT_TEXT) {
255
- anchorCandidates.push(( new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy)));
256
- }
257
- if (target.type === MouseTargetType.CONTENT_EMPTY) {
258
- const epsilon = this._editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth / 2;
259
- if (!target.detail.isAfterLines
260
- && typeof target.detail.horizontalDistanceToText === 'number'
261
- && target.detail.horizontalDistanceToText < epsilon) {
221
+ switch (target.type) {
222
+ case MouseTargetType.CONTENT_TEXT: {
262
223
  anchorCandidates.push(( new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy)));
224
+ break;
225
+ }
226
+ case MouseTargetType.CONTENT_EMPTY: {
227
+ const epsilon = this._editor.getOption(EditorOption.fontInfo).typicalHalfwidthCharacterWidth / 2;
228
+ const mouseIsWithinLinesAndCloseToHover = !target.detail.isAfterLines
229
+ && typeof target.detail.horizontalDistanceToText === 'number'
230
+ && target.detail.horizontalDistanceToText < epsilon;
231
+ if (!mouseIsWithinLinesAndCloseToHover) {
232
+ break;
233
+ }
234
+ anchorCandidates.push(( new HoverRangeAnchor(0, target.range, mouseEvent.event.posx, mouseEvent.event.posy)));
235
+ break;
263
236
  }
264
- }
265
- if (anchorCandidates.length === 0) {
266
- return this._startShowingOrUpdateHover(null, HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);
267
237
  }
268
238
  anchorCandidates.sort((a, b) => b.priority - a.priority);
269
- return this._startShowingOrUpdateHover(anchorCandidates[0], HoverStartMode.Delayed, HoverStartSource.Mouse, false, mouseEvent);
239
+ return anchorCandidates;
270
240
  }
271
241
  startShowingAtRange(range, mode, source, focus) {
272
242
  this._startShowingOrUpdateHover(( new HoverRangeAnchor(0, range, undefined, undefined)), mode, source, focus, null);
273
243
  }
274
- async updateMarkdownHoverVerbosityLevel(action, index, focus) {
275
- this._markdownHoverParticipant?.updateMarkdownHoverVerbosityLevel(action, index, focus);
276
- }
277
- focusedMarkdownHoverIndex() {
278
- return this._markdownHoverParticipant?.focusedMarkdownHoverIndex() ?? -1;
279
- }
280
- markdownHoverContentAtIndex(index) {
281
- return this._markdownHoverParticipant?.markdownHoverContentAtIndex(index) ?? '';
282
- }
283
- doesMarkdownHoverAtIndexSupportVerbosityAction(index, action) {
284
- return this._markdownHoverParticipant?.doesMarkdownHoverAtIndexSupportVerbosityAction(index, action) ?? false;
285
- }
286
244
  getWidgetContent() {
287
- const node = this._widget.getDomNode();
245
+ const node = this._contentHoverWidget.getDomNode();
288
246
  if (!node.textContent) {
289
247
  return undefined;
290
248
  }
291
249
  return node.textContent;
292
250
  }
251
+ async updateHoverVerbosityLevel(action, index, focus) {
252
+ this._renderedContentHover?.updateHoverVerbosityLevel(action, index, focus);
253
+ }
254
+ doesHoverAtIndexSupportVerbosityAction(index, action) {
255
+ return this._renderedContentHover?.doesHoverAtIndexSupportVerbosityAction(index, action) ?? false;
256
+ }
257
+ getAccessibleWidgetContent() {
258
+ return this._renderedContentHover?.getAccessibleWidgetContent();
259
+ }
260
+ getAccessibleWidgetContentAtIndex(index) {
261
+ return this._renderedContentHover?.getAccessibleWidgetContentAtIndex(index);
262
+ }
263
+ focusedHoverPartIndex() {
264
+ return this._renderedContentHover?.focusedHoverPartIndex ?? -1;
265
+ }
293
266
  containsNode(node) {
294
- return (node ? this._widget.getDomNode().contains(node) : false);
267
+ return (node ? this._contentHoverWidget.getDomNode().contains(node) : false);
295
268
  }
296
269
  focus() {
297
- this._widget.focus();
270
+ this._contentHoverWidget.focus();
271
+ }
272
+ focusHoverPartWithIndex(index) {
273
+ this._renderedContentHover?.focusHoverPartWithIndex(index);
298
274
  }
299
275
  scrollUp() {
300
- this._widget.scrollUp();
276
+ this._contentHoverWidget.scrollUp();
301
277
  }
302
278
  scrollDown() {
303
- this._widget.scrollDown();
279
+ this._contentHoverWidget.scrollDown();
304
280
  }
305
281
  scrollLeft() {
306
- this._widget.scrollLeft();
282
+ this._contentHoverWidget.scrollLeft();
307
283
  }
308
284
  scrollRight() {
309
- this._widget.scrollRight();
285
+ this._contentHoverWidget.scrollRight();
310
286
  }
311
287
  pageUp() {
312
- this._widget.pageUp();
288
+ this._contentHoverWidget.pageUp();
313
289
  }
314
290
  pageDown() {
315
- this._widget.pageDown();
291
+ this._contentHoverWidget.pageDown();
316
292
  }
317
293
  goToTop() {
318
- this._widget.goToTop();
294
+ this._contentHoverWidget.goToTop();
319
295
  }
320
296
  goToBottom() {
321
- this._widget.goToBottom();
297
+ this._contentHoverWidget.goToBottom();
322
298
  }
323
299
  hide() {
324
300
  this._computer.anchor = null;
@@ -326,25 +302,25 @@ let ContentHoverController = class ContentHoverController extends Disposable {
326
302
  this._setCurrentResult(null);
327
303
  }
328
304
  get isColorPickerVisible() {
329
- return this._widget.isColorPickerVisible;
305
+ return this._renderedContentHover?.isColorPickerVisible() ?? false;
330
306
  }
331
307
  get isVisibleFromKeyboard() {
332
- return this._widget.isVisibleFromKeyboard;
308
+ return this._contentHoverWidget.isVisibleFromKeyboard;
333
309
  }
334
310
  get isVisible() {
335
- return this._widget.isVisible;
311
+ return this._contentHoverWidget.isVisible;
336
312
  }
337
313
  get isFocused() {
338
- return this._widget.isFocused;
314
+ return this._contentHoverWidget.isFocused;
339
315
  }
340
316
  get isResizing() {
341
- return this._widget.isResizing;
317
+ return this._contentHoverWidget.isResizing;
342
318
  }
343
319
  get widget() {
344
- return this._widget;
320
+ return this._contentHoverWidget;
345
321
  }
346
322
  };
347
- ContentHoverController = ContentHoverController_1 = ( __decorate([
323
+ ContentHoverController = ( __decorate([
348
324
  ( __param(1, IInstantiationService)),
349
325
  ( __param(2, IKeybindingService))
350
326
  ], ContentHoverController));