@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,796 +0,0 @@
1
-
2
- import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
3
- import { localize } from '../../../../../../nls.js';
4
- import { getWindow, append, $, modify, getActiveElement, getRootContainer, setVisibility, addDisposableListener, runAtThisOrScheduleAtNextAnimationFrame, hide, show } from '../../../../../../base/browser/dom.js';
5
- import { raceCancellation } from '../../../../../../base/common/async.js';
6
- import { CancellationTokenSource } from '../../../../../../base/common/cancellation.js';
7
- import { Codicon } from '../../../../../../base/common/codicons.js';
8
- import { Event } from '../../../../../../base/common/event.js';
9
- import { Disposable, toDisposable } from '../../../../../../base/common/lifecycle.js';
10
- import { clamp } from '../../../../../../base/common/numbers.js';
11
- import { escape } from '../../../../../../base/common/strings.js';
12
- import { ThemeIcon } from '../../../../../../base/common/themables.js';
13
- import { EditorOption } from '../../../../../../editor/common/config/editorOptions.js';
14
- import { ILanguageService } from '../../../../../../editor/common/languages/language.service.js';
15
- import { tokenizeToStringSync } from '../../../../../../editor/common/languages/textToHtmlTokenizer.js';
16
- import { CodeActionController } from '../../../../../../editor/contrib/codeAction/browser/codeActionController.js';
17
- import { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.service.js';
18
- import { IInstantiationService } from '../../../../../../platform/instantiation/common/instantiation.js';
19
- import { IKeybindingService } from '../../../../../../platform/keybinding/common/keybinding.service.js';
20
- import { INotebookExecutionStateService } from '../../../common/notebookExecutionStateService.service.js';
21
- import { CellFocusMode, EXPAND_CELL_INPUT_COMMAND_ID } from '../../notebookBrowser.js';
22
- import { outputDisplayLimit } from '../../viewModel/codeCellViewModel.js';
23
- import { collapsedCellTTPolicy } from '../notebookRenderingCommon.js';
24
- import { CellEditorOptions } from './cellEditorOptions.js';
25
- import { CellOutputContainer } from './cellOutput.js';
26
- import { CollapsedCodeCellExecutionIcon } from './codeCellExecutionIcon.js';
27
- import { INotebookLoggingService } from '../../../common/notebookLoggingService.service.js';
28
-
29
- let CodeCell = class CodeCell extends Disposable {
30
- constructor(
31
- notebookEditor,
32
- viewCell,
33
- templateData,
34
- editorPool,
35
- instantiationService,
36
- keybindingService,
37
- languageService,
38
- configurationService,
39
- notebookExecutionStateService,
40
- notebookLogService
41
- ) {
42
- super();
43
- this.notebookEditor = notebookEditor;
44
- this.viewCell = viewCell;
45
- this.templateData = templateData;
46
- this.editorPool = editorPool;
47
- this.instantiationService = instantiationService;
48
- this.keybindingService = keybindingService;
49
- this.languageService = languageService;
50
- this.configurationService = configurationService;
51
- this._isDisposed = false;
52
- this._useNewApproachForEditorLayout = true;
53
- this._pointerDownInEditor = false;
54
- this._pointerDraggingInEditor = false;
55
- const cellIndex = this.notebookEditor.getCellIndex(this.viewCell);
56
- const debugPrefix = `[Cell ${cellIndex}]`;
57
- const debug = this._debug = output => {
58
- notebookLogService.debug("CellLayout", `${debugPrefix} ${output}`);
59
- };
60
- this._cellEditorOptions = this._register(( new CellEditorOptions(
61
- this.notebookEditor.getBaseCellEditorOptions(viewCell.language),
62
- this.notebookEditor.notebookOptions,
63
- this.configurationService
64
- )));
65
- this._outputContainerRenderer = this.instantiationService.createInstance(CellOutputContainer, notebookEditor, viewCell, templateData, {
66
- limit: outputDisplayLimit
67
- });
68
- this.cellParts = this._register(templateData.cellParts.concatContentPart(
69
- [this._cellEditorOptions, this._outputContainerRenderer],
70
- getWindow(notebookEditor.getDomNode())
71
- ));
72
- const initialEditorDimension = {
73
- height: this.calculateInitEditorHeight(),
74
- width: this.viewCell.layoutInfo.editorWidth
75
- };
76
- this._cellLayout = ( new CodeCellLayout(
77
- this._useNewApproachForEditorLayout,
78
- notebookEditor,
79
- viewCell,
80
- templateData,
81
- {
82
- debug
83
- },
84
- initialEditorDimension
85
- ));
86
- this.initializeEditor(initialEditorDimension);
87
- this._renderedInputCollapseState = false;
88
- this.registerNotebookEditorListeners();
89
- this.registerViewCellLayoutChange();
90
- this.registerCellEditorEventListeners();
91
- this.registerMouseListener();
92
- this._register(
93
- Event.any(this.viewCell.onDidStartExecution, this.viewCell.onDidStopExecution)(e => {
94
- this.cellParts.updateForExecutionState(this.viewCell, e);
95
- })
96
- );
97
- this._register(this.viewCell.onDidChangeState(e => {
98
- this.cellParts.updateState(this.viewCell, e);
99
- if (e.outputIsHoveredChanged) {
100
- this.updateForOutputHover();
101
- }
102
- if (e.outputIsFocusedChanged) {
103
- this.updateForOutputFocus();
104
- }
105
- if (e.metadataChanged || e.internalMetadataChanged) {
106
- this.updateEditorOptions();
107
- }
108
- if (e.inputCollapsedChanged || e.outputCollapsedChanged) {
109
- this.viewCell.pauseLayout();
110
- const updated = this.updateForCollapseState();
111
- this.viewCell.resumeLayout();
112
- if (updated) {
113
- this.relayoutCell();
114
- }
115
- }
116
- if (e.focusModeChanged) {
117
- this.updateEditorForFocusModeChange(true);
118
- }
119
- }));
120
- this.updateEditorOptions();
121
- this.updateEditorForFocusModeChange(false);
122
- this.updateForOutputHover();
123
- this.updateForOutputFocus();
124
- this.cellParts.scheduleRenderCell(this.viewCell);
125
- this._register(toDisposable(() => {
126
- this.cellParts.unrenderCell(this.viewCell);
127
- }));
128
- this.viewCell.editorHeight = initialEditorDimension.height;
129
- this._outputContainerRenderer.render();
130
- this._renderedOutputCollapseState = false;
131
- this.initialViewUpdateExpanded();
132
- this._register(this.viewCell.onLayoutInfoRead(() => {
133
- this.cellParts.prepareLayout();
134
- }));
135
- const executionItemElement = append(
136
- this.templateData.cellInputCollapsedContainer,
137
- $(".collapsed-execution-icon")
138
- );
139
- this._register(toDisposable(() => {
140
- executionItemElement.remove();
141
- }));
142
- this._collapsedExecutionIcon = this._register(this.instantiationService.createInstance(
143
- CollapsedCodeCellExecutionIcon,
144
- this.notebookEditor,
145
- this.viewCell,
146
- executionItemElement
147
- ));
148
- this.updateForCollapseState();
149
- this._register(
150
- Event.runAndSubscribe(viewCell.onDidChangeOutputs, this.updateForOutputs.bind(this))
151
- );
152
- this._register(
153
- Event.runAndSubscribe(viewCell.onDidChangeLayout, this.updateForLayout.bind(this))
154
- );
155
- this._cellEditorOptions.setLineNumbers(this.viewCell.lineNumbers);
156
- templateData.editor.updateOptions(
157
- this._cellEditorOptions.getUpdatedValue(this.viewCell.internalMetadata, this.viewCell.uri)
158
- );
159
- }
160
- updateCodeCellOptions(templateData) {
161
- templateData.editor.updateOptions(
162
- this._cellEditorOptions.getUpdatedValue(this.viewCell.internalMetadata, this.viewCell.uri)
163
- );
164
- const cts = ( new CancellationTokenSource());
165
- this._register({
166
- dispose() {
167
- cts.dispose(true);
168
- }
169
- });
170
- raceCancellation(this.viewCell.resolveTextModel(), cts.token).then(model => {
171
- if (this._isDisposed) {
172
- return;
173
- }
174
- if (model) {
175
- model.updateOptions({
176
- indentSize: this._cellEditorOptions.indentSize,
177
- tabSize: this._cellEditorOptions.tabSize,
178
- insertSpaces: this._cellEditorOptions.insertSpaces
179
- });
180
- }
181
- });
182
- }
183
- updateForLayout() {
184
- this._pendingLayout?.dispose();
185
- this._pendingLayout = modify(getWindow(this.notebookEditor.getDomNode()), () => {
186
- this.cellParts.updateInternalLayoutNow(this.viewCell);
187
- });
188
- }
189
- updateForOutputHover() {
190
- this.templateData.container.classList.toggle("cell-output-hover", this.viewCell.outputIsHovered);
191
- }
192
- updateForOutputFocus() {
193
- this.templateData.container.classList.toggle("cell-output-focus", this.viewCell.outputIsFocused);
194
- }
195
- calculateInitEditorHeight() {
196
- const lineNum = this.viewCell.lineCount;
197
- const lineHeight = this.viewCell.layoutInfo.fontInfo?.lineHeight || 17;
198
- const editorPadding = this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata, this.viewCell.uri);
199
- const editorHeight = this.viewCell.layoutInfo.editorHeight === 0 ? lineNum * lineHeight + editorPadding.top + editorPadding.bottom : this.viewCell.layoutInfo.editorHeight;
200
- return editorHeight;
201
- }
202
- initializeEditor(dimension) {
203
- this._debug(
204
- `Initialize Editor ${dimension.height} x ${dimension.width}, Scroll Top = ${this.notebookEditor.scrollTop}`
205
- );
206
- this._cellLayout.layoutEditor("init");
207
- this.layoutEditor(dimension);
208
- const cts = ( new CancellationTokenSource());
209
- this._register({
210
- dispose() {
211
- cts.dispose(true);
212
- }
213
- });
214
- raceCancellation(this.viewCell.resolveTextModel(), cts.token).then(model => {
215
- if (this._isDisposed || model?.isDisposed()) {
216
- return;
217
- }
218
- if (model && this.templateData.editor) {
219
- this._reigsterModelListeners(model);
220
- this.templateData.editor.setModel(model);
221
- if (this._isDisposed) {
222
- return;
223
- }
224
- model.updateOptions({
225
- indentSize: this._cellEditorOptions.indentSize,
226
- tabSize: this._cellEditorOptions.tabSize,
227
- insertSpaces: this._cellEditorOptions.insertSpaces
228
- });
229
- this.viewCell.attachTextEditor(
230
- this.templateData.editor,
231
- this.viewCell.layoutInfo.estimatedHasHorizontalScrolling
232
- );
233
- const focusEditorIfNeeded = () => {
234
- if (
235
- this.notebookEditor.getActiveCell() === this.viewCell && this.viewCell.focusMode === CellFocusMode.Editor && (this.notebookEditor.hasEditorFocus() || getActiveElement(this.notebookEditor.getDomNode().ownerDocument) === getRootContainer(this.notebookEditor.getDomNode()))) {
236
- this.templateData.editor.focus();
237
- }
238
- };
239
- focusEditorIfNeeded();
240
- const realContentHeight = this.templateData.editor.getContentHeight();
241
- if (realContentHeight !== dimension.height) {
242
- this.onCellEditorHeightChange("onDidResolveTextModel");
243
- }
244
- if (this._isDisposed) {
245
- return;
246
- }
247
- focusEditorIfNeeded();
248
- }
249
- this._register(
250
- this._cellEditorOptions.onDidChange(() => this.updateCodeCellOptions(this.templateData))
251
- );
252
- });
253
- }
254
- updateForOutputs() {
255
- setVisibility(
256
- this.viewCell.outputsViewModels.length > 0,
257
- this.templateData.focusSinkElement
258
- );
259
- }
260
- updateEditorOptions() {
261
- const editor = this.templateData.editor;
262
- if (!editor) {
263
- return;
264
- }
265
- const isReadonly = this.notebookEditor.isReadOnly;
266
- const padding = this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata, this.viewCell.uri);
267
- const options = editor.getOptions();
268
- if (options.get(EditorOption.readOnly) !== isReadonly || options.get(EditorOption.padding) !== padding) {
269
- editor.updateOptions({
270
- readOnly: this.notebookEditor.isReadOnly,
271
- padding: this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata, this.viewCell.uri)
272
- });
273
- }
274
- }
275
- registerNotebookEditorListeners() {
276
- this._register(this.notebookEditor.onDidScroll(() => {
277
- this.adjustEditorPosition();
278
- this._cellLayout.layoutEditor("nbDidScroll");
279
- }));
280
- this._register(this.notebookEditor.onDidChangeLayout(() => {
281
- this.adjustEditorPosition();
282
- this.onCellWidthChange("nbLayoutChange");
283
- }));
284
- }
285
- adjustEditorPosition() {
286
- if (this._useNewApproachForEditorLayout) {
287
- return;
288
- }
289
- const extraOffset = -6 - 1 ;
290
- const min = 0;
291
- const scrollTop = this.notebookEditor.scrollTop;
292
- const elementTop = this.notebookEditor.getAbsoluteTopOfElement(this.viewCell);
293
- const diff = scrollTop - elementTop + extraOffset;
294
- const notebookEditorLayout = this.notebookEditor.getLayoutInfo();
295
- const editorMaxHeight = notebookEditorLayout.height - notebookEditorLayout.stickyHeight - 26 ;
296
- const maxTop =
297
- this.viewCell.layoutInfo.editorHeight - editorMaxHeight;
298
- const top = maxTop > 20 ? clamp(min, diff, maxTop) : min;
299
- this.templateData.editorPart.style.top = `${top}px`;
300
- this.templateData.editor.setScrollTop(top);
301
- }
302
- registerViewCellLayoutChange() {
303
- this._register(this.viewCell.onDidChangeLayout(e => {
304
- if (e.outerWidth !== undefined) {
305
- const layoutInfo = this.templateData.editor.getLayoutInfo();
306
- if (layoutInfo.width !== this.viewCell.layoutInfo.editorWidth) {
307
- this.onCellWidthChange("viewCellLayoutChange");
308
- this.adjustEditorPosition();
309
- }
310
- }
311
- }));
312
- }
313
- registerCellEditorEventListeners() {
314
- this._register(this.templateData.editor.onDidContentSizeChange(e => {
315
- if (e.contentHeightChanged) {
316
- if (this.viewCell.layoutInfo.editorHeight !== e.contentHeight) {
317
- this.onCellEditorHeightChange(`onDidContentSizeChange`);
318
- this.adjustEditorPosition();
319
- }
320
- }
321
- }));
322
- if (this._useNewApproachForEditorLayout) {
323
- this._register(this.templateData.editor.onDidScrollChange(e => {
324
- if (this._pointerDownInEditor || this._pointerDraggingInEditor) {
325
- return;
326
- }
327
- if (this._cellLayout.editorVisibility === "Invisible" || !this.templateData.editor.hasTextFocus()) {
328
- return;
329
- }
330
- if (this._cellLayout._lastChangedEditorScrolltop === e.scrollTop || this._cellLayout.isUpdatingLayout) {
331
- return;
332
- }
333
- const scrollTop = this.notebookEditor.scrollTop;
334
- const diff = e.scrollTop - (this._cellLayout._lastChangedEditorScrolltop ?? 0);
335
- if (this._cellLayout.editorVisibility === "Full (Small Viewport)" && typeof this._cellLayout._lastChangedEditorScrolltop === "number") {
336
- this._debug(
337
- `Scroll Change (1) = ${e.scrollTop} changed by ${diff} (notebook scrollTop: ${scrollTop}, setEditorScrollTop: ${e.scrollTop})`
338
- );
339
- } else if (this._cellLayout.editorVisibility === "Bottom Clipped" && typeof this._cellLayout._lastChangedEditorScrolltop === "number") {
340
- this._debug(
341
- `Scroll Change (2) = ${e.scrollTop} changed by ${diff} (notebook scrollTop: ${scrollTop}, setNotebookScrollTop: ${scrollTop + e.scrollTop})`
342
- );
343
- this.notebookEditor.setScrollTop(scrollTop + e.scrollTop);
344
- } else if (this._cellLayout.editorVisibility === "Top Clipped" && typeof this._cellLayout._lastChangedEditorScrolltop === "number") {
345
- const newScrollTop = scrollTop + diff - 1;
346
- this._debug(
347
- `Scroll Change (3) = ${e.scrollTop} changed by ${diff} (notebook scrollTop: ${scrollTop}, setNotebookScrollTop?: ${newScrollTop})`
348
- );
349
- if (scrollTop !== newScrollTop) {
350
- this.notebookEditor.setScrollTop(newScrollTop);
351
- }
352
- } else {
353
- this._debug(
354
- `Scroll Change (4) = ${e.scrollTop} changed by ${diff} (notebook scrollTop: ${scrollTop})`
355
- );
356
- this._cellLayout._lastChangedEditorScrolltop = undefined;
357
- }
358
- }));
359
- }
360
- this._register(this.templateData.editor.onDidChangeCursorSelection(e => {
361
- if (
362
- e.source === "restoreState" || e.oldModelVersionId === 0 || !this.templateData.editor.hasTextFocus()) {
363
- return;
364
- }
365
- if ((this._pointerDownInEditor || this._pointerDraggingInEditor) && this._useNewApproachForEditorLayout) {
366
- return;
367
- }
368
- const selections = this.templateData.editor.getSelections();
369
- if (selections?.length) {
370
- const contentHeight = this.templateData.editor.getContentHeight();
371
- const layoutContentHeight = this.viewCell.layoutInfo.editorHeight;
372
- if (contentHeight !== layoutContentHeight) {
373
- if (!this._useNewApproachForEditorLayout) {
374
- this._debug(`onDidChangeCursorSelection`);
375
- this.onCellEditorHeightChange("onDidChangeCursorSelection");
376
- }
377
- if (this._isDisposed) {
378
- return;
379
- }
380
- }
381
- const lastSelection = selections[selections.length - 1];
382
- this.notebookEditor.revealRangeInViewAsync(this.viewCell, lastSelection);
383
- }
384
- }));
385
- this._register(this.templateData.editor.onDidBlurEditorWidget(() => {
386
- CodeActionController.get(this.templateData.editor)?.hideLightBulbWidget();
387
- }));
388
- }
389
- _reigsterModelListeners(model) {
390
- this._register(model.onDidChangeTokens(() => {
391
- if (this.viewCell.isInputCollapsed && this._inputCollapseElement) {
392
- const content = this._getRichTextFromLineTokens(model);
393
- this._inputCollapseElement.innerHTML = (collapsedCellTTPolicy?.createHTML(content) ?? content);
394
- this._attachInputExpandButton(this._inputCollapseElement);
395
- }
396
- }));
397
- }
398
- registerMouseListener() {
399
- const resetPointerState = () => {
400
- this._pointerDownInEditor = false;
401
- this._pointerDraggingInEditor = false;
402
- this._cellLayout.setPointerDown(false);
403
- };
404
- this._register(this.templateData.editor.onMouseDown(e => {
405
- if (e.event.rightButton) {
406
- e.event.preventDefault();
407
- }
408
- if (this._useNewApproachForEditorLayout) {
409
- if (e.event.leftButton) {
410
- this._pointerDownInEditor = true;
411
- this._pointerDraggingInEditor = false;
412
- this._cellLayout.setPointerDown(false);
413
- }
414
- }
415
- }));
416
- if (this._useNewApproachForEditorLayout) {
417
- this._register(this.templateData.editor.onMouseMove(e => {
418
- if (!this._pointerDownInEditor) {
419
- return;
420
- }
421
- if (!e.event.leftButton) {
422
- resetPointerState();
423
- return;
424
- }
425
- if (!this._pointerDraggingInEditor) {
426
- this._pointerDraggingInEditor = true;
427
- this._cellLayout.setPointerDown(true);
428
- }
429
- }));
430
- }
431
- if (this._useNewApproachForEditorLayout) {
432
- const win = getWindow(this.notebookEditor.getDomNode());
433
- this._register(addDisposableListener(win, "mouseup", resetPointerState));
434
- this._register(addDisposableListener(win, "pointerup", resetPointerState));
435
- this._register(addDisposableListener(win, "pointercancel", resetPointerState));
436
- this._register(addDisposableListener(win, "blur", resetPointerState));
437
- this._register(addDisposableListener(win, "keydown", e => {
438
- if (e.key === "Escape" && (this._pointerDownInEditor || this._pointerDraggingInEditor)) {
439
- resetPointerState();
440
- }
441
- }));
442
- }
443
- }
444
- shouldPreserveEditor() {
445
- return this.notebookEditor.getActiveCell() === this.viewCell && this.viewCell.focusMode === CellFocusMode.Editor && (this.notebookEditor.hasEditorFocus() || getActiveElement(this.notebookEditor.getDomNode().ownerDocument) === getRootContainer(this.notebookEditor.getDomNode()));
446
- }
447
- updateEditorForFocusModeChange(sync) {
448
- if (this.shouldPreserveEditor()) {
449
- if (sync) {
450
- this.templateData.editor.focus();
451
- } else {
452
- this._register(
453
- runAtThisOrScheduleAtNextAnimationFrame(getWindow(this.templateData.container), () => {
454
- this.templateData.editor.focus();
455
- })
456
- );
457
- }
458
- }
459
- this.templateData.container.classList.toggle("cell-editor-focus", this.viewCell.focusMode === CellFocusMode.Editor);
460
- this.templateData.container.classList.toggle("cell-output-focus", this.viewCell.focusMode === CellFocusMode.Output);
461
- }
462
- updateForCollapseState() {
463
- if (this.viewCell.isOutputCollapsed === this._renderedOutputCollapseState && this.viewCell.isInputCollapsed === this._renderedInputCollapseState) {
464
- return false;
465
- }
466
- this.viewCell.layoutChange({
467
- editorHeight: true
468
- });
469
- if (this.viewCell.isInputCollapsed) {
470
- this._collapseInput();
471
- } else {
472
- this._showInput();
473
- }
474
- if (this.viewCell.isOutputCollapsed) {
475
- this._collapseOutput();
476
- } else {
477
- this._showOutput(false);
478
- }
479
- this.relayoutCell();
480
- this._renderedOutputCollapseState = this.viewCell.isOutputCollapsed;
481
- this._renderedInputCollapseState = this.viewCell.isInputCollapsed;
482
- return true;
483
- }
484
- _collapseInput() {
485
- hide(this.templateData.editorPart);
486
- this.templateData.container.classList.toggle("input-collapsed", true);
487
- this._removeInputCollapsePreview();
488
- this._collapsedExecutionIcon.setVisibility(true);
489
- const richEditorText = this.templateData.editor.hasModel() ? this._getRichTextFromLineTokens(this.templateData.editor.getModel()) : this._getRichText(this.viewCell.textBuffer, this.viewCell.language);
490
- const element = $("div.cell-collapse-preview");
491
- element.innerHTML = (collapsedCellTTPolicy?.createHTML(richEditorText) ?? richEditorText);
492
- this._inputCollapseElement = element;
493
- this.templateData.cellInputCollapsedContainer.appendChild(element);
494
- this._attachInputExpandButton(element);
495
- show(this.templateData.cellInputCollapsedContainer);
496
- }
497
- _attachInputExpandButton(element) {
498
- const expandIcon = $("span.expandInputIcon");
499
- const keybinding = this.keybindingService.lookupKeybinding(EXPAND_CELL_INPUT_COMMAND_ID);
500
- if (keybinding) {
501
- element.title = ( localize(14829, "Double-click to expand cell input ({0})", keybinding.getLabel()));
502
- expandIcon.title = ( localize(14830, "Expand Cell Input ({0})", keybinding.getLabel()));
503
- }
504
- expandIcon.classList.add(...ThemeIcon.asClassNameArray(Codicon.more));
505
- element.appendChild(expandIcon);
506
- }
507
- _showInput() {
508
- this._collapsedExecutionIcon.setVisibility(false);
509
- show(this.templateData.editorPart);
510
- hide(this.templateData.cellInputCollapsedContainer);
511
- }
512
- _getRichText(buffer, language) {
513
- return tokenizeToStringSync(this.languageService, buffer.getLineContent(1), language);
514
- }
515
- _getRichTextFromLineTokens(model) {
516
- let result = `<div class="monaco-tokenized-source">`;
517
- const firstLineTokens = model.tokenization.getLineTokens(1);
518
- const viewLineTokens = firstLineTokens.inflate();
519
- const line = model.getLineContent(1);
520
- let startOffset = 0;
521
- for (let j = 0, lenJ = viewLineTokens.getCount(); j < lenJ; j++) {
522
- const type = viewLineTokens.getClassName(j);
523
- const endIndex = viewLineTokens.getEndOffset(j);
524
- result += `<span class="${type}">${escape(line.substring(startOffset, endIndex))}</span>`;
525
- startOffset = endIndex;
526
- }
527
- result += `</div>`;
528
- return result;
529
- }
530
- _removeInputCollapsePreview() {
531
- const children = this.templateData.cellInputCollapsedContainer.children;
532
- const elements = [];
533
- for (let i = 0; i < children.length; i++) {
534
- if (children[i].classList.contains("cell-collapse-preview")) {
535
- elements.push(children[i]);
536
- }
537
- }
538
- elements.forEach(element => {
539
- element.remove();
540
- });
541
- }
542
- _updateOutputInnerContainer(hide) {
543
- const children = this.templateData.outputContainer.domNode.children;
544
- for (let i = 0; i < children.length; i++) {
545
- if (children[i].classList.contains("output-inner-container")) {
546
- setVisibility(!hide, children[i]);
547
- }
548
- }
549
- }
550
- _collapseOutput() {
551
- this.templateData.container.classList.toggle("output-collapsed", true);
552
- show(this.templateData.cellOutputCollapsedContainer);
553
- this._updateOutputInnerContainer(true);
554
- this._outputContainerRenderer.viewUpdateHideOuputs();
555
- }
556
- _showOutput(initRendering) {
557
- this.templateData.container.classList.toggle("output-collapsed", false);
558
- hide(this.templateData.cellOutputCollapsedContainer);
559
- this._updateOutputInnerContainer(false);
560
- this._outputContainerRenderer.viewUpdateShowOutputs(initRendering);
561
- }
562
- initialViewUpdateExpanded() {
563
- this.templateData.container.classList.toggle("input-collapsed", false);
564
- show(this.templateData.editorPart);
565
- hide(this.templateData.cellInputCollapsedContainer);
566
- this.templateData.container.classList.toggle("output-collapsed", false);
567
- this._showOutput(true);
568
- }
569
- layoutEditor(dimension) {
570
- if (this._useNewApproachForEditorLayout) {
571
- return;
572
- }
573
- const editorLayout = this.notebookEditor.getLayoutInfo();
574
- const maxHeight = Math.min(
575
- editorLayout.height - editorLayout.stickyHeight - 26,
576
- dimension.height
577
- );
578
- this._debug(
579
- `Layout Editor: Width = ${dimension.width}, Height = ${maxHeight} (Requested: ${dimension.height}, Editor Layout Height: ${editorLayout.height}, Sticky: ${editorLayout.stickyHeight})`
580
- );
581
- this.templateData.editor.layout({
582
- width: dimension.width,
583
- height: maxHeight
584
- }, true);
585
- }
586
- onCellWidthChange(dbgReasonForChange) {
587
- this._debug(
588
- `Cell Editor Width Change, ${dbgReasonForChange}, Content Height = ${this.templateData.editor.getContentHeight()}`
589
- );
590
- const height = this.templateData.editor.getContentHeight();
591
- if (this.templateData.editor.hasModel()) {
592
- this._debug(
593
- `**** Updating Cell Editor Height (1), ContentHeight: ${height}, CodeCellLayoutInfo.EditorWidth ${this.viewCell.layoutInfo.editorWidth}, EditorLayoutInfo ${this.templateData.editor.getLayoutInfo().height} ****`
594
- );
595
- this.viewCell.editorHeight = height;
596
- this.relayoutCell();
597
- this.layoutEditor({
598
- width: this.viewCell.layoutInfo.editorWidth,
599
- height
600
- });
601
- } else {
602
- this._debug(
603
- `Cell Editor Width Change without model, return (1), ContentHeight: ${height}, CodeCellLayoutInfo.EditorWidth ${this.viewCell.layoutInfo.editorWidth}, EditorLayoutInfo ${this.templateData.editor.getLayoutInfo().height}`
604
- );
605
- }
606
- this._cellLayout.layoutEditor(dbgReasonForChange);
607
- }
608
- onCellEditorHeightChange(dbgReasonForChange) {
609
- const height = this.templateData.editor.getContentHeight();
610
- if (!this.templateData.editor.hasModel()) {
611
- this._debug(
612
- `Cell Editor Height Change without model, return (2), ContentHeight: ${height}, CodeCellLayoutInfo.EditorWidth ${this.viewCell.layoutInfo.editorWidth}, EditorLayoutInfo ${this.templateData.editor.getLayoutInfo()}`
613
- );
614
- }
615
- this._debug(`Cell Editor Height Change (${dbgReasonForChange}): ${height}`);
616
- this._debug(
617
- `**** Updating Cell Editor Height (2), ContentHeight: ${height}, CodeCellLayoutInfo.EditorWidth ${this.viewCell.layoutInfo.editorWidth}, EditorLayoutInfo ${this.templateData.editor.getLayoutInfo().height} ****`
618
- );
619
- const viewLayout = this.templateData.editor.getLayoutInfo();
620
- this.viewCell.editorHeight = height;
621
- this.relayoutCell();
622
- this.layoutEditor({
623
- width: viewLayout.width,
624
- height
625
- });
626
- this._cellLayout.layoutEditor(dbgReasonForChange);
627
- }
628
- relayoutCell() {
629
- this.notebookEditor.layoutNotebookCell(this.viewCell, this.viewCell.layoutInfo.totalHeight);
630
- }
631
- dispose() {
632
- this._isDisposed = true;
633
- if (this.shouldPreserveEditor()) {
634
- this.editorPool.preserveFocusedEditor(this.viewCell);
635
- }
636
- this.viewCell.detachTextEditor();
637
- this._removeInputCollapsePreview();
638
- this._outputContainerRenderer.dispose();
639
- this._pendingLayout?.dispose();
640
- super.dispose();
641
- }
642
- };
643
- CodeCell = ( __decorate([( __param(4, IInstantiationService)), ( __param(5, IKeybindingService)), ( __param(6, ILanguageService)), ( __param(7, IConfigurationService)), ( __param(8, INotebookExecutionStateService)), ( __param(9, INotebookLoggingService))], CodeCell));
644
- class CodeCellLayout {
645
- get editorVisibility() {
646
- return this._editorVisibility;
647
- }
648
- get isUpdatingLayout() {
649
- return this._isUpdatingLayout;
650
- }
651
- constructor(
652
- _enabled,
653
- notebookEditor,
654
- viewCell,
655
- templateData,
656
- _logService,
657
- _initialEditorDimension
658
- ) {
659
- this._enabled = _enabled;
660
- this.notebookEditor = notebookEditor;
661
- this.viewCell = viewCell;
662
- this.templateData = templateData;
663
- this._logService = _logService;
664
- this._initialEditorDimension = _initialEditorDimension;
665
- this._initialized = false;
666
- this._pointerDown = false;
667
- }
668
- setPointerDown(isDown) {
669
- this._pointerDown = isDown;
670
- }
671
- layoutEditor(reason) {
672
- if (!this._enabled) {
673
- return;
674
- }
675
- const element = this.templateData.editorPart;
676
- if (this.viewCell.isInputCollapsed) {
677
- element.style.top = "";
678
- return;
679
- }
680
- const LINE_HEIGHT = this.notebookEditor.getLayoutInfo().fontInfo.lineHeight;
681
- const CELL_TOP_MARGIN = this.viewCell.layoutInfo.topMargin;
682
- const CELL_OUTLINE_WIDTH = this.viewCell.layoutInfo.outlineWidth;
683
- const STATUSBAR_HEIGHT = this.viewCell.layoutInfo.statusBarHeight;
684
- const editor = this.templateData.editor;
685
- const editorLayout = this.templateData.editor.getLayoutInfo();
686
- const editorWidth = this._initialized && (reason === "nbLayoutChange" || reason === "viewCellLayoutChange") ? this.viewCell.layoutInfo.editorWidth : editorLayout.width;
687
- const editorHeight = this.viewCell.layoutInfo.editorHeight;
688
- const scrollTop = this.notebookEditor.scrollTop;
689
- const elementTop = this.notebookEditor.getAbsoluteTopOfElement(this.viewCell);
690
- const elementBottom = this.notebookEditor.getAbsoluteBottomOfElement(this.viewCell);
691
- const elementHeight = this.notebookEditor.getHeightOfElement(this.viewCell);
692
- let editorContentHeight;
693
- const isInit = !this._initialized && reason === "init";
694
- if (isInit) {
695
- editorContentHeight = this._initialEditorDimension.height;
696
- this._establishedContentHeight = editorContentHeight;
697
- } else {
698
- const gotContentHeight = editor.getContentHeight();
699
- const fallbackEditorContentHeight = gotContentHeight === -1 ? Math.max(editor.getLayoutInfo().height, this._initialEditorDimension.height) : gotContentHeight;
700
- const shouldRefreshContentHeight = !this._initialized || reason === "onDidContentSizeChange" || reason === "viewCellLayoutChange" || reason === "nbLayoutChange";
701
- if (shouldRefreshContentHeight) {
702
- editorContentHeight = fallbackEditorContentHeight;
703
- this._establishedContentHeight = editorContentHeight;
704
- } else {
705
- editorContentHeight = this._establishedContentHeight ?? fallbackEditorContentHeight;
706
- }
707
- }
708
- const editorBottom = elementTop + this.viewCell.layoutInfo.outputContainerOffset;
709
- const scrollBottom = this.notebookEditor.scrollBottom;
710
- const viewportHeight = scrollBottom - scrollTop === 0 ? this.notebookEditor.getLayoutInfo().height : scrollBottom - scrollTop;
711
- const outputContainerOffset = this.viewCell.layoutInfo.outputContainerOffset;
712
- const scrollDirection = typeof this._previousScrollBottom === "number" ? (scrollBottom < this._previousScrollBottom ? "up" : "down") : "down";
713
- this._previousScrollBottom = scrollBottom;
714
- let top = Math.max(0, scrollTop - elementTop - CELL_TOP_MARGIN - CELL_OUTLINE_WIDTH);
715
- const possibleEditorHeight = editorHeight - top;
716
- if (possibleEditorHeight < LINE_HEIGHT) {
717
- top = top - (LINE_HEIGHT - possibleEditorHeight) - CELL_OUTLINE_WIDTH;
718
- }
719
- let height = editorContentHeight;
720
- let editorScrollTop = 0;
721
- if (scrollTop <= (elementTop + CELL_TOP_MARGIN)) {
722
- const minimumEditorHeight = LINE_HEIGHT + this.notebookEditor.notebookOptions.getLayoutConfiguration().editorTopPadding;
723
- if (scrollBottom >= editorBottom) {
724
- height = clamp(editorContentHeight, minimumEditorHeight, editorContentHeight);
725
- this._editorVisibility = "Full";
726
- } else {
727
- height = clamp(
728
- scrollBottom - (elementTop + CELL_TOP_MARGIN) - STATUSBAR_HEIGHT,
729
- minimumEditorHeight,
730
- editorContentHeight
731
- ) + (2 * CELL_OUTLINE_WIDTH);
732
- this._editorVisibility = "Bottom Clipped";
733
- editorScrollTop = 0;
734
- }
735
- } else {
736
- if (viewportHeight <= editorContentHeight && scrollBottom <= editorBottom) {
737
- const minimumEditorHeight = LINE_HEIGHT + this.notebookEditor.notebookOptions.getLayoutConfiguration().editorTopPadding;
738
- height = clamp(
739
- viewportHeight - STATUSBAR_HEIGHT,
740
- minimumEditorHeight,
741
- editorContentHeight - STATUSBAR_HEIGHT
742
- ) + (2 * CELL_OUTLINE_WIDTH);
743
- this._editorVisibility = "Full (Small Viewport)";
744
- editorScrollTop = top;
745
- } else {
746
- const minimumEditorHeight = LINE_HEIGHT;
747
- height = clamp(
748
- editorContentHeight - (scrollTop - (elementTop + CELL_TOP_MARGIN)),
749
- minimumEditorHeight,
750
- editorContentHeight
751
- );
752
- if (scrollTop > editorBottom) {
753
- this._editorVisibility = "Invisible";
754
- } else {
755
- this._editorVisibility = "Top Clipped";
756
- }
757
- editorScrollTop = editorContentHeight - height;
758
- }
759
- }
760
- this._logService.debug(`${reason} (${this._editorVisibility}, ${this._initialized})`);
761
- this._logService.debug(
762
- `=> Editor Top = ${top}px (editHeight = ${editorHeight}, editContentHeight: ${editorContentHeight})`
763
- );
764
- this._logService.debug(
765
- `=> eleTop = ${elementTop}, eleBottom = ${elementBottom}, eleHeight = ${elementHeight}`
766
- );
767
- this._logService.debug(`=> scrollTop = ${scrollTop}, top = ${top}`);
768
- this._logService.debug(
769
- `=> cellTopMargin = ${CELL_TOP_MARGIN}, cellBottomMargin = ${this.viewCell.layoutInfo.topMargin}, cellOutline = ${CELL_OUTLINE_WIDTH}`
770
- );
771
- this._logService.debug(
772
- `=> scrollBottom: ${scrollBottom}, editBottom: ${editorBottom}, viewport: ${viewportHeight}, scroll: ${scrollDirection}, contOffset: ${outputContainerOffset})`
773
- );
774
- this._logService.debug(
775
- `=> Editor Height = ${height}px, Width: ${editorWidth}px, Initial Width: ${this._initialEditorDimension.width}, EditorScrollTop = ${editorScrollTop}px, StatusbarHeight = ${STATUSBAR_HEIGHT}, lineHeight = ${this.notebookEditor.getLayoutInfo().fontInfo.lineHeight}`
776
- );
777
- try {
778
- this._isUpdatingLayout = true;
779
- element.style.top = `${top}px`;
780
- editor.layout({
781
- width: this._initialized ? editorWidth : this._initialEditorDimension.width,
782
- height
783
- }, true);
784
- if (!this._pointerDown && editorScrollTop >= 0) {
785
- this._lastChangedEditorScrolltop = editorScrollTop;
786
- editor.setScrollTop(editorScrollTop);
787
- }
788
- } finally {
789
- this._initialized = true;
790
- this._isUpdatingLayout = false;
791
- this._logService.debug("Updated Editor Layout");
792
- }
793
- }
794
- }
795
-
796
- export { CodeCell, CodeCellLayout };