@codingame/monaco-vscode-katex-common 25.1.2 → 26.0.1

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 (317) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +23 -2
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +64 -27
  4. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +3 -1
  5. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +31 -28
  6. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +2 -0
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.js +71 -50
  8. package/vscode/src/vs/platform/editor/browser/editor.js +17 -7
  9. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +112 -129
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +10 -1
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +110 -85
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +5 -5
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +21 -6
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +308 -216
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +153 -148
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +27 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +247 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +71 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +347 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +44 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +287 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.d.ts +20 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +89 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +188 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +677 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentSessionHoverWidget.css +98 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +263 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +34 -25
  29. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +19 -14
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +762 -359
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +22 -1
  32. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +188 -99
  33. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +9 -3
  34. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +166 -113
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +12 -5
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +279 -213
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.d.ts +46 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +533 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +28 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +382 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.d.ts +101 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +509 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +130 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +276 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +24 -7
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +128 -52
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +153 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +1218 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionPickerActionItem.css +14 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +39 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +193 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +2 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +93 -89
  54. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +5 -2
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +42 -47
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +58 -56
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +18 -14
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +17 -15
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -2
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +132 -68
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +0 -2
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +68 -47
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +14 -13
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -4
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +36 -24
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +18 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +32 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +7 -2
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +15 -4
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +22 -14
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +0 -2
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +34 -27
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -5
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +198 -135
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +2 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +38 -10
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +29 -27
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +0 -2
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +41 -36
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +0 -2
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +23 -18
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.js +13 -13
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +0 -3
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +20 -14
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +11 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +291 -152
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +2 -3
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +227 -162
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownDecorationsRenderer.js +68 -72
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +2 -4
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +76 -75
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +2 -5
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +96 -76
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +4 -1
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +74 -38
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +0 -2
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -25
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +107 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +814 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +0 -2
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +34 -29
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +8 -10
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +236 -197
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +123 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +492 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +75 -47
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +2 -4
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +31 -20
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +0 -3
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +42 -36
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +55 -7
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +714 -148
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +7 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +21 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +2 -7
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +143 -153
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +14 -5
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +79 -61
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +10 -4
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +209 -77
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +9 -7
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +71 -54
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +18 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +83 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +4 -4
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +248 -190
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +1 -14
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +23 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPullRequestContent.css +5 -41
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +493 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +63 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +9 -1
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +121 -5
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +37 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +51 -45
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +46 -42
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +4 -2
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +99 -67
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +112 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +634 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +49 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +132 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.js +15 -9
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +196 -149
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +17 -1
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +577 -193
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +119 -86
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +10 -2
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +165 -36
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +0 -2
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +5 -8
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +5 -3
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +75 -65
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +30 -28
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +1 -5
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +102 -106
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +44 -20
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +19 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +67 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +57 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +69 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +122 -82
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +39 -12
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +1110 -597
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +291 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +485 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatOptions.js +38 -28
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +9 -20
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +650 -689
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +21 -18
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +102 -36
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +1253 -790
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.d.ts +0 -7
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPartWidgets.js +11 -11
  176. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +34 -0
  177. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +55 -0
  178. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +6 -2
  179. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +51 -35
  180. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +22 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +102 -0
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +16 -4
  183. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +192 -44
  184. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +11 -12
  185. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +99 -66
  186. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +47 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +188 -0
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.d.ts +20 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +115 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +129 -167
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +16 -3
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +37 -0
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +143 -0
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +56 -0
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +206 -0
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +152 -0
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +67 -0
  198. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +22 -0
  199. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +170 -0
  200. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
  201. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +80 -19
  202. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatWidgetHistoryService.js +20 -28
  203. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +2 -1
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +22 -19
  205. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +15 -0
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +122 -0
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +19 -104
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +316 -1040
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +28 -0
  210. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +162 -0
  211. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +21 -0
  212. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +98 -0
  213. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +68 -0
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +416 -0
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +1 -6
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +194 -215
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +0 -1
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +74 -104
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +45 -91
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +22 -0
  221. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +98 -0
  222. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +5 -2
  223. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +96 -68
  224. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +7 -0
  225. package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +11 -0
  226. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +20 -0
  227. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +150 -0
  228. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +141 -147
  229. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +64 -0
  230. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +200 -0
  231. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +548 -0
  232. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.js +23 -0
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +22 -0
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +338 -0
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +18 -0
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +75 -0
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +364 -0
  239. package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +21 -0
  240. package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +36 -0
  241. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +110 -0
  242. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +692 -0
  243. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +40 -0
  244. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +158 -0
  245. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +80 -21
  246. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +440 -82
  247. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.d.ts +0 -34
  248. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatInputRelatedFilesContrib.js +0 -139
  249. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.d.ts +0 -10
  250. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.js +0 -1081
  251. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +0 -199
  252. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +0 -482
  253. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +0 -28
  254. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +0 -37
  255. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +0 -94
  256. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +0 -495
  257. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +0 -72
  258. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +0 -454
  259. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +0 -13
  260. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +0 -66
  261. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +0 -41
  262. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +0 -372
  263. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +0 -4
  264. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +0 -58
  265. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +0 -26
  266. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +0 -594
  267. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +0 -8
  268. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -55
  269. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +0 -273
  270. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1746
  271. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +0 -50
  272. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -269
  273. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +0 -258
  274. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -806
  275. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +0 -41
  276. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -116
  277. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +0 -17
  278. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +0 -62
  279. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +0 -27
  280. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -40
  281. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +0 -23
  282. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +0 -295
  283. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +0 -51
  284. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +0 -241
  285. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +0 -24
  286. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +0 -146
  287. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +0 -28
  288. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +0 -90
  289. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +0 -10
  290. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +0 -41
  291. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +0 -21
  292. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +0 -42
  293. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +0 -25
  294. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +0 -77
  295. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +0 -469
  296. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +0 -149
  297. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -823
  298. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +0 -180
  299. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -29
  300. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +0 -102
  301. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -567
  302. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +0 -30
  303. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -189
  304. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +0 -75
  305. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +0 -439
  306. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +0 -57
  307. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +0 -263
  308. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +0 -22
  309. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +0 -48
  310. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +0 -13
  311. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +0 -39
  312. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +0 -19
  313. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +0 -89
  314. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +0 -26
  315. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +0 -92
  316. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +0 -33
  317. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -108
