@codingame/monaco-vscode-katex-common 30.0.0 → 31.0.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 (276) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/platform/actions/browser/actionbar.d.ts +16 -0
  3. package/vscode/src/vs/platform/actions/browser/actionbar.js +22 -0
  4. package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -2
  5. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.d.ts +50 -0
  6. package/vscode/src/vs/platform/networkFilter/common/domainMatcher.js +138 -0
  7. package/vscode/src/vs/platform/networkFilter/common/settings.d.ts +12 -0
  8. package/vscode/src/vs/platform/networkFilter/common/settings.js +14 -0
  9. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.d.ts +18 -0
  10. package/vscode/src/vs/platform/sandbox/common/sandboxHelperIpc.js +13 -0
  11. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.d.ts +73 -0
  12. package/vscode/src/vs/platform/sandbox/common/terminalSandboxService.js +10 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +3 -1
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +51 -24
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +2 -1
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +64 -72
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +2 -1
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +17 -14
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +13 -13
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +17 -18
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +5 -2
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +5 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +73 -9
  28. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +32 -32
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.d.ts +1 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentModel.js +20 -2
  32. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +1 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +73 -49
  34. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +12 -12
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +0 -6
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +41 -99
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +13 -9
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
  42. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +14 -15
  43. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +11 -12
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +339 -161
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +9 -2
  47. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  48. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +9 -4
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +33 -5
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.d.ts +43 -1
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollections.js +147 -2
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +4 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +55 -6
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.d.ts +1 -1
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +7 -5
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +1 -3
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +42 -10
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animation.d.ts +18 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animationRegistry.d.ts +15 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/animationRegistry.js +16 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/blockAnimations.d.ts +13 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/animations/blockAnimations.js +33 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/buffer.d.ts +46 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/bufferRegistry.d.ts +11 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/bufferRegistry.js +12 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/offBuffer.d.ts +9 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/offBuffer.js +12 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.d.ts +23 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/paragraphBuffer.js +37 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/wordBuffer.d.ts +34 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/buffers/wordBuffer.js +68 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.d.ts +77 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/chatIncrementalRendering.js +170 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatIncrementalRendering/media/chatIncrementalRendering.css +112 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +3 -1
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -16
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +24 -6
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +111 -145
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.d.ts +58 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +425 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +16 -7
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +68 -25
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +5 -1
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +101 -45
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +36 -4
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +217 -25
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +6 -6
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +23 -3
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +168 -60
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +10 -10
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +18 -17
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +1 -5
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +7 -18
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +1 -5
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +7 -19
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +24 -19
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +104 -78
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +11 -2
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +257 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +19 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +30 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +1 -1
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +12 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +286 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +2 -2
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +15 -11
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -7
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +25 -47
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +29 -53
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +258 -321
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.d.ts +53 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +392 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +1 -3
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +24 -30
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +2 -3
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +9 -8
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.d.ts +6 -3
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/terminalToolAutoExpand.js +2 -3
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +38 -11
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +577 -113
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +0 -7
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +4 -7
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +1 -8
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +58 -75
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +44 -12
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +362 -188
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +0 -2
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +4 -5
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +42 -95
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +2 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +9 -10
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +57 -38
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +21 -15
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/{modelPickerActionItem2.js → modelPickerActionItem.js} +5 -7
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +38 -31
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +4 -5
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +94 -40
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
  166. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.d.ts +16 -0
  167. package/vscode/src/vs/workbench/contrib/chat/common/chatArtifactExtraction.js +218 -0
  168. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +7 -7
  169. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +6 -1
  170. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
  171. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +12 -21
  172. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +2 -32
  173. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +355 -156
  174. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +2 -13
  175. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +72 -65
  176. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +4 -43
  177. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +238 -204
  178. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +4 -19
  179. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +128 -115
  180. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +6 -9
  181. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +152 -49
  182. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +64 -0
  183. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +40 -40
  184. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  185. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  186. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  187. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
  188. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
  189. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
  190. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
  191. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
  192. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
  193. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
  194. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  195. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  196. package/vscode/src/vs/workbench/contrib/terminal/terminalContribChatExports.d.ts +2 -0
  197. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.d.ts +2 -0
  198. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/alternativeRecommendation.js +41 -0
  199. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/commandFileWriteParser.d.ts +24 -0
  200. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.d.ts +26 -0
  201. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandParsers/sedFileWriteParser.js +142 -0
  202. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.d.ts +45 -0
  203. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/basicExecuteStrategy.js +165 -0
  204. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.d.ts +53 -0
  205. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/executeStrategy.js +163 -0
  206. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.d.ts +27 -0
  207. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/noneExecuteStrategy.js +142 -0
  208. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.d.ts +29 -0
  209. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/richExecuteStrategy.js +144 -0
  210. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.d.ts +40 -0
  211. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/executeStrategy/strategyHelpers.js +174 -0
  212. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.d.ts +7 -0
  213. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/outputHelpers.js +43 -0
  214. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.d.ts +42 -0
  215. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +256 -0
  216. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.d.ts +42 -0
  217. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalToolTelemetry.js +94 -0
  218. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.d.ts +42 -0
  219. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/toolTerminalCreator.js +221 -0
  220. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.d.ts +31 -0
  221. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/commandLineAutoApprover.js +392 -0
  222. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.d.ts +45 -0
  223. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/autoApprove/npmScriptAutoApprover.js +243 -0
  224. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.d.ts +52 -0
  225. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAnalyzer.js +10 -0
  226. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.d.ts +20 -0
  227. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +310 -0
  228. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.d.ts +19 -0
  229. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +168 -0
  230. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.d.ts +11 -0
  231. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineSandboxAnalyzer.js +33 -0
  232. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/commandLinePresenter.d.ts +41 -0
  233. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.d.ts +19 -0
  234. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/nodeCommandLinePresenter.js +37 -0
  235. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.d.ts +19 -0
  236. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/pythonCommandLinePresenter.js +37 -0
  237. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.d.ts +19 -0
  238. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/rubyCommandLinePresenter.js +44 -0
  239. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.d.ts +13 -0
  240. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLinePresenter/sandboxedCommandLinePresenter.js +22 -0
  241. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.d.ts +22 -0
  242. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineBackgroundDetachRewriter.js +47 -0
  243. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.d.ts +5 -0
  244. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineCdPrefixRewriter.js +27 -0
  245. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.d.ts +14 -0
  246. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePreventHistoryRewriter.js +29 -0
  247. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.d.ts +8 -0
  248. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLinePwshChainOperatorRewriter.js +33 -0
  249. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineRewriter.d.ts +24 -0
  250. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.d.ts +8 -0
  251. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineRewriter/commandLineSandboxRewriter.js +32 -0
  252. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.d.ts +108 -0
  253. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +412 -0
  254. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.d.ts +42 -0
  255. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/types.js +23 -0
  256. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/outputAnalyzer.d.ts +9 -0
  257. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.d.ts +192 -0
  258. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +2258 -0
  259. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.d.ts +22 -0
  260. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/sandboxOutputAnalyzer.js +43 -0
  261. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.d.ts +17 -0
  262. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalCommandArtifactCollector.js +118 -0
  263. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.d.ts +22 -0
  264. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/terminalToolAutoApprove.js +44 -0
  265. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/toolIds.d.ts +1 -0
  266. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.d.ts +25 -0
  267. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/treeSitterCommandParser.js +141 -0
  268. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.d.ts +85 -0
  269. package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalSandboxService.js +608 -0
  270. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.d.ts +0 -40
  271. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +0 -196
  272. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +0 -29
  273. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.d.ts +0 -46
  274. package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +0 -215
  275. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +0 -18
  276. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +0 -107
