@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,823 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
+ import { $ as $$1, append, createElement, addStandardDisposableGenericMouseDownListener, addStandardDisposableGenericMouseUpListener, scheduleAtNextAnimationFrame } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { findLastIdx } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arraysFind';
6
+ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
7
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
8
+ import { registerThemingParticipant } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
9
+ import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
10
+ import { EditorPaneSelectionCompareResult, EditorPaneSelectionChangeReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
11
+ import { getDefaultNotebookCreationOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorWidget';
12
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
13
+ import { SideBySideDiffElementViewModel } from './diffElementViewModel.js';
14
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
15
+ import { CellDiffSingleSideRenderer, CellDiffSideBySideRenderer, CellDiffPlaceholderRenderer, NotebookDocumentMetadataDiffRenderer, NotebookTextDiffList, NotebookCellTextDiffListDelegate } from './notebookDiffList.js';
16
+ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
17
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
18
+ import { foreground, focusBorder } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
19
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
20
+ import { editorBackground, diffDiagonalFill } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
21
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
22
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
23
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
24
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
25
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
26
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
27
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
28
+ import { INotebookEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service';
29
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
30
+ import { createBareFontInfoFromRawSettings } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/fontInfoFromSettings';
31
+ import { PixelRatio } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/pixelRatio';
32
+ import { DiffSide, DIFF_CELL_MARGIN } from './notebookDiffEditorBrowser.js';
33
+ import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
34
+ import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
35
+ import { EditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorPane';
36
+ import { NOTEBOOK_DIFF_EDITOR_ID, NotebookSetting, CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
37
+ import { SequencerByKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
38
+ import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
39
+ import { BackLayerWebView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView';
40
+ import { NotebookDiffEditorEventDispatcher, NotebookDiffLayoutChangedEvent } from './eventDispatcher.js';
41
+ import { FontMeasurements } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/config/fontMeasurements';
42
+ import { NotebookOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookOptions';
43
+ import { cellIndexesToRanges, cellRangesToIndexes } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookRange';
44
+ import { NotebookDiffOverviewRuler } from './notebookDiffOverviewRuler.js';
45
+ import { registerZIndex, ZIndex } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/zIndexRegistry';
46
+ import { NotebookDiffViewModel } from './notebookDiffViewModel.js';
47
+ import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
48
+ import { DiffEditorHeightCalculatorService } from './editorHeightCalculator.js';
49
+ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
50
+ import { NotebookInlineDiffWidget } from './inlineDiff/notebookInlineDiffWidget.js';
51
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
52
+ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
53
+
54
+ var NotebookTextDiffEditor_1;
55
+ const $ = $$1;
56
+ class NotebookDiffEditorSelection {
57
+ constructor(selections) {
58
+ this.selections = selections;
59
+ }
60
+ compare(other) {
61
+ if (!(other instanceof NotebookDiffEditorSelection)) {
62
+ return EditorPaneSelectionCompareResult.DIFFERENT;
63
+ }
64
+ if (this.selections.length !== other.selections.length) {
65
+ return EditorPaneSelectionCompareResult.DIFFERENT;
66
+ }
67
+ for (let i = 0; i < this.selections.length; i++) {
68
+ if (this.selections[i] !== other.selections[i]) {
69
+ return EditorPaneSelectionCompareResult.DIFFERENT;
70
+ }
71
+ }
72
+ return EditorPaneSelectionCompareResult.IDENTICAL;
73
+ }
74
+ restore(options) {
75
+ const notebookOptions = {
76
+ cellSelections: cellIndexesToRanges(this.selections)
77
+ };
78
+ Object.assign(notebookOptions, options);
79
+ return notebookOptions;
80
+ }
81
+ }
82
+ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
83
+ static { NotebookTextDiffEditor_1 = this; }
84
+ static { this.ENTIRE_DIFF_OVERVIEW_WIDTH = 30; }
85
+ static { this.ID = NOTEBOOK_DIFF_EDITOR_ID; }
86
+ get textModel() {
87
+ return this._model?.modified.notebook;
88
+ }
89
+ get inlineNotebookEditor() {
90
+ if (this._inlineView) {
91
+ return this.inlineDiffWidget?.editorWidget;
92
+ }
93
+ return undefined;
94
+ }
95
+ get notebookOptions() {
96
+ return this._notebookOptions;
97
+ }
98
+ get isDisposed() {
99
+ return this._isDisposed;
100
+ }
101
+ constructor(group, instantiationService, themeService, contextKeyService, notebookEditorWorkerService, configurationService, telemetryService, storageService, notebookService, editorService) {
102
+ super(NotebookTextDiffEditor_1.ID, group, telemetryService, themeService, storageService);
103
+ this.instantiationService = instantiationService;
104
+ this.contextKeyService = contextKeyService;
105
+ this.notebookEditorWorkerService = notebookEditorWorkerService;
106
+ this.configurationService = configurationService;
107
+ this.notebookService = notebookService;
108
+ this.editorService = editorService;
109
+ this.creationOptions = getDefaultNotebookCreationOptions();
110
+ this._dimension = undefined;
111
+ this._modifiedWebview = null;
112
+ this._originalWebview = null;
113
+ this._webviewTransparentCover = null;
114
+ this._inlineView = false;
115
+ this._onMouseUp = this._register(( new Emitter()));
116
+ this.onMouseUp = this._onMouseUp.event;
117
+ this._onDidScroll = this._register(( new Emitter()));
118
+ this.onDidScroll = this._onDidScroll.event;
119
+ this.onDidChangeScroll = this._onDidScroll.event;
120
+ this._model = null;
121
+ this._modifiedResourceDisposableStore = this._register(( new DisposableStore()));
122
+ this._insetModifyQueueByOutputId = ( new SequencerByKey());
123
+ this._onDidDynamicOutputRendered = this._register(( new Emitter()));
124
+ this.onDidDynamicOutputRendered = this._onDidDynamicOutputRendered.event;
125
+ this._localStore = this._register(( new DisposableStore()));
126
+ this._onDidChangeSelection = this._register(( new Emitter()));
127
+ this.onDidChangeSelection = this._onDidChangeSelection.event;
128
+ this._isDisposed = false;
129
+ this._currentChangedIndex = observableValue(this, -1);
130
+ this.currentChangedIndex = this._currentChangedIndex;
131
+ this.pendingLayouts = ( new WeakMap());
132
+ this.diffEditorCalcuator = this.instantiationService.createInstance(DiffEditorHeightCalculatorService, this.fontInfo.lineHeight);
133
+ this._notebookOptions = instantiationService.createInstance(NotebookOptions, this.window, false, undefined);
134
+ this._register(this._notebookOptions);
135
+ this._revealFirst = true;
136
+ }
137
+ get fontInfo() {
138
+ if (!this._fontInfo) {
139
+ this._fontInfo = this.createFontInfo();
140
+ }
141
+ return this._fontInfo;
142
+ }
143
+ createFontInfo() {
144
+ const editorOptions = this.configurationService.getValue('editor');
145
+ return FontMeasurements.readFontInfo(this.window, createBareFontInfoFromRawSettings(editorOptions, PixelRatio.getInstance(this.window).value));
146
+ }
147
+ isOverviewRulerEnabled() {
148
+ return this.configurationService.getValue(NotebookSetting.diffOverviewRuler) ?? false;
149
+ }
150
+ getSelection() {
151
+ const selections = this._list.getFocus();
152
+ return ( new NotebookDiffEditorSelection(selections));
153
+ }
154
+ toggleNotebookCellSelection(cell) {
155
+ }
156
+ updatePerformanceMetadata(cellId, executionId, duration, rendererId) {
157
+ }
158
+ async focusNotebookCell(cell, focus) {
159
+ }
160
+ async focusNextNotebookCell(cell, focus) {
161
+ }
162
+ didFocusOutputInputChange(inputFocused) {
163
+ }
164
+ getScrollTop() {
165
+ return this._list?.scrollTop ?? 0;
166
+ }
167
+ getScrollHeight() {
168
+ return this._list?.scrollHeight ?? 0;
169
+ }
170
+ getScrollPosition() {
171
+ return {
172
+ scrollTop: this.getScrollTop(),
173
+ scrollLeft: this._list?.scrollLeft ?? 0
174
+ };
175
+ }
176
+ setScrollPosition(scrollPosition) {
177
+ if (!this._list) {
178
+ return;
179
+ }
180
+ this._list.scrollTop = scrollPosition.scrollTop;
181
+ if (scrollPosition.scrollLeft !== undefined) {
182
+ this._list.scrollLeft = scrollPosition.scrollLeft;
183
+ }
184
+ }
185
+ delegateVerticalScrollbarPointerDown(browserEvent) {
186
+ this._list?.delegateVerticalScrollbarPointerDown(browserEvent);
187
+ }
188
+ updateOutputHeight(cellInfo, output, outputHeight, isInit) {
189
+ const diffElement = cellInfo.diffElement;
190
+ const cell = this.getCellByInfo(cellInfo);
191
+ const outputIndex = cell.outputsViewModels.indexOf(output);
192
+ if (diffElement instanceof SideBySideDiffElementViewModel) {
193
+ const info = CellUri.parse(cellInfo.cellUri);
194
+ if (!info) {
195
+ return;
196
+ }
197
+ diffElement.updateOutputHeight(( info.notebook.toString()) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified, outputIndex, outputHeight);
198
+ }
199
+ else {
200
+ diffElement.updateOutputHeight(diffElement.type === 'insert' ? DiffSide.Modified : DiffSide.Original, outputIndex, outputHeight);
201
+ }
202
+ if (isInit) {
203
+ this._onDidDynamicOutputRendered.fire({ cell, output });
204
+ }
205
+ }
206
+ setMarkupCellEditState(cellId, editState) {
207
+ }
208
+ didStartDragMarkupCell(cellId, event) {
209
+ }
210
+ didDragMarkupCell(cellId, event) {
211
+ }
212
+ didEndDragMarkupCell(cellId) {
213
+ }
214
+ didDropMarkupCell(cellId) {
215
+ }
216
+ didResizeOutput(cellId) {
217
+ }
218
+ async toggleInlineView() {
219
+ this._layoutCancellationTokenSource?.dispose();
220
+ this._inlineView = !this._inlineView;
221
+ if (!this._lastLayoutProperties) {
222
+ return;
223
+ }
224
+ if (this._inlineView) {
225
+ this.layout(this._lastLayoutProperties?.dimension, this._lastLayoutProperties?.position);
226
+ this.inlineDiffWidget?.show(this.input, this._model?.modified.notebook, this._model?.original.notebook, this._options);
227
+ }
228
+ else {
229
+ this.layout(this._lastLayoutProperties?.dimension, this._lastLayoutProperties?.position);
230
+ this.inlineDiffWidget?.hide();
231
+ }
232
+ this._layoutCancellationTokenSource = ( new CancellationTokenSource());
233
+ this.updateLayout(this._layoutCancellationTokenSource.token);
234
+ }
235
+ createEditor(parent) {
236
+ this._rootElement = append(parent, $$1('.notebook-text-diff-editor'));
237
+ this._overflowContainer = createElement('div');
238
+ this._overflowContainer.classList.add('notebook-overflow-widget-container', 'monaco-editor');
239
+ append(parent, this._overflowContainer);
240
+ const renderers = [
241
+ this.instantiationService.createInstance(CellDiffSingleSideRenderer, this),
242
+ this.instantiationService.createInstance(CellDiffSideBySideRenderer, this),
243
+ this.instantiationService.createInstance(CellDiffPlaceholderRenderer, this),
244
+ this.instantiationService.createInstance(NotebookDocumentMetadataDiffRenderer, this),
245
+ ];
246
+ this._listViewContainer = append(this._rootElement, $$1('.notebook-diff-list-view'));
247
+ this._list = this.instantiationService.createInstance(NotebookTextDiffList, 'NotebookTextDiff', this._listViewContainer, this.instantiationService.createInstance(NotebookCellTextDiffListDelegate, this.window), renderers, this.contextKeyService, {
248
+ setRowLineHeight: false,
249
+ setRowHeight: false,
250
+ supportDynamicHeights: true,
251
+ horizontalScrolling: false,
252
+ keyboardSupport: false,
253
+ mouseSupport: true,
254
+ multipleSelectionSupport: false,
255
+ typeNavigationEnabled: true,
256
+ paddingBottom: 0,
257
+ styleController: (_suffix) => { return this._list; },
258
+ overrideStyles: {
259
+ listBackground: editorBackground,
260
+ listActiveSelectionBackground: editorBackground,
261
+ listActiveSelectionForeground: foreground,
262
+ listFocusAndSelectionBackground: editorBackground,
263
+ listFocusAndSelectionForeground: foreground,
264
+ listFocusBackground: editorBackground,
265
+ listFocusForeground: foreground,
266
+ listHoverForeground: foreground,
267
+ listHoverBackground: editorBackground,
268
+ listHoverOutline: focusBorder,
269
+ listFocusOutline: focusBorder,
270
+ listInactiveSelectionBackground: editorBackground,
271
+ listInactiveSelectionForeground: foreground,
272
+ listInactiveFocusBackground: editorBackground,
273
+ listInactiveFocusOutline: editorBackground,
274
+ },
275
+ accessibilityProvider: {
276
+ getAriaLabel() { return null; },
277
+ getWidgetAriaLabel() {
278
+ return localize(9468, "Notebook Text Diff");
279
+ }
280
+ },
281
+ });
282
+ this.inlineDiffWidget = this._register(this.instantiationService.createInstance(NotebookInlineDiffWidget, this._rootElement, this.group.id, this.window, this.notebookOptions, this._dimension));
283
+ this._register(this._list);
284
+ this._register(this._list.onMouseUp(e => {
285
+ if (e.element) {
286
+ if (typeof e.index === 'number') {
287
+ this._list.setFocus([e.index]);
288
+ }
289
+ this._onMouseUp.fire({ event: e.browserEvent, target: e.element });
290
+ }
291
+ }));
292
+ this._register(this._list.onDidScroll(() => {
293
+ this._onDidScroll.fire();
294
+ }));
295
+ this._register(this._list.onDidChangeFocus(() => this._onDidChangeSelection.fire({ reason: EditorPaneSelectionChangeReason.USER })));
296
+ this._overviewRulerContainer = createElement('div');
297
+ this._overviewRulerContainer.classList.add('notebook-overview-ruler-container');
298
+ this._rootElement.appendChild(this._overviewRulerContainer);
299
+ this._registerOverviewRuler();
300
+ this._webviewTransparentCover = append(this._list.rowsContainer, $('.webview-cover'));
301
+ this._webviewTransparentCover.style.display = 'none';
302
+ this._register(addStandardDisposableGenericMouseDownListener(this._overflowContainer, (e) => {
303
+ if (e.target.classList.contains('slider') && this._webviewTransparentCover) {
304
+ this._webviewTransparentCover.style.display = 'block';
305
+ }
306
+ }));
307
+ this._register(addStandardDisposableGenericMouseUpListener(this._overflowContainer, () => {
308
+ if (this._webviewTransparentCover) {
309
+ this._webviewTransparentCover.style.display = 'none';
310
+ }
311
+ }));
312
+ this._register(this._list.onDidScroll(e => {
313
+ this._webviewTransparentCover.style.top = `${e.scrollTop}px`;
314
+ }));
315
+ }
316
+ _registerOverviewRuler() {
317
+ this._overviewRuler = this._register(this.instantiationService.createInstance(NotebookDiffOverviewRuler, this, NotebookTextDiffEditor_1.ENTIRE_DIFF_OVERVIEW_WIDTH, this._overviewRulerContainer));
318
+ }
319
+ _updateOutputsOffsetsInWebview(scrollTop, scrollHeight, activeWebview, getActiveNestedCell, diffSide) {
320
+ activeWebview.element.style.height = `${scrollHeight}px`;
321
+ if (activeWebview.insetMapping) {
322
+ const updateItems = [];
323
+ const removedItems = [];
324
+ activeWebview.insetMapping.forEach((value, key) => {
325
+ const cell = getActiveNestedCell(value.cellInfo.diffElement);
326
+ if (!cell) {
327
+ return;
328
+ }
329
+ const viewIndex = this._list.indexOf(value.cellInfo.diffElement);
330
+ if (viewIndex === undefined) {
331
+ return;
332
+ }
333
+ if (cell.outputsViewModels.indexOf(key) < 0) {
334
+ removedItems.push(key);
335
+ }
336
+ else {
337
+ const cellTop = this._list.getCellViewScrollTop(value.cellInfo.diffElement);
338
+ const outputIndex = cell.outputsViewModels.indexOf(key);
339
+ const outputOffset = value.cellInfo.diffElement.getOutputOffsetInCell(diffSide, outputIndex);
340
+ updateItems.push({
341
+ cell,
342
+ output: key,
343
+ cellTop: cellTop,
344
+ outputOffset: outputOffset,
345
+ forceDisplay: false
346
+ });
347
+ }
348
+ });
349
+ activeWebview.removeInsets(removedItems);
350
+ if (updateItems.length) {
351
+ activeWebview.updateScrollTops(updateItems, []);
352
+ }
353
+ }
354
+ }
355
+ async setInput(input, options, context, token) {
356
+ this.inlineDiffWidget?.hide();
357
+ await super.setInput(input, options, context, token);
358
+ const model = await input.resolve();
359
+ if (this._model !== model) {
360
+ this._detachModel();
361
+ this._attachModel(model);
362
+ }
363
+ this._model = model;
364
+ if (this._model === null) {
365
+ return;
366
+ }
367
+ if (this._inlineView) {
368
+ this._listViewContainer.style.display = 'none';
369
+ this.inlineDiffWidget?.show(input, model.modified.notebook, model.original.notebook, options);
370
+ }
371
+ else {
372
+ this._listViewContainer.style.display = 'block';
373
+ this.inlineDiffWidget?.hide();
374
+ }
375
+ this._revealFirst = true;
376
+ this._modifiedResourceDisposableStore.clear();
377
+ this._layoutCancellationTokenSource = ( new CancellationTokenSource());
378
+ this._modifiedResourceDisposableStore.add(Event.any(this._model.original.notebook.onDidChangeContent, this._model.modified.notebook.onDidChangeContent)(e => {
379
+ if (this._model !== null && this.editorService.activeEditor !== input) {
380
+ this._layoutCancellationTokenSource?.dispose();
381
+ this._layoutCancellationTokenSource = ( new CancellationTokenSource());
382
+ this.updateLayout(this._layoutCancellationTokenSource.token);
383
+ }
384
+ }));
385
+ await this._createOriginalWebview(generateUuid(), this._model.original.viewType, this._model.original.resource);
386
+ if (this._originalWebview) {
387
+ this._modifiedResourceDisposableStore.add(this._originalWebview);
388
+ }
389
+ await this._createModifiedWebview(generateUuid(), this._model.modified.viewType, this._model.modified.resource);
390
+ if (this._modifiedWebview) {
391
+ this._modifiedResourceDisposableStore.add(this._modifiedWebview);
392
+ }
393
+ await this.updateLayout(this._layoutCancellationTokenSource.token, options?.cellSelections ? cellRangesToIndexes(options.cellSelections) : undefined);
394
+ }
395
+ setVisible(visible) {
396
+ super.setVisible(visible);
397
+ if (!visible) {
398
+ this.inlineDiffWidget?.hide();
399
+ }
400
+ }
401
+ _detachModel() {
402
+ this._localStore.clear();
403
+ this._originalWebview?.dispose();
404
+ this._originalWebview?.element.remove();
405
+ this._originalWebview = null;
406
+ this._modifiedWebview?.dispose();
407
+ this._modifiedWebview?.element.remove();
408
+ this._modifiedWebview = null;
409
+ this.notebookDiffViewModel?.dispose();
410
+ this.notebookDiffViewModel = undefined;
411
+ this._modifiedResourceDisposableStore.clear();
412
+ this._list.clear();
413
+ }
414
+ _attachModel(model) {
415
+ this._model = model;
416
+ this._eventDispatcher = ( new NotebookDiffEditorEventDispatcher());
417
+ const updateInsets = () => {
418
+ scheduleAtNextAnimationFrame(this.window, () => {
419
+ if (this._isDisposed) {
420
+ return;
421
+ }
422
+ if (this._modifiedWebview) {
423
+ this._updateOutputsOffsetsInWebview(this._list.scrollTop, this._list.scrollHeight, this._modifiedWebview, (diffElement) => {
424
+ return diffElement.modified;
425
+ }, DiffSide.Modified);
426
+ }
427
+ if (this._originalWebview) {
428
+ this._updateOutputsOffsetsInWebview(this._list.scrollTop, this._list.scrollHeight, this._originalWebview, (diffElement) => {
429
+ return diffElement.original;
430
+ }, DiffSide.Original);
431
+ }
432
+ });
433
+ };
434
+ this._localStore.add(this._list.onDidChangeContentHeight(() => {
435
+ updateInsets();
436
+ }));
437
+ this._localStore.add(this._list.onDidChangeFocus((e) => {
438
+ if (e.indexes.length && this.notebookDiffViewModel && e.indexes[0] < this.notebookDiffViewModel.items.length) {
439
+ const selectedItem = this.notebookDiffViewModel.items[e.indexes[0]];
440
+ const changedItems = this.notebookDiffViewModel.items.filter(item => item.type !== 'unchanged' && item.type !== 'unchangedMetadata' && item.type !== 'placeholder');
441
+ if (selectedItem && selectedItem?.type !== 'placeholder' && selectedItem?.type !== 'unchanged' && selectedItem?.type !== 'unchangedMetadata') {
442
+ return this._currentChangedIndex.set(changedItems.indexOf(selectedItem), undefined);
443
+ }
444
+ }
445
+ return this._currentChangedIndex.set(-1, undefined);
446
+ }));
447
+ this._localStore.add(this._eventDispatcher.onDidChangeCellLayout(() => {
448
+ updateInsets();
449
+ }));
450
+ const vm = this.notebookDiffViewModel = this._register(( new NotebookDiffViewModel(
451
+ this._model,
452
+ this.notebookEditorWorkerService,
453
+ this.configurationService,
454
+ this._eventDispatcher,
455
+ this.notebookService,
456
+ this.diffEditorCalcuator,
457
+ this.fontInfo,
458
+ undefined
459
+ )));
460
+ this._localStore.add(this.notebookDiffViewModel.onDidChangeItems(e => {
461
+ this._originalWebview?.removeInsets([...this._originalWebview?.insetMapping.keys()]);
462
+ this._modifiedWebview?.removeInsets([...this._modifiedWebview?.insetMapping.keys()]);
463
+ if (this._revealFirst && typeof e.firstChangeIndex === 'number' && e.firstChangeIndex > -1 && e.firstChangeIndex < this._list.length) {
464
+ this._revealFirst = false;
465
+ this._list.setFocus([e.firstChangeIndex]);
466
+ this._list.reveal(e.firstChangeIndex, 0.3);
467
+ }
468
+ this._list.splice(e.start, e.deleteCount, e.elements);
469
+ if (this.isOverviewRulerEnabled()) {
470
+ this._overviewRuler.updateViewModels(vm.items, this._eventDispatcher);
471
+ }
472
+ }));
473
+ }
474
+ async _createModifiedWebview(id, viewType, resource) {
475
+ this._modifiedWebview?.dispose();
476
+ this._modifiedWebview = this.instantiationService.createInstance(BackLayerWebView, this, id, viewType, resource, {
477
+ ...this._notebookOptions.computeDiffWebviewOptions(),
478
+ fontFamily: this._generateFontFamily()
479
+ }, undefined);
480
+ this._list.rowsContainer.insertAdjacentElement('afterbegin', this._modifiedWebview.element);
481
+ this._modifiedWebview.createWebview(this.window);
482
+ this._modifiedWebview.element.style.width = `calc(50% - 16px)`;
483
+ this._modifiedWebview.element.style.left = `calc(50%)`;
484
+ }
485
+ _generateFontFamily() {
486
+ return this.fontInfo.fontFamily ?? `"SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace`;
487
+ }
488
+ async _createOriginalWebview(id, viewType, resource) {
489
+ this._originalWebview?.dispose();
490
+ this._originalWebview = this.instantiationService.createInstance(BackLayerWebView, this, id, viewType, resource, {
491
+ ...this._notebookOptions.computeDiffWebviewOptions(),
492
+ fontFamily: this._generateFontFamily()
493
+ }, undefined);
494
+ this._list.rowsContainer.insertAdjacentElement('afterbegin', this._originalWebview.element);
495
+ this._originalWebview.createWebview(this.window);
496
+ this._originalWebview.element.style.width = `calc(50% - 16px)`;
497
+ this._originalWebview.element.style.left = `16px`;
498
+ }
499
+ setOptions(options) {
500
+ const selections = options?.cellSelections ? cellRangesToIndexes(options.cellSelections) : undefined;
501
+ if (selections) {
502
+ this._list.setFocus(selections);
503
+ }
504
+ }
505
+ async updateLayout(token, selections) {
506
+ if (!this._model || !this.notebookDiffViewModel) {
507
+ return;
508
+ }
509
+ await this.notebookDiffViewModel.computeDiff(token);
510
+ if (token.isCancellationRequested) {
511
+ return;
512
+ }
513
+ if (selections) {
514
+ this._list.setFocus(selections);
515
+ }
516
+ }
517
+ scheduleOutputHeightAck(cellInfo, outputId, height) {
518
+ const diffElement = cellInfo.diffElement;
519
+ let diffSide = DiffSide.Original;
520
+ if (diffElement instanceof SideBySideDiffElementViewModel) {
521
+ const info = CellUri.parse(cellInfo.cellUri);
522
+ if (!info) {
523
+ return;
524
+ }
525
+ diffSide = ( info.notebook.toString()) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified;
526
+ }
527
+ else {
528
+ diffSide = diffElement.type === 'insert' ? DiffSide.Modified : DiffSide.Original;
529
+ }
530
+ const webview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
531
+ scheduleAtNextAnimationFrame(this.window, () => {
532
+ webview?.ackHeight([{ cellId: cellInfo.cellId, outputId, height }]);
533
+ }, 10);
534
+ }
535
+ layoutNotebookCell(cell, height) {
536
+ const relayout = (cell, height) => {
537
+ this._list.updateElementHeight2(cell, height);
538
+ };
539
+ let disposable = this.pendingLayouts.get(cell);
540
+ if (disposable) {
541
+ this._localStore.delete(disposable);
542
+ }
543
+ let r;
544
+ const layoutDisposable = scheduleAtNextAnimationFrame(this.window, () => {
545
+ this.pendingLayouts.delete(cell);
546
+ relayout(cell, height);
547
+ r();
548
+ });
549
+ disposable = toDisposable(() => {
550
+ layoutDisposable.dispose();
551
+ r();
552
+ });
553
+ this._localStore.add(disposable);
554
+ this.pendingLayouts.set(cell, disposable);
555
+ return ( new Promise(resolve => { r = resolve; }));
556
+ }
557
+ setScrollTop(scrollTop) {
558
+ this._list.scrollTop = scrollTop;
559
+ }
560
+ triggerScroll(event) {
561
+ this._list.triggerScrollFromMouseWheelEvent(event);
562
+ }
563
+ firstChange() {
564
+ if (!this.notebookDiffViewModel) {
565
+ return;
566
+ }
567
+ const currentViewModels = this.notebookDiffViewModel.items;
568
+ const index = currentViewModels.findIndex(vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder');
569
+ if (index >= 0) {
570
+ this._list.setFocus([index]);
571
+ this._list.reveal(index);
572
+ }
573
+ }
574
+ lastChange() {
575
+ if (!this.notebookDiffViewModel) {
576
+ return;
577
+ }
578
+ const currentViewModels = this.notebookDiffViewModel.items;
579
+ const item = currentViewModels.slice().reverse().find(vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder');
580
+ const index = item ? currentViewModels.indexOf(item) : -1;
581
+ if (index >= 0) {
582
+ this._list.setFocus([index]);
583
+ this._list.reveal(index);
584
+ }
585
+ }
586
+ previousChange() {
587
+ if (!this.notebookDiffViewModel) {
588
+ return;
589
+ }
590
+ let currFocus = this._list.getFocus()[0];
591
+ if (isNaN(currFocus) || currFocus < 0) {
592
+ currFocus = 0;
593
+ }
594
+ let prevChangeIndex = currFocus - 1;
595
+ const currentViewModels = this.notebookDiffViewModel.items;
596
+ while (prevChangeIndex >= 0) {
597
+ const vm = currentViewModels[prevChangeIndex];
598
+ if (vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder') {
599
+ break;
600
+ }
601
+ prevChangeIndex--;
602
+ }
603
+ if (prevChangeIndex >= 0) {
604
+ this._list.setFocus([prevChangeIndex]);
605
+ this._list.reveal(prevChangeIndex);
606
+ }
607
+ else {
608
+ const index = findLastIdx(currentViewModels, vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder');
609
+ if (index >= 0) {
610
+ this._list.setFocus([index]);
611
+ this._list.reveal(index);
612
+ }
613
+ }
614
+ }
615
+ nextChange() {
616
+ if (!this.notebookDiffViewModel) {
617
+ return;
618
+ }
619
+ let currFocus = this._list.getFocus()[0];
620
+ if (isNaN(currFocus) || currFocus < 0) {
621
+ currFocus = 0;
622
+ }
623
+ let nextChangeIndex = currFocus + 1;
624
+ const currentViewModels = this.notebookDiffViewModel.items;
625
+ while (nextChangeIndex < currentViewModels.length) {
626
+ const vm = currentViewModels[nextChangeIndex];
627
+ if (vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder') {
628
+ break;
629
+ }
630
+ nextChangeIndex++;
631
+ }
632
+ if (nextChangeIndex < currentViewModels.length) {
633
+ this._list.setFocus([nextChangeIndex]);
634
+ this._list.reveal(nextChangeIndex);
635
+ }
636
+ else {
637
+ const index = currentViewModels.findIndex(vm => vm.type !== 'unchanged' && vm.type !== 'unchangedMetadata' && vm.type !== 'placeholder');
638
+ if (index >= 0) {
639
+ this._list.setFocus([index]);
640
+ this._list.reveal(index);
641
+ }
642
+ }
643
+ }
644
+ createOutput(cellDiffViewModel, cellViewModel, output, getOffset, diffSide) {
645
+ this._insetModifyQueueByOutputId.queue(output.source.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => {
646
+ const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
647
+ if (!activeWebview) {
648
+ return;
649
+ }
650
+ if (!( activeWebview.insetMapping.has(output.source))) {
651
+ const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
652
+ await activeWebview.createOutput({ diffElement: cellDiffViewModel, cellHandle: cellViewModel.handle, cellId: cellViewModel.id, cellUri: cellViewModel.uri }, output, cellTop, getOffset());
653
+ }
654
+ else {
655
+ const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
656
+ const outputIndex = cellViewModel.outputsViewModels.indexOf(output.source);
657
+ const outputOffset = cellDiffViewModel.getOutputOffsetInCell(diffSide, outputIndex);
658
+ activeWebview.updateScrollTops([{
659
+ cell: cellViewModel,
660
+ output: output.source,
661
+ cellTop,
662
+ outputOffset,
663
+ forceDisplay: true
664
+ }], []);
665
+ }
666
+ });
667
+ }
668
+ updateMarkupCellHeight() {
669
+ }
670
+ getCellByInfo(cellInfo) {
671
+ return cellInfo.diffElement.getCellByUri(cellInfo.cellUri);
672
+ }
673
+ getCellById(cellId) {
674
+ throw ( new Error('Not implemented'));
675
+ }
676
+ removeInset(cellDiffViewModel, cellViewModel, displayOutput, diffSide) {
677
+ this._insetModifyQueueByOutputId.queue(displayOutput.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => {
678
+ const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
679
+ if (!activeWebview) {
680
+ return;
681
+ }
682
+ if (!( activeWebview.insetMapping.has(displayOutput))) {
683
+ return;
684
+ }
685
+ activeWebview.removeInsets([displayOutput]);
686
+ });
687
+ }
688
+ showInset(cellDiffViewModel, cellViewModel, displayOutput, diffSide) {
689
+ this._insetModifyQueueByOutputId.queue(displayOutput.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => {
690
+ const activeWebview = diffSide === DiffSide.Modified ? this._modifiedWebview : this._originalWebview;
691
+ if (!activeWebview) {
692
+ return;
693
+ }
694
+ if (!( activeWebview.insetMapping.has(displayOutput))) {
695
+ return;
696
+ }
697
+ const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
698
+ const outputIndex = cellViewModel.outputsViewModels.indexOf(displayOutput);
699
+ const outputOffset = cellDiffViewModel.getOutputOffsetInCell(diffSide, outputIndex);
700
+ activeWebview.updateScrollTops([{
701
+ cell: cellViewModel,
702
+ output: displayOutput,
703
+ cellTop,
704
+ outputOffset,
705
+ forceDisplay: true,
706
+ }], []);
707
+ });
708
+ }
709
+ hideInset(cellDiffViewModel, cellViewModel, output) {
710
+ this._modifiedWebview?.hideInset(output);
711
+ this._originalWebview?.hideInset(output);
712
+ }
713
+ getDomNode() {
714
+ return this._rootElement;
715
+ }
716
+ getOverflowContainerDomNode() {
717
+ return this._overflowContainer;
718
+ }
719
+ getControl() {
720
+ return this;
721
+ }
722
+ clearInput() {
723
+ this.inlineDiffWidget?.hide();
724
+ super.clearInput();
725
+ this._modifiedResourceDisposableStore.clear();
726
+ this._list?.splice(0, this._list?.length || 0);
727
+ this._model = null;
728
+ this.notebookDiffViewModel?.dispose();
729
+ this.notebookDiffViewModel = undefined;
730
+ }
731
+ deltaCellOutputContainerClassNames(diffSide, cellId, added, removed) {
732
+ if (diffSide === DiffSide.Original) {
733
+ this._originalWebview?.deltaCellOutputContainerClassNames(cellId, added, removed);
734
+ }
735
+ else {
736
+ this._modifiedWebview?.deltaCellOutputContainerClassNames(cellId, added, removed);
737
+ }
738
+ }
739
+ getLayoutInfo() {
740
+ if (!this._list) {
741
+ throw ( new Error('Editor is not initalized successfully'));
742
+ }
743
+ return {
744
+ width: this._dimension.width,
745
+ height: this._dimension.height,
746
+ fontInfo: this.fontInfo,
747
+ scrollHeight: this._list?.getScrollHeight() ?? 0,
748
+ stickyHeight: 0,
749
+ listViewOffsetTop: 0,
750
+ };
751
+ }
752
+ layout(dimension, position) {
753
+ this._rootElement.classList.toggle('mid-width', dimension.width < 1000 && dimension.width >= 600);
754
+ this._rootElement.classList.toggle('narrow-width', dimension.width < 600);
755
+ const overviewRulerEnabled = this.isOverviewRulerEnabled();
756
+ this._dimension = dimension.with(dimension.width - (overviewRulerEnabled ? NotebookTextDiffEditor_1.ENTIRE_DIFF_OVERVIEW_WIDTH : 0));
757
+ this._listViewContainer.style.height = `${dimension.height}px`;
758
+ this._listViewContainer.style.width = `${this._dimension.width}px`;
759
+ if (this._inlineView) {
760
+ this._listViewContainer.style.display = 'none';
761
+ this.inlineDiffWidget?.setLayout(dimension, position);
762
+ }
763
+ else {
764
+ this.inlineDiffWidget?.hide();
765
+ this._listViewContainer.style.display = 'block';
766
+ this._list?.layout(this._dimension.height, this._dimension.width);
767
+ if (this._modifiedWebview) {
768
+ this._modifiedWebview.element.style.width = `calc(50% - 16px)`;
769
+ this._modifiedWebview.element.style.left = `calc(50%)`;
770
+ }
771
+ if (this._originalWebview) {
772
+ this._originalWebview.element.style.width = `calc(50% - 16px)`;
773
+ this._originalWebview.element.style.left = `16px`;
774
+ }
775
+ if (this._webviewTransparentCover) {
776
+ this._webviewTransparentCover.style.height = `${this._dimension.height}px`;
777
+ this._webviewTransparentCover.style.width = `${this._dimension.width}px`;
778
+ }
779
+ if (overviewRulerEnabled) {
780
+ this._overviewRuler.layout();
781
+ }
782
+ }
783
+ this._lastLayoutProperties = { dimension, position };
784
+ this._eventDispatcher?.emit([( new NotebookDiffLayoutChangedEvent({ width: true, fontInfo: true }, this.getLayoutInfo()))]);
785
+ }
786
+ dispose() {
787
+ this._isDisposed = true;
788
+ this._layoutCancellationTokenSource?.dispose();
789
+ this._detachModel();
790
+ super.dispose();
791
+ }
792
+ };
793
+ NotebookTextDiffEditor = NotebookTextDiffEditor_1 = ( __decorate([
794
+ ( __param(1, IInstantiationService)),
795
+ ( __param(2, IThemeService)),
796
+ ( __param(3, IContextKeyService)),
797
+ ( __param(4, INotebookEditorWorkerService)),
798
+ ( __param(5, IConfigurationService)),
799
+ ( __param(6, ITelemetryService)),
800
+ ( __param(7, IStorageService)),
801
+ ( __param(8, INotebookService)),
802
+ ( __param(9, IEditorService))
803
+ ], NotebookTextDiffEditor));
804
+ registerZIndex(ZIndex.Base, 10, 'notebook-diff-view-viewport-slider');
805
+ registerThemingParticipant((theme, collector) => {
806
+ const diffDiagonalFillColor = theme.getColor(diffDiagonalFill);
807
+ collector.addRule(`
808
+ .notebook-text-diff-editor .diagonal-fill {
809
+ background-image: linear-gradient(
810
+ -45deg,
811
+ ${diffDiagonalFillColor} 12.5%,
812
+ #0000 12.5%, #0000 50%,
813
+ ${diffDiagonalFillColor} 50%, ${diffDiagonalFillColor} 62.5%,
814
+ #0000 62.5%, #0000 100%
815
+ );
816
+ background-size: 8px 8px;
817
+ }
818
+ `);
819
+ collector.addRule(`.notebook-text-diff-editor .cell-body { margin: ${DIFF_CELL_MARGIN}px; }`);
820
+ collector.addRule(`.notebook-text-diff-editor .cell-placeholder-body { margin: ${DIFF_CELL_MARGIN}px 0; }`);
821
+ });
822
+
823
+ export { NotebookTextDiffEditor };