@@ -1,51 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
3
- import { NotebookTextModel } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/common/model/notebookTextModel";
4
- import { CellDiffInfo } from "../notebookDiffViewModel.js";
5
- import { INotebookEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
6
- import { MenuId } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions";
7
- import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
8
- import { IActionViewItemProvider } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/actionbar/actionbar";
9
- export interface INotebookDeletedCellDecorator {
10
- getTop(deletedIndex: number): number | undefined;
11
- }
12
- export declare class NotebookDeletedCellDecorator extends Disposable implements INotebookDeletedCellDecorator {
13
- private readonly _notebookEditor;
14
- private readonly toolbar;
15
- private readonly languageService;
16
- private readonly instantiationService;
17
- private readonly zoneRemover;
18
- private readonly createdViewZones;
19
- private readonly deletedCellInfos;
20
- constructor(_notebookEditor: INotebookEditor, toolbar: {
21
- menuId: MenuId;
22
- className: string;
23
- telemetrySource?: string;
24
- argFactory: (deletedCellIndex: number) => any;
25
- actionViewItemProvider?: IActionViewItemProvider;
26
- } | undefined, languageService: ILanguageService, instantiationService: IInstantiationService);
27
- getTop(deletedIndex: number): number | undefined;
28
- reveal(deletedIndex: number): void;
29
- apply(diffInfo: CellDiffInfo[], original: NotebookTextModel): void;
30
- clear(): void;
31
- private _createWidget;
32
- private _createWidgetImpl;
33
- }
34
- export declare class NotebookDeletedCellWidget extends Disposable {
35
- private readonly _notebookEditor;
36
- private readonly _toolbarOptions;
37
- private readonly code;
38
- private readonly language;
39
- private readonly _originalIndex;
40
- private readonly languageService;
41
- private readonly instantiationService;
42
- private readonly container;
43
- constructor(_notebookEditor: INotebookEditor, _toolbarOptions: {
44
- menuId: MenuId;
45
- className: string;
46
- telemetrySource?: string;
47
- argFactory: (deletedCellIndex: number) => any;
48
- actionViewItemProvider?: IActionViewItemProvider;
49
- } | undefined, code: string, language: string, container: HTMLElement, _originalIndex: number, languageService: ILanguageService, instantiationService: IInstantiationService);
50
- render(): Promise<number>;
51
- }
@@ -1,241 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { createTrustedTypesPolicy } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/trustedTypes';
4
- import { Disposable, DisposableStore, toDisposable, dispose } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
- import { splitLines } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
6
- import { EditorOption } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/config/editorOptions';
7
- import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
8
- import { tokenizeToString } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/textToHtmlTokenizer';
9
- import { DefaultLineHeight } from '../diffElementViewModel.js';
10
- import { NotebookOverviewRulerLane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
11
- import { createElement, append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
12
- import { MenuWorkbenchToolBar, HiddenItemStrategy } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
13
- import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
14
- import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
15
- import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
16
- import { overviewRulerDeletedForeground } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff';
17
-
18
- const ttPolicy = createTrustedTypesPolicy('notebookRenderer', { createHTML: value => value });
19
- let NotebookDeletedCellDecorator = class NotebookDeletedCellDecorator extends Disposable {
20
- constructor(_notebookEditor, toolbar, languageService, instantiationService) {
21
- super();
22
- this._notebookEditor = _notebookEditor;
23
- this.toolbar = toolbar;
24
- this.languageService = languageService;
25
- this.instantiationService = instantiationService;
26
- this.zoneRemover = this._register(( new DisposableStore()));
27
- this.createdViewZones = ( new Map());
28
- this.deletedCellInfos = ( new Map());
29
- }
30
- getTop(deletedIndex) {
31
- const info = this.deletedCellInfos.get(deletedIndex);
32
- if (!info) {
33
- return;
34
- }
35
- if (info.previousIndex === -1) {
36
- return 0;
37
- }
38
- const cells = this._notebookEditor.getCellsInRange({ start: info.previousIndex, end: info.previousIndex + 1 });
39
- if (!cells.length) {
40
- return this._notebookEditor.getLayoutInfo().height + info.offset;
41
- }
42
- const cell = cells[0];
43
- const cellHeight = this._notebookEditor.getHeightOfElement(cell);
44
- const top = this._notebookEditor.getAbsoluteTopOfElement(cell);
45
- return top + cellHeight + info.offset;
46
- }
47
- reveal(deletedIndex) {
48
- const top = this.getTop(deletedIndex);
49
- if (typeof top === 'number') {
50
- this._notebookEditor.focusContainer();
51
- this._notebookEditor.revealOffsetInCenterIfOutsideViewport(top);
52
- const info = this.deletedCellInfos.get(deletedIndex);
53
- if (info) {
54
- const prevIndex = info.previousIndex === -1 ? 0 : info.previousIndex;
55
- this._notebookEditor.setFocus({ start: prevIndex, end: prevIndex });
56
- this._notebookEditor.setSelections([{ start: prevIndex, end: prevIndex }]);
57
- }
58
- }
59
- }
60
- apply(diffInfo, original) {
61
- this.clear();
62
- let currentIndex = -1;
63
- const deletedCellsToRender = { cells: [], index: 0 };
64
- diffInfo.forEach(diff => {
65
- if (diff.type === 'delete') {
66
- const deletedCell = original.cells[diff.originalCellIndex];
67
- if (deletedCell) {
68
- deletedCellsToRender.cells.push({ cell: deletedCell, originalIndex: diff.originalCellIndex, previousIndex: currentIndex });
69
- deletedCellsToRender.index = currentIndex;
70
- }
71
- }
72
- else {
73
- if (deletedCellsToRender.cells.length) {
74
- this._createWidget(deletedCellsToRender.index + 1, deletedCellsToRender.cells);
75
- deletedCellsToRender.cells.length = 0;
76
- }
77
- currentIndex = diff.modifiedCellIndex;
78
- }
79
- });
80
- if (deletedCellsToRender.cells.length) {
81
- this._createWidget(deletedCellsToRender.index + 1, deletedCellsToRender.cells);
82
- }
83
- }
84
- clear() {
85
- this.deletedCellInfos.clear();
86
- this.zoneRemover.clear();
87
- }
88
- _createWidget(index, cells) {
89
- this._createWidgetImpl(index, cells);
90
- }
91
- async _createWidgetImpl(index, cells) {
92
- const rootContainer = createElement('div');
93
- const widgets = [];
94
- const heights = await Promise.all(( cells.map(async (cell) => {
95
- const widget = ( new NotebookDeletedCellWidget(
96
- this._notebookEditor,
97
- this.toolbar,
98
- cell.cell.getValue(),
99
- cell.cell.language,
100
- rootContainer,
101
- cell.originalIndex,
102
- this.languageService,
103
- this.instantiationService
104
- ));
105
- widgets.push(widget);
106
- const height = await widget.render();
107
- this.deletedCellInfos.set(cell.originalIndex, { height, previousIndex: cell.previousIndex, offset: 0 });
108
- return height;
109
- })));
110
- Array.from(( this.deletedCellInfos.keys())).sort((a, b) => a - b).forEach((originalIndex) => {
111
- const previousDeletedCell = this.deletedCellInfos.get(originalIndex - 1);
112
- if (previousDeletedCell) {
113
- const deletedCell = this.deletedCellInfos.get(originalIndex);
114
- if (deletedCell) {
115
- deletedCell.offset = previousDeletedCell.height + previousDeletedCell.offset;
116
- }
117
- }
118
- });
119
- const totalHeight = heights.reduce((prev, curr) => prev + curr, 0);
120
- this._notebookEditor.changeViewZones(accessor => {
121
- const notebookViewZone = {
122
- afterModelPosition: index,
123
- heightInPx: totalHeight + 4,
124
- domNode: rootContainer
125
- };
126
- const id = accessor.addZone(notebookViewZone);
127
- accessor.layoutZone(id);
128
- this.createdViewZones.set(index, id);
129
- const deletedCellOverviewRulereDecorationIds = this._notebookEditor.deltaCellDecorations([], [{
130
- viewZoneId: id,
131
- options: {
132
- overviewRuler: {
133
- color: overviewRulerDeletedForeground,
134
- position: NotebookOverviewRulerLane.Center,
135
- }
136
- }
137
- }]);
138
- this.zoneRemover.add(toDisposable(() => {
139
- if (this.createdViewZones.get(index) === id) {
140
- this.createdViewZones.delete(index);
141
- }
142
- if (!this._notebookEditor.isDisposed) {
143
- this._notebookEditor.changeViewZones(accessor => {
144
- accessor.removeZone(id);
145
- dispose(widgets);
146
- });
147
- this._notebookEditor.deltaCellDecorations(deletedCellOverviewRulereDecorationIds, []);
148
- }
149
- }));
150
- });
151
- }
152
- };
153
- NotebookDeletedCellDecorator = ( __decorate([
154
- ( __param(2, ILanguageService)),
155
- ( __param(3, IInstantiationService))
156
- ], NotebookDeletedCellDecorator));
157
- let NotebookDeletedCellWidget = class NotebookDeletedCellWidget extends Disposable {
158
- constructor(_notebookEditor, _toolbarOptions, code, language, container, _originalIndex, languageService, instantiationService) {
159
- super();
160
- this._notebookEditor = _notebookEditor;
161
- this._toolbarOptions = _toolbarOptions;
162
- this.code = code;
163
- this.language = language;
164
- this._originalIndex = _originalIndex;
165
- this.languageService = languageService;
166
- this.instantiationService = instantiationService;
167
- this.container = append(container, createElement('div'));
168
- this._register(toDisposable(() => {
169
- container.removeChild(this.container);
170
- }));
171
- }
172
- async render() {
173
- const code = this.code;
174
- const languageId = this.language;
175
- const codeHtml = await tokenizeToString(this.languageService, code, languageId);
176
- const fontInfo = this._notebookEditor.getBaseCellEditorOptions(languageId).value;
177
- const fontFamilyVar = '--notebook-editor-font-family';
178
- const fontSizeVar = '--notebook-editor-font-size';
179
- const fontWeightVar = '--notebook-editor-font-weight';
180
- const editor = ( this._notebookEditor.codeEditors.map(c => c[1])).find(c => c);
181
- const layoutInfo = editor?.getOptions().get(EditorOption.layoutInfo);
182
- const style = ``
183
- + `font-family: var(${fontFamilyVar});`
184
- + `font-weight: var(${fontWeightVar});`
185
- + `font-size: var(${fontSizeVar});`
186
- + fontInfo.lineHeight ? `line-height: ${fontInfo.lineHeight}px;` : ''
187
- + layoutInfo?.contentLeft ? `margin-left: ${layoutInfo}px;` : ''
188
- + `white-space: pre;`;
189
- const rootContainer = this.container;
190
- rootContainer.classList.add('code-cell-row');
191
- if (this._toolbarOptions) {
192
- const toolbar = createElement('div');
193
- toolbar.className = this._toolbarOptions.className;
194
- rootContainer.appendChild(toolbar);
195
- const scopedInstaService = this._register(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, this._notebookEditor.scopedContextKeyService]))));
196
- const toolbarWidget = scopedInstaService.createInstance(MenuWorkbenchToolBar, toolbar, this._toolbarOptions.menuId, {
197
- telemetrySource: this._toolbarOptions.telemetrySource,
198
- hiddenItemStrategy: HiddenItemStrategy.NoHide,
199
- toolbarOptions: { primaryGroup: () => true },
200
- menuOptions: {
201
- renderShortTitle: true,
202
- arg: this._toolbarOptions.argFactory(this._originalIndex),
203
- },
204
- actionViewItemProvider: this._toolbarOptions.actionViewItemProvider
205
- });
206
- this._store.add(toolbarWidget);
207
- toolbar.style.position = 'absolute';
208
- toolbar.style.right = '40px';
209
- toolbar.style.zIndex = '10';
210
- toolbar.classList.add('hover');
211
- }
212
- const container = append(rootContainer, $('.cell-inner-container'));
213
- container.style.position = 'relative';
214
- const focusIndicatorLeft = append(container, $('.cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-left'));
215
- const cellContainer = append(container, $('.cell.code'));
216
- append(focusIndicatorLeft, $('div.execution-count-label'));
217
- const editorPart = append(cellContainer, $('.cell-editor-part'));
218
- let editorContainer = append(editorPart, $('.cell-editor-container'));
219
- editorContainer = append(editorContainer, $('.code', { style }));
220
- if (fontInfo.fontFamily) {
221
- editorContainer.style.setProperty(fontFamilyVar, fontInfo.fontFamily);
222
- }
223
- if (fontInfo.fontSize) {
224
- editorContainer.style.setProperty(fontSizeVar, `${fontInfo.fontSize}px`);
225
- }
226
- if (fontInfo.fontWeight) {
227
- editorContainer.style.setProperty(fontWeightVar, fontInfo.fontWeight);
228
- }
229
- editorContainer.innerHTML = (ttPolicy?.createHTML(codeHtml) || codeHtml);
230
- const lineCount = splitLines(code).length;
231
- const height = (lineCount * (fontInfo.lineHeight || DefaultLineHeight)) + 12 + 12;
232
- const totalHeight = height + 16 + 16;
233
- return totalHeight;
234
- }
235
- };
236
- NotebookDeletedCellWidget = ( __decorate([
237
- ( __param(6, ILanguageService)),
238
- ( __param(7, IInstantiationService))
239
- ], NotebookDeletedCellWidget));
240
-
241
- export { NotebookDeletedCellDecorator, NotebookDeletedCellWidget };
@@ -1,24 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
3
- import { INotebookEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service";
4
- import { INotebookEditorContribution, INotebookEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
5
- import { INotebookLoggingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service";
6
- export declare class NotebookInlineDiffDecorationContribution extends Disposable implements INotebookEditorContribution {
7
- private readonly notebookEditor;
8
- private readonly notebookEditorWorkerService;
9
- private readonly instantiationService;
10
- private readonly logService;
11
- static ID: string;
12
- private previous?;
13
- private insertedCellDecorator;
14
- private deletedCellDecorator;
15
- private readonly cellDecorators;
16
- private cachedNotebookDiff?;
17
- private listeners;
18
- constructor(notebookEditor: INotebookEditor, notebookEditorWorkerService: INotebookEditorWorkerService, instantiationService: IInstantiationService, logService: INotebookLoggingService);
19
- private clear;
20
- dispose(): void;
21
- private initialize;
22
- private _update;
23
- private updateCells;
24
- }
@@ -1,146 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
- import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
- import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
6
- import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
7
- import { INotebookEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service';
8
- import { registerNotebookContribution } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
9
- import { NotebookCellDiffDecorator } from './notebookCellDiffDecorator.js';
10
- import { NotebookDeletedCellDecorator } from './notebookDeletedCellDecorator.js';
11
- import { NotebookInsertedCellDecorator } from './notebookInsertedCellDecorator.js';
12
- import { INotebookLoggingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
13
- import { computeDiff } from '../../../common/notebookDiff.js';
14
- import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
15
- import './notebookOriginalModelRefFactory.js';
16
- import './notebookOriginalCellModelFactory.js';
17
- import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
18
-
19
- let NotebookInlineDiffDecorationContribution = class NotebookInlineDiffDecorationContribution extends Disposable {
20
- static { this.ID = 'workbench.notebook.inlineDiffDecoration'; }
21
- constructor(notebookEditor, notebookEditorWorkerService, instantiationService, logService) {
22
- super();
23
- this.notebookEditor = notebookEditor;
24
- this.notebookEditorWorkerService = notebookEditorWorkerService;
25
- this.instantiationService = instantiationService;
26
- this.logService = logService;
27
- this.cellDecorators = ( new Map());
28
- this.listeners = [];
29
- this.logService.debug('inlineDiff', 'Watching for previous model');
30
- this._register(autorun((reader) => {
31
- this.previous = this.notebookEditor.notebookOptions.previousModelToCompare.read(reader);
32
- if (this.previous) {
33
- this.logService.debug('inlineDiff', 'Previous model set');
34
- if (this.notebookEditor.hasModel()) {
35
- this.initialize();
36
- }
37
- else {
38
- this.logService.debug('inlineDiff', 'Waiting for model to attach');
39
- this.listeners.push(Event.once(this.notebookEditor.onDidAttachViewModel)(() => this.initialize()));
40
- }
41
- }
42
- }));
43
- }
44
- clear() {
45
- this.listeners.forEach(l => l.dispose());
46
- this.cellDecorators.forEach((v, cell) => {
47
- v.dispose();
48
- this.cellDecorators.delete(cell);
49
- });
50
- this.insertedCellDecorator?.dispose();
51
- this.deletedCellDecorator?.dispose();
52
- this.cachedNotebookDiff = undefined;
53
- this.listeners = [];
54
- this.logService.debug('inlineDiff', 'Cleared decorations and listeners');
55
- }
56
- dispose() {
57
- this.logService.debug('inlineDiff', 'Disposing');
58
- this.clear();
59
- super.dispose();
60
- }
61
- initialize() {
62
- this.clear();
63
- if (!this.previous) {
64
- return;
65
- }
66
- this.insertedCellDecorator = this.instantiationService.createInstance(NotebookInsertedCellDecorator, this.notebookEditor);
67
- this.deletedCellDecorator = this.instantiationService.createInstance(NotebookDeletedCellDecorator, this.notebookEditor, undefined);
68
- this._update();
69
- const onVisibleChange = Event.debounce(this.notebookEditor.onDidChangeVisibleRanges, (e) => e, 100, undefined, undefined, undefined, this._store);
70
- this.listeners.push(onVisibleChange(() => this._update()));
71
- this.listeners.push(this.notebookEditor.onDidChangeModel(() => this._update()));
72
- if (this.notebookEditor.textModel) {
73
- const onContentChange = Event.debounce(this.notebookEditor.textModel.onDidChangeContent, (_, event) => event, 100, undefined, undefined, undefined, this._store);
74
- const onOriginalContentChange = Event.debounce(this.previous.onDidChangeContent, (_, event) => event, 100, undefined, undefined, undefined, this._store);
75
- this.listeners.push(onContentChange(() => this._update()));
76
- this.listeners.push(onOriginalContentChange(() => this._update()));
77
- }
78
- this.logService.debug('inlineDiff', 'Initialized');
79
- }
80
- async _update() {
81
- const current = this.notebookEditor.getViewModel()?.notebookDocument;
82
- if (!this.previous || !current) {
83
- this.logService.debug('inlineDiff', 'Update skipped - no original or current document');
84
- return;
85
- }
86
- if (!this.cachedNotebookDiff ||
87
- this.cachedNotebookDiff.originalVersion !== this.previous.versionId ||
88
- this.cachedNotebookDiff.version !== current.versionId) {
89
- let diffInfo = { cellDiffInfo: [] };
90
- try {
91
- const notebookDiff = await this.notebookEditorWorkerService.computeDiff(this.previous.uri, current.uri);
92
- diffInfo = computeDiff(this.previous, current, notebookDiff);
93
- }
94
- catch (e) {
95
- this.logService.error('inlineDiff', 'Error computing diff:\n' + e);
96
- return;
97
- }
98
- this.cachedNotebookDiff = { cellDiffInfo: diffInfo.cellDiffInfo, originalVersion: this.previous.versionId, version: current.versionId };
99
- this.insertedCellDecorator?.apply(diffInfo.cellDiffInfo);
100
- this.deletedCellDecorator?.apply(diffInfo.cellDiffInfo, this.previous);
101
- }
102
- await this.updateCells(this.previous, current, this.cachedNotebookDiff.cellDiffInfo);
103
- }
104
- async updateCells(original, modified, cellDiffs) {
105
- const validDiffDecorators = ( new Set());
106
- cellDiffs.forEach((diff) => {
107
- if (diff.type === 'modified') {
108
- const modifiedCell = modified.cells[diff.modifiedCellIndex];
109
- const originalCell = original.cells[diff.originalCellIndex];
110
- const editor = this.notebookEditor.codeEditors.find(([vm,]) => vm.handle === modifiedCell.handle)?.[1];
111
- if (editor) {
112
- const currentDecorator = this.cellDecorators.get(modifiedCell);
113
- if ((currentDecorator?.modifiedCell !== modifiedCell || currentDecorator?.originalCell !== originalCell)) {
114
- currentDecorator?.dispose();
115
- const decorator = this.instantiationService.createInstance(NotebookCellDiffDecorator, this.notebookEditor, modifiedCell, originalCell, editor);
116
- this.cellDecorators.set(modifiedCell, decorator);
117
- validDiffDecorators.add(decorator);
118
- this._register(editor.onDidDispose(() => {
119
- decorator.dispose();
120
- if (this.cellDecorators.get(modifiedCell) === decorator) {
121
- this.cellDecorators.delete(modifiedCell);
122
- }
123
- }));
124
- }
125
- else if (currentDecorator) {
126
- validDiffDecorators.add(currentDecorator);
127
- }
128
- }
129
- }
130
- });
131
- this.cellDecorators.forEach((v, cell) => {
132
- if (!( validDiffDecorators.has(v))) {
133
- v.dispose();
134
- this.cellDecorators.delete(cell);
135
- }
136
- });
137
- }
138
- };
139
- NotebookInlineDiffDecorationContribution = ( __decorate([
140
- ( __param(1, INotebookEditorWorkerService)),
141
- ( __param(2, IInstantiationService)),
142
- ( __param(3, INotebookLoggingService))
143
- ], NotebookInlineDiffDecorationContribution));
144
- registerNotebookContribution(NotebookInlineDiffDecorationContribution.ID, NotebookInlineDiffDecorationContribution);
145
-
146
- export { NotebookInlineDiffDecorationContribution };
@@ -1,28 +0,0 @@
1
- import * as DOM from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom";
2
- import { CodeWindow } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/window";
3
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
- import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
5
- import { NotebookTextModel } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/common/model/notebookTextModel";
6
- import { NotebookDiffEditorInput } from "../../../common/notebookDiffEditorInput.js";
7
- import { INotebookEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
8
- import { NotebookEditorWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorWidget";
9
- import { NotebookOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookOptions";
10
- import { INotebookEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service";
11
- export declare class NotebookInlineDiffWidget extends Disposable {
12
- private readonly rootElement;
13
- private readonly groupId;
14
- private readonly window;
15
- private readonly options;
16
- private dimension;
17
- private readonly instantiationService;
18
- private readonly widgetService;
19
- private widget;
20
- private position;
21
- get editorWidget(): NotebookEditorWidget | undefined;
22
- constructor(rootElement: HTMLElement, groupId: number, window: CodeWindow, options: NotebookOptions, dimension: DOM.Dimension | undefined, instantiationService: IInstantiationService, widgetService: INotebookEditorService);
23
- show(input: NotebookDiffEditorInput, model: NotebookTextModel | undefined, previousModel: NotebookTextModel | undefined, options: INotebookEditorOptions | undefined): Promise<void>;
24
- hide(): void;
25
- setLayout(dimension: DOM.Dimension, position: DOM.IDomPosition): void;
26
- private createNotebookWidget;
27
- dispose(): void;
28
- }
@@ -1,90 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { setParentFlowTo } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
- import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
- import { EditorExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
6
- import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
7
- import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
8
- import { NotebookInlineDiffDecorationContribution } from './notebookInlineDiff.js';
9
- import { NotebookEditorExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
10
- import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
11
-
12
- let NotebookInlineDiffWidget = class NotebookInlineDiffWidget extends Disposable {
13
- get editorWidget() {
14
- return this.widget.value;
15
- }
16
- constructor(rootElement, groupId, window, options, dimension, instantiationService, widgetService) {
17
- super();
18
- this.rootElement = rootElement;
19
- this.groupId = groupId;
20
- this.window = window;
21
- this.options = options;
22
- this.dimension = dimension;
23
- this.instantiationService = instantiationService;
24
- this.widgetService = widgetService;
25
- this.widget = { value: undefined };
26
- }
27
- async show(input, model, previousModel, options) {
28
- if (!this.widget.value) {
29
- this.createNotebookWidget(input, this.groupId, this.rootElement);
30
- }
31
- if (this.dimension) {
32
- this.widget.value?.layout(this.dimension, this.rootElement, this.position);
33
- }
34
- if (model) {
35
- await this.widget.value?.setOptions({ ...options });
36
- this.widget.value?.notebookOptions.previousModelToCompare.set(previousModel, undefined);
37
- await this.widget.value.setModel(model, options?.viewState);
38
- }
39
- }
40
- hide() {
41
- if (this.widget.value) {
42
- this.widget.value.notebookOptions.previousModelToCompare.set(undefined, undefined);
43
- this.widget.value.onWillHide();
44
- }
45
- }
46
- setLayout(dimension, position) {
47
- this.dimension = dimension;
48
- this.position = position;
49
- }
50
- createNotebookWidget(input, groupId, rootElement) {
51
- const contributions = NotebookEditorExtensionsRegistry.getSomeEditorContributions([NotebookInlineDiffDecorationContribution.ID]);
52
- const menuIds = {
53
- notebookToolbar: MenuId.NotebookToolbar,
54
- cellTitleToolbar: MenuId.NotebookCellTitle,
55
- cellDeleteToolbar: MenuId.NotebookCellDelete,
56
- cellInsertToolbar: MenuId.NotebookCellBetween,
57
- cellTopInsertToolbar: MenuId.NotebookCellListTop,
58
- cellExecuteToolbar: MenuId.NotebookCellExecute,
59
- cellExecutePrimary: undefined,
60
- };
61
- const skipContributions = [
62
- 'editor.contrib.review',
63
- 'editor.contrib.floatingClickMenu',
64
- 'editor.contrib.dirtydiff',
65
- 'editor.contrib.testingOutputPeek',
66
- 'editor.contrib.testingDecorations',
67
- 'store.contrib.stickyScrollController',
68
- 'editor.contrib.findController',
69
- 'editor.contrib.emptyTextEditorHint',
70
- ];
71
- const cellEditorContributions = EditorExtensionsRegistry.getEditorContributions().filter(c => skipContributions.indexOf(c.id) === -1);
72
- this.widget = this.instantiationService.invokeFunction(this.widgetService.retrieveWidget, groupId, input, { contributions, menuIds, cellEditorContributions, options: this.options }, this.dimension, this.window);
73
- if (this.rootElement && this.widget.value.getDomNode()) {
74
- this.rootElement.setAttribute('aria-flowto', this.widget.value.getDomNode().id || '');
75
- setParentFlowTo(this.widget.value.getDomNode(), this.rootElement);
76
- }
77
- }
78
- dispose() {
79
- super.dispose();
80
- if (this.widget.value) {
81
- this.widget.value.dispose();
82
- }
83
- }
84
- };
85
- NotebookInlineDiffWidget = ( __decorate([
86
- ( __param(5, IInstantiationService)),
87
- ( __param(6, INotebookEditorService))
88
- ], NotebookInlineDiffWidget));
89
-
90
- export { NotebookInlineDiffWidget };
@@ -1,10 +0,0 @@
1
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { CellDiffInfo } from "../notebookDiffViewModel.js";
3
- import { INotebookEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
4
- export declare class NotebookInsertedCellDecorator extends Disposable {
5
- private readonly notebookEditor;
6
- private readonly decorators;
7
- constructor(notebookEditor: INotebookEditor);
8
- apply(diffInfo: CellDiffInfo[]): void;
9
- clear(): void;
10
- }
@@ -1,41 +0,0 @@
1
-
2
- import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
3
- import { NotebookOverviewRulerLane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
4
- import { overviewRulerAddedForeground } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff';
5
-
6
- class NotebookInsertedCellDecorator extends Disposable {
7
- constructor(notebookEditor) {
8
- super();
9
- this.notebookEditor = notebookEditor;
10
- this.decorators = this._register(( new DisposableStore()));
11
- }
12
- apply(diffInfo) {
13
- const model = this.notebookEditor.textModel;
14
- if (!model) {
15
- return;
16
- }
17
- const cells = ( diffInfo.filter(diff => diff.type === 'insert').map((diff) => model.cells[diff.modifiedCellIndex]));
18
- const ids = this.notebookEditor.deltaCellDecorations([], ( cells.map(cell => ({
19
- handle: cell.handle,
20
- options: {
21
- className: 'nb-insertHighlight', outputClassName: 'nb-insertHighlight', overviewRuler: {
22
- color: overviewRulerAddedForeground,
23
- modelRanges: [],
24
- includeOutput: true,
25
- position: NotebookOverviewRulerLane.Full
26
- }
27
- }
28
- }))));
29
- this.clear();
30
- this.decorators.add(toDisposable(() => {
31
- if (!this.notebookEditor.isDisposed) {
32
- this.notebookEditor.deltaCellDecorations(ids, []);
33
- }
34
- }));
35
- }
36
- clear() {
37
- this.decorators.clear();
38
- }
39
- }
40
-
41
- export { NotebookInsertedCellDecorator };