@@ -1,7 +1,6 @@
1
1
  import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
2
  import { ChatTreeItem, IChatCodeBlockInfo } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat";
3
3
  import { IChatRendererContent, IChatRequestViewModel, IChatResponseViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel";
4
- import { CodeBlockModelCollection } from "../../../common/widget/codeBlockModelCollection.js";
5
4
  import { DiffEditorPool, EditorPool } from "./chatContentCodePools.js";
6
5
  import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
7
6
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
@@ -16,7 +15,7 @@ export interface IChatContentPart extends IDisposable {
16
15
  */
17
16
  codeblocksPartId?: string;
18
17
  /**
19
- * Codeblocks that were rendered by this part into CodeBlockModelCollection.
18
+ * Codeblocks that were rendered by this part.
20
19
  */
21
20
  codeblocks?: IChatCodeBlockInfo[];
22
21
  /**
@@ -42,7 +41,6 @@ export interface IChatContentPartRenderContext {
42
41
  readonly codeBlockStartIndex: number;
43
42
  readonly treeStartIndex: number;
44
43
  readonly diffEditorPool: DiffEditorPool;
45
- readonly codeBlockModelCollection: CodeBlockModelCollection;
46
44
  readonly currentWidth: IObservable<number>;
47
45
  readonly onDidChangeVisibility: Event<boolean>;
48
46
  readonly inlineTextModels: InlineTextModelCollection;
@@ -1,8 +1,8 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
3
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
4
  import { hashAsync } from '@codingame/monaco-vscode-api/vscode/vs/base/common/hash';
5
- import { Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { Disposable, MutableDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
6
  import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
7
7
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
8
8
  import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
@@ -76,17 +76,46 @@ let MarkdownDiffBlockPart = class MarkdownDiffBlockPart extends Disposable {
76
76
  path: `/chat-diff-modified-${data.codeBlockIndex}-${generateUuid()}`
77
77
  }));
78
78
  const languageSelection = this.languageService.createById(data.languageId);
79
- this._register(
80
- this.modelService.createModel(data.beforeContent, languageSelection, originalUri, false)
81
- );
82
- this._register(
83
- this.modelService.createModel(data.afterContent, languageSelection, modifiedUri, false)
84
- );
79
+ const originalModel = this.modelService.createModel(data.beforeContent, languageSelection, originalUri, false);
80
+ const modifiedModel = this.modelService.createModel(data.afterContent, languageSelection, modifiedUri, false);
81
+ const cts = ( new CancellationTokenSource());
82
+ let referencesSettled = false;
83
+ let disposeRequested = false;
84
+ let didDisposeModels = false;
85
+ const disposeModels = () => {
86
+ if (didDisposeModels) {
87
+ return;
88
+ }
89
+ didDisposeModels = true;
90
+ originalModel.dispose();
91
+ modifiedModel.dispose();
92
+ };
93
+ this._register(toDisposable(() => {
94
+ disposeRequested = true;
95
+ cts.dispose(true);
96
+ if (referencesSettled) {
97
+ disposeModels();
98
+ }
99
+ }));
85
100
  const modelsPromise = Promise.all([
86
101
  this.textModelService.createModelReference(originalUri),
87
102
  this.textModelService.createModelReference(modifiedUri)
88
103
  ]).then(([originalRef, modifiedRef]) => {
89
- return ( new SimpleDiffEditorModel(originalRef, modifiedRef));
104
+ referencesSettled = true;
105
+ const model = ( new SimpleDiffEditorModel(originalRef, modifiedRef));
106
+ if (disposeRequested) {
107
+ model.dispose();
108
+ disposeModels();
109
+ return undefined;
110
+ }
111
+ return model;
112
+ }, error => {
113
+ referencesSettled = true;
114
+ disposeModels();
115
+ if (disposeRequested) {
116
+ return undefined;
117
+ }
118
+ throw error;
90
119
  });
91
120
  const compareData = {
92
121
  element: data.element,
@@ -99,6 +128,9 @@ let MarkdownDiffBlockPart = class MarkdownDiffBlockPart extends Disposable {
99
128
  done: true
100
129
  },
101
130
  diffData: modelsPromise.then(async model => {
131
+ if (!model) {
132
+ return undefined;
133
+ }
102
134
  this.modelRef.value = model;
103
135
  const diffData = {
104
136
  original: model.original,
@@ -108,7 +140,7 @@ let MarkdownDiffBlockPart = class MarkdownDiffBlockPart extends Disposable {
108
140
  return diffData;
109
141
  })
110
142
  };
111
- this.comparePart.object.render(compareData, currentWidth, CancellationToken.None);
143
+ this.comparePart.object.render(compareData, currentWidth, cts.token);
112
144
  this.element = this.comparePart.object.element;
113
145
  }
114
146
  layout(width) {
@@ -24,13 +24,13 @@ let ChatDisabledClaudeHooksContentPart = class ChatDisabledClaudeHooksContentPar
24
24
  const icon = $(".chat-disabled-claude-hooks-icon");
25
25
  icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.info));
26
26
  const enableLink = createMarkdownCommandLink({
27
- text: ( localize(6726, "Enable")),
27
+ text: ( localize(6812, "Enable")),
28
28
  id: "workbench.action.openSettings",
29
29
  arguments: [PromptsConfig.USE_CLAUDE_HOOKS],
30
- tooltip: ( localize(6727, "Open settings to enable Claude Code hooks"))
30
+ tooltip: ( localize(6813, "Open settings to enable Claude Code hooks"))
31
31
  });
32
32
  const message = ( localize(
33
- 6728,
33
+ 6814,
34
34
  "Claude Code hooks are available for this workspace. {0}",
35
35
  enableLink
36
36
  ));
@@ -30,7 +30,7 @@ let ChatExtensionsContentPart = class ChatExtensionsContentPart extends Disposab
30
30
  append(
31
31
  loadingElement,
32
32
  $(ThemeIcon.asCSSSelector(ThemeIcon.modify(Codicon.loading, "spin"))),
33
- $("span.loading-message", undefined, ( localize(6729, "Loading extensions...")))
33
+ $("span.loading-message", undefined, ( localize(6815, "Loading extensions...")))
34
34
  );
35
35
  const extensionsList = append(this.domNode, $(".extensions-list"));
36
36
  const list = this._register(
@@ -20,7 +20,7 @@ let ChatHookContentPart = class ChatHookContentPart extends ChatCollapsibleConte
20
20
  const isStopped = !!hookPart.stopReason;
21
21
  const isWarning = !!hookPart.systemMessage;
22
22
  const toolName = hookPart.toolDisplayName;
23
- const title = isStopped ? (toolName ? ( localize(6730, "Blocked {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(6731, "Blocked by {0} hook", hookTypeLabel))) : (toolName ? ( localize(6732, "Warning for {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(6733, "Warning from {0} hook", hookTypeLabel)));
23
+ const title = isStopped ? (toolName ? ( localize(6816, "Blocked {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(6817, "Blocked by {0} hook", hookTypeLabel))) : (toolName ? ( localize(6818, "Warning for {0} - {1} hook", toolName, hookTypeLabel)) : ( localize(6819, "Warning from {0} hook", hookTypeLabel)));
24
24
  super(title, context, undefined, hoverService, configurationService);
25
25
  this.hookPart = hookPart;
26
26
  this.icon = isStopped ? Codicon.error : isWarning ? Codicon.warning : Codicon.check;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Animation strategy for incremental rendering. Applied as a post-processing
3
+ * decoration after the markdown has been correctly rendered.
4
+ *
5
+ * Animation is separate from buffering — it controls *how* rendered
6
+ * content appears, while buffering controls *when* we render.
7
+ */
8
+ export interface IIncrementalRenderingAnimation {
9
+ /**
10
+ * Apply entrance animation to newly appeared DOM children.
11
+ *
12
+ * @param children The live HTMLCollection of the container's children.
13
+ * @param fromIndex Index of the first new child to animate.
14
+ * @param currentCount Total number of children currently in the DOM.
15
+ * @param elapsed Milliseconds since the animation batch started.
16
+ */
17
+ animate(children: HTMLCollection, fromIndex: number, currentCount: number, elapsed: number): void;
18
+ }
@@ -0,0 +1,15 @@
1
+ import { IIncrementalRenderingAnimation } from "./animation.js";
2
+ /**
3
+ * Registry of all available animation styles.
4
+ * To add a new animation, add an entry here.
5
+ */
6
+ export declare const ANIMATION_STYLES: {
7
+ readonly none: () => IIncrementalRenderingAnimation;
8
+ readonly fade: () => IIncrementalRenderingAnimation;
9
+ readonly rise: () => IIncrementalRenderingAnimation;
10
+ readonly blur: () => IIncrementalRenderingAnimation;
11
+ readonly scale: () => IIncrementalRenderingAnimation;
12
+ readonly slide: () => IIncrementalRenderingAnimation;
13
+ readonly reveal: () => IIncrementalRenderingAnimation;
14
+ };
15
+ export type AnimationStyleName = keyof typeof ANIMATION_STYLES;
@@ -0,0 +1,16 @@
1
+
2
+ import { BlockAnimation } from './blockAnimations.js';
3
+
4
+ const ANIMATION_STYLES = {
5
+ none: () => ({
6
+ animate() {}
7
+ }),
8
+ fade: () => ( new BlockAnimation("fade")),
9
+ rise: () => ( new BlockAnimation("rise")),
10
+ blur: () => ( new BlockAnimation("blur")),
11
+ scale: () => ( new BlockAnimation("scale")),
12
+ slide: () => ( new BlockAnimation("slide")),
13
+ reveal: () => ( new BlockAnimation("reveal"))
14
+ };
15
+
16
+ export { ANIMATION_STYLES };
@@ -0,0 +1,13 @@
1
+ import { IIncrementalRenderingAnimation } from "./animation.js";
2
+ /** Duration of the animation applied to newly rendered blocks. */
3
+ export declare const ANIMATION_DURATION_MS = 600;
4
+ /**
5
+ * Block-level CSS animation styles: fade, rise, blur, scale, slide,
6
+ * and lineFade. Each applies a CSS class and staggered timing
7
+ * variables to new top-level children so they reveal sequentially.
8
+ */
9
+ export declare class BlockAnimation implements IIncrementalRenderingAnimation {
10
+ private readonly _style;
11
+ constructor(_style: "fade" | "rise" | "blur" | "scale" | "slide" | "reveal");
12
+ animate(children: HTMLCollection, fromIndex: number, currentCount: number, elapsed: number): void;
13
+ }
@@ -0,0 +1,33 @@
1
+
2
+
3
+ const ANIMATION_DURATION_MS = 600;
4
+ const STAGGER_DELAY_MS = 150;
5
+ class BlockAnimation {
6
+ constructor(_style) {
7
+ this._style = _style;
8
+ }
9
+ animate(children, fromIndex, currentCount, elapsed) {
10
+ const className = `chat-smooth-animate-${this._style}`;
11
+ for (let i = fromIndex; i < currentCount; i++) {
12
+ const child = children[i];
13
+ if (!child.classList) {
14
+ continue;
15
+ }
16
+ const staggerOffset = (i - fromIndex) * STAGGER_DELAY_MS;
17
+ const childDelay = -elapsed + staggerOffset;
18
+ child.classList.add(className);
19
+ child.style.setProperty('--chat-smooth-duration', `${ANIMATION_DURATION_MS}ms`);
20
+ child.style.setProperty('--chat-smooth-delay', `${childDelay}ms`);
21
+ child.addEventListener('animationend', (e) => {
22
+ if (e.target !== child) {
23
+ return;
24
+ }
25
+ child.classList.remove(className);
26
+ child.style.removeProperty('--chat-smooth-duration');
27
+ child.style.removeProperty('--chat-smooth-delay');
28
+ }, { once: true });
29
+ }
30
+ }
31
+ }
32
+
33
+ export { ANIMATION_DURATION_MS, BlockAnimation };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * A buffering strategy determines how much incoming markdown content
3
+ * must accumulate before a render is triggered.
4
+ *
5
+ * Buffering is separate from animation — it controls *when* we render,
6
+ * while animation controls *how* rendered content appears.
7
+ */
8
+ export interface IIncrementalRenderingBuffer {
9
+ /**
10
+ * Given the full markdown string and the markdown that was last
11
+ * rendered to the real DOM, return `true` if the buffer should
12
+ * be handled entirely within _flushRender (e.g. shadow measurement).
13
+ * In that case the orchestrator should pass everything through
14
+ * without updating `_renderedMarkdown`.
15
+ */
16
+ readonly handlesFlush: boolean;
17
+ /**
18
+ * Determine the renderable prefix of `fullMarkdown`. The returned
19
+ * string must be a prefix of `fullMarkdown` (or `fullMarkdown`
20
+ * itself). Content beyond the returned prefix stays buffered.
21
+ *
22
+ * @param fullMarkdown The complete markdown accumulated so far.
23
+ * @param lastRendered The markdown last rendered to the DOM.
24
+ * @returns The prefix to render now.
25
+ */
26
+ getRenderable(fullMarkdown: string, lastRendered: string): string;
27
+ /**
28
+ * For buffers that handle flushing themselves (e.g. line buffer
29
+ * with shadow DOM measurement), this is called during
30
+ * `_flushRender` to decide whether to commit the pending content.
31
+ *
32
+ * @param markdown The pending markdown to potentially commit.
33
+ * @returns The markdown to actually commit, or `undefined` to skip.
34
+ */
35
+ filterFlush?(markdown: string): string | undefined;
36
+ /**
37
+ * Whether the buffer needs another rAF frame to continue revealing
38
+ * content (e.g. typewriter drip-feeding words). When `true`, the
39
+ * orchestrator re-schedules a render after the current flush.
40
+ */
41
+ readonly needsNextFrame?: boolean;
42
+ /**
43
+ * Called when the buffer is no longer needed.
44
+ */
45
+ dispose?(): void;
46
+ }
@@ -0,0 +1,11 @@
1
+ import { IIncrementalRenderingBuffer } from "./buffer.js";
2
+ /**
3
+ * Registry of all available buffering strategies.
4
+ * To add a new buffer, add an entry here.
5
+ */
6
+ export declare const BUFFER_MODES: {
7
+ readonly off: (_domNode: HTMLElement) => IIncrementalRenderingBuffer;
8
+ readonly word: (_domNode: HTMLElement) => IIncrementalRenderingBuffer;
9
+ readonly paragraph: (_domNode: HTMLElement) => IIncrementalRenderingBuffer;
10
+ };
11
+ export type BufferModeName = keyof typeof BUFFER_MODES;
@@ -0,0 +1,12 @@
1
+
2
+ import { OffBuffer } from './offBuffer.js';
3
+ import { ParagraphBuffer } from './paragraphBuffer.js';
4
+ import { WordBuffer } from './wordBuffer.js';
5
+
6
+ const BUFFER_MODES = {
7
+ off: _domNode => ( new OffBuffer()),
8
+ word: _domNode => ( new WordBuffer()),
9
+ paragraph: _domNode => ( new ParagraphBuffer())
10
+ };
11
+
12
+ export { BUFFER_MODES };
@@ -0,0 +1,9 @@
1
+ import { IIncrementalRenderingBuffer } from "./buffer.js";
2
+ /**
3
+ * No buffering — renders everything immediately as tokens arrive.
4
+ * Content is still rAF-coalesced by the orchestrator.
5
+ */
6
+ export declare class OffBuffer implements IIncrementalRenderingBuffer {
7
+ readonly handlesFlush = false;
8
+ getRenderable(fullMarkdown: string, _lastRendered: string): string;
9
+ }
@@ -0,0 +1,12 @@
1
+
2
+
3
+ class OffBuffer {
4
+ constructor() {
5
+ this.handlesFlush = false;
6
+ }
7
+ getRenderable(fullMarkdown, _lastRendered) {
8
+ return fullMarkdown;
9
+ }
10
+ }
11
+
12
+ export { OffBuffer };
@@ -0,0 +1,23 @@
1
+ import { IIncrementalRenderingBuffer } from "./buffer.js";
2
+ /**
3
+ * Finds the last `\n\n` block boundary that is NOT inside an open
4
+ * fenced code block. This prevents splitting a render in the middle
5
+ * of a code fence, which would cause the code block element to update
6
+ * in place (same DOM index) without triggering a new-child animation.
7
+ *
8
+ * The scan counts backtick-fence openings/closings from the start of
9
+ * the string. A `\n\n` is only a valid boundary when the fence depth
10
+ * is 0 (i.e. outside any code block).
11
+ *
12
+ * @internal Exported for testing.
13
+ */
14
+ export declare function lastBlockBoundary(text: string): number;
15
+ /**
16
+ * Buffers content at paragraph boundaries (`\n\n` outside code fences).
17
+ * This avoids rendering partially formed blocks — text mid-paragraph,
18
+ * incomplete list groups, or half a code fence.
19
+ */
20
+ export declare class ParagraphBuffer implements IIncrementalRenderingBuffer {
21
+ readonly handlesFlush = false;
22
+ getRenderable(fullMarkdown: string, lastRendered: string): string;
23
+ }
@@ -0,0 +1,37 @@
1
+
2
+
3
+ const MAX_BUFFERED_CHARS = 4000;
4
+ function lastBlockBoundary(text) {
5
+ let lastValid = -1;
6
+ let inFence = false;
7
+ for (let i = 0; i < text.length; i++) {
8
+ if ((i === 0 || text[i - 1] === '\n') &&
9
+ ((text[i] === '`' && text[i + 1] === '`' && text[i + 2] === '`') ||
10
+ (text[i] === '~' && text[i + 1] === '~' && text[i + 2] === '~'))) {
11
+ inFence = !inFence;
12
+ i += 2;
13
+ continue;
14
+ }
15
+ if (!inFence && text[i] === '\n' && text[i + 1] === '\n') {
16
+ lastValid = i;
17
+ }
18
+ }
19
+ return lastValid;
20
+ }
21
+ class ParagraphBuffer {
22
+ constructor() {
23
+ this.handlesFlush = false;
24
+ }
25
+ getRenderable(fullMarkdown, lastRendered) {
26
+ const lastBlock = lastBlockBoundary(fullMarkdown);
27
+ let renderable = lastBlock === -1
28
+ ? lastRendered
29
+ : fullMarkdown.slice(0, lastBlock + 2);
30
+ if (fullMarkdown.length - renderable.length > MAX_BUFFERED_CHARS) {
31
+ renderable = fullMarkdown;
32
+ }
33
+ return renderable;
34
+ }
35
+ }
36
+
37
+ export { ParagraphBuffer, lastBlockBoundary };
@@ -0,0 +1,34 @@
1
+ import { IIncrementalRenderingBuffer } from "./buffer.js";
2
+ /**
3
+ * Word buffer: drip-feeds words at a rate matching the model's
4
+ * token production speed, similar to the original 50ms progressive
5
+ * render but driven by rAF for smoother output.
6
+ *
7
+ * The reveal rate is set externally via {@link setRate} from the
8
+ * model's `impliedWordLoadRate` estimate. Words are revealed based
9
+ * on elapsed time since the last render, so the output speed
10
+ * naturally matches the model's generation speed.
11
+ */
12
+ export declare class WordBuffer implements IIncrementalRenderingBuffer {
13
+ readonly handlesFlush = true;
14
+ /** The full markdown received so far. */
15
+ private _fullMarkdown;
16
+ /** Number of words currently revealed to the DOM. */
17
+ private _revealedWordCount;
18
+ /** The markdown string last committed to the DOM. */
19
+ private _lastCommittedMarkdown;
20
+ /** Whether there are still unrevealed words to show. */
21
+ private _needsNextFrame;
22
+ /** Timestamp of the last successful commit. */
23
+ private _lastCommitTime;
24
+ /** Estimated word production rate (words/sec). */
25
+ private _rate;
26
+ get needsNextFrame(): boolean;
27
+ /**
28
+ * Set the estimated word production rate from the model's
29
+ * `impliedWordLoadRate`. Called by the orchestrator.
30
+ */
31
+ setRate(rate: number | undefined, isComplete: boolean): void;
32
+ getRenderable(fullMarkdown: string, _lastRendered: string): string;
33
+ filterFlush(markdown: string): string | undefined;
34
+ }
@@ -0,0 +1,68 @@
1
+
2
+ import { getNWords } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatWordCounter';
3
+
4
+ const MIN_RATE = 40;
5
+ const MAX_RATE = 2000;
6
+ const MIN_RATE_AFTER_COMPLETE = 80;
7
+ const DEFAULT_RATE = 8;
8
+ class WordBuffer {
9
+ constructor() {
10
+ this.handlesFlush = true;
11
+ this._fullMarkdown = '';
12
+ this._revealedWordCount = 0;
13
+ this._lastCommittedMarkdown = '';
14
+ this._needsNextFrame = false;
15
+ this._lastCommitTime = 0;
16
+ this._rate = DEFAULT_RATE;
17
+ }
18
+ get needsNextFrame() {
19
+ return this._needsNextFrame;
20
+ }
21
+ setRate(rate, isComplete) {
22
+ if (isComplete) {
23
+ this._rate = typeof rate === 'number'
24
+ ? Math.max(rate, MIN_RATE_AFTER_COMPLETE)
25
+ : MIN_RATE_AFTER_COMPLETE;
26
+ }
27
+ else {
28
+ this._rate = typeof rate === 'number'
29
+ ? Math.min(Math.max(rate, MIN_RATE), MAX_RATE)
30
+ : DEFAULT_RATE;
31
+ }
32
+ }
33
+ getRenderable(fullMarkdown, _lastRendered) {
34
+ this._fullMarkdown = fullMarkdown;
35
+ return fullMarkdown;
36
+ }
37
+ filterFlush(markdown) {
38
+ this._fullMarkdown = markdown;
39
+ const now = Date.now();
40
+ if (this._lastCommitTime === 0) {
41
+ this._lastCommitTime = now;
42
+ this._revealedWordCount = 1;
43
+ }
44
+ else {
45
+ const elapsed = now - this._lastCommitTime;
46
+ const newWords = Math.floor(elapsed / 1000 * this._rate);
47
+ if (newWords > 0) {
48
+ this._revealedWordCount += newWords;
49
+ this._lastCommitTime = now;
50
+ }
51
+ }
52
+ const result = getNWords(this._fullMarkdown, this._revealedWordCount);
53
+ if (result.isFullString) {
54
+ this._needsNextFrame = false;
55
+ this._revealedWordCount = result.returnedWordCount;
56
+ this._lastCommittedMarkdown = this._fullMarkdown;
57
+ return this._fullMarkdown;
58
+ }
59
+ this._needsNextFrame = true;
60
+ if (result.value.length <= this._lastCommittedMarkdown.length) {
61
+ return undefined;
62
+ }
63
+ this._lastCommittedMarkdown = result.value;
64
+ return result.value;
65
+ }
66
+ }
67
+
68
+ export { WordBuffer };
@@ -0,0 +1,77 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
+ /**
4
+ * Incremental markdown streaming renderer — rAF-batched, append-only.
5
+ *
6
+ * Orchestrates two independent concerns:
7
+ * - **Buffering** (when to render): controlled by an {@link IIncrementalRenderingBuffer}.
8
+ * - **Animation** (how it appears): controlled by an {@link IIncrementalRenderingAnimation}.
9
+ *
10
+ * The renderer works *with* the existing markdown rendering pipeline.
11
+ * Each update re-renders through the standard `doRenderMarkdown()` path,
12
+ * so code blocks, tables, KaTeX, and all markdown features render correctly.
13
+ *
14
+ * If the new markdown is NOT a pure append, `tryMorph()` returns `false`
15
+ * and the caller falls back to a full re-render.
16
+ */
17
+ export declare class IncrementalDOMMorpher extends Disposable {
18
+ private readonly _domNode;
19
+ private readonly _configService;
20
+ private _lastMarkdown;
21
+ /**
22
+ * The markdown that was last rendered to the DOM. May lag behind
23
+ * `_lastMarkdown` while content is being buffered.
24
+ */
25
+ private _renderedMarkdown;
26
+ /**
27
+ * High-water mark: the number of top-level children that have been
28
+ * fully revealed. Children at indices >= this value are "new"
29
+ * and get animated on each render.
30
+ */
31
+ private _revealedChildCount;
32
+ /**
33
+ * Timestamp when children at indices >= `_revealedChildCount`
34
+ * first appeared. 0 means no animation is in progress.
35
+ */
36
+ private _animationStartTime;
37
+ /**
38
+ * The total child count at the end of the most recent render in
39
+ * the current animation batch.
40
+ */
41
+ private _batchChildCount;
42
+ private _rafScheduled;
43
+ private _pendingMarkdown;
44
+ private _rafHandle;
45
+ private _renderCallback;
46
+ private _buffer;
47
+ private _animation;
48
+ constructor(_domNode: HTMLElement, _configService: IConfigurationService);
49
+ private _createBuffer;
50
+ private _createAnimation;
51
+ /**
52
+ * Register the callback that performs the actual markdown re-render.
53
+ */
54
+ setRenderCallback(cb: (newMarkdown: string) => void): void;
55
+ /**
56
+ * Forward the stream's word-rate estimate to the active buffer
57
+ * (word buffer or line buffer).
58
+ */
59
+ updateStreamRate(rate: number, isComplete: boolean): void;
60
+ /**
61
+ * Seeds the renderer with the initial markdown string.
62
+ *
63
+ * @param animateInitial When `true`, the children already in the
64
+ * DOM receive the entrance animation.
65
+ */
66
+ seed(markdown: string, animateInitial?: boolean): void;
67
+ /**
68
+ * Attempts an incremental DOM update via rAF-batched re-render.
69
+ *
70
+ * @returns `true` if absorbed, `false` if a full re-render is needed.
71
+ */
72
+ tryMorph(newMarkdown: string): boolean;
73
+ private _scheduleRender;
74
+ private _flushRender;
75
+ private _animateNewChildren;
76
+ dispose(): void;
77
+ }