@codingame/monaco-vscode-api 1.85.0 → 1.85.2

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 (298) hide show
  1. package/README.md +31 -13
  2. package/contributions.js +1 -0
  3. package/missing-services.js +396 -68
  4. package/monaco-editor-treemending.patch +957 -950
  5. package/package.json +8 -7
  6. package/service-override/tools/editor.js +1 -1
  7. package/services.js +10 -6
  8. package/vscode/src/vs/base/browser/ui/tree/treeDefaults.js +14 -0
  9. package/vscode/src/vs/base/common/jsonFormatter.js +8 -1
  10. package/vscode/src/vs/platform/actions/browser/buttonbar.js +128 -0
  11. package/vscode/src/vs/platform/extensionManagement/common/extensionEnablementService.js +140 -0
  12. package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +2 -1
  13. package/vscode/src/vs/platform/extensions/common/extensions.d.ts +1062 -93
  14. package/vscode/src/vs/platform/files/common/inMemoryFilesystemProvider.js +220 -0
  15. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +58 -0
  16. package/vscode/src/vs/platform/quickinput/browser/quickPickPin.js +102 -0
  17. package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +56 -1
  18. package/vscode/src/vs/platform/userDataSync/common/content.js +9 -0
  19. package/vscode/src/vs/platform/userDataSync/common/settingsMerge.js +514 -0
  20. package/vscode/src/vs/platform/userDataSync/common/userDataSync.js +154 -2
  21. package/vscode/src/vs/platform/userDataSync/common/userDataSyncAccount.js +43 -1
  22. package/vscode/src/vs/platform/userDataSync/common/userDataSyncMachines.js +177 -0
  23. package/vscode/src/vs/workbench/api/common/extHostApiCommands.js +1 -1
  24. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
  25. package/vscode/src/vs/workbench/api/common/extHostWebview.js +2 -2
  26. package/vscode/src/vs/workbench/browser/actions/layoutActions.js +186 -4
  27. package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +105 -0
  28. package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +4 -0
  29. package/vscode/src/vs/workbench/browser/parts/views/treeView.js +1614 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +191 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +238 -2
  32. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +205 -1
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +168 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +35 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +340 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1195 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +115 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +81 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.css.js +4 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +62 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +583 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +4 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +290 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +167 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +4 -0
  47. package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +6 -1
  48. package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +562 -0
  49. package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +31 -1
  50. package/vscode/src/vs/workbench/contrib/chat/common/chatProvider.js +24 -1
  51. package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +193 -0
  52. package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +22 -1
  53. package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +52 -1
  54. package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +258 -0
  55. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +37 -0
  56. package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +25 -0
  57. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +4 -0
  58. package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +388 -0
  59. package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +7 -7
  60. package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +61 -0
  61. package/vscode/src/vs/workbench/contrib/comments/browser/commentFormActions.js +49 -0
  62. package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +647 -0
  63. package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +300 -0
  64. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadAdditionalActions.js +60 -0
  65. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +249 -0
  66. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +107 -0
  67. package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +333 -0
  68. package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +4 -0
  69. package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +99 -0
  70. package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +55 -0
  71. package/vscode/src/vs/workbench/contrib/comments/common/commentsConfiguration.js +2 -0
  72. package/vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js +20 -0
  73. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +855 -0
  74. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +410 -0
  75. package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1591 -0
  76. package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
  77. package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +4 -0
  78. package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +4 -0
  79. package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1485 -0
  80. package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +125 -0
  81. package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +29 -0
  82. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +41 -0
  83. package/vscode/src/vs/workbench/contrib/extensions/common/extensionsUtils.js +102 -0
  84. package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +73 -2
  85. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +4 -0
  86. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +988 -0
  87. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +431 -0
  88. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +417 -0
  89. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +806 -0
  90. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +915 -0
  91. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +19 -0
  92. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +129 -10
  93. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +205 -0
  94. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +150 -0
  95. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +480 -0
  96. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +5 -0
  97. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +90 -0
  98. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/editing.js +54 -0
  99. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/lineRange.js +108 -0
  100. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mapping.js +258 -0
  101. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +614 -0
  102. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange.js +307 -0
  103. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.js +44 -0
  104. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +165 -0
  105. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/telemetry.js +78 -0
  106. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +169 -0
  107. package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +64 -0
  108. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/cellOutputClipboard.js +49 -0
  109. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findFilters.js +70 -0
  110. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +120 -0
  111. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +416 -0
  112. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.css.js +4 -0
  113. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +663 -0
  114. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +593 -0
  115. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +72 -0
  116. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +326 -0
  117. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +539 -0
  118. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +265 -0
  119. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +348 -0
  120. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css.js +4 -0
  121. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +4 -0
  122. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css.js +4 -0
  123. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css.js +4 -0
  124. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css.js +4 -0
  125. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css.js +4 -0
  126. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css.js +4 -0
  127. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css.js +4 -0
  128. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +4 -0
  129. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css.js +4 -0
  130. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css.js +4 -0
  131. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css.js +4 -0
  132. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css.js +4 -0
  133. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css.js +4 -0
  134. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.js +95 -3
  135. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +437 -0
  136. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +29 -0
  137. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +2730 -0
  138. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +139 -0
  139. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +17 -0
  140. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +564 -0
  141. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +27 -0
  142. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +119 -0
  143. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +27 -0
  144. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +135 -0
  145. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +178 -0
  146. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +35 -0
  147. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +377 -0
  148. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +97 -0
  149. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +194 -0
  150. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +71 -0
  151. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +20 -0
  152. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +85 -0
  153. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +652 -0
  154. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +59 -0
  155. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +303 -0
  156. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +24 -0
  157. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +228 -0
  158. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +302 -0
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +438 -0
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +45 -0
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +435 -0
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +95 -0
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +107 -0
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +29 -0
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +59 -0
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +67 -0
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +430 -0
  168. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +54 -0
  169. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +1131 -0
  170. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +21 -0
  171. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +1591 -0
  172. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +341 -0
  173. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +2155 -0
  174. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +65 -0
  175. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +95 -0
  176. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +507 -0
  177. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +85 -0
  178. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +47 -0
  179. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +40 -0
  180. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +435 -0
  181. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +31 -0
  182. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +257 -0
  183. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +239 -0
  184. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +103 -0
  185. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +211 -0
  186. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +808 -0
  187. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +8 -0
  188. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +381 -0
  189. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +527 -0
  190. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +163 -0
  191. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +651 -0
  192. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +173 -0
  193. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +98 -0
  194. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +62 -0
  195. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +101 -0
  196. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +346 -0
  197. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +152 -1
  198. package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +39 -0
  199. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +296 -0
  200. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +261 -0
  201. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.js +3 -1
  202. package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
  203. package/vscode/src/vs/workbench/contrib/notebook/common/notebookKeymapService.js +3 -0
  204. package/vscode/src/vs/workbench/contrib/notebook/common/notebookLoggingService.js +3 -0
  205. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +16 -0
  206. package/vscode/src/vs/workbench/contrib/notebook/common/notebookRange.js +66 -0
  207. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWorkerService.js +4 -0
  208. package/vscode/src/vs/workbench/contrib/preferences/common/settingsEditorColorRegistry.js +130 -0
  209. package/vscode/src/vs/workbench/contrib/remote/browser/media/tunnelView.css.js +4 -0
  210. package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +847 -0
  211. package/vscode/src/vs/workbench/contrib/remote/browser/remoteIcons.js +89 -0
  212. package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +1942 -0
  213. package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +107 -0
  214. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsBase.js +49 -0
  215. package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +387 -0
  216. package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +2 -2
  217. package/vscode/src/vs/workbench/contrib/search/common/constants.js +66 -0
  218. package/vscode/src/vs/workbench/contrib/searchEditor/browser/constants.js +11 -0
  219. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions.js +24 -0
  220. package/vscode/src/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets.js +95 -0
  221. package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +6 -6
  222. package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +12 -2
  223. package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +712 -0
  224. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.js +4 -1
  225. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +130 -0
  226. package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +2 -1
  227. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/featuredExtensionService.js +159 -0
  228. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint.js +375 -0
  229. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +563 -0
  230. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent.js +932 -0
  231. package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +20 -1
  232. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +205 -0
  233. package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +11 -0
  234. package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +9 -9
  235. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +1 -1
  236. package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +2 -2
  237. package/vscode/src/vs/workbench/services/languageStatus/common/languageStatusService.js +24 -1
  238. package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +15 -1
  239. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +41 -0
  240. package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +588 -0
  241. package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +43 -0
  242. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.d.ts +2 -2
  243. package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +190 -2
  244. package/vscode/src/vs/workbench/services/search/common/search.js +3 -3
  245. package/vscode/src/vs/workbench/services/terminal/common/embedderTerminalService.js +75 -1
  246. package/vscode/src/vs/workbench/services/timer/browser/timerService.js +240 -1
  247. package/vscode/src/vs/workbench/services/userData/browser/userDataInit.js +31 -1
  248. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +25 -1
  249. package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfileIcons.js +75 -1
  250. package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +74 -4
  251. package/vscode/src/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +77 -0
  252. package/assets/break.mp3 +0 -0
  253. package/assets/chatRequestSent.mp3 +0 -0
  254. package/assets/chatResponsePending.mp3 +0 -0
  255. package/assets/chatResponseReceived1.mp3 +0 -0
  256. package/assets/chatResponseReceived2.mp3 +0 -0
  257. package/assets/chatResponseReceived3.mp3 +0 -0
  258. package/assets/chatResponseReceived4.mp3 +0 -0
  259. package/assets/clear.mp3 +0 -0
  260. package/assets/defaultIcon.png +0 -0
  261. package/assets/diffLineDeleted.mp3 +0 -0
  262. package/assets/diffLineInserted.mp3 +0 -0
  263. package/assets/diffLineModified.mp3 +0 -0
  264. package/assets/error.mp3 +0 -0
  265. package/assets/fake.html +0 -10
  266. package/assets/foldedAreas.mp3 +0 -0
  267. package/assets/format.mp3 +0 -0
  268. package/assets/index-no-csp.html +0 -1226
  269. package/assets/index.html +0 -1227
  270. package/assets/quickFixes.mp3 +0 -0
  271. package/assets/save.mp3 +0 -0
  272. package/assets/service-worker.js +0 -457
  273. package/assets/taskCompleted.mp3 +0 -0
  274. package/assets/taskFailed.mp3 +0 -0
  275. package/assets/terminalBell.mp3 +0 -0
  276. package/assets/warning.mp3 +0 -0
  277. package/assets/webWorkerExtensionHostIframe.html +0 -123
  278. package/override/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel.js +0 -2
  279. package/override/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2
  280. package/override/vs/workbench/contrib/notebook/common/notebookEditorInput.js +0 -5
  281. package/vscode/src/vs/base/parts/request/browser/request.js +0 -60
  282. package/vscode/src/vs/platform/request/browser/requestService.js +0 -28
  283. package/vscode/src/vs/platform/request/common/requestIpc.js +0 -17
  284. package/vscode/src/vs/platform/url/common/urlService.js +0 -17
  285. package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +0 -120
  286. package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +0 -319
  287. package/vscode/src/vs/workbench/services/files/browser/elevatedFileService.js +0 -9
  288. package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +0 -408
  289. package/vscode/src/vs/workbench/services/request/browser/requestService.js +0 -48
  290. package/vscode/src/vs/workbench/services/textfile/browser/browserTextFileService.js +0 -56
  291. package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +0 -639
  292. package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +0 -402
  293. package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +0 -62
  294. package/vscode/src/vs/workbench/services/themes/browser/browserHostColorSchemeService.js +0 -38
  295. package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +0 -295
  296. package/vscode/src/vs/workbench/services/url/browser/urlService.js +0 -47
  297. package/vscode/src/vs/workbench/services/views/common/treeViewsService.js +0 -20
  298. package/vscode/src/vs/workbench/services/workspaces/common/canonicalUriService.js +0 -19
