@codingame/monaco-vscode-katex-common 24.1.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 (262) hide show
  1. package/empty.js +1 -0
  2. package/package.json +45 -0
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +37 -0
  4. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +127 -0
  5. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +27 -0
  6. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +81 -0
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +44 -0
  8. package/vscode/src/vs/platform/actions/browser/buttonbar.js +172 -0
  9. package/vscode/src/vs/platform/editor/browser/editor.d.ts +12 -0
  10. package/vscode/src/vs/platform/editor/browser/editor.js +51 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +41 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +295 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.d.ts +2 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +60 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +65 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +650 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +2 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +364 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +38 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +207 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.d.ts +17 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +216 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.d.ts +24 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +114 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.d.ts +34 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.js +141 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.d.ts +169 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.js +951 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.d.ts +19 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.js +109 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.d.ts +12 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.js +47 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.d.ts +13 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.js +49 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.d.ts +27 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.js +160 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.d.ts +40 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.js +286 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.d.ts +13 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.js +49 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.d.ts +34 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.js +101 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.d.ts +14 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +30 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.d.ts +11 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +37 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.d.ts +17 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +69 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.d.ts +116 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.js +417 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.d.ts +20 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.js +66 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.d.ts +25 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.js +123 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.d.ts +18 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.js +60 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.d.ts +16 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.js +46 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.d.ts +19 -0
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.js +57 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.d.ts +94 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +567 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.d.ts +34 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.js +224 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.d.ts +34 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.js +259 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.d.ts +38 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +160 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.d.ts +16 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.js +55 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.d.ts +17 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.js +117 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.d.ts +66 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +528 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.d.ts +31 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.js +160 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.d.ts +17 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +49 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.d.ts +18 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +91 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.d.ts +13 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.js +6 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.d.ts +54 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.js +429 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.d.ts +40 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.js +347 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.d.ts +56 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.js +164 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.d.ts +32 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.js +224 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.d.ts +35 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +173 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatConfirmationWidget.css +341 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatExtensionsContent.css +27 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMarkdownPart.css +23 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMcpServersInteractionContent.css +14 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatPullRequestContent.css +75 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatTerminalToolProgressPart.css +221 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatThinkingContent.css +162 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +41 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +94 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +15 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +96 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +18 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +147 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +14 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.js +23 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +68 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +353 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +100 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +1085 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +39 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +275 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +32 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +119 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +19 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +36 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +21 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.js +130 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +25 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +225 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +24 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.js +101 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.d.ts +42 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.js +127 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.d.ts +43 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.js +388 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +49 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +721 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.d.ts +13 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +52 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.d.ts +39 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.js +409 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.d.ts +334 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +2008 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.d.ts +52 -0
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.js +93 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.d.ts +217 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1573 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.d.ts +43 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +249 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.d.ts +50 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +84 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.d.ts +32 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.js +174 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +31 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +101 -0
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +19 -0
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +76 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionAction.css +39 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.d.ts +292 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +2014 -0
  153. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css +171 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.d.ts +173 -0
  155. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +797 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.d.ts +54 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.js +345 -0
  158. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.d.ts +10 -0
  159. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +1069 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +34 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +139 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css +2880 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css +87 -0
  164. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatCodeBlockPill.css +139 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatInlineAnchorWidget.css +61 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewWelcome.css +209 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.d.ts +28 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.js +135 -0
  169. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.d.ts +28 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.js +147 -0
  171. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +71 -0
  172. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +279 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.d.ts +28 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +28 -0
  175. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.d.ts +13 -0
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +38 -0
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +55 -0
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +176 -0
  179. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.d.ts +45 -0
  180. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +207 -0
  181. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +48 -0
  182. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +373 -0
  183. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +171 -0
  184. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +1442 -0
  185. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +199 -0
  186. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +482 -0
  187. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +28 -0
  188. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +37 -0
  189. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +95 -0
  190. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +497 -0
  191. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +76 -0
  192. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +464 -0
  193. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +124 -0
  194. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +562 -0
  195. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +42 -0
  196. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +279 -0
  197. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +411 -0
  198. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +13 -0
  199. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +66 -0
  200. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +61 -0
  201. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +154 -0
  202. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.d.ts +19 -0
  203. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +201 -0
  204. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
  205. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +372 -0
  206. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
  207. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
  208. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
  209. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +594 -0
  210. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1746 -0
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +269 -0
  216. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
  217. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +806 -0
  218. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
  219. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +116 -0
  220. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
  221. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +62 -0
  222. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
  223. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
  224. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +295 -0
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +241 -0
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +146 -0
  230. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
  231. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +90 -0
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +41 -0
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +42 -0
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +77 -0
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
  239. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
  240. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +823 -0
  241. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
  242. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +29 -0
  243. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
  244. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +567 -0
  245. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
  246. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +189 -0
  247. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
  248. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +439 -0
  249. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
  250. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +263 -0
  251. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
  252. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +48 -0
  253. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
  254. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
  255. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
  256. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +89 -0
  257. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
  258. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
  259. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
  260. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +108 -0
  261. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +34 -0
  262. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +145 -0
