@codingame/monaco-vscode-api 4.5.2 → 5.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 (434) hide show
  1. package/api.js +1 -1
  2. package/extensions.d.ts +2 -3
  3. package/lifecycle.js +6 -0
  4. package/localExtensionHost.d.ts +4 -1
  5. package/missing-services.js +41 -25
  6. package/package.json +8 -8
  7. package/service-override/tools/editor.js +31 -8
  8. package/service-override/tools/views.d.ts +1 -1
  9. package/service-override/tools/views.js +2 -3
  10. package/service-override/views.d.ts +0 -1
  11. package/services.d.ts +3 -3
  12. package/services.js +3 -3
  13. package/vscode/src/vs/base/browser/markdownRenderer.js +9 -3
  14. package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +2 -2
  15. package/vscode/src/vs/base/browser/ui/button/button.js +3 -3
  16. package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
  17. package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -1
  18. package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +2 -2
  19. package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +2 -2
  20. package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +2 -2
  21. package/vscode/src/vs/{platform/hover/browser → base/browser/ui/hover}/hover.d.ts +64 -4
  22. package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +1 -1
  23. package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +13 -0
  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 +30 -14
  26. package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +15 -2
  27. package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +2 -2
  28. package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.css.js +4 -0
  29. package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.js +239 -0
  30. package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +2 -2
  31. package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +2 -2
  32. package/vscode/src/vs/base/browser/ui/list/listView.js +5 -3
  33. package/vscode/src/vs/base/browser/ui/list/listWidget.d.ts +33 -0
  34. package/vscode/src/vs/base/browser/ui/list/listWidget.js +4 -1
  35. package/vscode/src/vs/base/browser/ui/menu/menu.js +1 -0
  36. package/vscode/src/vs/base/browser/ui/menu/menubar.css.js +1 -1
  37. package/vscode/src/vs/base/browser/ui/progressbar/progressAccessibilitySignal.js +13 -0
  38. package/vscode/src/vs/base/browser/ui/progressbar/progressbar.js +7 -1
  39. package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +2 -2
  40. package/vscode/src/vs/base/browser/ui/table/tableWidget.js +2 -2
  41. package/vscode/src/vs/base/browser/ui/toggle/toggle.js +8 -2
  42. package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +1 -1
  43. package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +11 -4
  44. package/vscode/src/vs/base/browser/ui/tree/media/tree.css.js +1 -1
  45. package/vscode/src/vs/base/browser/ui/tree/objectTree.js +6 -4
  46. package/vscode/src/vs/base/common/arraysFind.js +7 -7
  47. package/vscode/src/vs/base/common/async.js +8 -3
  48. package/vscode/src/vs/base/common/cache.js +29 -10
  49. package/vscode/src/vs/base/common/cancellation.js +6 -1
  50. package/vscode/src/vs/base/common/codicons.d.ts +3 -0
  51. package/vscode/src/vs/base/common/codiconsLibrary.js +3 -0
  52. package/vscode/src/vs/base/common/controlFlow.js +48 -0
  53. package/vscode/src/vs/base/common/equals.js +44 -0
  54. package/vscode/src/vs/base/common/event.d.ts +11 -1
  55. package/vscode/src/vs/base/common/event.js +26 -1
  56. package/vscode/src/vs/base/common/jsonEdit.js +1 -1
  57. package/vscode/src/vs/base/common/lifecycle.js +1 -1
  58. package/vscode/src/vs/base/common/map.js +53 -4
  59. package/vscode/src/vs/base/common/network.js +2 -0
  60. package/vscode/src/vs/base/common/objects.js +3 -0
  61. package/vscode/src/vs/base/common/observableInternal/autorun.js +1 -10
  62. package/vscode/src/vs/base/common/observableInternal/base.js +22 -10
  63. package/vscode/src/vs/base/common/observableInternal/derived.js +8 -8
  64. package/vscode/src/vs/base/common/observableInternal/promise.js +19 -1
  65. package/vscode/src/vs/base/common/observableInternal/utils.js +30 -52
  66. package/vscode/src/vs/base/common/product.d.ts +1 -0
  67. package/vscode/src/vs/base/common/strings.js +1 -1
  68. package/vscode/src/vs/base/common/types.d.ts +5 -1
  69. package/vscode/src/vs/editor/browser/config/editorConfiguration.js +3 -2
  70. package/vscode/src/vs/editor/browser/observableUtilities.js +58 -0
  71. package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +121 -2
  72. package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +80 -0
  73. package/vscode/src/vs/editor/browser/stableEditorScroll.js +37 -1
  74. package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -3
  75. package/vscode/src/vs/editor/browser/widget/codeEditor/editor.css.js +1 -1
  76. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +1 -0
  77. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +7 -5
  78. package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorSash.js +1 -0
  79. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
  80. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +3 -0
  81. package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +3 -10
  82. package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +8 -0
  83. package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +6 -6
  84. package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
  85. package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
  86. package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -0
  87. package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +1 -0
  88. package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +1 -0
  89. package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +1 -0
  90. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +3 -2
  91. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.js +17 -8
  92. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget.js +1 -0
  93. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +27 -19
  94. package/vscode/src/vs/editor/browser/widget/multiDiffEditor/style.css.js +1 -1
  95. package/vscode/src/vs/editor/common/core/editorColorRegistry.js +4 -4
  96. package/vscode/src/vs/editor/common/core/lineRange.d.ts +12 -0
  97. package/vscode/src/vs/editor/common/core/lineRange.js +28 -0
  98. package/vscode/src/vs/editor/common/core/textEdit.d.ts +21 -0
  99. package/vscode/src/vs/editor/common/core/textEdit.js +13 -1
  100. package/vscode/src/vs/editor/common/core/textLength.d.ts +29 -0
  101. package/vscode/src/vs/editor/common/core/textLength.js +6 -0
  102. package/vscode/src/vs/editor/common/cursor/cursorCollection.js +3 -3
  103. package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +11 -1
  104. package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +11 -0
  105. package/vscode/src/vs/editor/common/diff/rangeMapping.js +34 -3
  106. package/vscode/src/vs/editor/common/languages.d.ts +50 -10
  107. package/vscode/src/vs/editor/common/languages.js +11 -1
  108. package/vscode/src/vs/editor/common/services/languageFeatureDebounce.js +1 -1
  109. package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -2
  110. package/vscode/src/vs/editor/common/services/languageFeaturesService.js +1 -1
  111. package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +11 -1
  112. package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +3 -0
  113. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +22 -6
  114. package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +5 -0
  115. package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +1 -0
  116. package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +1 -1
  117. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions.js +20 -3
  118. package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +1 -1
  119. package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +2 -2
  120. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +4 -4
  121. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +2 -2
  122. package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +7 -0
  123. package/vscode/src/vs/editor/contrib/find/browser/findController.js +11 -6
  124. package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +10 -10
  125. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverComputer.js +74 -0
  126. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +332 -0
  127. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverStatusBar.js +34 -0
  128. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +39 -0
  129. package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +355 -0
  130. package/vscode/src/vs/editor/contrib/hover/browser/getHover.js +11 -14
  131. package/vscode/src/vs/editor/contrib/hover/browser/hover.css.js +1 -1
  132. package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +13 -0
  133. package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +354 -0
  134. package/vscode/src/vs/editor/contrib/hover/browser/hoverContribution.js +42 -0
  135. package/vscode/src/vs/editor/contrib/hover/browser/hoverController.js +320 -0
  136. package/vscode/src/vs/editor/contrib/hover/browser/marginHoverComputer.js +48 -0
  137. package/vscode/src/vs/editor/contrib/hover/browser/{marginHover.js → marginHoverWidget.js} +14 -48
  138. package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +250 -41
  139. package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +1 -0
  140. package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +44 -20
  141. package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +11 -7
  142. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commands.js +1 -0
  143. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +1 -0
  144. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +2 -3
  145. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js +1 -0
  146. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +26 -13
  147. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +5 -11
  148. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +24 -22
  149. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +39 -70
  150. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +3 -3
  151. package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +1 -0
  152. package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -0
  153. package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +1 -0
  154. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +4 -2
  155. package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +5 -3
  156. package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgressWidget.css.js +1 -1
  157. package/vscode/src/vs/editor/contrib/rename/browser/rename.js +18 -6
  158. package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.css.js +1 -1
  159. package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +165 -40
  160. package/vscode/src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +5 -0
  161. package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +3 -3
  162. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +15 -8
  163. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +13 -6
  164. package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +0 -2
  165. package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +9 -2
  166. package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +23 -18
  167. package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +33 -11
  168. package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +1 -9
  169. package/vscode/src/vs/platform/accessibility/common/accessibility.js +2 -1
  170. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.d.ts +15 -9
  171. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +133 -132
  172. package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service.d.ts +12 -5
  173. package/vscode/src/vs/platform/accessibilitySignal/browser/progressAccessibilitySignalScheduler.js +25 -0
  174. package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +4 -4
  175. package/vscode/src/vs/platform/actions/browser/buttonbar.js +10 -7
  176. package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +1 -1
  177. package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +4 -1
  178. package/vscode/src/vs/platform/actions/browser/toolbar.js +53 -36
  179. package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -1
  180. package/vscode/src/vs/platform/actions/common/actions.js +14 -4
  181. package/vscode/src/vs/platform/actions/common/menuService.js +30 -8
  182. package/vscode/src/vs/platform/configuration/common/configuration.js +4 -0
  183. package/vscode/src/vs/platform/configuration/common/configurationModels.js +43 -32
  184. package/vscode/src/vs/platform/configuration/common/configurations.js +12 -10
  185. package/vscode/src/vs/platform/contextview/browser/contextView.d.ts +4 -1
  186. package/vscode/src/vs/platform/contextview/browser/contextView.service.d.ts +2 -3
  187. package/vscode/src/vs/platform/contextview/browser/contextViewService.js +10 -8
  188. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +0 -1
  189. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +1 -0
  190. package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +1 -0
  191. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +5 -0
  192. package/vscode/src/vs/platform/files/common/files.d.ts +14 -1
  193. package/vscode/src/vs/platform/hover/browser/hover.service.d.ts +2 -31
  194. package/vscode/src/vs/platform/instantiation/common/instantiation.d.ts +9 -0
  195. package/vscode/src/vs/platform/instantiation/common/instantiationService.js +42 -8
  196. package/vscode/src/vs/platform/log/common/log.js +3 -1
  197. package/vscode/src/vs/platform/markers/common/markerService.js +7 -3
  198. package/vscode/src/vs/platform/opener/browser/link.js +6 -4
  199. package/vscode/src/vs/platform/quickinput/browser/quickInput.js +2 -2
  200. package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +15 -7
  201. package/vscode/src/vs/platform/telemetry/common/gdprTypings.d.ts +0 -1
  202. package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -0
  203. package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +5 -0
  204. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +30 -0
  205. package/vscode/src/vs/platform/theme/browser/defaultStyles.js +6 -0
  206. package/vscode/src/vs/platform/theme/browser/iconsStyleSheet.js +13 -11
  207. package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
  208. package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +28 -28
  209. package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -6
  210. package/vscode/src/vs/workbench/api/common/extHostBulkEdits.js +2 -1
  211. package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +104 -96
  212. package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +4 -4
  213. package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +9 -3
  214. package/vscode/src/vs/workbench/api/common/extHostDebugService.js +3 -3
  215. package/vscode/src/vs/workbench/api/common/extHostDocumentSaveParticipant.js +2 -1
  216. package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +1 -1
  217. package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +19 -1
  218. package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +87 -17
  219. package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +39 -2
  220. package/vscode/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.js +2 -1
  221. package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +52 -36
  222. package/vscode/src/vs/workbench/api/common/extHostTesting.js +10 -28
  223. package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +6 -1
  224. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +132 -136
  225. package/vscode/src/vs/workbench/api/common/extHostTypes.js +72 -18
  226. package/vscode/src/vs/workbench/api/common/extHostWindow.js +3 -5
  227. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +86 -76
  228. package/vscode/src/vs/workbench/browser/actions/media/actions.css.js +1 -1
  229. package/vscode/src/vs/workbench/browser/actions/widgetNavigationCommands.js +30 -6
  230. package/vscode/src/vs/workbench/browser/labels.js +4 -1
  231. package/vscode/src/vs/workbench/browser/parts/compositePart.d.ts +3 -1
  232. package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +19 -7
  233. package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +16 -3
  234. package/vscode/src/vs/workbench/browser/parts/editor/media/editorquickaccess.css.js +1 -1
  235. package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +1 -1
  236. package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +14 -33
  237. package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +33 -13
  238. package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +7 -5
  239. package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +4 -3
  240. package/vscode/src/vs/workbench/browser/parts/panel/panelPart.d.ts +2 -1
  241. package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +3 -1
  242. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +3 -3
  243. package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +1 -1
  244. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +182 -63
  245. package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +14 -3
  246. package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +61 -34
  247. package/vscode/src/vs/workbench/browser/workbench.contribution.js +16 -10
  248. package/vscode/src/vs/workbench/common/theme.js +144 -98
  249. package/vscode/src/vs/workbench/common/views.d.ts +2 -0
  250. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +190 -138
  251. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +876 -0
  252. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +59 -7
  253. package/vscode/src/vs/workbench/contrib/accessibility/browser/{accessibilityContributions.js → accessibleViewContributions.js} +160 -6
  254. package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +3 -3
  255. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +66 -150
  256. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -12
  257. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +21 -22
  258. package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +6 -1
  259. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +101 -0
  260. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +6 -5
  261. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +30 -23
  262. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +201 -47
  263. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +42 -5
  264. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +13 -28
  265. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
  266. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +366 -6
  267. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +35 -2
  268. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
  269. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css.js +4 -0
  270. package/vscode/src/vs/workbench/contrib/chat/common/annotations.js +4 -9
  271. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +95 -5
  272. package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.js +2 -1
  273. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +1 -1
  274. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +11 -6
  275. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +94 -79
  276. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +0 -13
  277. package/vscode/src/vs/workbench/contrib/chat/common/chatParticipantContribTypes.js +2 -0
  278. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +7 -9
  279. package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.service.js +3 -0
  280. package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +1 -1
  281. package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +1 -0
  282. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +4 -4
  283. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +30 -26
  284. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +30 -29
  285. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +4 -4
  286. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +5 -4
  287. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
  288. package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +13 -13
  289. package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +26 -16
  290. package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +107 -26
  291. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
  292. package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +23 -2
  293. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +2 -3
  294. package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +39 -11
  295. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +53 -33
  296. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +967 -0
  297. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +101 -0
  298. package/vscode/src/vs/workbench/contrib/debug/common/debug.js +4 -1
  299. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +82 -0
  300. package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +10 -9
  301. package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +79 -45
  302. package/vscode/src/vs/workbench/contrib/files/browser/{fileCommands.save.js → fileCommands._save.js} +4 -4
  303. package/vscode/src/vs/workbench/contrib/files/browser/{files.configuration.contribution.js → files.contribution._configuration.js} +1 -1
  304. package/vscode/src/vs/workbench/contrib/files/browser/{files.editorPane.contribution.js → files.contribution._editorPane.js} +18 -18
  305. package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +5 -3
  306. package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +19 -14
  307. package/vscode/src/vs/workbench/contrib/files/browser/views/media/openeditors.css.js +1 -1
  308. package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +8 -8
  309. package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +15 -2
  310. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +29 -112
  311. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +10 -7
  312. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +99 -91
  313. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +9 -31
  314. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +345 -104
  315. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +62 -69
  316. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +63 -46
  317. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +18 -10
  318. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
  319. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +1 -1
  320. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +1 -31
  321. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +7 -3
  322. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +5 -1
  323. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +1 -0
  324. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +1 -0
  325. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +1 -0
  326. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +4 -4
  327. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +2 -48
  328. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +28 -23
  329. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.js +5 -9
  330. package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +112 -0
  331. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +18 -10
  332. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +4 -4
  333. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +7 -2
  334. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +4 -5
  335. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +8 -3
  336. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +1 -0
  337. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +36 -4
  338. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +9 -6
  339. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +17 -5
  340. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +6 -4
  341. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +5 -5
  342. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +3 -3
  343. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +5 -4
  344. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +2 -0
  345. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
  346. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +2 -3
  347. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +22 -1
  348. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +34 -6
  349. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +15 -0
  350. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +6 -4
  351. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service.js +3 -0
  352. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +17 -14
  353. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +2 -1
  354. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +52 -16
  355. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
  356. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +2 -2
  357. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +25 -12
  358. package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +6 -4
  359. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +0 -2
  360. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +6 -4
  361. package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +24 -2
  362. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +38 -8
  363. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +0 -1
  364. package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +1 -0
  365. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +7 -14
  366. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +24 -6
  367. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.js +2 -1
  368. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +8 -9
  369. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +2 -20
  370. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +3 -1
  371. package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +2 -2
  372. package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +1 -0
  373. package/vscode/src/vs/workbench/contrib/testing/common/testItemCollection.js +10 -0
  374. package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +15 -3
  375. package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.service.d.ts +9 -0
  376. package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.service.js +3 -0
  377. package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +30 -16
  378. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +15 -4
  379. package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.service.d.ts +20 -1
  380. package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +0 -1
  381. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +4 -1
  382. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +4 -1
  383. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocation.d.ts +1 -1
  384. package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +8 -2
  385. package/vscode/src/vs/workbench/services/extensions/common/extensions.js +2 -1
  386. package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +4 -1
  387. package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +3 -3
  388. package/vscode/src/vs/workbench/services/language/common/languageService.js +23 -18
  389. package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +6 -4
  390. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +50 -9
  391. package/vscode/src/vs/workbench/services/themes/common/workbenchThemeService.js +1 -0
  392. package/vscode/src/vs/workbench/services/userDataProfile/browser/iconSelectBox.js +97 -0
  393. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.d.ts +7 -2
  394. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +2 -2
  395. package/vscode-dts/vscode.proposed.chatParticipant.d.ts +23 -45
  396. package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +65 -91
  397. package/vscode-dts/vscode.proposed.chatProvider.d.ts +9 -0
  398. package/vscode-dts/vscode.proposed.chatTab.d.ts +1 -5
  399. package/vscode-dts/vscode.proposed.contribAccessibilityHelpContent.d.ts +15 -0
  400. package/vscode-dts/vscode.proposed.debugFocus.d.ts +4 -4
  401. package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +2 -2
  402. package/vscode-dts/vscode.proposed.documentPaste.d.ts +144 -43
  403. package/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts +76 -0
  404. package/vscode-dts/vscode.proposed.interactive.d.ts +1 -17
  405. package/vscode-dts/vscode.proposed.languageModels.d.ts +56 -11
  406. package/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts +12 -1
  407. package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +4 -4
  408. package/vscode-dts/vscode.proposed.speech.d.ts +2 -1
  409. package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +144 -38
  410. package/vscode-dts/vscode.proposed.testPreserveFocus.d.ts +28 -0
  411. package/vscode/src/vs/base/browser/ui/hover/updatableHoverWidget.d.ts +0 -21
  412. package/vscode/src/vs/base/browser/ui/hover/updatableHoverWidget.js +0 -214
  413. package/vscode/src/vs/editor/browser/services/hoverService/hoverService.d.ts +0 -32
  414. package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +0 -838
  415. package/vscode/src/vs/editor/contrib/hover/browser/hover.js +0 -621
  416. package/vscode/src/vs/platform/accessibility/common/accessibility.service.d.ts +0 -19
  417. package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -54
  418. package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +0 -70
  419. package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +0 -237
  420. package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +0 -49
  421. package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalLineFeatureContribution.js +0 -178
  422. package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +0 -141
  423. package/vscode/src/vs/workbench/contrib/chat/common/chatContributionService.service.js +0 -3
  424. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatFileCreationWidget.js +0 -212
  425. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +0 -95
  426. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +0 -110
  427. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +0 -224
  428. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +0 -48
  429. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEvents.js +0 -47
  430. package/vscode-dts/vscode.proposed.dropMetadata.d.ts +0 -65
  431. package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +0 -57
  432. package/vscode-dts/vscode.proposed.windowActivity.d.ts +0 -17
  433. /package/vscode/src/vs/workbench/browser/parts/editor/{editor.autosave.contribution.js → editor.contribution._autosave.js} +0 -0
  434. /package/vscode/src/vs/workbench/contrib/files/browser/{files.fileEditorFactory.contribution.js → files.contribution._fileEditorFactory.js} +0 -0
