@codingame/monaco-vscode-api 37.1.0 → 37.2.0

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 (313) hide show
  1. package/missing-services.js +6 -26
  2. package/package.json +8 -8
  3. package/services.d.ts +1 -1
  4. package/services.js +3 -3
  5. package/tools.d.ts +4 -0
  6. package/tools.js +24 -1
  7. package/vscode/src/vs/platform/product/common/product.js +1 -1
  8. package/vscode/src/vs/platform/webWorker/browser/webWorkerServiceImpl.js +2 -2
  9. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +63 -0
  10. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +305 -0
  11. package/vscode/src/vs/workbench/api/common/extHost.protocol.d.ts +2 -2
  12. package/vscode/src/vs/workbench/api/common/extHostLanguageModelTools.js +1 -2
  13. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +1 -1
  14. package/vscode/src/vs/workbench/browser/media/code-icon.svg +1 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.d.ts +1 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatConstants.js +2 -1
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentPluginActions.d.ts +2 -2
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostActiveClientService.service.d.ts +1 -1
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.d.ts +30 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsBanner.js +39 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsService.service.d.ts +1 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/experiments/agentSessionProjectionService.service.d.ts +1 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chat.d.ts +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.service.d.ts +1 -1
  25. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariableEntries.d.ts +1 -1
  26. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.service.d.ts +1 -1
  27. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.service.d.ts +1 -1
  28. package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.d.ts +1 -0
  29. package/vscode/src/vs/workbench/contrib/chat/common/chatImageBuffer.js +29 -0
  30. package/vscode/src/vs/workbench/contrib/chat/common/chatService/chatService.d.ts +2 -2
  31. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.service.d.ts +1 -1
  32. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.d.ts +1 -1
  33. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginRepositoryService.service.d.ts +2 -2
  34. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.service.d.ts +1 -1
  35. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.d.ts +1 -1
  36. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service.d.ts +1 -1
  37. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.service.d.ts +2 -2
  38. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginSource.d.ts +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatParserTypes.d.ts +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.d.ts +3 -0
  41. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolIds.js +7 -0
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookBrowser.d.ts +3 -3
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service.d.ts +1 -1
  44. package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.d.ts +1 -1
  45. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.d.ts +1 -1
  46. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.d.ts +1 -1
  47. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionService.service.d.ts +1 -1
  48. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service.d.ts +1 -1
  49. package/vscode/src/vs/workbench/contrib/notebook/common/notebookService.service.d.ts +1 -1
  50. package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.d.ts +1 -1
  51. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts +1 -1
  52. package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase.d.ts +1 -1
  53. package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.d.ts +1 -1
  54. package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon.d.ts +1 -1
  55. package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +4 -3
  56. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.d.ts +34 -0
  57. package/vscode/src/vs/workbench/contrib/welcomeAgentSessions/browser/agentSessionsWelcomeInput.js +72 -0
  58. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.d.ts +44 -0
  59. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput.js +96 -0
  60. package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/media/gettingStarted.css +1148 -0
  61. package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.d.ts +81 -0
  62. package/vscode/src/vs/workbench/contrib/welcomeOnboarding/common/onboardingTypes.js +97 -0
  63. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
  64. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +45 -0
  65. package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.d.ts +0 -7
  66. package/vscode/src/vs/platform/agentHost/common/agentHostEnablementService.js +0 -92
  67. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.d.ts +0 -12
  68. package/vscode/src/vs/platform/layout/browser/zIndexRegistry.js +0 -64
  69. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.d.ts +0 -262
  70. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.js +0 -865
  71. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.d.ts +0 -57
  72. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatDynamicVariables.js +0 -311
  73. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.d.ts +0 -15
  74. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatVariables.js +0 -80
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.d.ts +0 -2
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionDescription.js +0 -57
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -231
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1850
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.d.ts +0 -109
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup/chatSetup.js +0 -85
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +0 -140
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.js +0 -186
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.d.ts +0 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatDynamicVariablesConstant.js +0 -5
  85. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.d.ts +0 -46
  86. package/vscode/src/vs/workbench/contrib/chat/common/attachments/chatVariables.js +0 -17
  87. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.d.ts +0 -253
  88. package/vscode/src/vs/workbench/contrib/chat/common/chatDebugService.js +0 -20
  89. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +0 -34
  90. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +0 -194
  91. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.d.ts +0 -87
  92. package/vscode/src/vs/workbench/contrib/chat/common/chatSelectedModel.js +0 -69
  93. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.d.ts +0 -300
  94. package/vscode/src/vs/workbench/contrib/chat/common/customizationHarnessService.js +0 -272
  95. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.d.ts +0 -25
  96. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginEnablement.js +0 -178
  97. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.d.ts +0 -78
  98. package/vscode/src/vs/workbench/contrib/chat/common/plugins/agentPluginService.js +0 -51
  99. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.d.ts +0 -67
  100. package/vscode/src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.js +0 -195
  101. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.d.ts +0 -67
  102. package/vscode/src/vs/workbench/contrib/chat/common/plugins/marketplaceReference.js +0 -294
  103. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.d.ts +0 -212
  104. package/vscode/src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.js +0 -955
  105. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.d.ts +0 -31
  106. package/vscode/src/vs/workbench/contrib/chat/common/plugins/strictKnownMarketplaces.js +0 -122
  107. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +0 -65
  108. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +0 -697
  109. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.d.ts +0 -150
  110. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/config/config.js +0 -142
  111. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.d.ts +0 -50
  112. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookClaudeCompat.js +0 -77
  113. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.d.ts +0 -77
  114. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCompatibility.js +0 -120
  115. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.d.ts +0 -10
  116. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/hookCopilotCliCompat.js +0 -23
  117. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.d.ts +0 -92
  118. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/extensionPromptFileService.js +0 -335
  119. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.d.ts +0 -235
  120. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +0 -1673
  121. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.d.ts +0 -202
  122. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.js +0 -872
  123. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.d.ts +0 -35
  124. package/vscode/src/vs/workbench/contrib/chat/common/requestParser/chatRequestParser.js +0 -289
  125. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.d.ts +0 -72
  126. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/askQuestionsTool.js +0 -600
  127. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.d.ts +0 -36
  128. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/confirmationTool.js +0 -239
  129. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.d.ts +0 -22
  130. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/editFileTool.js +0 -143
  131. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.d.ts +0 -24
  132. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/manageTodoListTool.js +0 -298
  133. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.d.ts +0 -25
  134. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/reviewPlanTool.js +0 -177
  135. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.d.ts +0 -73
  136. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.js +0 -577
  137. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.d.ts +0 -11
  138. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactRulesTool.js +0 -90
  139. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.d.ts +0 -16
  140. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/setArtifactsTool.js +0 -130
  141. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.d.ts +0 -12
  142. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/taskCompleteTool.js +0 -53
  143. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.d.ts +0 -5
  144. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/toolHelpers.js +0 -12
  145. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.d.ts +0 -10
  146. package/vscode/src/vs/workbench/contrib/chat/common/tools/builtinTools/tools.js +0 -92
  147. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.d.ts +0 -38
  148. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +0 -518
  149. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.d.ts +0 -6
  150. package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsParametersSchema.js +0 -231
  151. package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.d.ts +0 -20
  152. package/vscode/src/vs/workbench/contrib/chat/common/tools/terminalToolIds.js +0 -17
  153. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.d.ts +0 -6
  154. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +0 -283
  155. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.d.ts +0 -91
  156. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +0 -340
  157. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.d.ts +0 -17
  158. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +0 -272
  159. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebook.css +0 -686
  160. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css +0 -348
  161. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellEditorHint.css +0 -8
  162. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellInsertToolbar.css +0 -92
  163. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellOutput.css +0 -119
  164. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellStatusBar.css +0 -79
  165. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellTitleToolbar.css +0 -61
  166. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditController.css +0 -55
  167. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookChatEditorOverlay.css +0 -63
  168. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookDnd.css +0 -79
  169. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css +0 -63
  170. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFocusIndicator.css +0 -92
  171. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookFolding.css +0 -79
  172. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookKernelActionViewItem.css +0 -24
  173. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookOutline.css +0 -61
  174. package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookToolbar.css +0 -102
  175. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.d.ts +0 -27
  176. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +0 -131
  177. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.d.ts +0 -18
  178. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookCellLayoutManager.js +0 -92
  179. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.d.ts +0 -105
  180. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +0 -673
  181. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.d.ts +0 -9
  182. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorExtensions.js +0 -37
  183. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.d.ts +0 -354
  184. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +0 -2926
  185. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.d.ts +0 -29
  186. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookIcons.js +0 -36
  187. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.d.ts +0 -1
  188. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookLogger.js +0 -19
  189. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.d.ts +0 -200
  190. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +0 -591
  191. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.d.ts +0 -56
  192. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookViewEvents.js +0 -30
  193. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.d.ts +0 -99
  194. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +0 -131
  195. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.d.ts +0 -30
  196. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +0 -115
  197. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.d.ts +0 -28
  198. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +0 -158
  199. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.d.ts +0 -40
  200. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellContextKeys.js +0 -183
  201. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.d.ts +0 -10
  202. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations.js +0 -66
  203. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.d.ts +0 -52
  204. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDnd.js +0 -429
  205. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.d.ts +0 -6
  206. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer.js +0 -108
  207. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.d.ts +0 -36
  208. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +0 -221
  209. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.d.ts +0 -17
  210. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellExecution.js +0 -142
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.d.ts +0 -5
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus.js +0 -23
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.d.ts +0 -18
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellFocusIndicator.js +0 -104
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.d.ts +0 -92
  216. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput.js +0 -762
  217. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.d.ts +0 -15
  218. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar.js +0 -58
  219. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.d.ts +0 -36
  220. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +0 -357
  221. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.d.ts +0 -6
  222. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +0 -32
  223. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.d.ts +0 -47
  224. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +0 -260
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.d.ts +0 -9
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellWidgets.js +0 -10
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.d.ts +0 -10
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatPart.js +0 -24
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.d.ts +0 -182
  230. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +0 -796
  231. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.d.ts +0 -13
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +0 -79
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.d.ts +0 -30
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar.js +0 -126
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.d.ts +0 -6
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput.js +0 -32
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.d.ts +0 -8
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput.js +0 -50
  239. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.d.ts +0 -18
  240. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +0 -119
  241. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.d.ts +0 -57
  242. package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/markupCell.js +0 -443
  243. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.d.ts +0 -20
  244. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +0 -56
  245. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.d.ts +0 -24
  246. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellEditorPool.js +0 -121
  247. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.d.ts +0 -152
  248. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +0 -1288
  249. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.d.ts +0 -59
  250. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellListView.js +0 -287
  251. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.d.ts +0 -117
  252. package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookRenderingCommon.js +0 -6
  253. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.d.ts +0 -222
  254. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +0 -1840
  255. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.d.ts +0 -63
  256. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer.js +0 -449
  257. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewMessages.d.ts +0 -432
  258. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.d.ts +0 -18
  259. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +0 -2546
  260. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.d.ts +0 -8
  261. package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping.js +0 -105
  262. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.d.ts +0 -137
  263. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +0 -646
  264. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.d.ts +0 -21
  265. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +0 -101
  266. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.d.ts +0 -13
  267. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper.js +0 -111
  268. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.d.ts +0 -30
  269. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellOutputViewModel.js +0 -65
  270. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.d.ts +0 -13
  271. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellSelectionCollection.js +0 -49
  272. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.d.ts +0 -89
  273. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel.js +0 -472
  274. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.d.ts +0 -11
  275. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/eventDispatcher.js +0 -34
  276. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.d.ts +0 -33
  277. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +0 -275
  278. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.d.ts +0 -69
  279. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel.js +0 -269
  280. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.d.ts +0 -125
  281. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +0 -958
  282. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.d.ts +0 -9
  283. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/viewContext.js +0 -11
  284. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.d.ts +0 -20
  285. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookCellOverlays.js +0 -101
  286. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.d.ts +0 -65
  287. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +0 -458
  288. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.d.ts +0 -80
  289. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +0 -708
  290. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.d.ts +0 -37
  291. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorWidgetContextKeys.js +0 -193
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.d.ts +0 -7
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookHorizontalTracker.js +0 -62
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.d.ts +0 -108
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelQuickPickStrategy.js +0 -717
  296. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.d.ts +0 -23
  297. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +0 -183
  298. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.d.ts +0 -11
  299. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookOverviewRuler.js +0 -134
  300. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.d.ts +0 -20
  301. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookTopCellToolbar.js +0 -135
  302. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.d.ts +0 -27
  303. package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookViewZones.js +0 -213
  304. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.d.ts +0 -27
  305. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel.js +0 -104
  306. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.d.ts +0 -115
  307. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +0 -480
  308. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.d.ts +0 -87
  309. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +0 -352
  310. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.d.ts +0 -81
  311. package/vscode/src/vs/workbench/contrib/notebook/common/notebookExecutionStateService.js +0 -9
  312. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.d.ts +0 -10
  313. package/vscode/src/vs/workbench/contrib/notebook/common/notebookPerformance.js +0 -19