@@ -0,0 +1,300 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from 'monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js';
4
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
+ import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
6
+ import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
7
+ import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
8
+ import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
9
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
10
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
11
+ import { resolveColorValue, editorForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
12
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
13
+ import { CommentFormActions } from './commentFormActions.js';
14
+ import { ICommentService } from './commentService.js';
15
+ import { CommentContextKeys } from '../common/commentContextKeys.js';
16
+ import { MIN_EDITOR_HEIGHT, SimpleCommentEditor, calculateEditorHeight } from './simpleCommentEditor.js';
17
+ const COMMENT_SCHEME = 'comment';
18
+ let INMEM_MODEL_ID = 0;
19
+ const COMMENTEDITOR_DECORATION_KEY = 'commenteditordecoration';
20
+ let CommentReply = class CommentReply extends Disposable {
21
+ constructor(owner, container, _parentEditor, _commentThread, _scopedInstatiationService, _contextKeyService, _commentMenus, _commentOptions, _pendingComment, _parentThread, _actionRunDelegate, commentService, languageService, modelService, themeService, configurationService) {
22
+ super();
23
+ this.owner = owner;
24
+ this._parentEditor = _parentEditor;
25
+ this._commentThread = _commentThread;
26
+ this._scopedInstatiationService = _scopedInstatiationService;
27
+ this._contextKeyService = _contextKeyService;
28
+ this._commentMenus = _commentMenus;
29
+ this._commentOptions = _commentOptions;
30
+ this._pendingComment = _pendingComment;
31
+ this._parentThread = _parentThread;
32
+ this._actionRunDelegate = _actionRunDelegate;
33
+ this.commentService = commentService;
34
+ this.languageService = languageService;
35
+ this.modelService = modelService;
36
+ this.themeService = themeService;
37
+ this._commentThreadDisposables = [];
38
+ this._editorHeight = MIN_EDITOR_HEIGHT;
39
+ this.form = dom.append(container, dom.$('.comment-form'));
40
+ this.commentEditor = this._register(this._scopedInstatiationService.createInstance(SimpleCommentEditor, this.form, SimpleCommentEditor.getEditorOptions(configurationService), _contextKeyService, this._parentThread));
41
+ this.commentEditorIsEmpty = CommentContextKeys.commentIsEmpty.bindTo(this._contextKeyService);
42
+ this.commentEditorIsEmpty.set(!this._pendingComment);
43
+ const hasExistingComments = this._commentThread.comments && this._commentThread.comments.length > 0;
44
+ const modeId = generateUuid() + '-' + (hasExistingComments ? this._commentThread.threadId : ++INMEM_MODEL_ID);
45
+ const params = JSON.stringify({
46
+ extensionId: this._commentThread.extensionId,
47
+ commentThreadId: this._commentThread.threadId
48
+ });
49
+ let resource = ( URI.parse(
50
+ `${COMMENT_SCHEME}://${this._commentThread.extensionId}/commentinput-${modeId}.md?${params}`
51
+ ));
52
+ const commentController = this.commentService.getCommentController(owner);
53
+ if (commentController) {
54
+ resource = resource.with({ authority: commentController.id });
55
+ }
56
+ const model = this.modelService.createModel(this._pendingComment || '', this.languageService.createByFilepathOrFirstLine(resource), resource, false);
57
+ this._register(model);
58
+ this.commentEditor.setModel(model);
59
+ this.calculateEditorHeight();
60
+ this._register((model.onDidChangeContent(() => {
61
+ this.setCommentEditorDecorations();
62
+ this.commentEditorIsEmpty?.set(!this.commentEditor.getValue());
63
+ if (this.calculateEditorHeight()) {
64
+ this.commentEditor.layout({ height: this._editorHeight, width: this.commentEditor.getLayoutInfo().width });
65
+ this.commentEditor.render(true);
66
+ }
67
+ })));
68
+ this.createTextModelListener(this.commentEditor, this.form);
69
+ this.setCommentEditorDecorations();
70
+ if (hasExistingComments) {
71
+ this.createReplyButton(this.commentEditor, this.form);
72
+ }
73
+ else if ((this._commentThread.comments && this._commentThread.comments.length === 0) || this._pendingComment) {
74
+ this.expandReplyArea();
75
+ }
76
+ this._error = dom.append(this.form, dom.$('.validation-error.hidden'));
77
+ const formActions = dom.append(this.form, dom.$('.form-actions'));
78
+ this._formActions = dom.append(formActions, dom.$('.other-actions'));
79
+ this.createCommentWidgetFormActions(this._formActions, model);
80
+ this._editorActions = dom.append(formActions, dom.$('.editor-actions'));
81
+ this.createCommentWidgetEditorActions(this._editorActions, model);
82
+ }
83
+ calculateEditorHeight() {
84
+ const newEditorHeight = calculateEditorHeight(this._parentEditor, this.commentEditor, this._editorHeight);
85
+ if (newEditorHeight !== this._editorHeight) {
86
+ this._editorHeight = newEditorHeight;
87
+ return true;
88
+ }
89
+ return false;
90
+ }
91
+ updateCommentThread(commentThread) {
92
+ const isReplying = this.commentEditor.hasTextFocus();
93
+ if (!this._reviewThreadReplyButton) {
94
+ this.createReplyButton(this.commentEditor, this.form);
95
+ }
96
+ if (this._commentThread.comments && this._commentThread.comments.length === 0) {
97
+ this.expandReplyArea();
98
+ }
99
+ if (isReplying) {
100
+ this.commentEditor.focus();
101
+ }
102
+ }
103
+ getPendingComment() {
104
+ const model = this.commentEditor.getModel();
105
+ if (model && model.getValueLength() > 0) {
106
+ return model.getValue();
107
+ }
108
+ return undefined;
109
+ }
110
+ setPendingComment(comment) {
111
+ this._pendingComment = comment;
112
+ this.expandReplyArea();
113
+ this.commentEditor.setValue(comment);
114
+ }
115
+ layout(widthInPixel) {
116
+ this.commentEditor.layout({ height: this._editorHeight, width: widthInPixel - 54 });
117
+ }
118
+ focusIfNeeded() {
119
+ if (!this._commentThread.comments || !this._commentThread.comments.length) {
120
+ this.commentEditor.focus();
121
+ }
122
+ else if (this.commentEditor.getModel().getValueLength() > 0) {
123
+ this.expandReplyArea();
124
+ }
125
+ }
126
+ focusCommentEditor() {
127
+ this.commentEditor.focus();
128
+ }
129
+ expandReplyAreaAndFocusCommentEditor() {
130
+ this.expandReplyArea();
131
+ this.commentEditor.focus();
132
+ }
133
+ isCommentEditorFocused() {
134
+ return this.commentEditor.hasWidgetFocus();
135
+ }
136
+ getCommentModel() {
137
+ return this.commentEditor.getModel();
138
+ }
139
+ updateCanReply() {
140
+ if (!this._commentThread.canReply) {
141
+ this.form.style.display = 'none';
142
+ }
143
+ else {
144
+ this.form.style.display = 'block';
145
+ }
146
+ }
147
+ async submitComment() {
148
+ await this._commentFormActions?.triggerDefaultAction();
149
+ this._pendingComment = undefined;
150
+ }
151
+ setCommentEditorDecorations() {
152
+ const model = this.commentEditor.getModel();
153
+ if (model) {
154
+ const valueLength = model.getValueLength();
155
+ const hasExistingComments = this._commentThread.comments && this._commentThread.comments.length > 0;
156
+ const placeholder = valueLength > 0
157
+ ? ''
158
+ : hasExistingComments
159
+ ? (this._commentOptions?.placeHolder || ( nls.localizeWithPath('vs/workbench/contrib/comments/browser/commentReply', 'reply', "Reply...")))
160
+ : (this._commentOptions?.placeHolder || ( nls.localizeWithPath(
161
+ 'vs/workbench/contrib/comments/browser/commentReply',
162
+ 'newComment',
163
+ "Type a new comment"
164
+ )));
165
+ const decorations = [{
166
+ range: {
167
+ startLineNumber: 0,
168
+ endLineNumber: 0,
169
+ startColumn: 0,
170
+ endColumn: 1
171
+ },
172
+ renderOptions: {
173
+ after: {
174
+ contentText: placeholder,
175
+ color: `${resolveColorValue(editorForeground, this.themeService.getColorTheme())?.transparent(0.4)}`
176
+ }
177
+ }
178
+ }];
179
+ this.commentEditor.setDecorationsByType('review-zone-widget', COMMENTEDITOR_DECORATION_KEY, decorations);
180
+ }
181
+ }
182
+ createTextModelListener(commentEditor, commentForm) {
183
+ this._commentThreadDisposables.push(commentEditor.onDidFocusEditorWidget(() => {
184
+ this._commentThread.input = {
185
+ uri: commentEditor.getModel().uri,
186
+ value: commentEditor.getValue()
187
+ };
188
+ this.commentService.setActiveCommentThread(this._commentThread);
189
+ }));
190
+ this._commentThreadDisposables.push(commentEditor.getModel().onDidChangeContent(() => {
191
+ const modelContent = commentEditor.getValue();
192
+ if (this._commentThread.input && this._commentThread.input.uri === commentEditor.getModel().uri && this._commentThread.input.value !== modelContent) {
193
+ const newInput = this._commentThread.input;
194
+ newInput.value = modelContent;
195
+ this._commentThread.input = newInput;
196
+ }
197
+ this.commentService.setActiveCommentThread(this._commentThread);
198
+ }));
199
+ this._commentThreadDisposables.push(this._commentThread.onDidChangeInput(input => {
200
+ const thread = this._commentThread;
201
+ const model = commentEditor.getModel();
202
+ if (thread.input && model && (thread.input.uri !== model.uri)) {
203
+ return;
204
+ }
205
+ if (!input) {
206
+ return;
207
+ }
208
+ if (commentEditor.getValue() !== input.value) {
209
+ commentEditor.setValue(input.value);
210
+ if (input.value === '') {
211
+ this._pendingComment = '';
212
+ commentForm.classList.remove('expand');
213
+ commentEditor.getDomNode().style.outline = '';
214
+ this._error.textContent = '';
215
+ this._error.classList.add('hidden');
216
+ }
217
+ }
218
+ }));
219
+ }
220
+ createCommentWidgetFormActions(container, model) {
221
+ const menu = this._commentMenus.getCommentThreadActions(this._contextKeyService);
222
+ this._register(menu);
223
+ this._register(menu.onDidChange(() => {
224
+ this._commentFormActions.setActions(menu);
225
+ }));
226
+ this._commentFormActions = ( new CommentFormActions(container, async (action) => {
227
+ await this._actionRunDelegate?.();
228
+ await action.run({
229
+ thread: this._commentThread,
230
+ text: this.commentEditor.getValue(),
231
+ $mid: 9
232
+ });
233
+ this.hideReplyArea();
234
+ }));
235
+ this._register(this._commentFormActions);
236
+ this._commentFormActions.setActions(menu);
237
+ }
238
+ createCommentWidgetEditorActions(container, model) {
239
+ const editorMenu = this._commentMenus.getCommentEditorActions(this._contextKeyService);
240
+ this._register(editorMenu);
241
+ this._register(editorMenu.onDidChange(() => {
242
+ this._commentEditorActions.setActions(editorMenu);
243
+ }));
244
+ this._commentEditorActions = ( new CommentFormActions(container, async (action) => {
245
+ this._actionRunDelegate?.();
246
+ action.run({
247
+ thread: this._commentThread,
248
+ text: this.commentEditor.getValue(),
249
+ $mid: 9
250
+ });
251
+ this.focusCommentEditor();
252
+ }));
253
+ this._register(this._commentEditorActions);
254
+ this._commentEditorActions.setActions(editorMenu, true);
255
+ }
256
+ get isReplyExpanded() {
257
+ return this.form.classList.contains('expand');
258
+ }
259
+ expandReplyArea() {
260
+ if (!this.isReplyExpanded) {
261
+ this.form.classList.add('expand');
262
+ this.commentEditor.focus();
263
+ this.commentEditor.layout();
264
+ }
265
+ }
266
+ clearAndExpandReplyArea() {
267
+ if (!this.isReplyExpanded) {
268
+ this.commentEditor.setValue('');
269
+ this.expandReplyArea();
270
+ }
271
+ }
272
+ hideReplyArea() {
273
+ this.commentEditor.getDomNode().style.outline = '';
274
+ this.commentEditor.setValue('');
275
+ this._pendingComment = '';
276
+ this.form.classList.remove('expand');
277
+ this._error.textContent = '';
278
+ this._error.classList.add('hidden');
279
+ }
280
+ createReplyButton(commentEditor, commentForm) {
281
+ this._reviewThreadReplyButton = dom.append(commentForm, dom.$(`button.review-thread-reply-button.${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`));
282
+ this._reviewThreadReplyButton.title = this._commentOptions?.prompt || ( nls.localizeWithPath('vs/workbench/contrib/comments/browser/commentReply', 'reply', "Reply..."));
283
+ this._reviewThreadReplyButton.textContent = this._commentOptions?.prompt || ( nls.localizeWithPath('vs/workbench/contrib/comments/browser/commentReply', 'reply', "Reply..."));
284
+ this._register(dom.addDisposableListener(this._reviewThreadReplyButton, 'click', _ => this.clearAndExpandReplyArea()));
285
+ this._register(dom.addDisposableListener(this._reviewThreadReplyButton, 'focus', _ => this.clearAndExpandReplyArea()));
286
+ commentEditor.onDidBlurEditorWidget(() => {
287
+ if (commentEditor.getModel().getValueLength() === 0 && commentForm.classList.contains('expand')) {
288
+ commentForm.classList.remove('expand');
289
+ }
290
+ });
291
+ }
292
+ };
293
+ CommentReply = ( __decorate([
294
+ ( __param(11, ICommentService)),
295
+ ( __param(12, ILanguageService)),
296
+ ( __param(13, IModelService)),
297
+ ( __param(14, IThemeService)),
298
+ ( __param(15, IConfigurationService))
299
+ ], CommentReply));
300
+ export { COMMENTEDITOR_DECORATION_KEY, CommentReply };
@@ -0,0 +1,60 @@
1
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
2
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+ import { CommentFormActions } from './commentFormActions.js';
4
+ class CommentThreadAdditionalActions extends Disposable {
5
+ constructor(container, _commentThread, _contextKeyService, _commentMenus, _actionRunDelegate) {
6
+ super();
7
+ this._commentThread = _commentThread;
8
+ this._contextKeyService = _contextKeyService;
9
+ this._commentMenus = _commentMenus;
10
+ this._actionRunDelegate = _actionRunDelegate;
11
+ this._container = dom.append(container, dom.$('.comment-additional-actions'));
12
+ dom.append(this._container, dom.$('.section-separator'));
13
+ this._buttonBar = dom.append(this._container, dom.$('.button-bar'));
14
+ this._createAdditionalActions(this._buttonBar);
15
+ }
16
+ _showMenu() {
17
+ this._container?.classList.remove('hidden');
18
+ }
19
+ _hideMenu() {
20
+ this._container?.classList.add('hidden');
21
+ }
22
+ _enableDisableMenu(menu) {
23
+ const groups = menu.getActions({ shouldForwardArgs: true });
24
+ for (const group of groups) {
25
+ const [, actions] = group;
26
+ for (const action of actions) {
27
+ if (action.enabled) {
28
+ this._showMenu();
29
+ return;
30
+ }
31
+ for (const subAction of action.actions ?? []) {
32
+ if (subAction.enabled) {
33
+ this._showMenu();
34
+ return;
35
+ }
36
+ }
37
+ }
38
+ }
39
+ this._hideMenu();
40
+ }
41
+ _createAdditionalActions(container) {
42
+ const menu = this._commentMenus.getCommentThreadAdditionalActions(this._contextKeyService);
43
+ this._register(menu);
44
+ this._register(menu.onDidChange(() => {
45
+ this._commentFormActions.setActions(menu, true);
46
+ this._enableDisableMenu(menu);
47
+ }));
48
+ this._commentFormActions = ( new CommentFormActions(container, async (action) => {
49
+ this._actionRunDelegate?.();
50
+ action.run({
51
+ thread: this._commentThread,
52
+ $mid: 8
53
+ });
54
+ }, 4));
55
+ this._register(this._commentFormActions);
56
+ this._commentFormActions.setActions(menu, true);
57
+ this._enableDisableMenu(menu);
58
+ }
59
+ }
60
+ export { CommentThreadAdditionalActions };
@@ -0,0 +1,249 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import * as nls from 'monaco-editor/esm/vs/nls.js';
4
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
+ import * as languages from 'monaco-editor/esm/vs/editor/common/languages.js';
6
+ import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
7
+ import { ICommentService } from './commentService.js';
8
+ import { StandardKeyboardEvent } from 'monaco-editor/esm/vs/base/browser/keyboardEvent.js';
9
+ import { CommentNode } from './commentNode.js';
10
+ import { MarkdownRenderer } from 'monaco-editor/esm/vs/editor/contrib/markdownRenderer/browser/markdownRenderer.js';
11
+ import { IOpenerService } from 'monaco-editor/esm/vs/platform/opener/common/opener.js';
12
+ import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
13
+ let CommentThreadBody = class CommentThreadBody extends Disposable {
14
+ get length() {
15
+ return this._commentThread.comments ? this._commentThread.comments.length : 0;
16
+ }
17
+ get activeComment() {
18
+ return this._commentElements.filter(node => node.isEditing)[0];
19
+ }
20
+ constructor(_parentEditor, owner, parentResourceUri, container, _options, _commentThread, _pendingEdits, _scopedInstatiationService, _parentCommentThreadWidget, commentService, openerService, languageService) {
21
+ super();
22
+ this._parentEditor = _parentEditor;
23
+ this.owner = owner;
24
+ this.parentResourceUri = parentResourceUri;
25
+ this.container = container;
26
+ this._options = _options;
27
+ this._commentThread = _commentThread;
28
+ this._pendingEdits = _pendingEdits;
29
+ this._scopedInstatiationService = _scopedInstatiationService;
30
+ this._parentCommentThreadWidget = _parentCommentThreadWidget;
31
+ this.commentService = commentService;
32
+ this.openerService = openerService;
33
+ this.languageService = languageService;
34
+ this._commentElements = [];
35
+ this._focusedComment = undefined;
36
+ this._onDidResize = ( new Emitter());
37
+ this.onDidResize = this._onDidResize.event;
38
+ this._commentDisposable = ( new Map());
39
+ this._register(dom.addDisposableListener(container, dom.EventType.FOCUS_IN, e => {
40
+ this.commentService.setActiveCommentThread(this._commentThread);
41
+ }));
42
+ this._markdownRenderer = this._register(( new MarkdownRenderer(this._options, this.languageService, this.openerService)));
43
+ }
44
+ focus() {
45
+ this._commentsElement.focus();
46
+ }
47
+ display() {
48
+ this._commentsElement = dom.append(this.container, dom.$('div.comments-container'));
49
+ this._commentsElement.setAttribute('role', 'presentation');
50
+ this._commentsElement.tabIndex = 0;
51
+ this._updateAriaLabel();
52
+ this._register(dom.addDisposableListener(this._commentsElement, dom.EventType.KEY_DOWN, (e) => {
53
+ const event = ( new StandardKeyboardEvent(e));
54
+ if ((event.equals(16 ) || event.equals(18 )) && (!this._focusedComment || !this._commentElements[this._focusedComment].isEditing)) {
55
+ const moveFocusWithinBounds = (change) => {
56
+ if (this._focusedComment === undefined && change >= 0) {
57
+ return 0;
58
+ }
59
+ if (this._focusedComment === undefined && change < 0) {
60
+ return this._commentElements.length - 1;
61
+ }
62
+ const newIndex = this._focusedComment + change;
63
+ return Math.min(Math.max(0, newIndex), this._commentElements.length - 1);
64
+ };
65
+ this._setFocusedComment(event.equals(16 ) ? moveFocusWithinBounds(-1) : moveFocusWithinBounds(1));
66
+ }
67
+ }));
68
+ this._commentElements = [];
69
+ if (this._commentThread.comments) {
70
+ for (const comment of this._commentThread.comments) {
71
+ const newCommentNode = this.createNewCommentNode(comment);
72
+ this._commentElements.push(newCommentNode);
73
+ this._commentsElement.appendChild(newCommentNode.domNode);
74
+ if (comment.mode === languages.CommentMode.Editing) {
75
+ newCommentNode.switchToEditMode();
76
+ }
77
+ }
78
+ }
79
+ this._resizeObserver = ( new MutationObserver(this._refresh.bind(this)));
80
+ this._resizeObserver.observe(this.container, {
81
+ attributes: true,
82
+ childList: true,
83
+ characterData: true,
84
+ subtree: true
85
+ });
86
+ }
87
+ _refresh() {
88
+ const dimensions = dom.getClientArea(this.container);
89
+ this._onDidResize.fire(dimensions);
90
+ }
91
+ getDimensions() {
92
+ return dom.getClientArea(this.container);
93
+ }
94
+ layout(widthInPixel) {
95
+ this._commentElements.forEach(element => {
96
+ element.layout(widthInPixel);
97
+ });
98
+ }
99
+ getPendingEdits() {
100
+ const pendingEdits = {};
101
+ this._commentElements.forEach(element => {
102
+ if (element.isEditing) {
103
+ const pendingEdit = element.getPendingEdit();
104
+ if (pendingEdit) {
105
+ pendingEdits[element.comment.uniqueIdInThread] = pendingEdit;
106
+ }
107
+ }
108
+ });
109
+ return pendingEdits;
110
+ }
111
+ getCommentCoords(commentUniqueId) {
112
+ const matchedNode = this._commentElements.filter(commentNode => commentNode.comment.uniqueIdInThread === commentUniqueId);
113
+ if (matchedNode && matchedNode.length) {
114
+ const commentThreadCoords = dom.getDomNodePagePosition(this._commentElements[0].domNode);
115
+ const commentCoords = dom.getDomNodePagePosition(matchedNode[0].domNode);
116
+ return {
117
+ thread: commentThreadCoords,
118
+ comment: commentCoords
119
+ };
120
+ }
121
+ return;
122
+ }
123
+ updateCommentThread(commentThread, preserveFocus) {
124
+ const oldCommentsLen = this._commentElements.length;
125
+ const newCommentsLen = commentThread.comments ? commentThread.comments.length : 0;
126
+ const commentElementsToDel = [];
127
+ const commentElementsToDelIndex = [];
128
+ for (let i = 0; i < oldCommentsLen; i++) {
129
+ const comment = this._commentElements[i].comment;
130
+ const newComment = commentThread.comments ? commentThread.comments.filter(c => c.uniqueIdInThread === comment.uniqueIdInThread) : [];
131
+ if (newComment.length) {
132
+ this._commentElements[i].update(newComment[0]);
133
+ }
134
+ else {
135
+ commentElementsToDelIndex.push(i);
136
+ commentElementsToDel.push(this._commentElements[i]);
137
+ }
138
+ }
139
+ for (let i = commentElementsToDel.length - 1; i >= 0; i--) {
140
+ const commentToDelete = commentElementsToDel[i];
141
+ this._commentDisposable.get(commentToDelete)?.dispose();
142
+ this._commentDisposable.delete(commentToDelete);
143
+ this._commentElements.splice(commentElementsToDelIndex[i], 1);
144
+ this._commentsElement.removeChild(commentToDelete.domNode);
145
+ }
146
+ let lastCommentElement = null;
147
+ const newCommentNodeList = [];
148
+ const newCommentsInEditMode = [];
149
+ for (let i = newCommentsLen - 1; i >= 0; i--) {
150
+ const currentComment = commentThread.comments[i];
151
+ const oldCommentNode = this._commentElements.filter(commentNode => commentNode.comment.uniqueIdInThread === currentComment.uniqueIdInThread);
152
+ if (oldCommentNode.length) {
153
+ lastCommentElement = oldCommentNode[0].domNode;
154
+ newCommentNodeList.unshift(oldCommentNode[0]);
155
+ }
156
+ else {
157
+ const newElement = this.createNewCommentNode(currentComment);
158
+ newCommentNodeList.unshift(newElement);
159
+ if (lastCommentElement) {
160
+ this._commentsElement.insertBefore(newElement.domNode, lastCommentElement);
161
+ lastCommentElement = newElement.domNode;
162
+ }
163
+ else {
164
+ this._commentsElement.appendChild(newElement.domNode);
165
+ lastCommentElement = newElement.domNode;
166
+ }
167
+ if (currentComment.mode === languages.CommentMode.Editing) {
168
+ newElement.switchToEditMode();
169
+ newCommentsInEditMode.push(newElement);
170
+ }
171
+ }
172
+ }
173
+ this._commentThread = commentThread;
174
+ this._commentElements = newCommentNodeList;
175
+ if (newCommentsInEditMode.length) {
176
+ const lastIndex = this._commentElements.indexOf(newCommentsInEditMode[newCommentsInEditMode.length - 1]);
177
+ this._focusedComment = lastIndex;
178
+ }
179
+ this._updateAriaLabel();
180
+ if (!preserveFocus) {
181
+ this._setFocusedComment(this._focusedComment);
182
+ }
183
+ }
184
+ _updateAriaLabel() {
185
+ if (this._commentThread.isDocumentCommentThread()) {
186
+ if (this._commentThread.range) {
187
+ this._commentsElement.ariaLabel = ( nls.localizeWithPath(
188
+ 'vs/workbench/contrib/comments/browser/commentThreadBody',
189
+ 'commentThreadAria.withRange',
190
+ "Comment thread with {0} comments on lines {1} through {2}. {3}.",
191
+ this._commentThread.comments?.length,
192
+ this._commentThread.range.startLineNumber,
193
+ this._commentThread.range.endLineNumber,
194
+ this._commentThread.label
195
+ ));
196
+ }
197
+ else {
198
+ this._commentsElement.ariaLabel = ( nls.localizeWithPath(
199
+ 'vs/workbench/contrib/comments/browser/commentThreadBody',
200
+ 'commentThreadAria.document',
201
+ "Comment thread with {0} comments on the entire document. {1}.",
202
+ this._commentThread.comments?.length,
203
+ this._commentThread.label
204
+ ));
205
+ }
206
+ }
207
+ else {
208
+ this._commentsElement.ariaLabel = ( nls.localizeWithPath(
209
+ 'vs/workbench/contrib/comments/browser/commentThreadBody',
210
+ 'commentThreadAria',
211
+ "Comment thread with {0} comments. {1}.",
212
+ this._commentThread.comments?.length,
213
+ this._commentThread.label
214
+ ));
215
+ }
216
+ }
217
+ _setFocusedComment(value) {
218
+ if (this._focusedComment !== undefined) {
219
+ this._commentElements[this._focusedComment]?.setFocus(false);
220
+ }
221
+ if (this._commentElements.length === 0 || value === undefined) {
222
+ this._focusedComment = undefined;
223
+ }
224
+ else {
225
+ this._focusedComment = Math.min(value, this._commentElements.length - 1);
226
+ this._commentElements[this._focusedComment].setFocus(true);
227
+ }
228
+ }
229
+ createNewCommentNode(comment) {
230
+ const newCommentNode = this._scopedInstatiationService.createInstance(CommentNode, this._parentEditor, this._commentThread, comment, this._pendingEdits ? this._pendingEdits[comment.uniqueIdInThread] : undefined, this.owner, this.parentResourceUri, this._parentCommentThreadWidget, this._markdownRenderer);
231
+ this._register(newCommentNode);
232
+ this._commentDisposable.set(newCommentNode, newCommentNode.onDidClick(clickedNode => this._setFocusedComment(this._commentElements.findIndex(commentNode => commentNode.comment.uniqueIdInThread === clickedNode.comment.uniqueIdInThread))));
233
+ return newCommentNode;
234
+ }
235
+ dispose() {
236
+ super.dispose();
237
+ if (this._resizeObserver) {
238
+ this._resizeObserver.disconnect();
239
+ this._resizeObserver = null;
240
+ }
241
+ this._commentDisposable.forEach(v => v.dispose());
242
+ }
243
+ };
244
+ CommentThreadBody = ( __decorate([
245
+ ( __param(9, ICommentService)),
246
+ ( __param(10, IOpenerService)),
247
+ ( __param(11, ILanguageService))
248
+ ], CommentThreadBody));
249
+ export { CommentThreadBody };