@@ -0,0 +1,50 @@
1
+ import { Disposable, DisposableStore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { DiffElementCellViewModelBase } from "./diffElementViewModel.js";
3
+ import { DiffSide, INotebookTextDiffEditor } from "./notebookDiffEditorBrowser.js";
4
+ import { ICellOutputViewModel, IInsetRenderOutput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
5
+ import { NotebookTextModel } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/common/model/notebookTextModel";
6
+ import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
7
+ import { DiffNestedCellViewModel } from "./diffNestedCellViewModel.js";
8
+ import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
9
+ export declare class OutputElement extends Disposable {
10
+ private _notebookEditor;
11
+ private _notebookTextModel;
12
+ private _notebookService;
13
+ private _quickInputService;
14
+ private _diffElementViewModel;
15
+ private _diffSide;
16
+ private _nestedCell;
17
+ private _outputContainer;
18
+ readonly output: ICellOutputViewModel;
19
+ readonly resizeListener: DisposableStore;
20
+ domNode: HTMLElement;
21
+ renderResult?: IInsetRenderOutput;
22
+ constructor(_notebookEditor: INotebookTextDiffEditor, _notebookTextModel: NotebookTextModel, _notebookService: INotebookService, _quickInputService: IQuickInputService, _diffElementViewModel: DiffElementCellViewModelBase, _diffSide: DiffSide, _nestedCell: DiffNestedCellViewModel, _outputContainer: HTMLElement, output: ICellOutputViewModel);
23
+ render(index: number, beforeElement?: HTMLElement): void;
24
+ private _renderMissingRenderer;
25
+ private _renderSearchForMimetype;
26
+ private _renderMessage;
27
+ private pickActiveMimeTypeRenderer;
28
+ private generateRendererInfo;
29
+ getCellOutputCurrentIndex(): number;
30
+ updateHeight(index: number, height: number): void;
31
+ getOutputOffsetInContainer(index: number): number;
32
+ getOutputOffsetInCell(index: number): number;
33
+ }
34
+ export declare class OutputContainer extends Disposable {
35
+ private _editor;
36
+ private _notebookTextModel;
37
+ private _diffElementViewModel;
38
+ private _nestedCellViewModel;
39
+ private _diffSide;
40
+ private _outputContainer;
41
+ private _notebookService;
42
+ private readonly _quickInputService;
43
+ private _outputEntries;
44
+ constructor(_editor: INotebookTextDiffEditor, _notebookTextModel: NotebookTextModel, _diffElementViewModel: DiffElementCellViewModelBase, _nestedCellViewModel: DiffNestedCellViewModel, _diffSide: DiffSide, _outputContainer: HTMLElement, _notebookService: INotebookService, _quickInputService: IQuickInputService);
45
+ private _updateOutputs;
46
+ render(): void;
47
+ showOutputs(): void;
48
+ hideOutputs(): void;
49
+ private _renderOutput;
50
+ }
@@ -0,0 +1,269 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { createElement, $, addStandardDisposableListener, addDisposableListener, EventType, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
+ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
+ import { SideBySideDiffElementViewModel } from './diffElementViewModel.js';
7
+ import { DiffSide } from './notebookDiffEditorBrowser.js';
8
+ import { RenderOutputType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
9
+ import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
10
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
11
+ import { mimetypeIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
12
+ import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
13
+ import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
14
+ import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
15
+
16
+ class OutputElement extends Disposable {
17
+ constructor(_notebookEditor, _notebookTextModel, _notebookService, _quickInputService, _diffElementViewModel, _diffSide, _nestedCell, _outputContainer, output) {
18
+ super();
19
+ this._notebookEditor = _notebookEditor;
20
+ this._notebookTextModel = _notebookTextModel;
21
+ this._notebookService = _notebookService;
22
+ this._quickInputService = _quickInputService;
23
+ this._diffElementViewModel = _diffElementViewModel;
24
+ this._diffSide = _diffSide;
25
+ this._nestedCell = _nestedCell;
26
+ this._outputContainer = _outputContainer;
27
+ this.output = output;
28
+ this.resizeListener = this._register(( new DisposableStore()));
29
+ }
30
+ render(index, beforeElement) {
31
+ const outputItemDiv = createElement('div');
32
+ let result = undefined;
33
+ const [mimeTypes, pick] = this.output.resolveMimeTypes(this._notebookTextModel, undefined);
34
+ const pickedMimeTypeRenderer = this.output.pickedMimeType || mimeTypes[pick];
35
+ if (mimeTypes.length > 1) {
36
+ outputItemDiv.style.position = 'relative';
37
+ const mimeTypePicker = $('.multi-mimetype-output');
38
+ mimeTypePicker.classList.add(...ThemeIcon.asClassNameArray(mimetypeIcon));
39
+ mimeTypePicker.tabIndex = 0;
40
+ mimeTypePicker.title = ( localize(
41
+ 9441,
42
+ "Choose a different output mimetype, available mimetypes: {0}",
43
+ ( mimeTypes.map(mimeType => mimeType.mimeType)).join(', ')
44
+ ));
45
+ outputItemDiv.appendChild(mimeTypePicker);
46
+ this.resizeListener.add(addStandardDisposableListener(mimeTypePicker, 'mousedown', async (e) => {
47
+ if (e.leftButton) {
48
+ e.preventDefault();
49
+ e.stopPropagation();
50
+ await this.pickActiveMimeTypeRenderer(this._notebookTextModel, this.output);
51
+ }
52
+ }));
53
+ this.resizeListener.add((addDisposableListener(mimeTypePicker, EventType.KEY_DOWN, async (e) => {
54
+ const event = ( new StandardKeyboardEvent(e));
55
+ if ((event.equals(KeyCode.Enter) || event.equals(KeyCode.Space))) {
56
+ e.preventDefault();
57
+ e.stopPropagation();
58
+ await this.pickActiveMimeTypeRenderer(this._notebookTextModel, this.output);
59
+ }
60
+ })));
61
+ }
62
+ const innerContainer = $('.output-inner-container');
63
+ append(outputItemDiv, innerContainer);
64
+ if (mimeTypes.length !== 0) {
65
+ const renderer = this._notebookService.getRendererInfo(pickedMimeTypeRenderer.rendererId);
66
+ result = renderer
67
+ ? { type: RenderOutputType.Extension, renderer, source: this.output, mimeType: pickedMimeTypeRenderer.mimeType }
68
+ : this._renderMissingRenderer(this.output, pickedMimeTypeRenderer.mimeType);
69
+ this.output.pickedMimeType = pickedMimeTypeRenderer;
70
+ }
71
+ this.domNode = outputItemDiv;
72
+ this.renderResult = result;
73
+ if (!result) {
74
+ return;
75
+ }
76
+ if (beforeElement) {
77
+ this._outputContainer.insertBefore(outputItemDiv, beforeElement);
78
+ }
79
+ else {
80
+ this._outputContainer.appendChild(outputItemDiv);
81
+ }
82
+ this._notebookEditor.createOutput(this._diffElementViewModel, this._nestedCell, result, () => this.getOutputOffsetInCell(index), this._diffElementViewModel instanceof SideBySideDiffElementViewModel
83
+ ? this._diffSide
84
+ : this._diffElementViewModel.type === 'insert' ? DiffSide.Modified : DiffSide.Original);
85
+ }
86
+ _renderMissingRenderer(viewModel, preferredMimeType) {
87
+ if (!viewModel.model.outputs.length) {
88
+ return this._renderMessage(viewModel, ( localize(9442, "Cell has no output")));
89
+ }
90
+ if (!preferredMimeType) {
91
+ const mimeTypes = ( viewModel.model.outputs.map(op => op.mime));
92
+ const mimeTypesMessage = mimeTypes.join(', ');
93
+ return this._renderMessage(viewModel, ( localize(
94
+ 9443,
95
+ "No renderer could be found for output. It has the following mimetypes: {0}",
96
+ mimeTypesMessage
97
+ )));
98
+ }
99
+ return this._renderSearchForMimetype(viewModel, preferredMimeType);
100
+ }
101
+ _renderSearchForMimetype(viewModel, mimeType) {
102
+ const query = `@tag:notebookRenderer ${mimeType}`;
103
+ const p = $('p', undefined, `No renderer could be found for mimetype "${mimeType}", but one might be available on the Marketplace.`);
104
+ const a = $('a', { href: `command:workbench.extensions.search?%22${query}%22`, class: 'monaco-button monaco-text-button', tabindex: 0, role: 'button', style: 'padding: 8px; text-decoration: none; color: rgb(255, 255, 255); background-color: rgb(14, 99, 156); max-width: 200px;' }, `Search Marketplace`);
105
+ return {
106
+ type: RenderOutputType.Html,
107
+ source: viewModel,
108
+ htmlContent: p.outerHTML + a.outerHTML,
109
+ };
110
+ }
111
+ _renderMessage(viewModel, message) {
112
+ const el = $('p', undefined, message);
113
+ return { type: RenderOutputType.Html, source: viewModel, htmlContent: el.outerHTML };
114
+ }
115
+ async pickActiveMimeTypeRenderer(notebookTextModel, viewModel) {
116
+ const [mimeTypes, currIndex] = viewModel.resolveMimeTypes(notebookTextModel, undefined);
117
+ const items = ( mimeTypes.filter(mimeType => mimeType.isTrusted).map((mimeType, index) => ({
118
+ label: mimeType.mimeType,
119
+ id: mimeType.mimeType,
120
+ index: index,
121
+ picked: index === currIndex,
122
+ detail: this.generateRendererInfo(mimeType.rendererId),
123
+ description: index === currIndex ? ( localize(9444, "Currently Active")) : undefined
124
+ })));
125
+ const disposables = ( new DisposableStore());
126
+ const picker = disposables.add(this._quickInputService.createQuickPick());
127
+ picker.items = items;
128
+ picker.activeItems = items.filter(item => !!item.picked);
129
+ picker.placeholder = items.length !== mimeTypes.length
130
+ ? ( localize(
131
+ 9445,
132
+ "Select mimetype to render for current output. Rich mimetypes are available only when the notebook is trusted"
133
+ ))
134
+ : ( localize(9446, "Select mimetype to render for current output"));
135
+ const pick = await ( new Promise(resolve => {
136
+ disposables.add(picker.onDidAccept(() => {
137
+ resolve(picker.selectedItems.length === 1 ? picker.selectedItems[0].index : undefined);
138
+ disposables.dispose();
139
+ }));
140
+ picker.show();
141
+ }));
142
+ if (pick === undefined) {
143
+ return;
144
+ }
145
+ if (pick !== currIndex) {
146
+ const index = this._nestedCell.outputsViewModels.indexOf(viewModel);
147
+ const nextElement = this.domNode.nextElementSibling;
148
+ this.resizeListener.clear();
149
+ const element = this.domNode;
150
+ if (element) {
151
+ element.remove();
152
+ this._notebookEditor.removeInset(this._diffElementViewModel, this._nestedCell, viewModel, this._diffSide);
153
+ }
154
+ viewModel.pickedMimeType = mimeTypes[pick];
155
+ this.render(index, nextElement);
156
+ }
157
+ }
158
+ generateRendererInfo(renderId) {
159
+ const renderInfo = this._notebookService.getRendererInfo(renderId);
160
+ if (renderInfo) {
161
+ const displayName = renderInfo.displayName !== '' ? renderInfo.displayName : renderInfo.id;
162
+ return `${displayName} (${renderInfo.extensionId.value})`;
163
+ }
164
+ return localize(9447, "built-in");
165
+ }
166
+ getCellOutputCurrentIndex() {
167
+ return this._diffElementViewModel.getNestedCellViewModel(this._diffSide).outputs.indexOf(this.output.model);
168
+ }
169
+ updateHeight(index, height) {
170
+ this._diffElementViewModel.updateOutputHeight(this._diffSide, index, height);
171
+ }
172
+ getOutputOffsetInContainer(index) {
173
+ return this._diffElementViewModel.getOutputOffsetInContainer(this._diffSide, index);
174
+ }
175
+ getOutputOffsetInCell(index) {
176
+ return this._diffElementViewModel.getOutputOffsetInCell(this._diffSide, index);
177
+ }
178
+ }
179
+ let OutputContainer = class OutputContainer extends Disposable {
180
+ constructor(_editor, _notebookTextModel, _diffElementViewModel, _nestedCellViewModel, _diffSide, _outputContainer, _notebookService, _quickInputService) {
181
+ super();
182
+ this._editor = _editor;
183
+ this._notebookTextModel = _notebookTextModel;
184
+ this._diffElementViewModel = _diffElementViewModel;
185
+ this._nestedCellViewModel = _nestedCellViewModel;
186
+ this._diffSide = _diffSide;
187
+ this._outputContainer = _outputContainer;
188
+ this._notebookService = _notebookService;
189
+ this._quickInputService = _quickInputService;
190
+ this._outputEntries = ( new Map());
191
+ this._register(this._diffElementViewModel.onDidLayoutChange(() => {
192
+ this._outputEntries.forEach((value, key) => {
193
+ const index = _nestedCellViewModel.outputs.indexOf(key.model);
194
+ if (index >= 0) {
195
+ const top = this._diffElementViewModel.getOutputOffsetInContainer(this._diffSide, index);
196
+ value.domNode.style.top = `${top}px`;
197
+ }
198
+ });
199
+ }));
200
+ this._register(this._nestedCellViewModel.textModel.onDidChangeOutputs(splice => {
201
+ this._updateOutputs(splice);
202
+ }));
203
+ }
204
+ _updateOutputs(splice) {
205
+ const removedKeys = [];
206
+ this._outputEntries.forEach((value, key) => {
207
+ if (this._nestedCellViewModel.outputsViewModels.indexOf(key) < 0) {
208
+ removedKeys.push(key);
209
+ value.domNode.remove();
210
+ this._editor.removeInset(this._diffElementViewModel, this._nestedCellViewModel, key, this._diffSide);
211
+ }
212
+ });
213
+ removedKeys.forEach(key => {
214
+ this._outputEntries.get(key)?.dispose();
215
+ this._outputEntries.delete(key);
216
+ });
217
+ let prevElement = undefined;
218
+ const outputsToRender = this._nestedCellViewModel.outputsViewModels;
219
+ outputsToRender.reverse().forEach(output => {
220
+ if (( this._outputEntries.has(output))) {
221
+ prevElement = this._outputEntries.get(output).domNode;
222
+ return;
223
+ }
224
+ const currIndex = this._nestedCellViewModel.outputsViewModels.indexOf(output);
225
+ this._renderOutput(output, currIndex, prevElement);
226
+ prevElement = this._outputEntries.get(output)?.domNode;
227
+ });
228
+ }
229
+ render() {
230
+ for (let index = 0; index < this._nestedCellViewModel.outputsViewModels.length; index++) {
231
+ const currOutput = this._nestedCellViewModel.outputsViewModels[index];
232
+ this._renderOutput(currOutput, index, undefined);
233
+ }
234
+ }
235
+ showOutputs() {
236
+ for (let index = 0; index < this._nestedCellViewModel.outputsViewModels.length; index++) {
237
+ const currOutput = this._nestedCellViewModel.outputsViewModels[index];
238
+ this._editor.showInset(this._diffElementViewModel, currOutput.cellViewModel, currOutput, this._diffSide);
239
+ }
240
+ }
241
+ hideOutputs() {
242
+ this._outputEntries.forEach((outputElement, cellOutputViewModel) => {
243
+ this._editor.hideInset(this._diffElementViewModel, this._nestedCellViewModel, cellOutputViewModel);
244
+ });
245
+ }
246
+ _renderOutput(currOutput, index, beforeElement) {
247
+ if (!( this._outputEntries.has(currOutput))) {
248
+ this._outputEntries.set(currOutput, ( new OutputElement(
249
+ this._editor,
250
+ this._notebookTextModel,
251
+ this._notebookService,
252
+ this._quickInputService,
253
+ this._diffElementViewModel,
254
+ this._diffSide,
255
+ this._nestedCellViewModel,
256
+ this._outputContainer,
257
+ currOutput
258
+ )));
259
+ }
260
+ const renderElement = this._outputEntries.get(currOutput);
261
+ renderElement.render(index, beforeElement);
262
+ }
263
+ };
264
+ OutputContainer = ( __decorate([
265
+ ( __param(6, INotebookService)),
266
+ ( __param(7, IQuickInputService))
267
+ ], OutputContainer));
268
+
269
+ export { OutputContainer, OutputElement };
@@ -0,0 +1,258 @@
1
+ import { Emitter } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
+ import { FontInfo } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/config/fontInfo";
5
+ import * as editorCommon from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon";
6
+ import { DiffNestedCellViewModel } from "./diffNestedCellViewModel.js";
7
+ import { NotebookDiffEditorEventDispatcher } from "./eventDispatcher.js";
8
+ import { CellDiffViewModelLayoutChangeEvent, DiffSide, IDiffElementLayoutInfo } from "./notebookDiffEditorBrowser.js";
9
+ import { IGenericCellViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
10
+ import { NotebookLayoutInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookViewEvents";
11
+ import { NotebookCellTextModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel";
12
+ import { NotebookTextModel } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/common/model/notebookTextModel";
13
+ import { ICellOutput, INotebookTextModel, IOutputDto, IOutputItemDto } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
14
+ import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
15
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
16
+ import { IDiffEditorHeightCalculatorService } from "./editorHeightCalculator.js";
17
+ import { NotebookDocumentMetadataTextModel } from "../../common/model/notebookMetadataTextModel.js";
18
+ export declare const HeightOfHiddenLinesRegionInDiffEditor = 24;
19
+ export declare const DefaultLineHeight = 17;
20
+ export declare enum PropertyFoldingState {
21
+ Expanded = 0,
22
+ Collapsed = 1
23
+ }
24
+ export declare const OUTPUT_EDITOR_HEIGHT_MAGIC = 1440;
25
+ type ILayoutInfoDelta0 = {
26
+ [K in keyof IDiffElementLayoutInfo]?: number;
27
+ };
28
+ interface ILayoutInfoDelta extends ILayoutInfoDelta0 {
29
+ rawOutputHeight?: number;
30
+ recomputeOutput?: boolean;
31
+ }
32
+ export type IDiffElementViewModelBase = DiffElementCellViewModelBase | DiffElementPlaceholderViewModel | NotebookDocumentMetadataViewModel;
33
+ export declare abstract class DiffElementViewModelBase extends Disposable {
34
+ readonly mainDocumentTextModel: INotebookTextModel;
35
+ readonly editorEventDispatcher: NotebookDiffEditorEventDispatcher;
36
+ readonly initData: {
37
+ metadataStatusHeight: number;
38
+ outputStatusHeight: number;
39
+ fontInfo: FontInfo | undefined;
40
+ };
41
+ protected _layoutInfoEmitter: Emitter<CellDiffViewModelLayoutChangeEvent>;
42
+ onDidLayoutChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<CellDiffViewModelLayoutChangeEvent>;
43
+ abstract renderOutput: boolean;
44
+ constructor(mainDocumentTextModel: INotebookTextModel, editorEventDispatcher: NotebookDiffEditorEventDispatcher, initData: {
45
+ metadataStatusHeight: number;
46
+ outputStatusHeight: number;
47
+ fontInfo: FontInfo | undefined;
48
+ });
49
+ abstract layoutChange(): void;
50
+ abstract getHeight(lineHeight: number): number;
51
+ abstract get totalHeight(): number;
52
+ }
53
+ export declare class DiffElementPlaceholderViewModel extends DiffElementViewModelBase {
54
+ readonly type: "placeholder";
55
+ hiddenCells: DiffElementCellViewModelBase[];
56
+ protected _unfoldHiddenCells: Emitter<void>;
57
+ onUnfoldHiddenCells: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
58
+ renderOutput: boolean;
59
+ constructor(mainDocumentTextModel: INotebookTextModel, editorEventDispatcher: NotebookDiffEditorEventDispatcher, initData: {
60
+ metadataStatusHeight: number;
61
+ outputStatusHeight: number;
62
+ fontInfo: FontInfo | undefined;
63
+ });
64
+ get totalHeight(): number;
65
+ getHeight(_: number): number;
66
+ layoutChange(): void;
67
+ showHiddenCells(): void;
68
+ }
69
+ export declare class NotebookDocumentMetadataViewModel extends DiffElementViewModelBase {
70
+ readonly originalDocumentTextModel: INotebookTextModel;
71
+ readonly modifiedDocumentTextModel: INotebookTextModel;
72
+ readonly type: "unchangedMetadata" | "modifiedMetadata";
73
+ private readonly editorHeightCalculator;
74
+ readonly originalMetadata: NotebookDocumentMetadataTextModel;
75
+ readonly modifiedMetadata: NotebookDocumentMetadataTextModel;
76
+ cellFoldingState: PropertyFoldingState;
77
+ protected _layoutInfo: IDiffElementLayoutInfo;
78
+ renderOutput: boolean;
79
+ set editorHeight(height: number);
80
+ get editorHeight(): number;
81
+ set editorMargin(margin: number);
82
+ get editorMargin(): number;
83
+ get layoutInfo(): IDiffElementLayoutInfo;
84
+ get totalHeight(): number;
85
+ private _sourceEditorViewState;
86
+ constructor(originalDocumentTextModel: INotebookTextModel, modifiedDocumentTextModel: INotebookTextModel, type: "unchangedMetadata" | "modifiedMetadata", editorEventDispatcher: NotebookDiffEditorEventDispatcher, initData: {
87
+ metadataStatusHeight: number;
88
+ outputStatusHeight: number;
89
+ fontInfo: FontInfo | undefined;
90
+ }, notebookService: INotebookService, editorHeightCalculator: IDiffEditorHeightCalculatorService);
91
+ computeHeights(): Promise<void>;
92
+ layoutChange(): void;
93
+ protected _layout(delta: ILayoutInfoDelta): void;
94
+ getHeight(lineHeight: number): number;
95
+ private _computeTotalHeight;
96
+ computeInputEditorHeight(_lineHeight: number): number;
97
+ private _fireLayoutChangeEvent;
98
+ getComputedCellContainerWidth(layoutInfo: NotebookLayoutInfo, diffEditor: boolean, fullWidth: boolean): number;
99
+ getSourceEditorViewState(): editorCommon.ICodeEditorViewState | editorCommon.IDiffEditorViewState | null;
100
+ saveSpirceEditorViewState(viewState: editorCommon.ICodeEditorViewState | editorCommon.IDiffEditorViewState | null): void;
101
+ }
102
+ export declare abstract class DiffElementCellViewModelBase extends DiffElementViewModelBase {
103
+ readonly type: "unchanged" | "insert" | "delete" | "modified";
104
+ readonly index: number;
105
+ private readonly configurationService;
106
+ readonly diffEditorHeightCalculator: IDiffEditorHeightCalculatorService;
107
+ cellFoldingState: PropertyFoldingState;
108
+ metadataFoldingState: PropertyFoldingState;
109
+ outputFoldingState: PropertyFoldingState;
110
+ protected _stateChangeEmitter: Emitter<{
111
+ renderOutput: boolean;
112
+ }>;
113
+ onDidStateChange: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<{
114
+ renderOutput: boolean;
115
+ }>;
116
+ protected _layoutInfo: IDiffElementLayoutInfo;
117
+ displayIconToHideUnmodifiedCells?: boolean;
118
+ private _hideUnchangedCells;
119
+ onHideUnchangedCells: import("@codingame/monaco-vscode-api/vscode/vs/base/common/event").Event<void>;
120
+ hideUnchangedCells(): void;
121
+ set rawOutputHeight(height: number);
122
+ get rawOutputHeight(): number;
123
+ set outputStatusHeight(height: number);
124
+ get outputStatusHeight(): number;
125
+ set outputMetadataHeight(height: number);
126
+ get outputMetadataHeight(): number;
127
+ set editorHeight(height: number);
128
+ get editorHeight(): number;
129
+ set editorMargin(margin: number);
130
+ get editorMargin(): number;
131
+ set metadataStatusHeight(height: number);
132
+ get metadataStatusHeight(): number;
133
+ set metadataHeight(height: number);
134
+ get metadataHeight(): number;
135
+ private _renderOutput;
136
+ set renderOutput(value: boolean);
137
+ get renderOutput(): boolean;
138
+ get layoutInfo(): IDiffElementLayoutInfo;
139
+ get totalHeight(): number;
140
+ protected get ignoreOutputs(): boolean;
141
+ protected get ignoreMetadata(): boolean;
142
+ private _sourceEditorViewState;
143
+ private _outputEditorViewState;
144
+ private _metadataEditorViewState;
145
+ readonly original: DiffNestedCellViewModel | undefined;
146
+ readonly modified: DiffNestedCellViewModel | undefined;
147
+ constructor(mainDocumentTextModel: INotebookTextModel, original: NotebookCellTextModel | undefined, modified: NotebookCellTextModel | undefined, type: "unchanged" | "insert" | "delete" | "modified", editorEventDispatcher: NotebookDiffEditorEventDispatcher, initData: {
148
+ metadataStatusHeight: number;
149
+ outputStatusHeight: number;
150
+ fontInfo: FontInfo | undefined;
151
+ }, notebookService: INotebookService, index: number, configurationService: IConfigurationService, diffEditorHeightCalculator: IDiffEditorHeightCalculatorService);
152
+ layoutChange(): void;
153
+ private _estimateEditorHeight;
154
+ protected _layout(delta: ILayoutInfoDelta): void;
155
+ getHeight(lineHeight: number): number;
156
+ private _computeTotalHeight;
157
+ computeInputEditorHeight(lineHeight: number): number;
158
+ private _getOutputTotalHeight;
159
+ private _fireLayoutChangeEvent;
160
+ abstract checkIfInputModified(): false | {
161
+ reason: string | undefined;
162
+ };
163
+ abstract checkIfOutputsModified(): false | {
164
+ reason: string | undefined;
165
+ };
166
+ abstract checkMetadataIfModified(): false | {
167
+ reason: string | undefined;
168
+ };
169
+ abstract isOutputEmpty(): boolean;
170
+ abstract getRichOutputTotalHeight(): number;
171
+ abstract getCellByUri(cellUri: URI): IGenericCellViewModel;
172
+ abstract getOutputOffsetInCell(diffSide: DiffSide, index: number): number;
173
+ abstract getOutputOffsetInContainer(diffSide: DiffSide, index: number): number;
174
+ abstract updateOutputHeight(diffSide: DiffSide, index: number, height: number): void;
175
+ abstract getNestedCellViewModel(diffSide: DiffSide): DiffNestedCellViewModel;
176
+ getComputedCellContainerWidth(layoutInfo: NotebookLayoutInfo, diffEditor: boolean, fullWidth: boolean): number;
177
+ getOutputEditorViewState(): editorCommon.ICodeEditorViewState | editorCommon.IDiffEditorViewState | null;
178
+ saveOutputEditorViewState(viewState: editorCommon.ICodeEditorViewState | editorCommon.IDiffEditorViewState | null): void;
179
+ getMetadataEditorViewState(): editorCommon.ICodeEditorViewState | editorCommon.IDiffEditorViewState | null;
180
+ saveMetadataEditorViewState(viewState: editorCommon.ICodeEditorViewState | editorCommon.IDiffEditorViewState | null): void;
181
+ getSourceEditorViewState(): editorCommon.ICodeEditorViewState | editorCommon.IDiffEditorViewState | null;
182
+ saveSpirceEditorViewState(viewState: editorCommon.ICodeEditorViewState | editorCommon.IDiffEditorViewState | null): void;
183
+ }
184
+ export declare class SideBySideDiffElementViewModel extends DiffElementCellViewModelBase {
185
+ readonly otherDocumentTextModel: NotebookTextModel;
186
+ get originalDocument(): NotebookTextModel;
187
+ get modifiedDocument(): INotebookTextModel;
188
+ readonly original: DiffNestedCellViewModel;
189
+ readonly modified: DiffNestedCellViewModel;
190
+ readonly type: "unchanged" | "modified";
191
+ /**
192
+ * The height of the editor when the unchanged lines are collapsed.
193
+ */
194
+ private editorHeightWithUnchangedLinesCollapsed?;
195
+ constructor(mainDocumentTextModel: NotebookTextModel, otherDocumentTextModel: NotebookTextModel, original: NotebookCellTextModel, modified: NotebookCellTextModel, type: "unchanged" | "modified", editorEventDispatcher: NotebookDiffEditorEventDispatcher, initData: {
196
+ metadataStatusHeight: number;
197
+ outputStatusHeight: number;
198
+ fontInfo: FontInfo | undefined;
199
+ }, notebookService: INotebookService, configurationService: IConfigurationService, index: number, diffEditorHeightCalculator: IDiffEditorHeightCalculatorService);
200
+ checkIfInputModified(): false | {
201
+ reason: string | undefined;
202
+ };
203
+ checkIfOutputsModified(): false | {
204
+ reason: string | undefined;
205
+ kind: OutputComparison;
206
+ };
207
+ checkMetadataIfModified(): false | {
208
+ reason: undefined;
209
+ };
210
+ updateOutputHeight(diffSide: DiffSide, index: number, height: number): void;
211
+ getOutputOffsetInContainer(diffSide: DiffSide, index: number): number;
212
+ getOutputOffsetInCell(diffSide: DiffSide, index: number): number;
213
+ isOutputEmpty(): boolean;
214
+ getRichOutputTotalHeight(): number;
215
+ getNestedCellViewModel(diffSide: DiffSide): DiffNestedCellViewModel;
216
+ getCellByUri(cellUri: URI): IGenericCellViewModel;
217
+ computeInputEditorHeight(lineHeight: number): number;
218
+ private computeModifiedInputEditorHeight;
219
+ private computeModifiedMetadataEditorHeight;
220
+ computeEditorHeights(): Promise<void>;
221
+ }
222
+ export declare class SingleSideDiffElementViewModel extends DiffElementCellViewModelBase {
223
+ readonly otherDocumentTextModel: NotebookTextModel;
224
+ get cellViewModel(): DiffNestedCellViewModel;
225
+ get originalDocument(): NotebookTextModel | INotebookTextModel;
226
+ get modifiedDocument(): NotebookTextModel | INotebookTextModel;
227
+ readonly type: "insert" | "delete";
228
+ constructor(mainDocumentTextModel: NotebookTextModel, otherDocumentTextModel: NotebookTextModel, original: NotebookCellTextModel | undefined, modified: NotebookCellTextModel | undefined, type: "insert" | "delete", editorEventDispatcher: NotebookDiffEditorEventDispatcher, initData: {
229
+ metadataStatusHeight: number;
230
+ outputStatusHeight: number;
231
+ fontInfo: FontInfo | undefined;
232
+ }, notebookService: INotebookService, configurationService: IConfigurationService, diffEditorHeightCalculator: IDiffEditorHeightCalculatorService, index: number);
233
+ checkIfInputModified(): false | {
234
+ reason: string | undefined;
235
+ };
236
+ getNestedCellViewModel(diffSide: DiffSide): DiffNestedCellViewModel;
237
+ checkIfOutputsModified(): false | {
238
+ reason: string | undefined;
239
+ };
240
+ checkMetadataIfModified(): false | {
241
+ reason: string | undefined;
242
+ };
243
+ updateOutputHeight(diffSide: DiffSide, index: number, height: number): void;
244
+ getOutputOffsetInContainer(diffSide: DiffSide, index: number): number;
245
+ getOutputOffsetInCell(diffSide: DiffSide, index: number): number;
246
+ isOutputEmpty(): boolean;
247
+ getRichOutputTotalHeight(): number;
248
+ getCellByUri(cellUri: URI): IGenericCellViewModel;
249
+ }
250
+ export declare enum OutputComparison {
251
+ Unchanged = 0,
252
+ Metadata = 1,
253
+ Other = 2
254
+ }
255
+ export declare function outputEqual(a: ICellOutput, b: ICellOutput): OutputComparison;
256
+ export declare function getStreamOutputData(outputs: IOutputItemDto[]): string | null;
257
+ export declare function getFormattedOutputJSON(outputs: IOutputDto[]): string;
258
+ export {};