@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,567 @@
1
+
2
+ import { registerCss } from '@codingame/monaco-vscode-api/css';
3
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
+ import * as notebookDiff from './notebookDiff.css';
5
+ import { $, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
6
+ import { createStyleSheet } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/domStylesheets';
7
+ import { MouseController, isMonacoEditor } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/list/listWidget';
8
+ import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
9
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
10
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
11
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
12
+ import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
13
+ import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
14
+ import { IListService } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService.service';
15
+ import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
16
+ import { DIFF_CELL_MARGIN } from './notebookDiffEditorBrowser.js';
17
+ import { CollapsedCellOverlayWidget, CellDiffPlaceholderElement, UnchangedCellOverlayWidget, NotebookDocumentMetadataElement, InsertElement, DeletedElement, ModifiedElement, getOptimizedNestedCodeEditorWidgetOptions } from './diffComponents.js';
18
+ import { CodeEditorWidget } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
19
+ import { DiffEditorWidget } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/diffEditor/diffEditorWidget';
20
+ import { MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
21
+ import { IMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service';
22
+ import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
23
+ import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
24
+ import { CodiconActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView';
25
+ import { createBareFontInfoFromRawSettings } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/fontInfoFromSettings';
26
+ import { PixelRatio } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/pixelRatio';
27
+ import { WorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
28
+ import { fixedDiffEditorOptions, fixedEditorOptions } from './diffCellEditorOptions.js';
29
+ import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
30
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
31
+ import { EditorExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
32
+
33
+ var CellDiffPlaceholderRenderer_1, NotebookDocumentMetadataDiffRenderer_1, CellDiffSingleSideRenderer_1, CellDiffSideBySideRenderer_1;
34
+ registerCss(notebookDiff);
35
+ let NotebookCellTextDiffListDelegate = class NotebookCellTextDiffListDelegate {
36
+ constructor(targetWindow, configurationService) {
37
+ this.configurationService = configurationService;
38
+ const editorOptions = this.configurationService.getValue('editor');
39
+ this.lineHeight = createBareFontInfoFromRawSettings(editorOptions, PixelRatio.getInstance(targetWindow).value).lineHeight;
40
+ }
41
+ getHeight(element) {
42
+ return element.getHeight(this.lineHeight);
43
+ }
44
+ hasDynamicHeight(element) {
45
+ return false;
46
+ }
47
+ getTemplateId(element) {
48
+ switch (element.type) {
49
+ case 'delete':
50
+ case 'insert':
51
+ return CellDiffSingleSideRenderer.TEMPLATE_ID;
52
+ case 'modified':
53
+ case 'unchanged':
54
+ return CellDiffSideBySideRenderer.TEMPLATE_ID;
55
+ case 'placeholder':
56
+ return CellDiffPlaceholderRenderer.TEMPLATE_ID;
57
+ case 'modifiedMetadata':
58
+ case 'unchangedMetadata':
59
+ return NotebookDocumentMetadataDiffRenderer.TEMPLATE_ID;
60
+ }
61
+ }
62
+ };
63
+ NotebookCellTextDiffListDelegate = ( __decorate([
64
+ ( __param(1, IConfigurationService))
65
+ ], NotebookCellTextDiffListDelegate));
66
+ let CellDiffPlaceholderRenderer = class CellDiffPlaceholderRenderer {
67
+ static { CellDiffPlaceholderRenderer_1 = this; }
68
+ static { this.TEMPLATE_ID = 'cell_diff_placeholder'; }
69
+ constructor(notebookEditor, instantiationService) {
70
+ this.notebookEditor = notebookEditor;
71
+ this.instantiationService = instantiationService;
72
+ }
73
+ get templateId() {
74
+ return CellDiffPlaceholderRenderer_1.TEMPLATE_ID;
75
+ }
76
+ renderTemplate(container) {
77
+ const body = $('.cell-placeholder-body');
78
+ append(container, body);
79
+ const elementDisposables = ( new DisposableStore());
80
+ const marginOverlay = ( new CollapsedCellOverlayWidget(body));
81
+ const contents = append(body, $('.contents'));
82
+ const placeholder = append(contents, $('span.text', { title: ( localize(9474, 'Double click to show')) }));
83
+ return {
84
+ body,
85
+ container,
86
+ placeholder,
87
+ marginOverlay,
88
+ elementDisposables
89
+ };
90
+ }
91
+ renderElement(element, index, templateData) {
92
+ templateData.body.classList.remove('left', 'right', 'full');
93
+ templateData.elementDisposables.add(this.instantiationService.createInstance(CellDiffPlaceholderElement, element, templateData));
94
+ }
95
+ disposeTemplate(templateData) {
96
+ templateData.container.innerText = '';
97
+ }
98
+ disposeElement(element, index, templateData) {
99
+ templateData.elementDisposables.clear();
100
+ }
101
+ };
102
+ CellDiffPlaceholderRenderer = CellDiffPlaceholderRenderer_1 = ( __decorate([
103
+ ( __param(1, IInstantiationService))
104
+ ], CellDiffPlaceholderRenderer));
105
+ let NotebookDocumentMetadataDiffRenderer = class NotebookDocumentMetadataDiffRenderer {
106
+ static { NotebookDocumentMetadataDiffRenderer_1 = this; }
107
+ static { this.TEMPLATE_ID = 'notebook_metadata_diff_side_by_side'; }
108
+ constructor(notebookEditor, instantiationService, contextMenuService, keybindingService, menuService, contextKeyService, notificationService, themeService, accessibilityService) {
109
+ this.notebookEditor = notebookEditor;
110
+ this.instantiationService = instantiationService;
111
+ this.contextMenuService = contextMenuService;
112
+ this.keybindingService = keybindingService;
113
+ this.menuService = menuService;
114
+ this.contextKeyService = contextKeyService;
115
+ this.notificationService = notificationService;
116
+ this.themeService = themeService;
117
+ this.accessibilityService = accessibilityService;
118
+ }
119
+ get templateId() {
120
+ return NotebookDocumentMetadataDiffRenderer_1.TEMPLATE_ID;
121
+ }
122
+ renderTemplate(container) {
123
+ const body = $('.cell-body');
124
+ append(container, body);
125
+ const diffEditorContainer = $('.cell-diff-editor-container');
126
+ append(body, diffEditorContainer);
127
+ const cellHeaderContainer = append(diffEditorContainer, $('.input-header-container'));
128
+ const sourceContainer = append(diffEditorContainer, $('.source-container'));
129
+ const { editor, editorContainer } = this._buildSourceEditor(sourceContainer);
130
+ const inputToolbarContainer = append(sourceContainer, $('.editor-input-toolbar-container'));
131
+ const cellToolbarContainer = append(inputToolbarContainer, $('div.property-toolbar'));
132
+ const toolbar = this.instantiationService.createInstance(WorkbenchToolBar, cellToolbarContainer, {
133
+ actionViewItemProvider: (action, options) => {
134
+ if (action instanceof MenuItemAction) {
135
+ const item = ( new CodiconActionViewItem(
136
+ action,
137
+ { hoverDelegate: options.hoverDelegate },
138
+ this.keybindingService,
139
+ this.notificationService,
140
+ this.contextKeyService,
141
+ this.themeService,
142
+ this.contextMenuService,
143
+ this.accessibilityService
144
+ ));
145
+ return item;
146
+ }
147
+ return undefined;
148
+ },
149
+ highlightToggledItems: true
150
+ });
151
+ const borderContainer = append(body, $('.border-container'));
152
+ const leftBorder = append(borderContainer, $('.left-border'));
153
+ const rightBorder = append(borderContainer, $('.right-border'));
154
+ const topBorder = append(borderContainer, $('.top-border'));
155
+ const bottomBorder = append(borderContainer, $('.bottom-border'));
156
+ const marginOverlay = ( new UnchangedCellOverlayWidget(body));
157
+ const elementDisposables = ( new DisposableStore());
158
+ return {
159
+ body,
160
+ container,
161
+ diffEditorContainer,
162
+ cellHeaderContainer,
163
+ sourceEditor: editor,
164
+ editorContainer,
165
+ inputToolbarContainer,
166
+ toolbar,
167
+ leftBorder,
168
+ rightBorder,
169
+ topBorder,
170
+ bottomBorder,
171
+ marginOverlay,
172
+ elementDisposables
173
+ };
174
+ }
175
+ _buildSourceEditor(sourceContainer) {
176
+ return buildDiffEditorWidget(this.instantiationService, this.notebookEditor, sourceContainer, { readOnly: true });
177
+ }
178
+ renderElement(element, index, templateData) {
179
+ templateData.body.classList.remove('full');
180
+ templateData.elementDisposables.add(this.instantiationService.createInstance(NotebookDocumentMetadataElement, this.notebookEditor, element, templateData));
181
+ }
182
+ disposeTemplate(templateData) {
183
+ templateData.container.innerText = '';
184
+ templateData.sourceEditor.dispose();
185
+ templateData.toolbar?.dispose();
186
+ templateData.elementDisposables.dispose();
187
+ }
188
+ disposeElement(element, index, templateData) {
189
+ if (templateData.toolbar) {
190
+ templateData.toolbar.context = undefined;
191
+ }
192
+ templateData.elementDisposables.clear();
193
+ }
194
+ };
195
+ NotebookDocumentMetadataDiffRenderer = NotebookDocumentMetadataDiffRenderer_1 = ( __decorate([
196
+ ( __param(1, IInstantiationService)),
197
+ ( __param(2, IContextMenuService)),
198
+ ( __param(3, IKeybindingService)),
199
+ ( __param(4, IMenuService)),
200
+ ( __param(5, IContextKeyService)),
201
+ ( __param(6, INotificationService)),
202
+ ( __param(7, IThemeService)),
203
+ ( __param(8, IAccessibilityService))
204
+ ], NotebookDocumentMetadataDiffRenderer));
205
+ let CellDiffSingleSideRenderer = class CellDiffSingleSideRenderer {
206
+ static { CellDiffSingleSideRenderer_1 = this; }
207
+ static { this.TEMPLATE_ID = 'cell_diff_single'; }
208
+ constructor(notebookEditor, instantiationService) {
209
+ this.notebookEditor = notebookEditor;
210
+ this.instantiationService = instantiationService;
211
+ }
212
+ get templateId() {
213
+ return CellDiffSingleSideRenderer_1.TEMPLATE_ID;
214
+ }
215
+ renderTemplate(container) {
216
+ const body = $('.cell-body');
217
+ append(container, body);
218
+ const diffEditorContainer = $('.cell-diff-editor-container');
219
+ append(body, diffEditorContainer);
220
+ const diagonalFill = append(body, $('.diagonal-fill'));
221
+ const cellHeaderContainer = append(diffEditorContainer, $('.input-header-container'));
222
+ const sourceContainer = append(diffEditorContainer, $('.source-container'));
223
+ const { editor, editorContainer } = this._buildSourceEditor(sourceContainer);
224
+ const metadataHeaderContainer = append(diffEditorContainer, $('.metadata-header-container'));
225
+ const metadataInfoContainer = append(diffEditorContainer, $('.metadata-info-container'));
226
+ const outputHeaderContainer = append(diffEditorContainer, $('.output-header-container'));
227
+ const outputInfoContainer = append(diffEditorContainer, $('.output-info-container'));
228
+ const borderContainer = append(body, $('.border-container'));
229
+ const leftBorder = append(borderContainer, $('.left-border'));
230
+ const rightBorder = append(borderContainer, $('.right-border'));
231
+ const topBorder = append(borderContainer, $('.top-border'));
232
+ const bottomBorder = append(borderContainer, $('.bottom-border'));
233
+ return {
234
+ body,
235
+ container,
236
+ editorContainer,
237
+ diffEditorContainer,
238
+ diagonalFill,
239
+ cellHeaderContainer,
240
+ sourceEditor: editor,
241
+ metadataHeaderContainer,
242
+ metadataInfoContainer,
243
+ outputHeaderContainer,
244
+ outputInfoContainer,
245
+ leftBorder,
246
+ rightBorder,
247
+ topBorder,
248
+ bottomBorder,
249
+ elementDisposables: ( new DisposableStore())
250
+ };
251
+ }
252
+ _buildSourceEditor(sourceContainer) {
253
+ return buildSourceEditor(this.instantiationService, this.notebookEditor, sourceContainer);
254
+ }
255
+ renderElement(element, index, templateData) {
256
+ templateData.body.classList.remove('left', 'right', 'full');
257
+ switch (element.type) {
258
+ case 'delete':
259
+ templateData.elementDisposables.add(this.instantiationService.createInstance(DeletedElement, this.notebookEditor, element, templateData));
260
+ return;
261
+ case 'insert':
262
+ templateData.elementDisposables.add(this.instantiationService.createInstance(InsertElement, this.notebookEditor, element, templateData));
263
+ return;
264
+ }
265
+ }
266
+ disposeTemplate(templateData) {
267
+ templateData.container.innerText = '';
268
+ templateData.sourceEditor.dispose();
269
+ templateData.elementDisposables.dispose();
270
+ }
271
+ disposeElement(element, index, templateData) {
272
+ templateData.elementDisposables.clear();
273
+ }
274
+ };
275
+ CellDiffSingleSideRenderer = CellDiffSingleSideRenderer_1 = ( __decorate([
276
+ ( __param(1, IInstantiationService))
277
+ ], CellDiffSingleSideRenderer));
278
+ let CellDiffSideBySideRenderer = class CellDiffSideBySideRenderer {
279
+ static { CellDiffSideBySideRenderer_1 = this; }
280
+ static { this.TEMPLATE_ID = 'cell_diff_side_by_side'; }
281
+ constructor(notebookEditor, instantiationService, contextMenuService, keybindingService, menuService, contextKeyService, notificationService, themeService, accessibilityService) {
282
+ this.notebookEditor = notebookEditor;
283
+ this.instantiationService = instantiationService;
284
+ this.contextMenuService = contextMenuService;
285
+ this.keybindingService = keybindingService;
286
+ this.menuService = menuService;
287
+ this.contextKeyService = contextKeyService;
288
+ this.notificationService = notificationService;
289
+ this.themeService = themeService;
290
+ this.accessibilityService = accessibilityService;
291
+ }
292
+ get templateId() {
293
+ return CellDiffSideBySideRenderer_1.TEMPLATE_ID;
294
+ }
295
+ renderTemplate(container) {
296
+ const body = $('.cell-body');
297
+ append(container, body);
298
+ const diffEditorContainer = $('.cell-diff-editor-container');
299
+ append(body, diffEditorContainer);
300
+ const cellHeaderContainer = append(diffEditorContainer, $('.input-header-container'));
301
+ const sourceContainer = append(diffEditorContainer, $('.source-container'));
302
+ const { editor, editorContainer } = this._buildSourceEditor(sourceContainer);
303
+ const inputToolbarContainer = append(sourceContainer, $('.editor-input-toolbar-container'));
304
+ const cellToolbarContainer = append(inputToolbarContainer, $('div.property-toolbar'));
305
+ const toolbar = this.instantiationService.createInstance(WorkbenchToolBar, cellToolbarContainer, {
306
+ actionViewItemProvider: (action, options) => {
307
+ if (action instanceof MenuItemAction) {
308
+ const item = ( new CodiconActionViewItem(
309
+ action,
310
+ { hoverDelegate: options.hoverDelegate },
311
+ this.keybindingService,
312
+ this.notificationService,
313
+ this.contextKeyService,
314
+ this.themeService,
315
+ this.contextMenuService,
316
+ this.accessibilityService
317
+ ));
318
+ return item;
319
+ }
320
+ return undefined;
321
+ },
322
+ highlightToggledItems: true
323
+ });
324
+ const metadataHeaderContainer = append(diffEditorContainer, $('.metadata-header-container'));
325
+ const metadataInfoContainer = append(diffEditorContainer, $('.metadata-info-container'));
326
+ const outputHeaderContainer = append(diffEditorContainer, $('.output-header-container'));
327
+ const outputInfoContainer = append(diffEditorContainer, $('.output-info-container'));
328
+ const borderContainer = append(body, $('.border-container'));
329
+ const leftBorder = append(borderContainer, $('.left-border'));
330
+ const rightBorder = append(borderContainer, $('.right-border'));
331
+ const topBorder = append(borderContainer, $('.top-border'));
332
+ const bottomBorder = append(borderContainer, $('.bottom-border'));
333
+ const marginOverlay = ( new UnchangedCellOverlayWidget(body));
334
+ const elementDisposables = ( new DisposableStore());
335
+ return {
336
+ body,
337
+ container,
338
+ diffEditorContainer,
339
+ cellHeaderContainer,
340
+ sourceEditor: editor,
341
+ editorContainer,
342
+ inputToolbarContainer,
343
+ toolbar,
344
+ metadataHeaderContainer,
345
+ metadataInfoContainer,
346
+ outputHeaderContainer,
347
+ outputInfoContainer,
348
+ leftBorder,
349
+ rightBorder,
350
+ topBorder,
351
+ bottomBorder,
352
+ marginOverlay,
353
+ elementDisposables
354
+ };
355
+ }
356
+ _buildSourceEditor(sourceContainer) {
357
+ return buildDiffEditorWidget(this.instantiationService, this.notebookEditor, sourceContainer);
358
+ }
359
+ renderElement(element, index, templateData) {
360
+ templateData.body.classList.remove('left', 'right', 'full');
361
+ switch (element.type) {
362
+ case 'unchanged':
363
+ templateData.elementDisposables.add(this.instantiationService.createInstance(ModifiedElement, this.notebookEditor, element, templateData));
364
+ return;
365
+ case 'modified':
366
+ templateData.elementDisposables.add(this.instantiationService.createInstance(ModifiedElement, this.notebookEditor, element, templateData));
367
+ return;
368
+ }
369
+ }
370
+ disposeTemplate(templateData) {
371
+ templateData.container.innerText = '';
372
+ templateData.sourceEditor.dispose();
373
+ templateData.toolbar?.dispose();
374
+ templateData.elementDisposables.dispose();
375
+ }
376
+ disposeElement(element, index, templateData) {
377
+ if (templateData.toolbar) {
378
+ templateData.toolbar.context = undefined;
379
+ }
380
+ templateData.elementDisposables.clear();
381
+ }
382
+ };
383
+ CellDiffSideBySideRenderer = CellDiffSideBySideRenderer_1 = ( __decorate([
384
+ ( __param(1, IInstantiationService)),
385
+ ( __param(2, IContextMenuService)),
386
+ ( __param(3, IKeybindingService)),
387
+ ( __param(4, IMenuService)),
388
+ ( __param(5, IContextKeyService)),
389
+ ( __param(6, INotificationService)),
390
+ ( __param(7, IThemeService)),
391
+ ( __param(8, IAccessibilityService))
392
+ ], CellDiffSideBySideRenderer));
393
+ class NotebookMouseController extends MouseController {
394
+ onViewPointer(e) {
395
+ if (isMonacoEditor(e.browserEvent.target)) {
396
+ const focus = typeof e.index === 'undefined' ? [] : [e.index];
397
+ this.list.setFocus(focus, e.browserEvent);
398
+ }
399
+ else {
400
+ super.onViewPointer(e);
401
+ }
402
+ }
403
+ }
404
+ let NotebookTextDiffList = class NotebookTextDiffList extends WorkbenchList {
405
+ get rowsContainer() {
406
+ return this.view.containerDomNode;
407
+ }
408
+ constructor(listUser, container, delegate, renderers, contextKeyService, options, listService, configurationService, instantiationService) {
409
+ super(listUser, container, delegate, renderers, options, contextKeyService, listService, configurationService, instantiationService);
410
+ }
411
+ createMouseController(options) {
412
+ return ( new NotebookMouseController(this));
413
+ }
414
+ getCellViewScrollTop(element) {
415
+ const index = this.indexOf(element);
416
+ return this.view.elementTop(index);
417
+ }
418
+ getScrollHeight() {
419
+ return this.view.scrollHeight;
420
+ }
421
+ triggerScrollFromMouseWheelEvent(browserEvent) {
422
+ this.view.delegateScrollFromMouseWheelEvent(browserEvent);
423
+ }
424
+ delegateVerticalScrollbarPointerDown(browserEvent) {
425
+ this.view.delegateVerticalScrollbarPointerDown(browserEvent);
426
+ }
427
+ clear() {
428
+ super.splice(0, this.length);
429
+ }
430
+ updateElementHeight2(element, size) {
431
+ const viewIndex = this.indexOf(element);
432
+ const focused = this.getFocus();
433
+ this.view.updateElementHeight(viewIndex, size, focused.length ? focused[0] : null);
434
+ }
435
+ style(styles) {
436
+ const selectorSuffix = this.view.domId;
437
+ if (!this.styleElement) {
438
+ this.styleElement = createStyleSheet(this.view.domNode);
439
+ }
440
+ const suffix = selectorSuffix && `.${selectorSuffix}`;
441
+ const content = [];
442
+ if (styles.listBackground) {
443
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows { background: ${styles.listBackground}; }`);
444
+ }
445
+ if (styles.listFocusBackground) {
446
+ content.push(`.monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${styles.listFocusBackground}; }`);
447
+ content.push(`.monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${styles.listFocusBackground}; }`);
448
+ }
449
+ if (styles.listFocusForeground) {
450
+ content.push(`.monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`);
451
+ }
452
+ if (styles.listActiveSelectionBackground) {
453
+ content.push(`.monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${styles.listActiveSelectionBackground}; }`);
454
+ content.push(`.monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${styles.listActiveSelectionBackground}; }`);
455
+ }
456
+ if (styles.listActiveSelectionForeground) {
457
+ content.push(`.monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${styles.listActiveSelectionForeground}; }`);
458
+ }
459
+ if (styles.listFocusAndSelectionBackground) {
460
+ content.push(`
461
+ .monaco-drag-image${suffix},
462
+ .monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { background-color: ${styles.listFocusAndSelectionBackground}; }
463
+ `);
464
+ }
465
+ if (styles.listFocusAndSelectionForeground) {
466
+ content.push(`
467
+ .monaco-drag-image${suffix},
468
+ .monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { color: ${styles.listFocusAndSelectionForeground}; }
469
+ `);
470
+ }
471
+ if (styles.listInactiveFocusBackground) {
472
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${styles.listInactiveFocusBackground}; }`);
473
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${styles.listInactiveFocusBackground}; }`);
474
+ }
475
+ if (styles.listInactiveSelectionBackground) {
476
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${styles.listInactiveSelectionBackground}; }`);
477
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${styles.listInactiveSelectionBackground}; }`);
478
+ }
479
+ if (styles.listInactiveSelectionForeground) {
480
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${styles.listInactiveSelectionForeground}; }`);
481
+ }
482
+ if (styles.listHoverBackground) {
483
+ content.push(`.monaco-list${suffix}:not(.drop-target) > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; }`);
484
+ }
485
+ if (styles.listHoverForeground) {
486
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { color: ${styles.listHoverForeground}; }`);
487
+ }
488
+ if (styles.listSelectionOutline) {
489
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; outline-offset: -1px; }`);
490
+ }
491
+ if (styles.listFocusOutline) {
492
+ content.push(`
493
+ .monaco-drag-image${suffix},
494
+ .monaco-list${suffix}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; }
495
+ `);
496
+ }
497
+ if (styles.listInactiveFocusOutline) {
498
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px dotted ${styles.listInactiveFocusOutline}; outline-offset: -1px; }`);
499
+ }
500
+ if (styles.listHoverOutline) {
501
+ content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${styles.listHoverOutline}; outline-offset: -1px; }`);
502
+ }
503
+ if (styles.listDropOverBackground) {
504
+ content.push(`
505
+ .monaco-list${suffix}.drop-target,
506
+ .monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows.drop-target,
507
+ .monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${styles.listDropOverBackground} !important; color: inherit !important; }
508
+ `);
509
+ }
510
+ const newStyles = content.join('\n');
511
+ if (newStyles !== this.styleElement.textContent) {
512
+ this.styleElement.textContent = newStyles;
513
+ }
514
+ }
515
+ };
516
+ NotebookTextDiffList = ( __decorate([
517
+ ( __param(6, IListService)),
518
+ ( __param(7, IConfigurationService)),
519
+ ( __param(8, IInstantiationService))
520
+ ], NotebookTextDiffList));
521
+ function buildDiffEditorWidget(instantiationService, notebookEditor, sourceContainer, options = {}) {
522
+ const editorContainer = append(sourceContainer, $('.editor-container'));
523
+ const editor = instantiationService.createInstance(DiffEditorWidget, editorContainer, {
524
+ ...fixedDiffEditorOptions,
525
+ overflowWidgetsDomNode: notebookEditor.getOverflowContainerDomNode(),
526
+ originalEditable: false,
527
+ ignoreTrimWhitespace: false,
528
+ automaticLayout: false,
529
+ dimension: {
530
+ height: 0,
531
+ width: 0
532
+ },
533
+ renderSideBySide: true,
534
+ useInlineViewWhenSpaceIsLimited: false,
535
+ ...options
536
+ }, {
537
+ originalEditor: getOptimizedNestedCodeEditorWidgetOptions(),
538
+ modifiedEditor: getOptimizedNestedCodeEditorWidgetOptions()
539
+ });
540
+ return {
541
+ editor,
542
+ editorContainer
543
+ };
544
+ }
545
+ function buildSourceEditor(instantiationService, notebookEditor, sourceContainer, options = {}) {
546
+ const editorContainer = append(sourceContainer, $('.editor-container'));
547
+ const skipContributions = [
548
+ 'editor.contrib.emptyTextEditorHint'
549
+ ];
550
+ const editor = instantiationService.createInstance(CodeEditorWidget, editorContainer, {
551
+ ...fixedEditorOptions,
552
+ glyphMargin: false,
553
+ dimension: {
554
+ width: (notebookEditor.getLayoutInfo().width - 2 * DIFF_CELL_MARGIN) / 2 - 18,
555
+ height: 0
556
+ },
557
+ automaticLayout: false,
558
+ overflowWidgetsDomNode: notebookEditor.getOverflowContainerDomNode(),
559
+ allowVariableLineHeights: false,
560
+ readOnly: true,
561
+ }, {
562
+ contributions: EditorExtensionsRegistry.getEditorContributions().filter(c => skipContributions.indexOf(c.id) === -1)
563
+ });
564
+ return { editor, editorContainer };
565
+ }
566
+
567
+ export { CellDiffPlaceholderRenderer, CellDiffSideBySideRenderer, CellDiffSingleSideRenderer, NotebookCellTextDiffListDelegate, NotebookDocumentMetadataDiffRenderer, NotebookMouseController, NotebookTextDiffList };
@@ -0,0 +1,30 @@
1
+ import { Themable } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService";
2
+ import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
3
+ import { IDiffElementViewModelBase } from "./diffElementViewModel.js";
4
+ import { NotebookDiffEditorEventDispatcher } from "./eventDispatcher.js";
5
+ import { INotebookTextDiffEditor } from "./notebookDiffEditorBrowser.js";
6
+ export declare class NotebookDiffOverviewRuler extends Themable {
7
+ readonly notebookEditor: INotebookTextDiffEditor;
8
+ readonly width: number;
9
+ private readonly _domNode;
10
+ private readonly _overviewViewportDomElement;
11
+ private _diffElementViewModels;
12
+ private _lanes;
13
+ private _insertColor;
14
+ private _insertColorHex;
15
+ private _removeColor;
16
+ private _removeColorHex;
17
+ private readonly _disposables;
18
+ private _renderAnimationFrame;
19
+ constructor(notebookEditor: INotebookTextDiffEditor, width: number, container: HTMLElement, themeService: IThemeService);
20
+ private applyColors;
21
+ layout(): void;
22
+ updateViewModels(elements: readonly IDiffElementViewModelBase[], eventDispatcher: NotebookDiffEditorEventDispatcher | undefined): void;
23
+ private _scheduleRender;
24
+ private _onRenderScheduled;
25
+ private _layoutNow;
26
+ private _renderOverviewViewport;
27
+ private _computeOverviewViewport;
28
+ private _renderCanvas;
29
+ dispose(): void;
30
+ }