@@ -1,673 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
3
- import { append, $, isAncestorOfActiveElement, setParentFlowTo } from '../../../../base/browser/dom.js';
4
- import { toAction } from '../../../../base/common/actions.js';
5
- import { timeout } from '../../../../base/common/async.js';
6
- import { isWeb } from '../../../../base/common/platform.js';
7
- import { Emitter } from '../../../../base/common/event.js';
8
- import { DisposableStore, MutableDisposable } from '../../../../base/common/lifecycle.js';
9
- import { extname, isEqual } from '../../../../base/common/resources.js';
10
- import { generateUuid } from '../../../../base/common/uuid.js';
11
- import { ITextResourceConfigurationService } from '../../../../editor/common/services/textResourceConfiguration.service.js';
12
- import { localize } from '../../../../nls.js';
13
- import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
14
- import { IDialogService } from '../../../../platform/dialogs/common/dialogs.service.js';
15
- import { FileOperationResult, TooLargeFileOperationError, ByteSize } from '../../../../platform/files/common/files.js';
16
- import { IFileService } from '../../../../platform/files/common/files.service.js';
17
- import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
18
- import { StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';
19
- import { IStorageService } from '../../../../platform/storage/common/storage.service.js';
20
- import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.service.js';
21
- import { IThemeService } from '../../../../platform/theme/common/themeService.service.js';
22
- import { EditorPane } from '../../../browser/parts/editor/editorPane.js';
23
- import { createEditorOpenError, DEFAULT_EDITOR_ASSOCIATION, EditorPaneSelectionChangeReason, isEditorOpenError, createTooLargeFileError, EditorResourceAccessor, EditorPaneSelectionCompareResult } from '../../../common/editor.js';
24
- import { SELECT_KERNEL_ID } from './controller/coreActions.js';
25
- import { INotebookEditorService } from './services/notebookEditorService.service.js';
26
- import { NotebooKernelActionViewItem } from './viewParts/notebookKernelView.js';
27
- import { NOTEBOOK_EDITOR_ID, NotebookWorkingCopyTypeIdentifier, CellKind } from '../common/notebookCommon.js';
28
- import { NotebookEditorInput } from '../common/notebookEditorInput.js';
29
- import { NotebookPerfMarks } from '../common/notebookPerformance.js';
30
- import { GroupsOrder } from '../../../services/editor/common/editorGroupsService.js';
31
- import { IEditorGroupsService } from '../../../services/editor/common/editorGroupsService.service.js';
32
- import { IEditorService } from '../../../services/editor/common/editorService.service.js';
33
- import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.service.js';
34
- import { IEditorProgressService } from '../../../../platform/progress/common/progress.service.js';
35
- import { InstallRecommendedExtensionAction } from '../../extensions/browser/extensionsActions.js';
36
- import { INotebookService } from '../common/notebookService.service.js';
37
- import { IExtensionsWorkbenchService } from '../../extensions/common/extensions.service.js';
38
- import { EnablementState } from '../../../services/extensionManagement/common/extensionManagement.js';
39
- import { IWorkingCopyBackupService } from '../../../services/workingCopy/common/workingCopyBackup.service.js';
40
- import { streamToBuffer } from '../../../../base/common/buffer.js';
41
- import { ILogService } from '../../../../platform/log/common/log.service.js';
42
- import { IPreferencesService } from '../../../services/preferences/common/preferences.service.js';
43
- import { StopWatch } from '../../../../base/common/stopwatch.js';
44
-
45
- var NotebookEditor_1;
46
- const NOTEBOOK_EDITOR_VIEW_STATE_PREFERENCE_KEY = "NotebookEditorViewState";
47
- const NOTEBOOK_WEB_HOST_OPEN_CONFIRMED_KEY = "notebook.webHost.openConfirmed";
48
- const confirmedWebHostNotebooks = ( new Set());
49
- let NotebookEditor = class NotebookEditor extends EditorPane {
50
- static {
51
- NotebookEditor_1 = this;
52
- }
53
- static {
54
- this.ID = NOTEBOOK_EDITOR_ID;
55
- }
56
- get onDidFocus() {
57
- return this._onDidFocusWidget.event;
58
- }
59
- get onDidBlur() {
60
- return this._onDidBlurWidget.event;
61
- }
62
- constructor(
63
- group,
64
- telemetryService,
65
- themeService,
66
- _instantiationService,
67
- _storageService,
68
- _editorService,
69
- _editorGroupService,
70
- _notebookWidgetService,
71
- _contextKeyService,
72
- _fileService,
73
- configurationService,
74
- _editorProgressService,
75
- _notebookService,
76
- _extensionsWorkbenchService,
77
- _workingCopyBackupService,
78
- logService,
79
- _preferencesService,
80
- _dialogService,
81
- _environmentService
82
- ) {
83
- super(
84
- NotebookEditor_1.ID,
85
- group,
86
- telemetryService,
87
- themeService,
88
- _storageService
89
- );
90
- this._instantiationService = _instantiationService;
91
- this._storageService = _storageService;
92
- this._editorService = _editorService;
93
- this._editorGroupService = _editorGroupService;
94
- this._notebookWidgetService = _notebookWidgetService;
95
- this._contextKeyService = _contextKeyService;
96
- this._fileService = _fileService;
97
- this._editorProgressService = _editorProgressService;
98
- this._notebookService = _notebookService;
99
- this._extensionsWorkbenchService = _extensionsWorkbenchService;
100
- this._workingCopyBackupService = _workingCopyBackupService;
101
- this.logService = logService;
102
- this._preferencesService = _preferencesService;
103
- this._dialogService = _dialogService;
104
- this._environmentService = _environmentService;
105
- this._groupListener = this._register(( new DisposableStore()));
106
- this._widgetDisposableStore = this._register(( new DisposableStore()));
107
- this._widget = {
108
- value: undefined
109
- };
110
- this._inputListener = this._register(( new MutableDisposable()));
111
- this._onDidFocusWidget = this._register(( new Emitter()));
112
- this._onDidBlurWidget = this._register(( new Emitter()));
113
- this._onDidChangeModel = this._register(( new Emitter()));
114
- this.onDidChangeModel = this._onDidChangeModel.event;
115
- this._onDidChangeSelection = this._register(( new Emitter()));
116
- this.onDidChangeSelection = this._onDidChangeSelection.event;
117
- this._onDidChangeScroll = this._register(( new Emitter()));
118
- this.onDidChangeScroll = this._onDidChangeScroll.event;
119
- this._editorMemento = this.getEditorMemento(
120
- _editorGroupService,
121
- configurationService,
122
- NOTEBOOK_EDITOR_VIEW_STATE_PREFERENCE_KEY
123
- );
124
- this._register(
125
- this._fileService.onDidChangeFileSystemProviderCapabilities(e => this._onDidChangeFileSystemProvider(e.scheme))
126
- );
127
- this._register(
128
- this._fileService.onDidChangeFileSystemProviderRegistrations(e => this._onDidChangeFileSystemProvider(e.scheme))
129
- );
130
- }
131
- _onDidChangeFileSystemProvider(scheme) {
132
- if (this.input instanceof NotebookEditorInput && this.input.resource?.scheme === scheme) {
133
- this._updateReadonly(this.input);
134
- }
135
- }
136
- _onDidChangeInputCapabilities(input) {
137
- if (this.input === input) {
138
- this._updateReadonly(input);
139
- }
140
- }
141
- _updateReadonly(input) {
142
- this._widget.value?.setOptions({
143
- isReadOnly: !!input.isReadonly()
144
- });
145
- }
146
- get textModel() {
147
- return this._widget.value?.textModel;
148
- }
149
- get minimumWidth() {
150
- return 220;
151
- }
152
- get maximumWidth() {
153
- return Number.POSITIVE_INFINITY;
154
- }
155
- set minimumWidth(value) {}
156
- set maximumWidth(value) {}
157
- get scopedContextKeyService() {
158
- return this._widget.value?.scopedContextKeyService;
159
- }
160
- createEditor(parent) {
161
- this._rootElement = append(parent, $(".notebook-editor"));
162
- this._rootElement.id = `notebook-editor-element-${generateUuid()}`;
163
- }
164
- getActionViewItem(action, options) {
165
- if (action.id === SELECT_KERNEL_ID) {
166
- return this._register(
167
- this._instantiationService.createInstance(NotebooKernelActionViewItem, action, this, options)
168
- );
169
- }
170
- return undefined;
171
- }
172
- getControl() {
173
- return this._widget.value;
174
- }
175
- setVisible(visible) {
176
- super.setVisible(visible);
177
- if (!visible) {
178
- this._widget.value?.onWillHide();
179
- }
180
- }
181
- setEditorVisible(visible) {
182
- super.setEditorVisible(visible);
183
- this._groupListener.clear();
184
- this._groupListener.add(this.group.onWillCloseEditor(e => this._saveEditorViewState(e.editor)));
185
- this._groupListener.add(this.group.onDidModelChange(() => {
186
- if (this._editorGroupService.activeGroup !== this.group) {
187
- this._widget?.value?.updateEditorFocus();
188
- }
189
- }));
190
- if (!visible) {
191
- this._saveEditorViewState(this.input);
192
- if (this.input && this._widget.value) {
193
- this._widget.value.onWillHide();
194
- }
195
- }
196
- }
197
- focus() {
198
- super.focus();
199
- this._widget.value?.focus();
200
- }
201
- hasFocus() {
202
- const value = this._widget.value;
203
- if (!value) {
204
- return false;
205
- }
206
- return !!value && (isAncestorOfActiveElement(
207
- value.getDomNode() || isAncestorOfActiveElement(value.getOverflowContainerDomNode())
208
- ));
209
- }
210
- async _confirmOpenOnWebHost(input) {
211
- const isServerlessWeb = isWeb && !this._environmentService.remoteAuthority;
212
- if (!isServerlessWeb) {
213
- return;
214
- }
215
- if (this._storageService.getBoolean(NOTEBOOK_WEB_HOST_OPEN_CONFIRMED_KEY, StorageScope.WORKSPACE, false)) {
216
- return;
217
- }
218
- const resourceKey = ( input.resource.toString());
219
- if (( confirmedWebHostNotebooks.has(resourceKey))) {
220
- return;
221
- }
222
- const {
223
- confirmed,
224
- checkboxChecked
225
- } = await this._dialogService.confirm({
226
- type: "warning",
227
- message: ( localize(14708, "Do you trust the authors of this notebook?")),
228
- detail: ( localize(
229
- 14709,
230
- "Notebooks can run code that has access to your browser session, including any signed-in accounts. Only open notebooks from authors you trust."
231
- )),
232
- primaryButton: ( localize(14710, "Open Notebook")),
233
- checkbox: {
234
- label: ( localize(14711, "Don't ask me again"))
235
- }
236
- });
237
- if (!confirmed) {
238
- throw createEditorOpenError(( localize(14712, "The notebook was not opened because its authors are not trusted.")), [toAction({
239
- id: "workbench.notebook.action.openAsText",
240
- label: ( localize(14713, "Open As Text")),
241
- run: async () => {
242
- this._editorService.openEditor({
243
- resource: input.resource,
244
- options: {
245
- override: DEFAULT_EDITOR_ASSOCIATION.id,
246
- pinned: true
247
- }
248
- });
249
- }
250
- })], {
251
- forceMessage: true
252
- });
253
- }
254
- confirmedWebHostNotebooks.add(resourceKey);
255
- if (checkboxChecked) {
256
- this._storageService.store(
257
- NOTEBOOK_WEB_HOST_OPEN_CONFIRMED_KEY,
258
- true,
259
- StorageScope.WORKSPACE,
260
- StorageTarget.MACHINE
261
- );
262
- }
263
- }
264
- async setInput(input, options, context, token, noRetry) {
265
- await this._confirmOpenOnWebHost(input);
266
- try {
267
- let perfMarksCaptured = false;
268
- const fileOpenMonitor = timeout(10000);
269
- fileOpenMonitor.then(() => {
270
- perfMarksCaptured = true;
271
- this._handlePerfMark(perf, input);
272
- });
273
- const perf = ( new NotebookPerfMarks());
274
- perf.mark("startTime");
275
- this._inputListener.value = input.onDidChangeCapabilities(() => this._onDidChangeInputCapabilities(input));
276
- this._widgetDisposableStore.clear();
277
- this._widget.value?.onWillHide();
278
- this._widget = this._instantiationService.invokeFunction(
279
- this._notebookWidgetService.retrieveWidget,
280
- this.group.id,
281
- input,
282
- undefined,
283
- this._pagePosition?.dimension,
284
- this.window
285
- );
286
- if (this._rootElement && this._widget.value.getDomNode()) {
287
- this._rootElement.setAttribute("aria-flowto", this._widget.value.getDomNode().id || "");
288
- setParentFlowTo(this._widget.value.getDomNode(), this._rootElement);
289
- }
290
- this._widgetDisposableStore.add(this._widget.value.onDidChangeModel(() => this._onDidChangeModel.fire()));
291
- this._widgetDisposableStore.add(
292
- this._widget.value.onDidChangeActiveCell(() => this._onDidChangeSelection.fire({
293
- reason: EditorPaneSelectionChangeReason.USER
294
- }))
295
- );
296
- if (this._pagePosition) {
297
- this._widget.value.layout(
298
- this._pagePosition.dimension,
299
- this._rootElement,
300
- this._pagePosition.position
301
- );
302
- }
303
- await super.setInput(input, options, context, token);
304
- const model = await input.resolve(options, perf);
305
- perf.mark("inputLoaded");
306
- if (token.isCancellationRequested) {
307
- return undefined;
308
- }
309
- if (!this._widget.value) {
310
- if (noRetry) {
311
- return undefined;
312
- }
313
- return this.setInput(input, options, context, token, true);
314
- }
315
- if (model === null) {
316
- const knownProvider = this._notebookService.getViewTypeProvider(input.viewType);
317
- if (!knownProvider) {
318
- throw ( new Error(( localize(
319
- 14714,
320
- "Cannot open resource with notebook editor type '{0}', please check if you have the right extension installed and enabled.",
321
- input.viewType
322
- ))));
323
- }
324
- await this._extensionsWorkbenchService.whenInitialized;
325
- const extensionInfo = this._extensionsWorkbenchService.local.find(e => e.identifier.id === knownProvider);
326
- throw createEditorOpenError(( new Error(( localize(
327
- 14715,
328
- "Cannot open resource with notebook editor type '{0}', please check if you have the right extension installed and enabled.",
329
- input.viewType
330
- )))), [toAction({
331
- id: "workbench.notebook.action.installOrEnableMissing",
332
- label: extensionInfo ? ( localize(14716, "Enable extension for '{0}'", input.viewType)) : ( localize(14717, "Install extension for '{0}'", input.viewType)),
333
- run: async () => {
334
- const d = this._notebookService.onAddViewType(viewType => {
335
- if (viewType === input.viewType) {
336
- this._editorService.openEditor({
337
- resource: input.resource
338
- });
339
- d.dispose();
340
- }
341
- });
342
- const extensionInfo = this._extensionsWorkbenchService.local.find(e => e.identifier.id === knownProvider);
343
- try {
344
- if (extensionInfo) {
345
- await this._extensionsWorkbenchService.setEnablement(
346
- extensionInfo,
347
- extensionInfo.enablementState === EnablementState.DisabledWorkspace ? EnablementState.EnabledWorkspace : EnablementState.EnabledGlobally
348
- );
349
- } else {
350
- await this._instantiationService.createInstance(InstallRecommendedExtensionAction, knownProvider).run();
351
- }
352
- } catch (ex) {
353
- this.logService.error(`Failed to install or enable extension ${knownProvider}`, ex);
354
- d.dispose();
355
- }
356
- }
357
- }), toAction({
358
- id: "workbench.notebook.action.openAsText",
359
- label: ( localize(14713, "Open As Text")),
360
- run: async () => {
361
- const backup = await this._workingCopyBackupService.resolve({
362
- resource: input.resource,
363
- typeId: NotebookWorkingCopyTypeIdentifier.create(input.viewType)
364
- });
365
- if (backup) {
366
- const contents = await streamToBuffer(backup.value);
367
- this._editorService.openEditor({
368
- resource: undefined,
369
- contents: ( contents.toString())
370
- });
371
- } else {
372
- this._editorService.openEditor({
373
- resource: input.resource,
374
- options: {
375
- override: DEFAULT_EDITOR_ASSOCIATION.id,
376
- pinned: true
377
- }
378
- });
379
- }
380
- }
381
- })], {
382
- allowDialog: true
383
- });
384
- }
385
- this._widgetDisposableStore.add(model.notebook.onDidChangeContent(() => this._onDidChangeSelection.fire({
386
- reason: EditorPaneSelectionChangeReason.EDIT
387
- })));
388
- const viewState = options?.viewState ?? this._loadNotebookEditorViewState(input);
389
- this._widget.value.setParentContextKeyService(this._contextKeyService);
390
- this._widget.value.setEditorProgressService(this._editorProgressService);
391
- await this._widget.value.setModel(model.notebook, viewState, perf);
392
- const isReadOnly = !!input.isReadonly();
393
- await this._widget.value.setOptions({
394
- ...options,
395
- isReadOnly
396
- });
397
- this._widgetDisposableStore.add(this._widget.value.onDidFocusWidget(() => this._onDidFocusWidget.fire()));
398
- this._widgetDisposableStore.add(this._widget.value.onDidBlurWidget(() => this._onDidBlurWidget.fire()));
399
- this._widgetDisposableStore.add(
400
- this._editorGroupService.createEditorDropTarget(this._widget.value.getDomNode(), {
401
- containsGroup: group => this.group.id === group.id
402
- })
403
- );
404
- this._widgetDisposableStore.add(this._widget.value.onDidScroll(() => {
405
- this._onDidChangeScroll.fire();
406
- }));
407
- perf.mark("editorLoaded");
408
- fileOpenMonitor.cancel();
409
- if (perfMarksCaptured) {
410
- return;
411
- }
412
- this._handlePerfMark(perf, input, model.notebook);
413
- this._onDidChangeControl.fire();
414
- } catch (e) {
415
- this.logService.warn("NotebookEditorWidget#setInput failed", e);
416
- if (isEditorOpenError(e)) {
417
- throw e;
418
- }
419
- if (e.fileOperationResult === FileOperationResult.FILE_TOO_LARGE) {
420
- let message;
421
- if (e instanceof TooLargeFileOperationError) {
422
- message = ( localize(
423
- 14718,
424
- "The notebook is not displayed in the notebook editor because it is very large ({0}).",
425
- ByteSize.formatSize(e.size)
426
- ));
427
- } else {
428
- message = ( localize(
429
- 14719,
430
- "The notebook is not displayed in the notebook editor because it is very large."
431
- ));
432
- }
433
- throw createTooLargeFileError(this.group, input, options, message, this._preferencesService);
434
- }
435
- const error = createEditorOpenError(e instanceof Error ? e : ( new Error((e ? e.message : ""))), [toAction({
436
- id: "workbench.notebook.action.openInTextEditor",
437
- label: ( localize(14720, "Open in Text Editor")),
438
- run: async () => {
439
- const activeEditorPane = this._editorService.activeEditorPane;
440
- if (!activeEditorPane) {
441
- return;
442
- }
443
- const activeEditorResource = EditorResourceAccessor.getCanonicalUri(activeEditorPane.input);
444
- if (!activeEditorResource) {
445
- return;
446
- }
447
- if (( activeEditorResource.toString()) === input.resource?.toString()) {
448
- return this._editorService.openEditor({
449
- resource: activeEditorResource,
450
- options: {
451
- override: DEFAULT_EDITOR_ASSOCIATION.id,
452
- pinned: true
453
- }
454
- });
455
- }
456
- return;
457
- }
458
- })], {
459
- allowDialog: true
460
- });
461
- throw error;
462
- }
463
- }
464
- _handlePerfMark(perf, input, notebook) {
465
- const perfMarks = perf.value;
466
- const startTime = perfMarks["startTime"];
467
- const extensionActivated = perfMarks["extensionActivated"];
468
- const inputLoaded = perfMarks["inputLoaded"];
469
- const webviewCommLoaded = perfMarks["webviewCommLoaded"];
470
- const customMarkdownLoaded = perfMarks["customMarkdownLoaded"];
471
- const editorLoaded = perfMarks["editorLoaded"];
472
- let extensionActivationTimespan = -1;
473
- let inputLoadingTimespan = -1;
474
- let webviewCommLoadingTimespan = -1;
475
- let customMarkdownLoadingTimespan = -1;
476
- let editorLoadingTimespan = -1;
477
- if (startTime !== undefined && extensionActivated !== undefined) {
478
- extensionActivationTimespan = extensionActivated - startTime;
479
- if (inputLoaded !== undefined) {
480
- inputLoadingTimespan = inputLoaded - extensionActivated;
481
- }
482
- if (webviewCommLoaded !== undefined) {
483
- webviewCommLoadingTimespan = webviewCommLoaded - extensionActivated;
484
- }
485
- if (customMarkdownLoaded !== undefined) {
486
- customMarkdownLoadingTimespan = customMarkdownLoaded - startTime;
487
- }
488
- if (editorLoaded !== undefined) {
489
- editorLoadingTimespan = editorLoaded - startTime;
490
- }
491
- }
492
- let codeCellCount = undefined;
493
- let mdCellCount = undefined;
494
- let outputCount = undefined;
495
- let outputBytes = undefined;
496
- let codeLength = undefined;
497
- let markdownLength = undefined;
498
- let notebookStatsLoaded = undefined;
499
- if (notebook) {
500
- const stopWatch = ( new StopWatch());
501
- for (const cell of notebook.cells) {
502
- if (cell.cellKind === CellKind.Code) {
503
- codeCellCount = (codeCellCount || 0) + 1;
504
- codeLength = (codeLength || 0) + cell.getTextLength();
505
- outputCount = (outputCount || 0) + cell.outputs.length;
506
- outputBytes = (outputBytes || 0) + cell.outputs.reduce(
507
- (prev, cur) => prev + cur.outputs.reduce((size, item) => size + item.data.byteLength, 0),
508
- 0
509
- );
510
- } else {
511
- mdCellCount = (mdCellCount || 0) + 1;
512
- markdownLength = (codeLength || 0) + cell.getTextLength();
513
- }
514
- }
515
- notebookStatsLoaded = stopWatch.elapsed();
516
- }
517
- this.logService.trace(
518
- `[NotebookEditor] open notebook perf ${notebook?.uri.toString() ?? ""} - extensionActivation: ${extensionActivationTimespan}, inputLoad: ${inputLoadingTimespan}, webviewComm: ${webviewCommLoadingTimespan}, customMarkdown: ${customMarkdownLoadingTimespan}, editorLoad: ${editorLoadingTimespan}`
519
- );
520
- this.telemetryService.publicLog2("notebook/editorOpenPerf", {
521
- scheme: input.resource.scheme,
522
- ext: extname(input.resource),
523
- viewType: input.viewType,
524
- extensionActivated: extensionActivationTimespan,
525
- inputLoaded: inputLoadingTimespan,
526
- webviewCommLoaded: webviewCommLoadingTimespan,
527
- customMarkdownLoaded: customMarkdownLoadingTimespan,
528
- editorLoaded: editorLoadingTimespan,
529
- codeCellCount,
530
- mdCellCount,
531
- outputCount,
532
- outputBytes,
533
- codeLength,
534
- markdownLength,
535
- notebookStatsLoaded
536
- });
537
- }
538
- clearInput() {
539
- this._inputListener.clear();
540
- if (this._widget.value) {
541
- this._saveEditorViewState(this.input);
542
- this._widget.value.onWillHide();
543
- }
544
- super.clearInput();
545
- }
546
- setOptions(options) {
547
- this._widget.value?.setOptions(options);
548
- super.setOptions(options);
549
- }
550
- saveState() {
551
- this._saveEditorViewState(this.input);
552
- super.saveState();
553
- }
554
- getViewState() {
555
- const input = this.input;
556
- if (!(input instanceof NotebookEditorInput)) {
557
- return undefined;
558
- }
559
- this._saveEditorViewState(input);
560
- return this._loadNotebookEditorViewState(input);
561
- }
562
- getSelection() {
563
- if (this._widget.value) {
564
- const activeCell = this._widget.value.getActiveCell();
565
- if (activeCell) {
566
- const cellUri = activeCell.uri;
567
- return ( new NotebookEditorSelection(cellUri, activeCell.getSelections()));
568
- }
569
- }
570
- return undefined;
571
- }
572
- getScrollPosition() {
573
- const widget = this.getControl();
574
- if (!widget) {
575
- throw ( new Error("Notebook widget has not yet been initialized"));
576
- }
577
- return {
578
- scrollTop: widget.scrollTop,
579
- scrollLeft: 0
580
- };
581
- }
582
- setScrollPosition(scrollPosition) {
583
- const editor = this.getControl();
584
- if (!editor) {
585
- throw ( new Error("Control has not yet been initialized"));
586
- }
587
- editor.setScrollTop(scrollPosition.scrollTop);
588
- }
589
- _saveEditorViewState(input) {
590
- if (this._widget.value && input instanceof NotebookEditorInput) {
591
- if (this._widget.value.isDisposed) {
592
- return;
593
- }
594
- const state = this._widget.value.getEditorViewState();
595
- this._editorMemento.saveEditorState(this.group, input.resource, state);
596
- }
597
- }
598
- _loadNotebookEditorViewState(input) {
599
- const result = this._editorMemento.loadEditorState(this.group, input.resource);
600
- if (result) {
601
- return result;
602
- }
603
- for (const group of this._editorGroupService.getGroups(GroupsOrder.MOST_RECENTLY_ACTIVE)) {
604
- if (group.activeEditorPane !== this && group.activeEditorPane instanceof NotebookEditor_1 && group.activeEditor?.matches(input)) {
605
- return group.activeEditorPane._widget.value?.getEditorViewState();
606
- }
607
- }
608
- return;
609
- }
610
- layout(dimension, position) {
611
- this._rootElement.classList.toggle("mid-width", dimension.width < 1000 && dimension.width >= 600);
612
- this._rootElement.classList.toggle("narrow-width", dimension.width < 600);
613
- this._pagePosition = {
614
- dimension,
615
- position
616
- };
617
- if (!this._widget.value || !(this.input instanceof NotebookEditorInput)) {
618
- return;
619
- }
620
- if (( this.input.resource.toString()) !== this.textModel?.uri.toString() && this._widget.value?.hasModel()) {
621
- return;
622
- }
623
- if (this.isVisible()) {
624
- this._widget.value.layout(dimension, this._rootElement, position);
625
- }
626
- }
627
- };
628
- NotebookEditor = NotebookEditor_1 = ( __decorate([( __param(1, ITelemetryService)), ( __param(2, IThemeService)), ( __param(3, IInstantiationService)), ( __param(4, IStorageService)), ( __param(5, IEditorService)), ( __param(6, IEditorGroupsService)), ( __param(7, INotebookEditorService)), ( __param(8, IContextKeyService)), ( __param(9, IFileService)), ( __param(10, ITextResourceConfigurationService)), ( __param(11, IEditorProgressService)), ( __param(12, INotebookService)), ( __param(13, IExtensionsWorkbenchService)), ( __param(14, IWorkingCopyBackupService)), ( __param(15, ILogService)), ( __param(16, IPreferencesService)), ( __param(17, IDialogService)), ( __param(18, IWorkbenchEnvironmentService))], NotebookEditor));
629
- class NotebookEditorSelection {
630
- constructor(cellUri, selections) {
631
- this.cellUri = cellUri;
632
- this.selections = selections;
633
- }
634
- compare(other) {
635
- if (!(other instanceof NotebookEditorSelection)) {
636
- return EditorPaneSelectionCompareResult.DIFFERENT;
637
- }
638
- if (isEqual(this.cellUri, other.cellUri)) {
639
- return EditorPaneSelectionCompareResult.IDENTICAL;
640
- }
641
- return EditorPaneSelectionCompareResult.DIFFERENT;
642
- }
643
- restore(options) {
644
- const notebookOptions = {
645
- cellOptions: {
646
- resource: this.cellUri,
647
- options: {
648
- selection: this.selections[0]
649
- }
650
- }
651
- };
652
- Object.assign(notebookOptions, options);
653
- return notebookOptions;
654
- }
655
- log() {
656
- return this.cellUri.fragment;
657
- }
658
- }
659
- function isNotebookContainingCellEditor(editor, codeEditor) {
660
- if (editor?.getId() === NotebookEditor.ID) {
661
- const notebookWidget = editor.getControl();
662
- if (notebookWidget) {
663
- for (const [_, editor] of notebookWidget.codeEditors) {
664
- if (editor === codeEditor) {
665
- return true;
666
- }
667
- }
668
- }
669
- }
670
- return false;
671
- }
672
-
673
- export { NotebookEditor, isNotebookContainingCellEditor };
@@ -1,9 +0,0 @@
1
- import { BrandedService } from "../../../../platform/instantiation/common/instantiation.js";
2
- import { INotebookEditor, INotebookEditorContribution, INotebookEditorContributionDescription } from "./notebookBrowser.js";
3
- export declare function registerNotebookContribution<Services extends BrandedService[]>(id: string, ctor: {
4
- new (editor: INotebookEditor, ...services: Services): INotebookEditorContribution;
5
- }): void;
6
- export declare namespace NotebookEditorExtensionsRegistry {
7
- function getEditorContributions(): INotebookEditorContributionDescription[];
8
- function getSomeEditorContributions(ids: string[]): INotebookEditorContributionDescription[];
9
- }