@@ -1,12 +1,14 @@
1
1
  import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
2
  import { h, scheduleAtNextAnimationFrame, getWindow } from '../../../../base/browser/dom.js';
3
3
  import { SmoothScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';
4
- import { findFirstMaxBy } from '../../../../base/common/arraysFind.js';
4
+ import { compareBy, numberComparator } from '../../../../base/common/arrays.js';
5
+ import { findFirstMax } from '../../../../base/common/arraysFind.js';
6
+ import { BugIndicatingError } from '../../../../base/common/errors.js';
5
7
  import { Disposable, toDisposable } from '../../../../base/common/lifecycle.js';
6
- import { transaction, globalTransaction, disposableObservableValue, observableValue } from '../../../../base/common/observableInternal/base.js';
8
+ import { globalTransaction, transaction, disposableObservableValue, observableValue } from '../../../../base/common/observableInternal/base.js';
7
9
  import { derivedWithStore, derived } from '../../../../base/common/observableInternal/derived.js';
8
10
  import { autorunWithStore, autorun } from '../../../../base/common/observableInternal/autorun.js';
9
- import { observableFromEvent, derivedObservableWithCache } from '../../../../base/common/observableInternal/utils.js';
11
+ import { observableFromEvent } from '../../../../base/common/observableInternal/utils.js';
10
12
  import '../../../../base/common/cancellation.js';
11
13
  import { Scrollable } from '../../../../base/common/scrollable.js';
12
14
  import './style.css.js';
@@ -19,7 +21,6 @@ import { IInstantiationService } from '../../../../platform/instantiation/common
19
21
  import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
20
22
  import { DiffEditorItemTemplate, TemplateData } from './diffEditorItemTemplate.js';
21
23
  import { ObjectPool } from './objectPool.js';
22
- import { BugIndicatingError } from '../../../../base/common/errors.js';
23
24
  let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposable {
24
25
  constructor(_element, _dimension, _viewModel, _workbenchUIElementFactory, _parentContextKeyService, _parentInstantiationService) {
25
26
  super();
@@ -55,13 +56,14 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
55
56
  }, this._scrollable)));
