@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,307 @@
1
+ import { equals, tieBreakComparators, compareBy, numberComparator } from 'monaco-editor/esm/vs/base/common/arrays.js';
2
+ import { BugIndicatingError } from 'monaco-editor/esm/vs/base/common/errors.js';
3
+ import { splitLines } from 'monaco-editor/esm/vs/base/common/strings.js';
4
+ import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
5
+ import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
6
+ import { LineRangeEdit, RangeEdit } from './editing.js';
7
+ import { MappingAlignment, DetailedLineRangeMapping } from './mapping.js';
8
+ import { concatArrays } from '../utils.js';
9
+ class ModifiedBaseRange {
10
+ static fromDiffs(diffs1, diffs2, baseTextModel, input1TextModel, input2TextModel) {
11
+ const alignments = MappingAlignment.compute(diffs1, diffs2);
12
+ return ( alignments.map((a) => ( new ModifiedBaseRange(
13
+ a.inputRange,
14
+ baseTextModel,
15
+ a.output1Range,
16
+ input1TextModel,
17
+ a.output1LineMappings,
18
+ a.output2Range,
19
+ input2TextModel,
20
+ a.output2LineMappings
21
+ ))));
22
+ }
23
+ constructor(baseRange, baseTextModel, input1Range, input1TextModel,
24
+ input1Diffs, input2Range, input2TextModel,
25
+ input2Diffs) {
26
+ this.baseRange = baseRange;
27
+ this.baseTextModel = baseTextModel;
28
+ this.input1Range = input1Range;
29
+ this.input1TextModel = input1TextModel;
30
+ this.input1Diffs = input1Diffs;
31
+ this.input2Range = input2Range;
32
+ this.input2TextModel = input2TextModel;
33
+ this.input2Diffs = input2Diffs;
34
+ this.input1CombinedDiff = DetailedLineRangeMapping.join(this.input1Diffs);
35
+ this.input2CombinedDiff = DetailedLineRangeMapping.join(this.input2Diffs);
36
+ this.isEqualChange = equals(this.input1Diffs, this.input2Diffs, (a, b) => a.getLineEdit().equals(b.getLineEdit()));
37
+ this.smartInput1LineRangeEdit = null;
38
+ this.smartInput2LineRangeEdit = null;
39
+ this.dumbInput1LineRangeEdit = null;
40
+ this.dumbInput2LineRangeEdit = null;
41
+ if (this.input1Diffs.length === 0 && this.input2Diffs.length === 0) {
42
+ throw new BugIndicatingError('must have at least one diff');
43
+ }
44
+ }
45
+ getInputRange(inputNumber) {
46
+ return inputNumber === 1 ? this.input1Range : this.input2Range;
47
+ }
48
+ getInputCombinedDiff(inputNumber) {
49
+ return inputNumber === 1 ? this.input1CombinedDiff : this.input2CombinedDiff;
50
+ }
51
+ getInputDiffs(inputNumber) {
52
+ return inputNumber === 1 ? this.input1Diffs : this.input2Diffs;
53
+ }
54
+ get isConflicting() {
55
+ return this.input1Diffs.length > 0 && this.input2Diffs.length > 0;
56
+ }
57
+ get canBeCombined() {
58
+ return this.smartCombineInputs(1) !== undefined;
59
+ }
60
+ get isOrderRelevant() {
61
+ const input1 = this.smartCombineInputs(1);
62
+ const input2 = this.smartCombineInputs(2);
63
+ if (!input1 || !input2) {
64
+ return false;
65
+ }
66
+ return !input1.equals(input2);
67
+ }
68
+ getEditForBase(state) {
69
+ const diffs = [];
70
+ if (state.includesInput1 && this.input1CombinedDiff) {
71
+ diffs.push({ diff: this.input1CombinedDiff, inputNumber: 1 });
72
+ }
73
+ if (state.includesInput2 && this.input2CombinedDiff) {
74
+ diffs.push({ diff: this.input2CombinedDiff, inputNumber: 2 });
75
+ }
76
+ if (diffs.length === 0) {
77
+ return { edit: undefined, effectiveState: ModifiedBaseRangeState.base };
78
+ }
79
+ if (diffs.length === 1) {
80
+ return { edit: diffs[0].diff.getLineEdit(), effectiveState: ModifiedBaseRangeState.base.withInputValue(diffs[0].inputNumber, true, false) };
81
+ }
82
+ if (state.kind !== ModifiedBaseRangeStateKind.both) {
83
+ throw new BugIndicatingError();
84
+ }
85
+ const smartCombinedEdit = state.smartCombination ? this.smartCombineInputs(state.firstInput) : this.dumbCombineInputs(state.firstInput);
86
+ if (smartCombinedEdit) {
87
+ return { edit: smartCombinedEdit, effectiveState: state };
88
+ }
89
+ return {
90
+ edit: diffs[getOtherInputNumber(state.firstInput) - 1].diff.getLineEdit(),
91
+ effectiveState: ModifiedBaseRangeState.base.withInputValue(getOtherInputNumber(state.firstInput), true, false),
92
+ };
93
+ }
94
+ smartCombineInputs(firstInput) {
95
+ if (firstInput === 1 && this.smartInput1LineRangeEdit !== null) {
96
+ return this.smartInput1LineRangeEdit;
97
+ }
98
+ else if (firstInput === 2 && this.smartInput2LineRangeEdit !== null) {
99
+ return this.smartInput2LineRangeEdit;
100
+ }
101
+ const combinedDiffs = concatArrays(this.input1Diffs.flatMap((diffs) => ( diffs.rangeMappings.map((diff) => ({ diff, input: 1 })))), this.input2Diffs.flatMap((diffs) => ( diffs.rangeMappings.map((diff) => ({ diff, input: 2 }))))).sort(tieBreakComparators(compareBy((d) => d.diff.inputRange, Range.compareRangesUsingStarts), compareBy((d) => (d.input === firstInput ? 1 : 2), numberComparator)));
102
+ const sortedEdits = ( combinedDiffs.map(d => {
103
+ const sourceTextModel = d.input === 1 ? this.input1TextModel : this.input2TextModel;
104
+ return ( new RangeEdit(d.diff.inputRange, sourceTextModel.getValueInRange(d.diff.outputRange)));
105
+ }));
106
+ const result = editsToLineRangeEdit(this.baseRange, sortedEdits, this.baseTextModel);
107
+ if (firstInput === 1) {
108
+ this.smartInput1LineRangeEdit = result;
109
+ }
110
+ else {
111
+ this.smartInput2LineRangeEdit = result;
112
+ }
113
+ return result;
114
+ }
115
+ dumbCombineInputs(firstInput) {
116
+ if (firstInput === 1 && this.dumbInput1LineRangeEdit !== null) {
117
+ return this.dumbInput1LineRangeEdit;
118
+ }
119
+ else if (firstInput === 2 && this.dumbInput2LineRangeEdit !== null) {
120
+ return this.dumbInput2LineRangeEdit;
121
+ }
122
+ let input1Lines = this.input1Range.getLines(this.input1TextModel);
123
+ let input2Lines = this.input2Range.getLines(this.input2TextModel);
124
+ if (firstInput === 2) {
125
+ [input1Lines, input2Lines] = [input2Lines, input1Lines];
126
+ }
127
+ const result = ( new LineRangeEdit(this.baseRange, input1Lines.concat(input2Lines)));
128
+ if (firstInput === 1) {
129
+ this.dumbInput1LineRangeEdit = result;
130
+ }
131
+ else {
132
+ this.dumbInput2LineRangeEdit = result;
133
+ }
134
+ return result;
135
+ }
136
+ }
137
+ function editsToLineRangeEdit(range, sortedEdits, textModel) {
138
+ let text = '';
139
+ const startsLineBefore = range.startLineNumber > 1;
140
+ let currentPosition = startsLineBefore
141
+ ? ( new Position(
142
+ range.startLineNumber - 1,
143
+ textModel.getLineMaxColumn(range.startLineNumber - 1)
144
+ ))
145
+ : ( new Position(range.startLineNumber, 1));
146
+ for (const edit of sortedEdits) {
147
+ const diffStart = edit.range.getStartPosition();
148
+ if (!currentPosition.isBeforeOrEqual(diffStart)) {
149
+ return undefined;
150
+ }
151
+ let originalText = textModel.getValueInRange(Range.fromPositions(currentPosition, diffStart));
152
+ if (diffStart.lineNumber > textModel.getLineCount()) {
153
+ originalText += '\n';
154
+ }
155
+ text += originalText;
156
+ text += edit.newText;
157
+ currentPosition = edit.range.getEndPosition();
158
+ }
159
+ const endsLineAfter = range.endLineNumberExclusive <= textModel.getLineCount();
160
+ const end = endsLineAfter ? ( new Position(range.endLineNumberExclusive, 1)) : ( new Position(
161
+ range.endLineNumberExclusive - 1,
162
+ 1073741824
163
+ ));
164
+ const originalText = textModel.getValueInRange(Range.fromPositions(currentPosition, end));
165
+ text += originalText;
166
+ const lines = splitLines(text);
167
+ if (startsLineBefore) {
168
+ if (lines[0] !== '') {
169
+ return undefined;
170
+ }
171
+ lines.shift();
172
+ }
173
+ if (endsLineAfter) {
174
+ if (lines[lines.length - 1] !== '') {
175
+ return undefined;
176
+ }
177
+ lines.pop();
178
+ }
179
+ return ( new LineRangeEdit(range, lines));
180
+ }
181
+ var ModifiedBaseRangeStateKind;
182
+ ( (function(ModifiedBaseRangeStateKind) {
183
+ ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["base"] = 0] = "base";
184
+ ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["input1"] = 1] = "input1";
185
+ ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["input2"] = 2] = "input2";
186
+ ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["both"] = 3] = "both";
187
+ ModifiedBaseRangeStateKind[ModifiedBaseRangeStateKind["unrecognized"] = 4] = "unrecognized";
188
+ })(ModifiedBaseRangeStateKind || (ModifiedBaseRangeStateKind = {})));
189
+ function getOtherInputNumber(inputNumber) {
190
+ return inputNumber === 1 ? 2 : 1;
191
+ }
192
+ class AbstractModifiedBaseRangeState {
193
+ constructor() { }
194
+ get includesInput1() { return false; }
195
+ get includesInput2() { return false; }
196
+ includesInput(inputNumber) {
197
+ return inputNumber === 1 ? this.includesInput1 : this.includesInput2;
198
+ }
199
+ isInputIncluded(inputNumber) {
200
+ return inputNumber === 1 ? this.includesInput1 : this.includesInput2;
201
+ }
202
+ toggle(inputNumber) {
203
+ return this.withInputValue(inputNumber, !this.includesInput(inputNumber), true);
204
+ }
205
+ getInput(inputNumber) {
206
+ if (!this.isInputIncluded(inputNumber)) {
207
+ return 0 ;
208
+ }
209
+ return 1 ;
210
+ }
211
+ }
212
+ class ModifiedBaseRangeStateBase extends AbstractModifiedBaseRangeState {
213
+ get kind() { return ModifiedBaseRangeStateKind.base; }
214
+ toString() { return 'base'; }
215
+ swap() { return this; }
216
+ withInputValue(inputNumber, value, smartCombination = false) {
217
+ if (inputNumber === 1) {
218
+ return value ? ( new ModifiedBaseRangeStateInput1()) : this;
219
+ }
220
+ else {
221
+ return value ? ( new ModifiedBaseRangeStateInput2()) : this;
222
+ }
223
+ }
224
+ equals(other) {
225
+ return other.kind === ModifiedBaseRangeStateKind.base;
226
+ }
227
+ }
228
+ class ModifiedBaseRangeStateInput1 extends AbstractModifiedBaseRangeState {
229
+ get kind() { return ModifiedBaseRangeStateKind.input1; }
230
+ get includesInput1() { return true; }
231
+ toString() { return '1✓'; }
232
+ swap() { return ( new ModifiedBaseRangeStateInput2()); }
233
+ withInputValue(inputNumber, value, smartCombination = false) {
234
+ if (inputNumber === 1) {
235
+ return value ? this : ( new ModifiedBaseRangeStateBase());
236
+ }
237
+ else {
238
+ return value ? ( new ModifiedBaseRangeStateBoth(1, smartCombination)) : ( new ModifiedBaseRangeStateInput2());
239
+ }
240
+ }
241
+ equals(other) {
242
+ return other.kind === ModifiedBaseRangeStateKind.input1;
243
+ }
244
+ }
245
+ class ModifiedBaseRangeStateInput2 extends AbstractModifiedBaseRangeState {
246
+ get kind() { return ModifiedBaseRangeStateKind.input2; }
247
+ get includesInput2() { return true; }
248
+ toString() { return '2✓'; }
249
+ swap() { return ( new ModifiedBaseRangeStateInput1()); }
250
+ withInputValue(inputNumber, value, smartCombination = false) {
251
+ if (inputNumber === 2) {
252
+ return value ? this : ( new ModifiedBaseRangeStateBase());
253
+ }
254
+ else {
255
+ return value ? ( new ModifiedBaseRangeStateBoth(2, smartCombination)) : ( new ModifiedBaseRangeStateInput2());
256
+ }
257
+ }
258
+ equals(other) {
259
+ return other.kind === ModifiedBaseRangeStateKind.input2;
260
+ }
261
+ }
262
+ class ModifiedBaseRangeStateBoth extends AbstractModifiedBaseRangeState {
263
+ constructor(firstInput, smartCombination) {
264
+ super();
265
+ this.firstInput = firstInput;
266
+ this.smartCombination = smartCombination;
267
+ }
268
+ get kind() { return ModifiedBaseRangeStateKind.both; }
269
+ get includesInput1() { return true; }
270
+ get includesInput2() { return true; }
271
+ toString() {
272
+ return '2✓';
273
+ }
274
+ swap() { return ( new ModifiedBaseRangeStateBoth(getOtherInputNumber(this.firstInput), this.smartCombination)); }
275
+ withInputValue(inputNumber, value, smartCombination = false) {
276
+ if (value) {
277
+ return this;
278
+ }
279
+ return inputNumber === 1 ? ( new ModifiedBaseRangeStateInput2()) : ( new ModifiedBaseRangeStateInput1());
280
+ }
281
+ equals(other) {
282
+ return other.kind === ModifiedBaseRangeStateKind.both && this.firstInput === other.firstInput && this.smartCombination === other.smartCombination;
283
+ }
284
+ getInput(inputNumber) {
285
+ return inputNumber === this.firstInput ? 1 : 2 ;
286
+ }
287
+ }
288
+ class ModifiedBaseRangeStateUnrecognized extends AbstractModifiedBaseRangeState {
289
+ get kind() { return ModifiedBaseRangeStateKind.unrecognized; }
290
+ toString() { return 'unrecognized'; }
291
+ swap() { return this; }
292
+ withInputValue(inputNumber, value, smartCombination = false) {
293
+ if (!value) {
294
+ return this;
295
+ }
296
+ return inputNumber === 1 ? ( new ModifiedBaseRangeStateInput1()) : ( new ModifiedBaseRangeStateInput2());
297
+ }
298
+ equals(other) {
299
+ return other.kind === ModifiedBaseRangeStateKind.unrecognized;
300
+ }
301
+ }
302
+ var ModifiedBaseRangeState;
303
+ ( (function(ModifiedBaseRangeState) {
304
+ ModifiedBaseRangeState.base = ( new ModifiedBaseRangeStateBase());
305
+ ModifiedBaseRangeState.unrecognized = ( new ModifiedBaseRangeStateUnrecognized());
306
+ })(ModifiedBaseRangeState || (ModifiedBaseRangeState = {})));
307
+ export { AbstractModifiedBaseRangeState, ModifiedBaseRange, ModifiedBaseRangeState, ModifiedBaseRangeStateBase, ModifiedBaseRangeStateBoth, ModifiedBaseRangeStateInput1, ModifiedBaseRangeStateInput2, ModifiedBaseRangeStateKind, ModifiedBaseRangeStateUnrecognized, getOtherInputNumber };
@@ -0,0 +1,44 @@
1
+ import { Position } from 'monaco-editor/esm/vs/editor/common/core/position.js';
2
+ import { LengthObj } from 'monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js';
3
+ function rangeContainsPosition(range, position) {
4
+ if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {
5
+ return false;
6
+ }
7
+ if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) {
8
+ return false;
9
+ }
10
+ if (position.lineNumber === range.endLineNumber && position.column >= range.endColumn) {
11
+ return false;
12
+ }
13
+ return true;
14
+ }
15
+ function lengthOfRange(range) {
16
+ if (range.startLineNumber === range.endLineNumber) {
17
+ return ( new LengthObj(0, range.endColumn - range.startColumn));
18
+ }
19
+ else {
20
+ return ( new LengthObj(range.endLineNumber - range.startLineNumber, range.endColumn - 1));
21
+ }
22
+ }
23
+ function lengthBetweenPositions(position1, position2) {
24
+ if (position1.lineNumber === position2.lineNumber) {
25
+ return ( new LengthObj(0, position2.column - position1.column));
26
+ }
27
+ else {
28
+ return ( new LengthObj(position2.lineNumber - position1.lineNumber, position2.column - 1));
29
+ }
30
+ }
31
+ function addLength(position, length) {
32
+ if (length.lineCount === 0) {
33
+ return ( new Position(position.lineNumber, position.column + length.columnCount));
34
+ }
35
+ else {
36
+ return ( new Position(position.lineNumber + length.lineCount, length.columnCount + 1));
37
+ }
38
+ }
39
+ function rangeIsBeforeOrTouching(range, other) {
40
+ return (range.endLineNumber < other.startLineNumber ||
41
+ (range.endLineNumber === other.startLineNumber &&
42
+ range.endColumn <= other.startColumn));
43
+ }
44
+ export { addLength, lengthBetweenPositions, lengthOfRange, rangeContainsPosition, rangeIsBeforeOrTouching };
@@ -0,0 +1,165 @@
1
+ import { compareBy, numberComparator } from 'monaco-editor/esm/vs/base/common/arrays.js';
2
+ import { BugIndicatingError } from 'monaco-editor/esm/vs/base/common/errors.js';
3
+ import { Disposable, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { DetailedLineRangeMapping } from './mapping.js';
5
+ import { LineRangeEdit } from './editing.js';
6
+ import { LineRange } from './lineRange.js';
7
+ import { ReentrancyBarrier } from '../utils.js';
8
+ import { observableValue, observableSignal, autorun, transaction } from 'monaco-editor/esm/vs/base/common/observable.js';
9
+ class TextModelDiffs extends Disposable {
10
+ get isApplyingChange() {
11
+ return this.barrier.isActive;
12
+ }
13
+ constructor(baseTextModel, textModel, diffComputer) {
14
+ super();
15
+ this.baseTextModel = baseTextModel;
16
+ this.textModel = textModel;
17
+ this.diffComputer = diffComputer;
18
+ this.recomputeCount = 0;
19
+ this._state = observableValue(this, 1 );
20
+ this._diffs = observableValue(this, []);
21
+ this.barrier = ( new ReentrancyBarrier());
22
+ this.isDisposed = false;
23
+ this.isInitializing = true;
24
+ const recomputeSignal = observableSignal('recompute');
25
+ this._register(autorun(reader => {
26
+ recomputeSignal.read(reader);
27
+ this.recompute(reader);
28
+ }));
29
+ this._register(baseTextModel.onDidChangeContent(this.barrier.makeExclusive(() => {
30
+ recomputeSignal.trigger(undefined);
31
+ })));
32
+ this._register(textModel.onDidChangeContent(this.barrier.makeExclusive(() => {
33
+ recomputeSignal.trigger(undefined);
34
+ })));
35
+ this._register(toDisposable(() => {
36
+ this.isDisposed = true;
37
+ }));
38
+ }
39
+ get state() {
40
+ return this._state;
41
+ }
42
+ get diffs() {
43
+ return this._diffs;
44
+ }
45
+ recompute(reader) {
46
+ this.recomputeCount++;
47
+ const currentRecomputeIdx = this.recomputeCount;
48
+ if (this._state.get() === 1 ) {
49
+ this.isInitializing = true;
50
+ }
51
+ transaction(tx => {
52
+ this._state.set(this.isInitializing ? 1 : 3 , tx, 0 );
53
+ });
54
+ const result = this.diffComputer.computeDiff(this.baseTextModel, this.textModel, reader);
55
+ result.then((result) => {
56
+ if (this.isDisposed) {
57
+ return;
58
+ }
59
+ if (currentRecomputeIdx !== this.recomputeCount) {
60
+ return;
61
+ }
62
+ transaction(tx => {
63
+ if (result.diffs) {
64
+ this._state.set(2 , tx, 1 );
65
+ this._diffs.set(result.diffs, tx, 1 );
66
+ }
67
+ else {
68
+ this._state.set(4 , tx, 1 );
69
+ }
70
+ this.isInitializing = false;
71
+ });
72
+ });
73
+ }
74
+ ensureUpToDate() {
75
+ if (this.state.get() !== 2 ) {
76
+ throw new BugIndicatingError('Cannot remove diffs when the model is not up to date');
77
+ }
78
+ }
79
+ removeDiffs(diffToRemoves, transaction, group) {
80
+ this.ensureUpToDate();
81
+ diffToRemoves.sort(compareBy((d) => d.inputRange.startLineNumber, numberComparator));
82
+ diffToRemoves.reverse();
83
+ let diffs = this._diffs.get();
84
+ for (const diffToRemove of diffToRemoves) {
85
+ const len = diffs.length;
86
+ diffs = diffs.filter((d) => d !== diffToRemove);
87
+ if (len === diffs.length) {
88
+ throw new BugIndicatingError();
89
+ }
90
+ this.barrier.runExclusivelyOrThrow(() => {
91
+ const edits = diffToRemove.getReverseLineEdit().toEdits(this.textModel.getLineCount());
92
+ this.textModel.pushEditOperations(null, edits, () => null, group);
93
+ });
94
+ diffs = ( diffs.map((d) => d.outputRange.isAfter(diffToRemove.outputRange)
95
+ ? d.addOutputLineDelta(diffToRemove.inputRange.lineCount - diffToRemove.outputRange.lineCount)
96
+ : d));
97
+ }
98
+ this._diffs.set(diffs, transaction, 0 );
99
+ }
100
+ applyEditRelativeToOriginal(edit, transaction, group) {
101
+ this.ensureUpToDate();
102
+ const editMapping = ( new DetailedLineRangeMapping(edit.range, this.baseTextModel, ( new LineRange(edit.range.startLineNumber, edit.newLines.length)), this.textModel));
103
+ let firstAfter = false;
104
+ let delta = 0;
105
+ const newDiffs = ( new Array());
106
+ for (const diff of this.diffs.get()) {
107
+ if (diff.inputRange.touches(edit.range)) {
108
+ throw new BugIndicatingError('Edit must be conflict free.');
109
+ }
110
+ else if (diff.inputRange.isAfter(edit.range)) {
111
+ if (!firstAfter) {
112
+ firstAfter = true;
113
+ newDiffs.push(editMapping.addOutputLineDelta(delta));
114
+ }
115
+ newDiffs.push(diff.addOutputLineDelta(edit.newLines.length - edit.range.lineCount));
116
+ }
117
+ else {
118
+ newDiffs.push(diff);
119
+ }
120
+ if (!firstAfter) {
121
+ delta += diff.outputRange.lineCount - diff.inputRange.lineCount;
122
+ }
123
+ }
124
+ if (!firstAfter) {
125
+ firstAfter = true;
126
+ newDiffs.push(editMapping.addOutputLineDelta(delta));
127
+ }
128
+ this.barrier.runExclusivelyOrThrow(() => {
129
+ const edits = ( new LineRangeEdit(edit.range.delta(delta), edit.newLines)).toEdits(this.textModel.getLineCount());
130
+ this.textModel.pushEditOperations(null, edits, () => null, group);
131
+ });
132
+ this._diffs.set(newDiffs, transaction, 0 );
133
+ }
134
+ findTouchingDiffs(baseRange) {
135
+ return this.diffs.get().filter(d => d.inputRange.touches(baseRange));
136
+ }
137
+ getResultLine(lineNumber, reader) {
138
+ let offset = 0;
139
+ const diffs = reader ? this.diffs.read(reader) : this.diffs.get();
140
+ for (const diff of diffs) {
141
+ if (diff.inputRange.contains(lineNumber) || diff.inputRange.endLineNumberExclusive === lineNumber) {
142
+ return diff;
143
+ }
144
+ else if (diff.inputRange.endLineNumberExclusive < lineNumber) {
145
+ offset = diff.resultingDeltaFromOriginalToModified;
146
+ }
147
+ else {
148
+ break;
149
+ }
150
+ }
151
+ return lineNumber + offset;
152
+ }
153
+ getResultLineRange(baseRange, reader) {
154
+ let start = this.getResultLine(baseRange.startLineNumber, reader);
155
+ if (typeof start !== 'number') {
156
+ start = start.outputRange.startLineNumber;
157
+ }
158
+ let endExclusive = this.getResultLine(baseRange.endLineNumberExclusive, reader);
159
+ if (typeof endExclusive !== 'number') {
160
+ endExclusive = endExclusive.outputRange.endLineNumberExclusive;
161
+ }
162
+ return LineRange.fromLineNumbers(start, endExclusive);
163
+ }
164
+ }
165
+ export { TextModelDiffs };
@@ -0,0 +1,78 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
3
+ let MergeEditorTelemetry = class MergeEditorTelemetry {
4
+ constructor(telemetryService) {
5
+ this.telemetryService = telemetryService;
6
+ }
7
+ reportMergeEditorOpened(args) {
8
+ this.telemetryService.publicLog2('mergeEditor.opened', {
9
+ conflictCount: args.conflictCount,
10
+ combinableConflictCount: args.combinableConflictCount,
11
+ baseVisible: args.baseVisible,
12
+ isColumnView: args.isColumnView,
13
+ baseTop: args.baseTop,
14
+ });
15
+ }
16
+ reportLayoutChange(args) {
17
+ this.telemetryService.publicLog2('mergeEditor.layoutChanged', {
18
+ baseVisible: args.baseVisible,
19
+ isColumnView: args.isColumnView,
20
+ baseTop: args.baseTop,
21
+ });
22
+ }
23
+ reportMergeEditorClosed(args) {
24
+ this.telemetryService.publicLog2('mergeEditor.closed', {
25
+ conflictCount: args.conflictCount,
26
+ combinableConflictCount: args.combinableConflictCount,
27
+ durationOpenedSecs: args.durationOpenedSecs,
28
+ remainingConflictCount: args.remainingConflictCount,
29
+ accepted: args.accepted,
30
+ conflictsResolvedWithBase: args.conflictsResolvedWithBase,
31
+ conflictsResolvedWithInput1: args.conflictsResolvedWithInput1,
32
+ conflictsResolvedWithInput2: args.conflictsResolvedWithInput2,
33
+ conflictsResolvedWithSmartCombination: args.conflictsResolvedWithSmartCombination,
34
+ manuallySolvedConflictCountThatEqualNone: args.manuallySolvedConflictCountThatEqualNone,
35
+ manuallySolvedConflictCountThatEqualSmartCombine: args.manuallySolvedConflictCountThatEqualSmartCombine,
36
+ manuallySolvedConflictCountThatEqualInput1: args.manuallySolvedConflictCountThatEqualInput1,
37
+ manuallySolvedConflictCountThatEqualInput2: args.manuallySolvedConflictCountThatEqualInput2,
38
+ manuallySolvedConflictCountThatEqualNoneAndStartedWithBase: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithBase,
39
+ manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1,
40
+ manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2,
41
+ manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart,
42
+ manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart: args.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart,
43
+ });
44
+ }
45
+ reportAcceptInvoked(inputNumber, otherAccepted) {
46
+ this.telemetryService.publicLog2('mergeEditor.action.accept', {
47
+ otherAccepted: otherAccepted,
48
+ isInput1: inputNumber === 1,
49
+ });
50
+ }
51
+ reportSmartCombinationInvoked(otherAccepted) {
52
+ this.telemetryService.publicLog2('mergeEditor.action.smartCombination', {
53
+ otherAccepted: otherAccepted,
54
+ });
55
+ }
56
+ reportRemoveInvoked(inputNumber, otherAccepted) {
57
+ this.telemetryService.publicLog2('mergeEditor.action.remove', {
58
+ otherAccepted: otherAccepted,
59
+ isInput1: inputNumber === 1,
60
+ });
61
+ }
62
+ reportResetToBaseInvoked() {
63
+ this.telemetryService.publicLog2('mergeEditor.action.resetToBase', {});
64
+ }
65
+ reportNavigationToNextConflict() {
66
+ this.telemetryService.publicLog2('mergeEditor.action.goToNextConflict', {});
67
+ }
68
+ reportNavigationToPreviousConflict() {
69
+ this.telemetryService.publicLog2('mergeEditor.action.goToPreviousConflict', {});
70
+ }
71
+ reportConflictCounterClicked() {
72
+ this.telemetryService.publicLog2('mergeEditor.action.conflictCounterClicked', {});
73
+ }
74
+ };
75
+ MergeEditorTelemetry = ( __decorate([
76
+ ( __param(0, ITelemetryService))
77
+ ], MergeEditorTelemetry));
78
+ export { MergeEditorTelemetry };