@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,119 @@
1
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
2
+ import { Disposable, MutableDisposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+ class CellContentPart extends Disposable {
4
+ constructor() {
5
+ super();
6
+ this.cellDisposables = ( new DisposableStore());
7
+ }
8
+ prepareRenderCell(element) { }
9
+ renderCell(element) {
10
+ this.currentCell = element;
11
+ this.didRenderCell(element);
12
+ }
13
+ didRenderCell(element) { }
14
+ unrenderCell(element) {
15
+ this.currentCell = undefined;
16
+ this.cellDisposables.clear();
17
+ }
18
+ prepareLayout() { }
19
+ updateInternalLayoutNow(element) { }
20
+ updateState(element, e) { }
21
+ updateForExecutionState(element, e) { }
22
+ }
23
+ class CellOverlayPart extends Disposable {
24
+ constructor() {
25
+ super();
26
+ this.cellDisposables = this._register(( new DisposableStore()));
27
+ }
28
+ prepareRenderCell(element) { }
29
+ renderCell(element) {
30
+ this.currentCell = element;
31
+ this.didRenderCell(element);
32
+ }
33
+ didRenderCell(element) { }
34
+ unrenderCell(element) {
35
+ this.currentCell = undefined;
36
+ this.cellDisposables.clear();
37
+ }
38
+ updateInternalLayoutNow(element) { }
39
+ updateState(element, e) { }
40
+ updateForExecutionState(element, e) { }
41
+ }
42
+ class CellPartsCollection extends Disposable {
43
+ constructor(targetWindow, contentParts, overlayParts) {
44
+ super();
45
+ this.targetWindow = targetWindow;
46
+ this.contentParts = contentParts;
47
+ this.overlayParts = overlayParts;
48
+ this._scheduledOverlayRendering = this._register(( new MutableDisposable()));
49
+ this._scheduledOverlayUpdateState = this._register(( new MutableDisposable()));
50
+ this._scheduledOverlayUpdateExecutionState = this._register(( new MutableDisposable()));
51
+ }
52
+ concatContentPart(other, targetWindow) {
53
+ return ( new CellPartsCollection(targetWindow, this.contentParts.concat(other), this.overlayParts));
54
+ }
55
+ concatOverlayPart(other, targetWindow) {
56
+ return ( new CellPartsCollection(targetWindow, this.contentParts, this.overlayParts.concat(other)));
57
+ }
58
+ scheduleRenderCell(element) {
59
+ for (const part of this.contentParts) {
60
+ part.prepareRenderCell(element);
61
+ }
62
+ for (const part of this.overlayParts) {
63
+ part.prepareRenderCell(element);
64
+ }
65
+ for (const part of this.contentParts) {
66
+ part.renderCell(element);
67
+ }
68
+ this._scheduledOverlayRendering.value = dom.modify(this.targetWindow, () => {
69
+ for (const part of this.overlayParts) {
70
+ part.renderCell(element);
71
+ }
72
+ });
73
+ }
74
+ unrenderCell(element) {
75
+ for (const part of this.contentParts) {
76
+ part.unrenderCell(element);
77
+ }
78
+ this._scheduledOverlayRendering.value = undefined;
79
+ this._scheduledOverlayUpdateState.value = undefined;
80
+ this._scheduledOverlayUpdateExecutionState.value = undefined;
81
+ for (const part of this.overlayParts) {
82
+ part.unrenderCell(element);
83
+ }
84
+ }
85
+ updateInternalLayoutNow(viewCell) {
86
+ for (const part of this.contentParts) {
87
+ part.updateInternalLayoutNow(viewCell);
88
+ }
89
+ for (const part of this.overlayParts) {
90
+ part.updateInternalLayoutNow(viewCell);
91
+ }
92
+ }
93
+ prepareLayout() {
94
+ for (const part of this.contentParts) {
95
+ part.prepareLayout();
96
+ }
97
+ }
98
+ updateState(viewCell, e) {
99
+ for (const part of this.contentParts) {
100
+ part.updateState(viewCell, e);
101
+ }
102
+ this._scheduledOverlayUpdateState.value = dom.modify(this.targetWindow, () => {
103
+ for (const part of this.overlayParts) {
104
+ part.updateState(viewCell, e);
105
+ }
106
+ });
107
+ }
108
+ updateForExecutionState(viewCell, e) {
109
+ for (const part of this.contentParts) {
110
+ part.updateForExecutionState(viewCell, e);
111
+ }
112
+ this._scheduledOverlayUpdateExecutionState.value = dom.modify(this.targetWindow, () => {
113
+ for (const part of this.overlayParts) {
114
+ part.updateForExecutionState(viewCell, e);
115
+ }
116
+ });
117
+ }
118
+ }
119
+ export { CellContentPart, CellOverlayPart, CellPartsCollection };
@@ -0,0 +1,27 @@
1
+ import { renderLabelWithIcons } from 'monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabels.js';
2
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
3
+ import { MenuEntryActionViewItem } from 'monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js';
4
+ class CodiconActionViewItem extends MenuEntryActionViewItem {
5
+ updateLabel() {
6
+ if (this.options.label && this.label) {
7
+ dom.reset(this.label, ...renderLabelWithIcons(this._commandAction.label ?? ''));
8
+ }
9
+ }
10
+ }
11
+ class ActionViewWithLabel extends MenuEntryActionViewItem {
12
+ render(container) {
13
+ super.render(container);
14
+ container.classList.add('notebook-action-view-item');
15
+ this._actionLabel = document.createElement('a');
16
+ container.appendChild(this._actionLabel);
17
+ this.updateLabel();
18
+ }
19
+ updateLabel() {
20
+ if (this._actionLabel) {
21
+ this._actionLabel.classList.add('notebook-label');
22
+ this._actionLabel.innerText = this._action.label;
23
+ this._actionLabel.title = this._action.tooltip.length ? this._action.tooltip : this._action.label;
24
+ }
25
+ }
26
+ }
27
+ export { ActionViewWithLabel, CodiconActionViewItem };
@@ -0,0 +1,135 @@
1
+ import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
2
+ import { coalesce } from 'monaco-editor/esm/vs/base/common/arrays.js';
3
+ import { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
4
+ import { EDITOR_FONT_DEFAULTS } from 'monaco-editor/esm/vs/editor/common/config/editorOptions.js';
5
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
6
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
7
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
8
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
9
+ import { ICommentService } from '../../../../comments/browser/commentService.js';
10
+ import { CommentThreadWidget } from '../../../../comments/browser/commentThreadWidget.js';
11
+ import { CellContentPart } from '../cellPart.js';
12
+ import { CellKind } from '../../../common/notebookCommon.js';
13
+ let CellComments = class CellComments extends CellContentPart {
14
+ constructor(notebookEditor, container, contextKeyService, themeService, commentService, configurationService, instantiationService) {
15
+ super();
16
+ this.notebookEditor = notebookEditor;
17
+ this.container = container;
18
+ this.contextKeyService = contextKeyService;
19
+ this.themeService = themeService;
20
+ this.commentService = commentService;
21
+ this.configurationService = configurationService;
22
+ this.instantiationService = instantiationService;
23
+ this._initialized = false;
24
+ this._commentThreadWidget = null;
25
+ this.commentTheadDisposables = this._register(( new DisposableStore()));
26
+ this.container.classList.add('review-widget');
27
+ this._register(this.themeService.onDidColorThemeChange(this._applyTheme, this));
28
+ this._applyTheme();
29
+ }
30
+ async initialize(element) {
31
+ if (this._initialized) {
32
+ return;
33
+ }
34
+ this._initialized = true;
35
+ const info = await this._getCommentThreadForCell(element);
36
+ if (info) {
37
+ this._createCommentTheadWidget(info.owner, info.thread);
38
+ }
39
+ }
40
+ _createCommentTheadWidget(owner, commentThread) {
41
+ this._commentThreadWidget?.dispose();
42
+ this.commentTheadDisposables.clear();
43
+ this._commentThreadWidget = this.instantiationService.createInstance(CommentThreadWidget, this.container, this.notebookEditor, owner, this.notebookEditor.textModel.uri, this.contextKeyService, this.instantiationService, commentThread, undefined, undefined, {
44
+ codeBlockFontFamily: this.configurationService.getValue('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily
45
+ }, undefined, {
46
+ actionRunner: () => {
47
+ },
48
+ collapse: () => { }
49
+ });
50
+ const layoutInfo = this.notebookEditor.getLayoutInfo();
51
+ this._commentThreadWidget.display(layoutInfo.fontInfo.lineHeight);
52
+ this._applyTheme();
53
+ this.commentTheadDisposables.add(this._commentThreadWidget.onDidResize(() => {
54
+ if (this.currentElement?.cellKind === CellKind.Code && this._commentThreadWidget) {
55
+ this.currentElement.commentHeight = this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height);
56
+ }
57
+ }));
58
+ }
59
+ _bindListeners() {
60
+ this.cellDisposables.add(this.commentService.onDidUpdateCommentThreads(async () => {
61
+ if (this.currentElement) {
62
+ const info = await this._getCommentThreadForCell(this.currentElement);
63
+ if (!this._commentThreadWidget && info) {
64
+ this._createCommentTheadWidget(info.owner, info.thread);
65
+ const layoutInfo = this.currentElement.layoutInfo;
66
+ this.container.style.top = `${layoutInfo.outputContainerOffset + layoutInfo.outputTotalHeight}px`;
67
+ this.currentElement.commentHeight = this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height);
68
+ return;
69
+ }
70
+ if (this._commentThreadWidget) {
71
+ if (!info) {
72
+ this._commentThreadWidget.dispose();
73
+ this.currentElement.commentHeight = 0;
74
+ return;
75
+ }
76
+ if (this._commentThreadWidget.commentThread === info.thread) {
77
+ this.currentElement.commentHeight = this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height);
78
+ return;
79
+ }
80
+ this._commentThreadWidget.updateCommentThread(info.thread);
81
+ this.currentElement.commentHeight = this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height);
82
+ }
83
+ }
84
+ }));
85
+ }
86
+ _calculateCommentThreadHeight(bodyHeight) {
87
+ const layoutInfo = this.notebookEditor.getLayoutInfo();
88
+ const headHeight = Math.ceil(layoutInfo.fontInfo.lineHeight * 1.2);
89
+ const lineHeight = layoutInfo.fontInfo.lineHeight;
90
+ const arrowHeight = Math.round(lineHeight / 3);
91
+ const frameThickness = Math.round(lineHeight / 9) * 2;
92
+ const computedHeight = headHeight + bodyHeight + arrowHeight + frameThickness + 8 ;
93
+ return computedHeight;
94
+ }
95
+ async _getCommentThreadForCell(element) {
96
+ if (this.notebookEditor.hasModel()) {
97
+ const commentInfos = coalesce(await this.commentService.getNotebookComments(element.uri));
98
+ if (commentInfos.length && commentInfos[0].threads.length) {
99
+ return { owner: commentInfos[0].owner, thread: commentInfos[0].threads[0] };
100
+ }
101
+ }
102
+ return null;
103
+ }
104
+ _applyTheme() {
105
+ const theme = this.themeService.getColorTheme();
106
+ const fontInfo = this.notebookEditor.getLayoutInfo().fontInfo;
107
+ this._commentThreadWidget?.applyTheme(theme, fontInfo);
108
+ }
109
+ didRenderCell(element) {
110
+ if (element.cellKind === CellKind.Code) {
111
+ this.currentElement = element;
112
+ this.initialize(element);
113
+ this._bindListeners();
114
+ }
115
+ }
116
+ prepareLayout() {
117
+ if (this.currentElement?.cellKind === CellKind.Code && this._commentThreadWidget) {
118
+ this.currentElement.commentHeight = this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height);
119
+ }
120
+ }
121
+ updateInternalLayoutNow(element) {
122
+ if (this.currentElement?.cellKind === CellKind.Code && this._commentThreadWidget) {
123
+ const layoutInfo = element.layoutInfo;
124
+ this.container.style.top = `${layoutInfo.outputContainerOffset + layoutInfo.outputTotalHeight}px`;
125
+ }
126
+ }
127
+ };
128
+ CellComments = ( __decorate([
129
+ ( __param(2, IContextKeyService)),
130
+ ( __param(3, IThemeService)),
131
+ ( __param(4, ICommentService)),
132
+ ( __param(5, IConfigurationService)),
133
+ ( __param(6, IInstantiationService))
134
+ ], CellComments));
135
+ export { CellComments };
@@ -0,0 +1,178 @@
1
+ import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
2
+ import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
3
+ import { IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
4
+ import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
5
+ import { CellFocusMode, CellEditState } from '../../notebookBrowser.js';
6
+ import { CellContentPart } from '../cellPart.js';
7
+ import { CodeCellViewModel } from '../../viewModel/codeCellViewModel.js';
8
+ import { MarkupCellViewModel } from '../../viewModel/markupCellViewModel.js';
9
+ import { NotebookCellExecutionState } from '../../../common/notebookCommon.js';
10
+ import { NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_CELL_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CELL_EXECUTION_STATE, NOTEBOOK_CELL_EXECUTING, NOTEBOOK_CELL_HAS_OUTPUTS, NOTEBOOK_CELL_INPUT_COLLAPSED, NOTEBOOK_CELL_OUTPUT_COLLAPSED, NOTEBOOK_CELL_LINE_NUMBERS, NOTEBOOK_CELL_RESOURCE } from '../../../common/notebookContextKeys.js';
11
+ import { NotebookExecutionType, INotebookExecutionStateService } from '../../../common/notebookExecutionStateService.js';
12
+ let CellContextKeyPart = class CellContextKeyPart extends CellContentPart {
13
+ constructor(notebookEditor, instantiationService) {
14
+ super();
15
+ this.instantiationService = instantiationService;
16
+ this.cellContextKeyManager = this._register(this.instantiationService.createInstance(CellContextKeyManager, notebookEditor, undefined));
17
+ }
18
+ didRenderCell(element) {
19
+ this.cellContextKeyManager.updateForElement(element);
20
+ }
21
+ };
22
+ CellContextKeyPart = ( __decorate([
23
+ ( __param(1, IInstantiationService))
24
+ ], CellContextKeyPart));
25
+ let CellContextKeyManager = class CellContextKeyManager extends Disposable {
26
+ constructor(notebookEditor, element, _contextKeyService, _notebookExecutionStateService) {
27
+ super();
28
+ this.notebookEditor = notebookEditor;
29
+ this.element = element;
30
+ this._contextKeyService = _contextKeyService;
31
+ this._notebookExecutionStateService = _notebookExecutionStateService;
32
+ this.elementDisposables = this._register(( new DisposableStore()));
33
+ this._contextKeyService.bufferChangeEvents(() => {
34
+ this.cellType = NOTEBOOK_CELL_TYPE.bindTo(this._contextKeyService);
35
+ this.cellEditable = NOTEBOOK_CELL_EDITABLE.bindTo(this._contextKeyService);
36
+ this.cellFocused = NOTEBOOK_CELL_FOCUSED.bindTo(this._contextKeyService);
37
+ this.cellEditorFocused = NOTEBOOK_CELL_EDITOR_FOCUSED.bindTo(this._contextKeyService);
38
+ this.markdownEditMode = NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.bindTo(this._contextKeyService);
39
+ this.cellRunState = NOTEBOOK_CELL_EXECUTION_STATE.bindTo(this._contextKeyService);
40
+ this.cellExecuting = NOTEBOOK_CELL_EXECUTING.bindTo(this._contextKeyService);
41
+ this.cellHasOutputs = NOTEBOOK_CELL_HAS_OUTPUTS.bindTo(this._contextKeyService);
42
+ this.cellContentCollapsed = NOTEBOOK_CELL_INPUT_COLLAPSED.bindTo(this._contextKeyService);
43
+ this.cellOutputCollapsed = NOTEBOOK_CELL_OUTPUT_COLLAPSED.bindTo(this._contextKeyService);
44
+ this.cellLineNumbers = NOTEBOOK_CELL_LINE_NUMBERS.bindTo(this._contextKeyService);
45
+ this.cellResource = NOTEBOOK_CELL_RESOURCE.bindTo(this._contextKeyService);
46
+ if (element) {
47
+ this.updateForElement(element);
48
+ }
49
+ });
50
+ this._register(this._notebookExecutionStateService.onDidChangeExecution(e => {
51
+ if (e.type === NotebookExecutionType.cell && this.element && e.affectsCell(this.element.uri)) {
52
+ this.updateForExecutionState();
53
+ }
54
+ }));
55
+ }
56
+ updateForElement(element) {
57
+ this.elementDisposables.clear();
58
+ this.element = element;
59
+ if (!element) {
60
+ return;
61
+ }
62
+ this.elementDisposables.add(element.onDidChangeState(e => this.onDidChangeState(e)));
63
+ if (element instanceof CodeCellViewModel) {
64
+ this.elementDisposables.add(element.onDidChangeOutputs(() => this.updateForOutputs()));
65
+ }
66
+ this.elementDisposables.add(this.notebookEditor.onDidChangeActiveCell(() => this.updateForFocusState()));
67
+ if (this.element instanceof MarkupCellViewModel) {
68
+ this.cellType.set('markup');
69
+ }
70
+ else if (this.element instanceof CodeCellViewModel) {
71
+ this.cellType.set('code');
72
+ }
73
+ this._contextKeyService.bufferChangeEvents(() => {
74
+ this.updateForFocusState();
75
+ this.updateForExecutionState();
76
+ this.updateForEditState();
77
+ this.updateForCollapseState();
78
+ this.updateForOutputs();
79
+ this.cellLineNumbers.set(this.element.lineNumbers);
80
+ this.cellResource.set(( this.element.uri.toString()));
81
+ });
82
+ }
83
+ onDidChangeState(e) {
84
+ this._contextKeyService.bufferChangeEvents(() => {
85
+ if (e.internalMetadataChanged) {
86
+ this.updateForExecutionState();
87
+ }
88
+ if (e.editStateChanged) {
89
+ this.updateForEditState();
90
+ }
91
+ if (e.focusModeChanged) {
92
+ this.updateForFocusState();
93
+ }
94
+ if (e.cellLineNumberChanged) {
95
+ this.cellLineNumbers.set(this.element.lineNumbers);
96
+ }
97
+ if (e.inputCollapsedChanged || e.outputCollapsedChanged) {
98
+ this.updateForCollapseState();
99
+ }
100
+ });
101
+ }
102
+ updateForFocusState() {
103
+ if (!this.element) {
104
+ return;
105
+ }
106
+ const activeCell = this.notebookEditor.getActiveCell();
107
+ this.cellFocused.set(this.notebookEditor.getActiveCell() === this.element);
108
+ if (activeCell === this.element) {
109
+ this.cellEditorFocused.set(this.element.focusMode === CellFocusMode.Editor);
110
+ }
111
+ else {
112
+ this.cellEditorFocused.set(false);
113
+ }
114
+ }
115
+ updateForExecutionState() {
116
+ if (!this.element) {
117
+ return;
118
+ }
119
+ const internalMetadata = this.element.internalMetadata;
120
+ this.cellEditable.set(!this.notebookEditor.isReadOnly);
121
+ const exeState = this._notebookExecutionStateService.getCellExecution(this.element.uri);
122
+ if (this.element instanceof MarkupCellViewModel) {
123
+ this.cellRunState.reset();
124
+ this.cellExecuting.reset();
125
+ }
126
+ else if (exeState?.state === NotebookCellExecutionState.Executing) {
127
+ this.cellRunState.set('executing');
128
+ this.cellExecuting.set(true);
129
+ }
130
+ else if (exeState?.state === NotebookCellExecutionState.Pending || exeState?.state === NotebookCellExecutionState.Unconfirmed) {
131
+ this.cellRunState.set('pending');
132
+ this.cellExecuting.set(true);
133
+ }
134
+ else if (internalMetadata.lastRunSuccess === true) {
135
+ this.cellRunState.set('succeeded');
136
+ this.cellExecuting.set(false);
137
+ }
138
+ else if (internalMetadata.lastRunSuccess === false) {
139
+ this.cellRunState.set('failed');
140
+ this.cellExecuting.set(false);
141
+ }
142
+ else {
143
+ this.cellRunState.set('idle');
144
+ this.cellExecuting.set(false);
145
+ }
146
+ }
147
+ updateForEditState() {
148
+ if (!this.element) {
149
+ return;
150
+ }
151
+ if (this.element instanceof MarkupCellViewModel) {
152
+ this.markdownEditMode.set(this.element.getEditState() === CellEditState.Editing);
153
+ }
154
+ else {
155
+ this.markdownEditMode.set(false);
156
+ }
157
+ }
158
+ updateForCollapseState() {
159
+ if (!this.element) {
160
+ return;
161
+ }
162
+ this.cellContentCollapsed.set(!!this.element.isInputCollapsed);
163
+ this.cellOutputCollapsed.set(!!this.element.isOutputCollapsed);
164
+ }
165
+ updateForOutputs() {
166
+ if (this.element instanceof CodeCellViewModel) {
167
+ this.cellHasOutputs.set(this.element.outputsViewModels.length > 0);
168
+ }
169
+ else {
170
+ this.cellHasOutputs.set(false);
171
+ }
172
+ }
173
+ };
174
+ CellContextKeyManager = ( __decorate([
175
+ ( __param(2, IContextKeyService)),
176
+ ( __param(3, INotebookExecutionStateService))
177
+ ], CellContextKeyManager));
178
+ export { CellContextKeyManager, CellContextKeyPart };
@@ -0,0 +1,35 @@
1
+ import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
2
+ import { CellContentPart } from '../cellPart.js';
3
+ class CellDecorations extends CellContentPart {
4
+ constructor(rootContainer, decorationContainer) {
5
+ super();
6
+ this.rootContainer = rootContainer;
7
+ this.decorationContainer = decorationContainer;
8
+ }
9
+ didRenderCell(element) {
10
+ const removedClassNames = [];
11
+ this.rootContainer.classList.forEach(className => {
12
+ if (/^nb\-.*$/.test(className)) {
13
+ removedClassNames.push(className);
14
+ }
15
+ });
16
+ removedClassNames.forEach(className => {
17
+ this.rootContainer.classList.remove(className);
18
+ });
19
+ this.decorationContainer.innerText = '';
20
+ const generateCellTopDecorations = () => {
21
+ this.decorationContainer.innerText = '';
22
+ element.getCellDecorations().filter(options => options.topClassName !== undefined).forEach(options => {
23
+ this.decorationContainer.append(dom.$(`.${options.topClassName}`));
24
+ });
25
+ };
26
+ this.cellDisposables.add(element.onCellDecorationsChanged((e) => {
27
+ const modified = e.added.find(e => e.topClassName) || e.removed.find(e => e.topClassName);
28
+ if (modified) {
29
+ generateCellTopDecorations();
30
+ }
31
+ }));
32
+ generateCellTopDecorations();
33
+ }
34
+ }
35
+ export { CellDecorations };