56
57
  this.scrollTop = observableFromEvent(this._scrollableElement.onScroll, () => this._scrollableElement.getScrollPosition().scrollTop);
57
58
  this.scrollLeft = observableFromEvent(this._scrollableElement.onScroll, () => this._scrollableElement.getScrollPosition().scrollLeft);
58
- this._viewItems = derivedWithStore(this, (reader, store) => {
59
+ this._viewItemsInfo = derivedWithStore(this, (reader, store) => {
59
60
  const vm = this._viewModel.read(reader);
60
61
  if (!vm) {
61
- return [];
62
+ return { items: [], getItem: _d => { throw ( new BugIndicatingError()); } };
62
63
  }
63
- const items = vm.items.read(reader);
64
- return ( items.map(d => {
64
+ const viewModels = vm.items.read(reader);
65
+ const map = ( new Map());
66
+ const items = ( viewModels.map(d => {
65
67
  const item = store.add(( new VirtualizedViewItem(d, this._objectPool, this.scrollLeft, delta => {
66
68
  this._scrollableElement.setScrollPosition({ scrollTop: this._scrollableElement.getScrollPosition().scrollTop + delta });
67
69
  })));
@@ -71,17 +73,25 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
71
73
  item.setViewState(data, tx);
72
74
  });
73
75
  }
76
+ map.set(d, item);
74
77
  return item;
75
78
  }));
79
+ return { items, getItem: d => map.get(d) };
76
80
  });
81
+ this._viewItems = ( this._viewItemsInfo.map(this, items => items.items));
77
82
  this._spaceBetweenPx = 0;
78
83
  this._totalHeight = ( this._viewItems.map(
79
84
  this,
80
85
  (items, reader) => items.reduce((r, i) => r + i.contentHeight.read(reader) + this._spaceBetweenPx, 0)
81
86
  ));
82
- this.activeDiffItem = derived(this, reader => this._viewItems.read(reader).find(i => i.template.read(reader)?.isFocused.read(reader)));
83
- this.lastActiveDiffItem = derivedObservableWithCache((reader, lastValue) => this.activeDiffItem.read(reader) ?? lastValue);
84
- this.activeControl = derived(this, reader => this.lastActiveDiffItem.read(reader)?.template.read(reader)?.editor);
87
+ this.activeControl = derived(this, reader => {
88
+ const activeDiffItem = this._viewModel.read(reader)?.activeDiffItem.read(reader);
89
+ if (!activeDiffItem) {
90
+ return undefined;
91
+ }
92
+ const viewItem = this._viewItemsInfo.read(reader).getItem(activeDiffItem);
93
+ return viewItem.template.read(reader)?.editor;
94
+ });
85
95
  this._contextKeyService = this._register(this._parentContextKeyService.createScoped(this._element));
86
96
  this._instantiationService = this._parentInstantiationService.createChild(( new ServiceCollection([IContextKeyService, this._contextKeyService])));
87
97
  this._lastDocStates = {};
@@ -104,12 +114,6 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
104
114
  ctxAllCollapsed.set(allCollapsed);
105
115
  }
106
116
  }));
