@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
@@ -1,402 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
3
- import { toErrorMessage } from 'monaco-editor/esm/vs/base/common/errorMessage.js';
4
- import { Emitter, Event } from 'monaco-editor/esm/vs/base/common/event.js';
5
- import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
6
- import { TextFileEditorModel } from './textFileEditorModel.js';
7
- import { Disposable, dispose, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
8
- import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
9
- import { ResourceMap } from 'monaco-editor/esm/vs/base/common/map.js';
10
- import { IFileService } from 'monaco-editor/esm/vs/platform/files/common/files.js';
11
- import { ResourceQueue, Promises } from 'monaco-editor/esm/vs/base/common/async.js';
12
- import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
13
- import { TextFileSaveParticipant } from './textFileSaveParticipant.js';
14
- import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
15
- import { IWorkingCopyFileService } from '../../workingCopy/common/workingCopyFileService.js';
16
- import { joinPath, extname } from 'monaco-editor/esm/vs/base/common/resources.js';
17
- import { createTextBufferFactoryFromSnapshot } from 'monaco-editor/esm/vs/editor/common/model/textModel.js';
18
- import { PLAINTEXT_LANGUAGE_ID, PLAINTEXT_EXTENSION } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
19
- import { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/common/uriIdentity.js';
20
- let TextFileEditorModelManager = class TextFileEditorModelManager extends Disposable {
21
- get models() {
22
- return [...( this.mapResourceToModel.values())];
23
- }
24
- constructor(instantiationService, fileService, notificationService, workingCopyFileService, uriIdentityService) {
25
- super();
26
- this.instantiationService = instantiationService;
27
- this.fileService = fileService;
28
- this.notificationService = notificationService;
29
- this.workingCopyFileService = workingCopyFileService;
30
- this.uriIdentityService = uriIdentityService;
31
- this._onDidCreate = this._register(( new Emitter()));
32
- this.onDidCreate = this._onDidCreate.event;
33
- this._onDidResolve = this._register(( new Emitter()));
34
- this.onDidResolve = this._onDidResolve.event;
35
- this._onDidRemove = this._register(( new Emitter()));
36
- this.onDidRemove = this._onDidRemove.event;
37
- this._onDidChangeDirty = this._register(( new Emitter()));
38
- this.onDidChangeDirty = this._onDidChangeDirty.event;
39
- this._onDidChangeReadonly = this._register(( new Emitter()));
40
- this.onDidChangeReadonly = this._onDidChangeReadonly.event;
41
- this._onDidChangeOrphaned = this._register(( new Emitter()));
42
- this.onDidChangeOrphaned = this._onDidChangeOrphaned.event;
43
- this._onDidSaveError = this._register(( new Emitter()));
44
- this.onDidSaveError = this._onDidSaveError.event;
45
- this._onDidSave = this._register(( new Emitter()));
46
- this.onDidSave = this._onDidSave.event;
47
- this._onDidRevert = this._register(( new Emitter()));
48
- this.onDidRevert = this._onDidRevert.event;
49
- this._onDidChangeEncoding = this._register(( new Emitter()));
50
- this.onDidChangeEncoding = this._onDidChangeEncoding.event;
51
- this.mapResourceToModel = ( new ResourceMap());
52
- this.mapResourceToModelListeners = ( new ResourceMap());
53
- this.mapResourceToDisposeListener = ( new ResourceMap());
54
- this.mapResourceToPendingModelResolvers = ( new ResourceMap());
55
- this.modelResolveQueue = this._register(( new ResourceQueue()));
56
- this.saveErrorHandler = (() => {
57
- const notificationService = this.notificationService;
58
- return {
59
- onSaveError(error, model) {
60
- notificationService.error(( localizeWithPath(
61
- 'vs/workbench/services/textfile/common/textFileEditorModelManager',
62
- { key: 'genericSaveError', comment: ['{0} is the resource that failed to save and {1} the error message'] },
63
- "Failed to save '{0}': {1}",
64
- model.name,
65
- toErrorMessage(error, false)
66
- )));
67
- }
68
- };
69
- })();
70
- this.mapCorrelationIdToModelsToRestore = ( new Map());
71
- this.saveParticipants = this._register(this.instantiationService.createInstance(TextFileSaveParticipant));
72
- this.registerListeners();
73
- }
74
- registerListeners() {
75
- this._register(this.fileService.onDidFilesChange(e => this.onDidFilesChange(e)));
76
- this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(e => this.onDidChangeFileSystemProviderCapabilities(e)));
77
- this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(e => this.onDidChangeFileSystemProviderRegistrations(e)));
78
- this._register(this.workingCopyFileService.onWillRunWorkingCopyFileOperation(e => this.onWillRunWorkingCopyFileOperation(e)));
79
- this._register(this.workingCopyFileService.onDidFailWorkingCopyFileOperation(e => this.onDidFailWorkingCopyFileOperation(e)));
80
- this._register(this.workingCopyFileService.onDidRunWorkingCopyFileOperation(e => this.onDidRunWorkingCopyFileOperation(e)));
81
- }
82
- onDidFilesChange(e) {
83
- for (const model of this.models) {
84
- if (model.isDirty()) {
85
- continue;
86
- }
87
- if (e.contains(model.resource, 0 , 1 )) {
88
- this.queueModelReload(model);
89
- }
90
- }
91
- }
92
- onDidChangeFileSystemProviderCapabilities(e) {
93
- this.queueModelReloads(e.scheme);
94
- }
95
- onDidChangeFileSystemProviderRegistrations(e) {
96
- if (!e.added) {
97
- return;
98
- }
99
- this.queueModelReloads(e.scheme);
100
- }
101
- queueModelReloads(scheme) {
102
- for (const model of this.models) {
103
- if (model.isDirty()) {
104
- continue;
105
- }
106
- if (scheme === model.resource.scheme) {
107
- this.queueModelReload(model);
108
- }
109
- }
110
- }
111
- queueModelReload(model) {
112
- const queue = this.modelResolveQueue.queueFor(model.resource);
113
- if (queue.size <= 1) {
114
- queue.queue(async () => {
115
- try {
116
- await this.reload(model);
117
- }
118
- catch (error) {
119
- onUnexpectedError(error);
120
- }
121
- });
122
- }
123
- }
124
- onWillRunWorkingCopyFileOperation(e) {
125
- if (e.operation === 2 || e.operation === 3 ) {
126
- const modelsToRestore = [];
127
- for (const { source, target } of e.files) {
128
- if (source) {
129
- if (this.uriIdentityService.extUri.isEqual(source, target)) {
130
- continue;
131
- }
132
- const sourceModels = [];
133
- for (const model of this.models) {
134
- if (this.uriIdentityService.extUri.isEqualOrParent(model.resource, source)) {
135
- sourceModels.push(model);
136
- }
137
- }
138
- for (const sourceModel of sourceModels) {
139
- const sourceModelResource = sourceModel.resource;
140
- let targetModelResource;
141
- if (this.uriIdentityService.extUri.isEqual(sourceModelResource, source)) {
142
- targetModelResource = target;
143
- }
144
- else {
145
- targetModelResource = joinPath(target, sourceModelResource.path.substr(source.path.length + 1));
146
- }
147
- modelsToRestore.push({
148
- source: sourceModelResource,
149
- target: targetModelResource,
150
- languageId: sourceModel.getLanguageId(),
151
- encoding: sourceModel.getEncoding(),
152
- snapshot: sourceModel.isDirty() ? sourceModel.createSnapshot() : undefined
153
- });
154
- }
155
- }
156
- }
157
- this.mapCorrelationIdToModelsToRestore.set(e.correlationId, modelsToRestore);
158
- }
159
- }
160
- onDidFailWorkingCopyFileOperation(e) {
161
- if (((e.operation === 2 || e.operation === 3) )) {
162
- const modelsToRestore = this.mapCorrelationIdToModelsToRestore.get(e.correlationId);
163
- if (modelsToRestore) {
164
- this.mapCorrelationIdToModelsToRestore.delete(e.correlationId);
165
- modelsToRestore.forEach(model => {
166
- if (model.snapshot) {
167
- this.get(model.source)?.setDirty(true);
168
- }
169
- });
170
- }
171
- }
172
- }
173
- onDidRunWorkingCopyFileOperation(e) {
174
- switch (e.operation) {
175
- case 0 :
176
- e.waitUntil((async () => {
177
- for (const { target } of e.files) {
178
- const model = this.get(target);
179
- if (model && !model.isDisposed()) {
180
- await model.revert();
181
- }
182
- }
183
- })());
184
- break;
185
- case 2 :
186
- case 3 :
187
- e.waitUntil((async () => {
188
- const modelsToRestore = this.mapCorrelationIdToModelsToRestore.get(e.correlationId);
189
- if (modelsToRestore) {
190
- this.mapCorrelationIdToModelsToRestore.delete(e.correlationId);
191
- await Promises.settled(( modelsToRestore.map(async (modelToRestore) => {
192
- const restoredModel = await this.resolve(modelToRestore.target, {
193
- reload: { async: false },
194
- contents: modelToRestore.snapshot ? createTextBufferFactoryFromSnapshot(modelToRestore.snapshot) : undefined,
195
- encoding: modelToRestore.encoding
196
- });
197
- if (modelToRestore.languageId &&
198
- modelToRestore.languageId !== PLAINTEXT_LANGUAGE_ID &&
199
- restoredModel.getLanguageId() === PLAINTEXT_LANGUAGE_ID &&
200
- extname(modelToRestore.target) !== PLAINTEXT_EXTENSION) {
201
- restoredModel.updateTextEditorModel(undefined, modelToRestore.languageId);
202
- }
203
- })));
204
- }
205
- })());
206
- break;
207
- }
208
- }
209
- get(resource) {
210
- return this.mapResourceToModel.get(resource);
211
- }
212
- has(resource) {
213
- return ( this.mapResourceToModel.has(resource));
214
- }
215
- async reload(model) {
216
- await this.joinPendingResolves(model.resource);
217
- if (model.isDirty() || model.isDisposed() || !( this.has(model.resource))) {
218
- return;
219
- }
220
- await this.doResolve(model, { reload: { async: false } });
221
- }
222
- async resolve(resource, options) {
223
- const pendingResolve = this.joinPendingResolves(resource);
224
- if (pendingResolve) {
225
- await pendingResolve;
226
- }
227
- return this.doResolve(resource, options);
228
- }
229
- async doResolve(resourceOrModel, options) {
230
- let model;
231
- let resource;
232
- if (URI.isUri(resourceOrModel)) {
233
- resource = resourceOrModel;
234
- model = this.get(resource);
235
- }
236
- else {
237
- resource = resourceOrModel.resource;
238
- model = resourceOrModel;
239
- }
240
- let modelResolve;
241
- let didCreateModel = false;
242
- if (model) {
243
- if (options?.contents) {
244
- modelResolve = model.resolve(options);
245
- }
246
- else if (options?.reload) {
247
- if (options.reload.async) {
248
- modelResolve = Promise.resolve();
249
- (async () => {
250
- try {
251
- await model.resolve(options);
252
- }
253
- catch (error) {
254
- onUnexpectedError(error);
255
- }
256
- })();
257
- }
258
- else {
259
- modelResolve = model.resolve(options);
260
- }
261
- }
262
- else {
263
- modelResolve = Promise.resolve();
264
- }
265
- }
266
- else {
267
- didCreateModel = true;
268
- const newModel = model = this.instantiationService.createInstance(TextFileEditorModel, resource, options ? options.encoding : undefined, options ? options.languageId : undefined);
269
- modelResolve = model.resolve(options);
270
- this.registerModel(newModel);
271
- }
272
- this.mapResourceToPendingModelResolvers.set(resource, modelResolve);
273
- this.add(resource, model);
274
- if (didCreateModel) {
275
- this._onDidCreate.fire(model);
276
- if (model.isDirty()) {
277
- this._onDidChangeDirty.fire(model);
278
- }
279
- }
280
- try {
281
- await modelResolve;
282
- }
283
- catch (error) {
284
- if (didCreateModel) {
285
- model.dispose();
286
- }
287
- throw error;
288
- }
289
- finally {
290
- this.mapResourceToPendingModelResolvers.delete(resource);
291
- }
292
- if (options?.languageId) {
293
- model.setLanguageId(options.languageId);
294
- }
295
- if (didCreateModel && model.isDirty()) {
296
- this._onDidChangeDirty.fire(model);
297
- }
298
- return model;
299
- }
300
- joinPendingResolves(resource) {
301
- const pendingModelResolve = this.mapResourceToPendingModelResolvers.get(resource);
302
- if (!pendingModelResolve) {
303
- return;
304
- }
305
- return this.doJoinPendingResolves(resource);
306
- }
307
- async doJoinPendingResolves(resource) {
308
- let currentModelCopyResolve;
309
- while (( this.mapResourceToPendingModelResolvers.has(resource))) {
310
- const nextPendingModelResolve = this.mapResourceToPendingModelResolvers.get(resource);
311
- if (nextPendingModelResolve === currentModelCopyResolve) {
312
- return;
313
- }
314
- currentModelCopyResolve = nextPendingModelResolve;
315
- try {
316
- await nextPendingModelResolve;
317
- }
318
- catch (error) {
319
- }
320
- }
321
- }
322
- registerModel(model) {
323
- const modelListeners = ( new DisposableStore());
324
- modelListeners.add(model.onDidResolve(reason => this._onDidResolve.fire({ model, reason })));
325
- modelListeners.add(model.onDidChangeDirty(() => this._onDidChangeDirty.fire(model)));
326
- modelListeners.add(model.onDidChangeReadonly(() => this._onDidChangeReadonly.fire(model)));
327
- modelListeners.add(model.onDidChangeOrphaned(() => this._onDidChangeOrphaned.fire(model)));
328
- modelListeners.add(model.onDidSaveError(() => this._onDidSaveError.fire(model)));
329
- modelListeners.add(model.onDidSave(e => this._onDidSave.fire({ model, ...e })));
330
- modelListeners.add(model.onDidRevert(() => this._onDidRevert.fire(model)));
331
- modelListeners.add(model.onDidChangeEncoding(() => this._onDidChangeEncoding.fire(model)));
332
- this.mapResourceToModelListeners.set(model.resource, modelListeners);
333
- }
334
- add(resource, model) {
335
- const knownModel = this.mapResourceToModel.get(resource);
336
- if (knownModel === model) {
337
- return;
338
- }
339
- const disposeListener = this.mapResourceToDisposeListener.get(resource);
340
- disposeListener?.dispose();
341
- this.mapResourceToModel.set(resource, model);
342
- this.mapResourceToDisposeListener.set(resource, model.onWillDispose(() => this.remove(resource)));
343
- }
344
- remove(resource) {
345
- const removed = this.mapResourceToModel.delete(resource);
346
- const disposeListener = this.mapResourceToDisposeListener.get(resource);
347
- if (disposeListener) {
348
- dispose(disposeListener);
349
- this.mapResourceToDisposeListener.delete(resource);
350
- }
351
- const modelListener = this.mapResourceToModelListeners.get(resource);
352
- if (modelListener) {
353
- dispose(modelListener);
354
- this.mapResourceToModelListeners.delete(resource);
355
- }
356
- if (removed) {
357
- this._onDidRemove.fire(resource);
358
- }
359
- }
360
- addSaveParticipant(participant) {
361
- return this.saveParticipants.addSaveParticipant(participant);
362
- }
363
- runSaveParticipants(model, context, token) {
364
- return this.saveParticipants.participate(model, context, token);
365
- }
366
- canDispose(model) {
367
- if (model.isDisposed() ||
368
- (!( this.mapResourceToPendingModelResolvers.has(model.resource)) && !model.isDirty())) {
369
- return true;
370
- }
371
- return this.doCanDispose(model);
372
- }
373
- async doCanDispose(model) {
374
- const pendingResolve = this.joinPendingResolves(model.resource);
375
- if (pendingResolve) {
376
- await pendingResolve;
377
- return this.canDispose(model);
378
- }
379
- if (model.isDirty()) {
380
- await Event.toPromise(model.onDidChangeDirty);
381
- return this.canDispose(model);
382
- }
383
- return true;
384
- }
385
- dispose() {
386
- super.dispose();
387
- this.mapResourceToModel.clear();
388
- this.mapResourceToPendingModelResolvers.clear();
389
- dispose(( this.mapResourceToDisposeListener.values()));
390
- this.mapResourceToDisposeListener.clear();
391
- dispose(( this.mapResourceToModelListeners.values()));
392
- this.mapResourceToModelListeners.clear();
393
- }
394
- };
395
- TextFileEditorModelManager = ( __decorate([
396
- ( __param(0, IInstantiationService)),
397
- ( __param(1, IFileService)),
398
- ( __param(2, INotificationService)),
399
- ( __param(3, IWorkingCopyFileService)),
400
- ( __param(4, IUriIdentityService))
401
- ], TextFileEditorModelManager));
402
- export { TextFileEditorModelManager };
@@ -1,62 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
3
- import { raceCancellation } from 'monaco-editor/esm/vs/base/common/async.js';
4
- import { CancellationTokenSource } from 'monaco-editor/esm/vs/base/common/cancellation.js';
5
- import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
6
- import { IProgressService } from 'monaco-editor/esm/vs/platform/progress/common/progress.js';
7
- import { Disposable, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
8
- import { insert } from 'monaco-editor/esm/vs/base/common/arrays.js';
9
- let TextFileSaveParticipant = class TextFileSaveParticipant extends Disposable {
10
- constructor(progressService, logService) {
11
- super();
12
- this.progressService = progressService;
13
- this.logService = logService;
14
- this.saveParticipants = [];
15
- }
16
- addSaveParticipant(participant) {
17
- const remove = insert(this.saveParticipants, participant);
18
- return toDisposable(() => remove());
19
- }
20
- participate(model, context, token) {
21
- const cts = ( new CancellationTokenSource(token));
22
- return this.progressService.withProgress({
23
- title: ( localizeWithPath(
24
- 'vs/workbench/services/textfile/common/textFileSaveParticipant',
25
- 'saveParticipants',
26
- "Saving '{0}'",
27
- model.name
28
- )),
29
- location: 15 ,
30
- cancellable: true,
31
- delay: model.isDirty() ? 3000 : 5000
32
- }, async (progress) => {
33
- model.textEditorModel?.pushStackElement();
34
- for (const saveParticipant of this.saveParticipants) {
35
- if (cts.token.isCancellationRequested || !model.textEditorModel ) {
36
- break;
37
- }
38
- try {
39
- const promise = saveParticipant.participate(model, context, progress, cts.token);
40
- await raceCancellation(promise, cts.token);
41
- }
42
- catch (err) {
43
- this.logService.error(err);
44
- }
45
- }
46
- model.textEditorModel?.pushStackElement();
47
- }, () => {
48
- cts.cancel();
49
- }).finally(() => {
50
- cts.dispose();
51
- });
52
- }
53
- dispose() {
54
- this.saveParticipants.splice(0, this.saveParticipants.length);
55
- super.dispose();
56
- }
57
- };
58
- TextFileSaveParticipant = ( __decorate([
59
- ( __param(0, IProgressService)),
60
- ( __param(1, ILogService))
61
- ], TextFileSaveParticipant));
62
- export { TextFileSaveParticipant };
@@ -1,38 +0,0 @@
1
- import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
2
- import { addMatchMediaChangeListener } from 'monaco-editor/esm/vs/base/browser/browser.js';
3
- import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
- import { mainWindow } from 'monaco-editor/esm/vs/base/browser/window.js';
5
- class BrowserHostColorSchemeService extends Disposable {
6
- constructor() {
7
- super();
8
- this._onDidSchemeChangeEvent = this._register(( new Emitter()));
9
- this.registerListeners();
10
- }
11
- registerListeners() {
12
- addMatchMediaChangeListener('(prefers-color-scheme: dark)', () => {
13
- this._onDidSchemeChangeEvent.fire();
14
- });
15
- addMatchMediaChangeListener('(forced-colors: active)', () => {
16
- this._onDidSchemeChangeEvent.fire();
17
- });
18
- }
19
- get onDidChangeColorScheme() {
20
- return this._onDidSchemeChangeEvent.event;
21
- }
22
- get dark() {
23
- if (mainWindow.matchMedia(`(prefers-color-scheme: light)`).matches) {
24
- return false;
25
- }
26
- else if (mainWindow.matchMedia(`(prefers-color-scheme: dark)`).matches) {
27
- return true;
28
- }
29
- return false;
30
- }
31
- get highContrast() {
32
- if (mainWindow.matchMedia(`(forced-colors: active)`).matches) {
33
- return true;
34
- }
35
- return false;
36
- }
37
- }
38
- export { BrowserHostColorSchemeService };