107
- this._register(autorun((reader) => {
108
- const lastActiveDiffItem = this.lastActiveDiffItem.read(reader);
109
- transaction(tx => {
110
- this._viewModel.read(reader)?.activeDiffItem.set(lastActiveDiffItem?.viewModel, tx);
111
- });
112
- }));
113
117
  this._register(autorun((reader) => {
114
118
  const dimension = this._dimension.read(reader);
115
119
  this._sizeObserver.observe(dimension);
@@ -123,7 +127,7 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
123
127
  const width = this._sizeObserver.width.read(reader);
124
128
  let scrollWidth = width;
125
129
  const viewItems = this._viewItems.read(reader);
126
- const max = findFirstMaxBy(viewItems, i => i.maxScroll.read(reader).maxScroll);
130
+ const max = findFirstMax(viewItems, compareBy(i => i.maxScroll.read(reader).maxScroll, numberComparator));
127
131
  if (max) {
128
132
  const maxScroll = max.maxScroll.read(reader);
129
133
  scrollWidth = width + maxScroll.maxScroll;
@@ -155,12 +159,14 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
155
159
  if (index === -1) {
156
160
  throw ( new BugIndicatingError('Resource not found in diff editor'));
157
161
  }
162
+ const viewItem = viewItems[index];
163
+ this._viewModel.get().activeDiffItem.setCache(viewItem.viewModel, undefined);
158
164
  let scrollTop = 0;
159
165
  for (let i = 0; i < index; i++) {
160
166
  scrollTop += viewItems[i].contentHeight.get() + this._spaceBetweenPx;
161
167
  }
162
168
  this._scrollableElement.setScrollPosition({ scrollTop });
163
- const diffEditor = viewItems[index].template.get()?.editor;
169
+ const diffEditor = viewItem.template.get()?.editor;
164
170
  const editor = 'original' in resource ? diffEditor?.getOriginalEditor() : diffEditor?.getModifiedEditor();
165
171
  if (editor && options?.range) {
166
172
  editor.revealRangeInCenter(options.range);
@@ -261,6 +267,8 @@ class VirtualizedViewItem extends Disposable {
261
267
  this.maxScroll = derived(this, reader => this._templateRef.read(reader)?.object.maxScroll.read(reader) ?? { maxScroll: 0, scrollWidth: 0 });
262
268
  this.template = derived(this, reader => this._templateRef.read(reader)?.object);
263
269
  this._isHidden = observableValue(this, false);
270
+ this._isFocused = derived(this, reader => this.template.read(reader)?.isFocused.read(reader) ?? false);
271
+ this.viewModel.setIsFocused(this._isFocused, undefined);
264
272
  this._register(autorun((reader) => {
265
273
  const scrollLeft = this._scrollLeft.read(reader);
266
274
  this._templateRef.read(reader)?.object.setScrollLeft(scrollLeft);
@@ -1,4 +1,4 @@
1
1
  import n from '../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
- var css = ".monaco-component.multiDiffEditor{background:var(--vscode-multiDiffEditor-background);overflow-y:hidden;.focused{--vscode-multiDiffEditor-border:var(--vscode-focusBorder)}.multiDiffEntry{display:flex;flex:1;flex-direction:column;overflow:hidden;.collapse-button{cursor:pointer;margin:0 5px;a{display:block}}.header{background:var(--vscode-editor-background);z-index:1000;&:not(.collapsed) .header-content{border-bottom:1px solid var(--vscode-sideBarSectionHeader-border)}.header-content{align-items:center;background:var(--vscode-multiDiffEditor-headerBackground);border-left:1px solid var(--vscode-multiDiffEditor-border);border-right:1px solid var(--vscode-multiDiffEditor-border);border-top:1px solid var(--vscode-multiDiffEditor-border);border-top-left-radius:2px;border-top-right-radius:2px;color:var(--vscode-foreground);display:flex;margin:8px 8px 0;padding:4px 5px;&.shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px}.file-path{display:flex;flex:1;min-width:0;.title{font-size:14px;line-height:22px;&.original{flex:1;min-width:0;text-overflow:ellipsis}}.status{font-weight:600;line-height:22px;margin:0 10px;opacity:.75}}.actions{padding:0 8px}}}.editorParent{border-bottom:1px solid var(--vscode-multiDiffEditor-border);border-left:1px solid var(--vscode-multiDiffEditor-border);border-radius:2px;border-right:1px solid var(--vscode-multiDiffEditor-border);display:flex;flex:1;flex-direction:column;margin-left:8px;margin-right:8px;overflow:hidden}.editorContainer{flex:1}}}";
2
+ var css = ".monaco-component.multiDiffEditor{background:var(--vscode-multiDiffEditor-background);overflow-y:hidden;.active{--vscode-multiDiffEditor-border:var(--vscode-focusBorder)}.multiDiffEntry{display:flex;flex:1;flex-direction:column;overflow:hidden;.collapse-button{cursor:pointer;margin:0 5px;a{display:block}}.header{background:var(--vscode-editor-background);z-index:1000;&:not(.collapsed) .header-content{border-bottom:1px solid var(--vscode-sideBarSectionHeader-border)}.header-content{align-items:center;background:var(--vscode-multiDiffEditor-headerBackground);border-top:1px solid var(--vscode-multiDiffEditor-border);color:var(--vscode-foreground);display:flex;margin:8px 0 0;padding:4px 5px;&.shadow{box-shadow:var(--vscode-scrollbar-shadow) 0 6px 6px -6px}.file-path{display:flex;flex:1;min-width:0;.title{font-size:14px;line-height:22px;&.original{flex:1;min-width:0;text-overflow:ellipsis}}.status{font-weight:600;line-height:22px;margin:0 10px;opacity:.75}}.actions{padding:0 8px}}}.editorParent{border-bottom:1px solid var(--vscode-multiDiffEditor-border);display:flex;flex:1;flex-direction:column;overflow:hidden}.editorContainer{flex:1}}}";
3
3
  n(css,{});
4
4
  export { css, css as default };
@@ -28,13 +28,13 @@ const editorRangeHighlight = registerColor('editor.rangeHighlightBackground', {
28
28
  2,
29
29
  'Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations.'
30
30
  )), true);
31
- registerColor('editor.rangeHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, ( localizeWithPath(_moduleId, 3, 'Background color of the border around highlighted ranges.')), true);
31
+ registerColor('editor.rangeHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, ( localizeWithPath(_moduleId, 3, 'Background color of the border around highlighted ranges.')));
32
32
  registerColor('editor.symbolHighlightBackground', { dark: editorFindMatchHighlight, light: editorFindMatchHighlight, hcDark: null, hcLight: null }, ( localizeWithPath(
33
33
  _moduleId,
34
34
  4,
35
35
  'Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations.'
36
36
  )), true);
37
- registerColor('editor.symbolHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, ( localizeWithPath(_moduleId, 5, 'Background color of the border around highlighted symbols.')), true);
37
+ registerColor('editor.symbolHighlightBorder', { dark: null, light: null, hcDark: activeContrastBorder, hcLight: activeContrastBorder }, ( localizeWithPath(_moduleId, 5, 'Background color of the border around highlighted symbols.')));
38
38
  const editorCursorForeground = registerColor('editorCursor.foreground', { dark: '#AEAFAD', light: Color.black, hcDark: Color.white, hcLight: '#0F4A85' }, ( localizeWithPath(_moduleId, 6, 'Color of the editor cursor.')));
39
39
  const editorCursorBackground = registerColor('editorCursor.background', null, ( localizeWithPath(
40
40
  _moduleId,
@@ -102,7 +102,7 @@ registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#006
102
102
  registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hcDark: contrastBorder, hcLight: contrastBorder }, ( localizeWithPath(_moduleId, 36, 'Color for matching brackets boxes')));
103
103
  const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hcDark: '#7f7f7f4d', hcLight: '#666666' }, ( localizeWithPath(_moduleId, 37, 'Color of the overview ruler border.')));
104
104
  const editorOverviewRulerBackground = registerColor('editorOverviewRuler.background', null, ( localizeWithPath(_moduleId, 38, 'Background color of the editor overview ruler.')));
105
- const editorGutter = registerColor('editorGutter.background', { dark: editorBackground, light: editorBackground, hcDark: editorBackground, hcLight: editorBackground }, ( localizeWithPath(
105
+ registerColor('editorGutter.background', { dark: editorBackground, light: editorBackground, hcDark: editorBackground, hcLight: editorBackground }, ( localizeWithPath(
106
106
  _moduleId,
107
107
  39,
108
108
  'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.'
@@ -230,4 +230,4 @@ registerThemingParticipant((theme, collector) => {
230
230
  collector.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${imeBackground}; }`);
231
231
  }
232
232
  });
233
- export { deprecatedEditorActiveIndentGuides, deprecatedEditorIndentGuides, editorActiveIndentGuide1, editorActiveIndentGuide2, editorActiveIndentGuide3, editorActiveIndentGuide4, editorActiveIndentGuide5, editorActiveIndentGuide6, editorBracketHighlightingForeground1, editorBracketHighlightingForeground2, editorBracketHighlightingForeground3, editorBracketHighlightingForeground4, editorBracketHighlightingForeground5, editorBracketHighlightingForeground6, editorBracketHighlightingUnexpectedBracketForeground, editorBracketPairGuideActiveBackground1, editorBracketPairGuideActiveBackground2, editorBracketPairGuideActiveBackground3, editorBracketPairGuideActiveBackground4, editorBracketPairGuideActiveBackground5, editorBracketPairGuideActiveBackground6, editorBracketPairGuideBackground1, editorBracketPairGuideBackground2, editorBracketPairGuideBackground3, editorBracketPairGuideBackground4, editorBracketPairGuideBackground5, editorBracketPairGuideBackground6, editorCursorBackground, editorCursorForeground, editorDimmedLineNumber, editorGutter, editorIndentGuide1, editorIndentGuide2, editorIndentGuide3, editorIndentGuide4, editorIndentGuide5, editorIndentGuide6, editorLineHighlight, editorLineHighlightBorder, editorLineNumbers, editorMultiCursorPrimaryBackground, editorMultiCursorPrimaryForeground, editorMultiCursorSecondaryBackground, editorMultiCursorSecondaryForeground, editorOverviewRulerBackground, editorOverviewRulerBorder, editorRangeHighlight, editorUnnecessaryCodeOpacity, editorWhitespaces, overviewRulerError, overviewRulerInfo, overviewRulerRangeHighlight, overviewRulerWarning };
233
+ export { deprecatedEditorActiveIndentGuides, deprecatedEditorIndentGuides, editorActiveIndentGuide1, editorActiveIndentGuide2, editorActiveIndentGuide3, editorActiveIndentGuide4, editorActiveIndentGuide5, editorActiveIndentGuide6, editorBracketHighlightingForeground1, editorBracketHighlightingForeground2, editorBracketHighlightingForeground3, editorBracketHighlightingForeground4, editorBracketHighlightingForeground5, editorBracketHighlightingForeground6, editorBracketHighlightingUnexpectedBracketForeground, editorBracketPairGuideActiveBackground1, editorBracketPairGuideActiveBackground2, editorBracketPairGuideActiveBackground3, editorBracketPairGuideActiveBackground4, editorBracketPairGuideActiveBackground5, editorBracketPairGuideActiveBackground6, editorBracketPairGuideBackground1, editorBracketPairGuideBackground2, editorBracketPairGuideBackground3, editorBracketPairGuideBackground4, editorBracketPairGuideBackground5, editorBracketPairGuideBackground6, editorCursorBackground, editorCursorForeground, editorDimmedLineNumber, editorIndentGuide1, editorIndentGuide2, editorIndentGuide3, editorIndentGuide4, editorIndentGuide5, editorIndentGuide6, editorLineHighlight, editorLineHighlightBorder, editorLineNumbers, editorMultiCursorPrimaryBackground, editorMultiCursorPrimaryForeground, editorMultiCursorSecondaryBackground, editorMultiCursorSecondaryForeground, editorOverviewRulerBackground, editorOverviewRulerBorder, editorRangeHighlight, editorUnnecessaryCodeOpacity, editorWhitespaces, overviewRulerError, overviewRulerInfo, overviewRulerRangeHighlight, overviewRulerWarning };
@@ -1,5 +1,6 @@
1
1
  import { OffsetRange } from './offsetRange.js';
2
2
  import { Range } from './range.js';
3
+ import { ITextModel } from '../model.js';
3
4
 
4
5
  /**
5
6
  * A range of lines (1-based).
@@ -18,6 +19,14 @@ declare class LineRange {
18
19
  * @internal
19
20
  */
20
21
  static deserialize(lineRange: ISerializedLineRange): LineRange;
22
+ /**
23
+ * @internal
24
+ */
25
+ static invert(range: LineRange, model: ITextModel): LineRange[];
26
+ /**
27
+ * @internal
28
+ */
29
+ static asRange(lineRange: LineRange, model: ITextModel): Range;
21
30
  /**
22
31
  * The start line number.
23
32
  */
@@ -58,6 +67,9 @@ declare class LineRange {
58
67
  overlapOrTouch(other: LineRange): boolean;
59
68
  equals(b: LineRange): boolean;
60
69
  toInclusiveRange(): Range | null;
70
+ /**
71
+ * @deprecated Using this function is discouraged because it might lead to bugs: The end position is not guaranteed to be a valid position!
72
+ */
61
73
  toExclusiveRange(): Range;
62
74
  mapToLineArray<T>(f: (lineNumber: number) => T): T[];
63
75
  forEach(f: (lineNumber: number) => void): void;
@@ -60,6 +60,34 @@ class LineRange {
60
60
  static deserialize(lineRange) {
61
61
  return ( new LineRange(lineRange[0], lineRange[1]));
62
62
  }
63
+ static invert(range, model) {
64
+ if (range.isEmpty) {
65
+ return [];
66
+ }
67
+ const result = [];
68
+ if (range.startLineNumber > 1) {
69
+ result.push(( new LineRange(1, range.startLineNumber)));
70
+ }
71
+ if (range.endLineNumberExclusive < model.getLineCount() + 1) {
72
+ result.push(( new LineRange(range.endLineNumberExclusive, model.getLineCount() + 1)));
73
+ }
74
+ return result.filter(r => !r.isEmpty);
75
+ }
76
+ static asRange(lineRange, model) {
77
+ return lineRange.isEmpty
78
+ ? ( new Range(
79
+ lineRange.startLineNumber,
80
+ 1,
81
+ lineRange.startLineNumber,
82
+ model.getLineLength(lineRange.startLineNumber)
83
+ ))
84
+ : ( new Range(
85
+ lineRange.startLineNumber,
86
+ 1,
87
+ lineRange.endLineNumberExclusive - 1,
88
+ model.getLineLength(lineRange.endLineNumberExclusive - 1)
89
+ ));
90
+ }
63
91
  constructor(startLineNumber, endLineNumberExclusive) {
64
92
  if (startLineNumber > endLineNumberExclusive) {
65
93
  throw ( new BugIndicatingError(
@@ -0,0 +1,21 @@
1
+ import { ISingleEditOperation } from './editOperation.js';
2
+ import { Position } from './position.js';
3
+ import { Range } from './range.js';
4
+ import { TextLength } from './textLength.js';
5
+
6
+ declare class SingleTextEdit {
7
+ readonly range: Range;
8
+ readonly text: string;
9
+ constructor(range: Range, text: string);
10
+ get isEmpty(): boolean;
11
+ static equals(first: SingleTextEdit, second: SingleTextEdit): boolean;
12
+ toSingleEditOperation(): ISingleEditOperation;
13
+ }
14
+ declare abstract class AbstractText {
15
+ abstract getValueOfRange(range: Range): string;
16
+ abstract readonly length: TextLength;
17
+ get endPositionExclusive(): Position;
18
+ getValue(): string;
19
+ }
20
+
21
+ export { AbstractText, SingleTextEdit };
@@ -5,6 +5,9 @@ import { PositionOffsetTransformer } from './positionToOffset.js';
5
5
  import { Range } from './range.js';
6
6
  import { TextLength } from './textLength.js';
7
7
  class TextEdit {
8
+ static single(originalRange, newText) {
9
+ return ( new TextEdit([( new SingleTextEdit(originalRange, newText))]));
10
+ }
8
11
  constructor(edits) {
9
12
  this.edits = edits;
10
13
  assertFn(() => checkAdjacentItems(edits, (a, b) => a.range.getEndPosition().isBeforeOrEqual(b.range.getStartPosition())));
@@ -138,9 +141,18 @@ class SingleTextEdit {
138
141
  static equals(first, second) {
139
142
  return first.range.equalsRange(second.range) && first.text === second.text;
140
143
  }
144
+ toSingleEditOperation() {
145
+ return {
146
+ range: this.range,
147
+ text: this.text,
148
+ };
149
+ }
141
150
  }
142
151
  function rangeFromPositions(start, end) {
143
- if (!start.isBeforeOrEqual(end)) {
152
+ if (start.lineNumber === end.lineNumber && start.column === Number.MAX_SAFE_INTEGER) {
153
+ return Range.fromPositions(end, end);
154
+ }
155
+ else if (!start.isBeforeOrEqual(end)) {
144
156
  throw ( new BugIndicatingError('start must be before end'));
145
157
  }
146
158
  return ( new Range(start.lineNumber, start.column, end.lineNumber, end.column));
@@ -0,0 +1,29 @@
1
+ import { Position } from './position.js';
2
+ import { Range } from './range.js';
3
+
4
+ /**
5
+ * Represents a non-negative length of text in terms of line and column count.
6
+ */
7
+ declare class TextLength {
8
+ readonly lineCount: number;
9
+ readonly columnCount: number;
10
+ static zero: TextLength;
11
+ static lengthDiffNonNegative(start: TextLength, end: TextLength): TextLength;
12
+ static betweenPositions(position1: Position, position2: Position): TextLength;
13
+ static ofRange(range: Range): TextLength;
14
+ static ofText(text: string): TextLength;
15
+ constructor(lineCount: number, columnCount: number);
16
+ isZero(): boolean;
17
+ isLessThan(other: TextLength): boolean;
18
+ isGreaterThan(other: TextLength): boolean;
19
+ isGreaterThanOrEqualTo(other: TextLength): boolean;
20
+ equals(other: TextLength): boolean;
21
+ compare(other: TextLength): number;
22
+ add(other: TextLength): TextLength;
23
+ createRange(startPosition: Position): Range;
24
+ toRange(): Range;
25
+ addToPosition(position: Position): Position;
26
+ toString(): string;
27
+ }
28
+
29
+ export { TextLength };
@@ -57,6 +57,12 @@ class TextLength {
57
57
  }
58
58
  return this.columnCount > other.columnCount;
59
59
  }
60
+ isGreaterThanOrEqualTo(other) {
61
+ if (this.lineCount !== other.lineCount) {
62
+ return this.lineCount > other.lineCount;
63
+ }
64
+ return this.columnCount >= other.columnCount;
65
+ }
60
66
  equals(other) {
61
67
  return this.lineCount === other.lineCount && this.columnCount === other.columnCount;
62
68
  }
@@ -1,5 +1,5 @@
1
1
  import { compareBy } from '../../../base/common/arrays.js';
2
- import { findFirstMinBy, findLastMaxBy } from '../../../base/common/arraysFind.js';
2
+ import { findFirstMin, findLastMax } from '../../../base/common/arraysFind.js';
3
3
  import { CursorState } from '../cursorCommon.js';
4
4
  import { Cursor } from './oneCursor.js';
5
5
  import { Position } from '../core/position.js';
@@ -44,10 +44,10 @@ class CursorCollection {
44
44
  return ( this.cursors.map(c => c.viewState.position));
45
45
  }
46
46
  getTopMostViewPosition() {
47
- return findFirstMinBy(this.cursors, compareBy(c => c.viewState.position, Position.compare)).viewState.position;
47
+ return findFirstMin(this.cursors, compareBy(c => c.viewState.position, Position.compare)).viewState.position;
48
48
  }
49
49
  getBottomMostViewPosition() {
50
- return findLastMaxBy(this.cursors, compareBy(c => c.viewState.position, Position.compare)).viewState.position;
50
+ return findLastMax(this.cursors, compareBy(c => c.viewState.position, Position.compare)).viewState.position;
51
51
  }
52
52
  getSelections() {
53
53
  return ( this.cursors.map(c => c.modelState.selection));
@@ -24,7 +24,17 @@ class DefaultLinesDiffComputer {
24
24
  if (originalLines.length === 1 && originalLines[0].length === 0 || modifiedLines.length === 1 && modifiedLines[0].length === 0) {
25
25
  return ( new LinesDiff([
26
26
  ( new DetailedLineRangeMapping(( new LineRange(1, originalLines.length + 1)), ( new LineRange(1, modifiedLines.length + 1)), [
27
- ( new RangeMapping(( new Range(1, 1, originalLines.length, originalLines[0].length + 1)), ( new Range(1, 1, modifiedLines.length, modifiedLines[0].length + 1))))
27
+ ( new RangeMapping(( new Range(
28
+ 1,
29
+ 1,
30
+ originalLines.length,
31
+ originalLines[originalLines.length - 1].length + 1
32
+ )), ( new Range(
33
+ 1,
34
+ 1,
35
+ modifiedLines.length,
36
+ modifiedLines[modifiedLines.length - 1].length + 1
37
+ ))))
28
38
  ]))
29
39
  ], [], false));
30
40
  }
@@ -1,5 +1,6 @@
1
1
  import { LineRange } from '../core/lineRange.js';
2
2
  import { Range } from '../core/range.js';
3
+ import { AbstractText, SingleTextEdit } from '../core/textEdit.js';
3
4
 
4
5
  /**
5
6
  * Maps a line range in the original text model to a line range in the modified text model.
@@ -20,6 +21,12 @@ declare class LineRangeMapping {
20
21
  flip(): LineRangeMapping;
21
22
  join(other: LineRangeMapping): LineRangeMapping;
22
23
  get changedLineCount(): number;
24
+ /**
25
+ * This method assumes that the LineRangeMapping describes a valid diff!
26
+ * I.e. if one range is empty, the other range cannot be the entire document.
27
+ * It avoids various problems when the line range points to non-existing line-numbers.
28
+ */
29
+ toRangeMapping(): RangeMapping;
23
30
  }
24
31
  /**
25
32
  * Maps a line range in the original text model to a line range in the modified text model.
@@ -53,6 +60,10 @@ declare class RangeMapping {
53
60
  constructor(originalRange: Range, modifiedRange: Range);
54
61
  toString(): string;
55
62
  flip(): RangeMapping;
63
+ /**
64
+ * Creates a single text edit that describes the change from the original to the modified text.
65
+ */
66
+ toTextEdit(modified: AbstractText): SingleTextEdit;
56
67
  }
57
68
 
58
69
  export { DetailedLineRangeMapping, LineRangeMapping, RangeMapping };
@@ -1,4 +1,7 @@
1
+ import { BugIndicatingError } from '../../../base/common/errors.js';
1
2
  import { LineRange } from '../core/lineRange.js';
3
+ import { Range } from '../core/range.js';
4
+ import { SingleTextEdit } from '../core/textEdit.js';
2
5
  class LineRangeMapping {
3
6
  static inverse(mapping, originalLineCount, modifiedLineCount) {
4
7
  const result = [];
@@ -45,6 +48,32 @@ class LineRangeMapping {
45
48
  get changedLineCount() {
46
49
  return Math.max(this.original.length, this.modified.length);
47
50
  }
51
+ toRangeMapping() {
52
+ const origInclusiveRange = this.original.toInclusiveRange();
53
+ const modInclusiveRange = this.modified.toInclusiveRange();
54
+ if (origInclusiveRange && modInclusiveRange) {
55
+ return ( new RangeMapping(origInclusiveRange, modInclusiveRange));
56
+ }
57
+ else if (this.original.startLineNumber === 1 || this.modified.startLineNumber === 1) {
58
+ if (!(this.modified.startLineNumber === 1 && this.original.startLineNumber === 1)) {
59
+ throw ( new BugIndicatingError('not a valid diff'));
60
+ }
61
+ return ( new RangeMapping(( new Range(this.original.startLineNumber, 1, this.original.endLineNumberExclusive, 1)), ( new Range(this.modified.startLineNumber, 1, this.modified.endLineNumberExclusive, 1))));
62
+ }
63
+ else {
64
+ return ( new RangeMapping(( new Range(
65
+ this.original.startLineNumber - 1,
66
+ Number.MAX_SAFE_INTEGER,
67
+ this.original.endLineNumberExclusive - 1,
68
+ Number.MAX_SAFE_INTEGER
69
+ )), ( new Range(
70
+ this.modified.startLineNumber - 1,
71
+ Number.MAX_SAFE_INTEGER,
72
+ this.modified.endLineNumberExclusive - 1,
73
+ Number.MAX_SAFE_INTEGER
74
+ ))));
75
+ }
76
+ }
48
77
  }
49
78
  class DetailedLineRangeMapping extends LineRangeMapping {
50
79
  static fromRangeMappings(rangeMappings) {
@@ -60,9 +89,7 @@ class DetailedLineRangeMapping extends LineRangeMapping {
60
89
  return ( new DetailedLineRangeMapping(this.modified, this.original, this.innerChanges?.map(c => c.flip())));
61
90
  }
62
91
  withInnerChangesFromLineRanges() {
63
- return ( new DetailedLineRangeMapping(this.original, this.modified, [
64
- ( new RangeMapping(this.original.toExclusiveRange(), this.modified.toExclusiveRange())),
65
- ]));
92
+ return ( new DetailedLineRangeMapping(this.original, this.modified, [this.toRangeMapping()]));
66
93
  }
67
94
  }
68
95
  class RangeMapping {
@@ -76,5 +103,9 @@ class RangeMapping {
76
103
  flip() {
77
104
  return ( new RangeMapping(this.modifiedRange, this.originalRange));
78
105
  }
106
+ toTextEdit(modified) {
107
+ const newText = modified.getValueOfRange(this.modifiedRange);
108
+ return ( new SingleTextEdit(this.originalRange, newText));
109
+ }
79
110
  }
80
111
  export { DetailedLineRangeMapping, LineRangeMapping, RangeMapping };
@@ -2,6 +2,7 @@ import { VSBuffer } from '../../base/common/buffer.js';
2
2
  import { CancellationToken } from '../../base/common/cancellation.js';
3
3
  import { IReadonlyVSDataTransfer } from '../../base/common/dataTransfer.js';
4
4
  import { Event } from '../../base/common/event.js';
5
+ import { HierarchicalKind } from '../../base/common/hierarchicalKind.js';
5
6
  import { IMarkdownString } from '../../base/common/htmlContent.js';
6
7
  import { IDisposable } from '../../base/common/lifecycle.js';
7
8
  import { ThemeIcon } from '../../base/common/themables.js';
@@ -11,11 +12,10 @@ import { Position, IPosition } from './core/position.js';
11
12
  import { Range, IRange } from './core/range.js';
12
13
  import { Selection } from './core/selection.js';
13
14
  import { LanguageId } from './encodedTokenAttributes.js';
15
+ import { LanguageFilter } from './languageSelector.js';
14
16
  import { ITextModel, EndOfLineSequence } from './model.js';
15
17
  import { ExtensionIdentifier } from '../../platform/extensions/common/extensions.js';
16
18
  import { IMarkerData } from '../../platform/markers/common/markers.js';
17
- import { LanguageFilter } from './languageSelector.js';
18
- import { HierarchicalKind } from '../../base/common/hierarchicalKind.js';
19
19
 
20
20
  /**
21
21
  * @internal
@@ -46,18 +46,52 @@ interface Hover {
46
46
  * current position itself.
47
47
  */
48
48
  range?: IRange;
49
+ /**
50
+ * Can increase the verbosity of the hover
51
+ */
52
+ canIncreaseVerbosity?: boolean;
53
+ /**
54
+ * Can decrease the verbosity of the hover
55
+ */
56
+ canDecreaseVerbosity?: boolean;
49
57
  }
50
58
  /**
51
59
  * The hover provider interface defines the contract between extensions and
52
60
  * the [hover](https://code.visualstudio.com/docs/editor/intellisense)-feature.
53
61
  */
54
- interface HoverProvider {
62
+ interface HoverProvider<THover = Hover> {
55
63
  /**
56
- * Provide a hover for the given position and document. Multiple hovers at the same
64
+ * Provide a hover for the given position, context and document. Multiple hovers at the same
57
65
  * position will be merged by the editor. A hover can have a range which defaults
58
66
  * to the word range at the position when omitted.
59
67
  */
60
- provideHover(model: ITextModel, position: Position, token: CancellationToken): ProviderResult<Hover>;
68
+ provideHover(model: ITextModel, position: Position, token: CancellationToken, context?: HoverContext<THover>): ProviderResult<THover>;
69
+ }
70
+ interface HoverContext<THover = Hover> {
71
+ /**
72
+ * Hover verbosity request
73
+ */
74
+ verbosityRequest?: HoverVerbosityRequest<THover>;
75
+ }
76
+ interface HoverVerbosityRequest<THover = Hover> {
77
+ /**
78
+ * Whether to increase or decrease the hover's verbosity
79
+ */
80
+ action: HoverVerbosityAction;
81
+ /**
82
+ * The previous hover for the same position
83
+ */
84
+ previousHover: THover;
85
+ }
86
+ declare enum HoverVerbosityAction {
87
+ /**
88
+ * Increase the verbosity of the hover
89
+ */
90
+ Increase = 0,
91
+ /**
92
+ * Decrease the verbosity of the hover
93
+ */
94
+ Decrease = 1
61
95
  }
62
96
  /**
63
97
  * An evaluatable expression represents additional information for an expression in a document. Evaluatable expressions are
@@ -1205,12 +1239,17 @@ interface RenameProvider {
1205
1239
  declare enum NewSymbolNameTag {
1206
1240
  AIGenerated = 1
1207
1241
  }
1242
+ declare enum NewSymbolNameTriggerKind {
1243
+ Invoke = 0,
1244
+ Automatic = 1
1245
+ }
1208
1246
  interface NewSymbolName {
1209
1247
  readonly newSymbolName: string;
1210
1248
  readonly tags?: readonly NewSymbolNameTag[];
1211
1249
  }
1212
1250
  interface NewSymbolNamesProvider {
1213
- provideNewSymbolNames(model: ITextModel, range: IRange, token: CancellationToken): ProviderResult<NewSymbolName[]>;
1251
+ supportsAutomaticNewSymbolNamesTriggerKind?: Promise<boolean | undefined>;
1252
+ provideNewSymbolNames(model: ITextModel, range: IRange, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): ProviderResult<NewSymbolName[]>;
1214
1253
  }
1215
1254
  interface Command {
1216
1255
  id: string;
@@ -1308,7 +1347,7 @@ type DropYieldTo = {
1308
1347
  /**
1309
1348
  * @internal
1310
1349
  */
1311
- interface DocumentOnDropEdit {
1350
+ interface DocumentDropEdit {
1312
1351
  readonly title: string;
1313
1352
  readonly kind: HierarchicalKind | undefined;
1314
1353
  readonly handledMimeType?: string;
@@ -1321,10 +1360,11 @@ interface DocumentOnDropEdit {
1321
1360
  /**
1322
1361
  * @internal
1323
1362
  */
1324
- interface DocumentOnDropEditProvider {
1363
+ interface DocumentDropEditProvider {
1325
1364
  readonly id?: string;
1326
1365
  readonly dropMimeTypes?: readonly string[];
1327
- provideDocumentOnDropEdits(model: ITextModel, position: IPosition, dataTransfer: IReadonlyVSDataTransfer, token: CancellationToken): ProviderResult<DocumentOnDropEdit[]>;
1366
+ provideDocumentDropEdits(model: ITextModel, position: IPosition, dataTransfer: IReadonlyVSDataTransfer, token: CancellationToken): ProviderResult<DocumentDropEdit[]>;
1367
+ resolveDocumentDropEdit?(edit: DocumentDropEdit, token: CancellationToken): Promise<DocumentDropEdit>;
1328
1368
  }
1329
1369
  interface DocumentContextItem {
1330
1370
  readonly uri: URI;
@@ -1366,4 +1406,4 @@ interface InlineEditProvider<T extends IInlineEdit = IInlineEdit> {
1366
1406
  freeInlineEdit(edit: T): void;
1367
1407
  }
1368
1408
 
1369
- export { type CodeAction, type CodeActionContext, type CodeActionList, type CodeActionProvider, CodeActionTriggerType, type CodeLens, type CodeLensList, type CodeLensProvider, Command, type CompletionContext, type CompletionItem, CompletionItemInsertTextRule, CompletionItemKind, type CompletionItemLabel, type CompletionItemProvider, type CompletionItemRanges, CompletionItemTag, type CompletionList, CompletionTriggerKind, type DeclarationProvider, type Definition, type DefinitionProvider, type DocumentColorProvider, type DocumentContextItem, type DocumentFormattingEditProvider, type DocumentHighlight, DocumentHighlightKind, type DocumentHighlightProvider, type DocumentOnDropEdit, type DocumentOnDropEditProvider, type DocumentPasteContext, type DocumentPasteEdit, type DocumentPasteEditProvider, type DocumentPasteEditsSession, DocumentPasteTriggerKind, type DocumentRangeFormattingEditProvider, type DocumentRangeSemanticTokensProvider, type DocumentSemanticTokensProvider, type DocumentSymbol, type DocumentSymbolProvider, type DropYieldTo, type EvaluatableExpression, type EvaluatableExpressionProvider, type FoldingContext, type FoldingRange, FoldingRangeKind, type FoldingRangeProvider, type FormattingOptions, type Hover, type HoverProvider, type IColor, type IColorInformation, type IColorPresentation, type IInlineEdit, type IInlineEditContext, type IInplaceReplaceSupportResult, type ILanguageIdCodec, type ILink, type ILinksList, type IWorkspaceFileEdit, type IWorkspaceTextEdit, type ImplementationProvider, type InlayHint, InlayHintKind, type InlayHintLabelPart, type InlayHintList, type InlayHintsProvider, type InlineCompletion, type InlineCompletionContext, type InlineCompletionProviderGroupId, InlineCompletionTriggerKind, type InlineCompletions, type InlineCompletionsProvider, type InlineEditProvider, InlineEditTriggerKind, type InlineValue, type InlineValueContext, type InlineValueExpression, type InlineValueText, type InlineValueVariableLookup, type InlineValuesProvider, type LinkProvider, type LinkedEditingRangeProvider, type LinkedEditingRanges, type Location, type LocationLink, type MappedEditsContext, type MappedEditsProvider, type MultiDocumentHighlightProvider, type NewSymbolName, NewSymbolNameTag, type NewSymbolNamesProvider, type OnTypeFormattingEditProvider, type ParameterInformation, type PartialAcceptInfo, PartialAcceptTriggerKind, type ProviderResult, type ReferenceContext, type ReferenceProvider, type Rejection, type RenameLocation, type RenameProvider, SelectedSuggestionInfo, type SelectionRange, type SelectionRangeProvider, type SemanticTokens, type SemanticTokensEdit, type SemanticTokensEdits, type SemanticTokensLegend, type SignatureHelp, type SignatureHelpContext, type SignatureHelpProvider, type SignatureHelpResult, SignatureHelpTriggerKind, type SignatureInformation, SymbolKind, SymbolTag, TextEdit, type TypeDefinitionProvider, type WorkspaceEdit, type WorkspaceEditMetadata, type WorkspaceFileEditOptions };
1409
+ export { type CodeAction, type CodeActionContext, type CodeActionList, type CodeActionProvider, CodeActionTriggerType, type CodeLens, type CodeLensList, type CodeLensProvider, Command, type CompletionContext, type CompletionItem, CompletionItemInsertTextRule, CompletionItemKind, type CompletionItemLabel, type CompletionItemProvider, type CompletionItemRanges, CompletionItemTag, type CompletionList, CompletionTriggerKind, type DeclarationProvider, type Definition, type DefinitionProvider, type DocumentColorProvider, type DocumentContextItem, type DocumentDropEdit, type DocumentDropEditProvider, type DocumentFormattingEditProvider, type DocumentHighlight, DocumentHighlightKind, type DocumentHighlightProvider, type DocumentPasteContext, type DocumentPasteEdit, type DocumentPasteEditProvider, type DocumentPasteEditsSession, DocumentPasteTriggerKind, type DocumentRangeFormattingEditProvider, type DocumentRangeSemanticTokensProvider, type DocumentSemanticTokensProvider, type DocumentSymbol, type DocumentSymbolProvider, type DropYieldTo, type EvaluatableExpression, type EvaluatableExpressionProvider, type FoldingContext, type FoldingRange, FoldingRangeKind, type FoldingRangeProvider, type FormattingOptions, type Hover, type HoverContext, type HoverProvider, HoverVerbosityAction, type HoverVerbosityRequest, type IColor, type IColorInformation, type IColorPresentation, type IInlineEdit, type IInlineEditContext, type IInplaceReplaceSupportResult, type ILanguageIdCodec, type ILink, type ILinksList, type IWorkspaceFileEdit, type IWorkspaceTextEdit, type ImplementationProvider, type InlayHint, InlayHintKind, type InlayHintLabelPart, type InlayHintList, type InlayHintsProvider, type InlineCompletion, type InlineCompletionContext, type InlineCompletionProviderGroupId, InlineCompletionTriggerKind, type InlineCompletions, type InlineCompletionsProvider, type InlineEditProvider, InlineEditTriggerKind, type InlineValue, type InlineValueContext, type InlineValueExpression, type InlineValueText, type InlineValueVariableLookup, type InlineValuesProvider, type LinkProvider, type LinkedEditingRangeProvider, type LinkedEditingRanges, type Location, type LocationLink, type MappedEditsContext, type MappedEditsProvider, type MultiDocumentHighlightProvider, type NewSymbolName, NewSymbolNameTag, NewSymbolNameTriggerKind, type NewSymbolNamesProvider, type OnTypeFormattingEditProvider, type ParameterInformation, type PartialAcceptInfo, PartialAcceptTriggerKind, type ProviderResult, type ReferenceContext, type ReferenceProvider, type Rejection, type RenameLocation, type RenameProvider, SelectedSuggestionInfo, type SelectionRange, type SelectionRangeProvider, type SemanticTokens, type SemanticTokensEdit, type SemanticTokensEdits, type SemanticTokensLegend, type SignatureHelp, type SignatureHelpContext, type SignatureHelpProvider, type SignatureHelpResult, SignatureHelpTriggerKind, type SignatureInformation, SymbolKind, SymbolTag, TextEdit, type TypeDefinitionProvider, type WorkspaceEdit, type WorkspaceEditMetadata, type WorkspaceFileEditOptions };
@@ -31,6 +31,11 @@ class EncodedTokenizationResult {
31
31
  this._encodedTokenizationResultBrand = undefined;
32
32
  }
33
33
  }
34
+ var HoverVerbosityAction;
35
+ ( ((function(HoverVerbosityAction) {
36
+ HoverVerbosityAction[HoverVerbosityAction["Increase"] = 0] = "Increase";
37
+ HoverVerbosityAction[HoverVerbosityAction["Decrease"] = 1] = "Decrease";
38
+ })(HoverVerbosityAction || (HoverVerbosityAction = {}))));
34
39
  var CompletionItemKinds;
35
40
  ( ((function(CompletionItemKinds) {
36
41
  const byKind = ( (new Map()));
@@ -251,6 +256,11 @@ var NewSymbolNameTag;
251
256
  ( ((function(NewSymbolNameTag) {
252
257
  NewSymbolNameTag[NewSymbolNameTag["AIGenerated"] = 1] = "AIGenerated";
253
258
  })(NewSymbolNameTag || (NewSymbolNameTag = {}))));
259
+ var NewSymbolNameTriggerKind;
260
+ ( ((function(NewSymbolNameTriggerKind) {
261
+ NewSymbolNameTriggerKind[NewSymbolNameTriggerKind["Invoke"] = 0] = "Invoke";
262
+ NewSymbolNameTriggerKind[NewSymbolNameTriggerKind["Automatic"] = 1] = "Automatic";
263
+ })(NewSymbolNameTriggerKind || (NewSymbolNameTriggerKind = {}))));
254
264
  var Command;
255
265
  ( ((function(Command) {
256
266
  function is(obj) {
@@ -321,4 +331,4 @@ var InlineEditTriggerKind;
321
331
  InlineEditTriggerKind[InlineEditTriggerKind["Invoke"] = 0] = "Invoke";
322
332
  InlineEditTriggerKind[InlineEditTriggerKind["Automatic"] = 1] = "Automatic";
323
333
  })(InlineEditTriggerKind || (InlineEditTriggerKind = {}))));
324
- export { Command, CommentMode, CommentThreadApplicability, CommentThreadCollapsibleState, CommentThreadState, CompletionItemKinds, DocumentHighlightKind, DocumentPasteTriggerKind, EncodedTokenizationResult, ExternalUriOpenerPriority, FoldingRangeKind, InlayHintKind, InlineCompletionTriggerKind, InlineEditTriggerKind, LazyTokenizationSupport, NewSymbolNameTag, SelectedSuggestionInfo, SignatureHelpTriggerKind, SymbolKinds, TextEdit, Token, TokenizationRegistry, TokenizationResult, getAriaLabelForSymbol, isLocationLink, symbolKindNames };
334
+ export { Command, CommentMode, CommentThreadApplicability, CommentThreadCollapsibleState, CommentThreadState, CompletionItemKinds, DocumentHighlightKind, DocumentPasteTriggerKind, EncodedTokenizationResult, ExternalUriOpenerPriority, FoldingRangeKind, HoverVerbosityAction, InlayHintKind, InlineCompletionTriggerKind, InlineEditTriggerKind, LazyTokenizationSupport, NewSymbolNameTag, NewSymbolNameTriggerKind, SelectedSuggestionInfo, SignatureHelpTriggerKind, SymbolKinds, TextEdit, Token, TokenizationRegistry, TokenizationResult, getAriaLabelForSymbol, isLocationLink, symbolKindNames };
@@ -94,7 +94,7 @@ let LanguageFeatureDebounceService = class LanguageFeatureDebounceService {
94
94
  const key = `${IdentityHash.of(feature)},${min}${extra ? ',' + extra : ''}`;
95
95
  let info = this._data.get(key);
96
96
  if (!info) {
97
- if (!this._isDev) {
97
+ if (this._isDev) {
98
98
  this._logService.debug(`[DEBOUNCE: ${name}] is disabled in developed mode`);
99
99
  info = ( new NullDebounceInformation(min * 1.5));
100
100
  }