@codingame/monaco-vscode-katex-common 24.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/empty.js +1 -0
  2. package/package.json +45 -0
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +37 -0
  4. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +127 -0
  5. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.d.ts +27 -0
  6. package/vscode/src/vs/platform/actions/browser/actionWidgetDropdownActionViewItem.js +81 -0
  7. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +44 -0
  8. package/vscode/src/vs/platform/actions/browser/buttonbar.js +172 -0
  9. package/vscode/src/vs/platform/editor/browser/editor.d.ts +12 -0
  10. package/vscode/src/vs/platform/editor/browser/editor.js +51 -0
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +41 -0
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +295 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.d.ts +2 -0
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +60 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +65 -0
  16. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +650 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +2 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +364 -0
  19. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.d.ts +38 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +207 -0
  21. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.d.ts +17 -0
  22. package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityProvider.js +216 -0
  23. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.d.ts +24 -0
  24. package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +114 -0
  25. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.d.ts +34 -0
  26. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentModel.js +141 -0
  27. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.d.ts +169 -0
  28. package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentWidgets.js +951 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.d.ts +19 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentMarkdownRenderer.js +109 -0
  31. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.d.ts +12 -0
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAgentCommandContentPart.js +47 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.d.ts +13 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAnonymousRateLimitedPart.js +49 -0
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.d.ts +27 -0
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatAttachmentsContentPart.js +160 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.d.ts +40 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatChangesSummaryPart.js +286 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.d.ts +13 -0
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCodeCitationContentPart.js +49 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.d.ts +34 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollapsibleContentPart.js +101 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.d.ts +14 -0
  44. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCollections.js +30 -0
  45. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.d.ts +11 -0
  46. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatCommandContentPart.js +37 -0
  47. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.d.ts +17 -0
  48. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationContentPart.js +69 -0
  49. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.d.ts +116 -0
  50. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatConfirmationWidget.js +417 -0
  51. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.d.ts +20 -0
  52. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatContentCodePools.js +66 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.d.ts +25 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatElicitationContentPart.js +123 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.d.ts +18 -0
  56. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorConfirmationPart.js +60 -0
  57. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.d.ts +16 -0
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatErrorContentPart.js +46 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.d.ts +19 -0
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatExtensionsContentPart.js +57 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.d.ts +94 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownContentPart.js +567 -0
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.d.ts +34 -0
  64. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMcpServersInteractionContentPart.js +224 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.d.ts +34 -0
  66. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatMultiDiffContentPart.js +259 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.d.ts +38 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatProgressContentPart.js +160 -0
  69. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.d.ts +16 -0
  70. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatPullRequestContentPart.js +55 -0
  71. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.d.ts +17 -0
  72. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatQuotaExceededPart.js +117 -0
  73. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.d.ts +66 -0
  74. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatReferencesContentPart.js +528 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.d.ts +31 -0
  76. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatSuggestNextWidget.js +160 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.d.ts +17 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.js +49 -0
  79. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.d.ts +18 -0
  80. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.js +91 -0
  81. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.d.ts +13 -0
  82. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTextEditContentPart.service.js +6 -0
  83. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.d.ts +54 -0
  84. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatThinkingContentPart.js +429 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.d.ts +40 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTodoListWidget.js +347 -0
  87. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.d.ts +56 -0
  88. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolInputOutputContentPart.js +164 -0
  89. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.d.ts +32 -0
  90. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatToolOutputContentSubPart.js +224 -0
  91. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.d.ts +35 -0
  92. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTreeContentPart.js +173 -0
  93. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatConfirmationWidget.css +341 -0
  94. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatExtensionsContent.css +27 -0
  95. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMarkdownPart.css +23 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatMcpServersInteractionContent.css +14 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatPullRequestContent.css +75 -0
  98. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatTerminalToolProgressPart.css +221 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/media/chatThinkingContent.css +162 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +41 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +94 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +15 -0
  103. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +96 -0
  104. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +18 -0
  105. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +147 -0
  106. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +14 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatResultListSubPart.js +23 -0
  108. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +68 -0
  109. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +353 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +100 -0
  111. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +1085 -0
  112. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +39 -0
  113. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +275 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +32 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +119 -0
  116. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.d.ts +19 -0
  117. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolInvocationSubPart.js +36 -0
  118. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +21 -0
  119. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolOutputPart.js +130 -0
  120. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +25 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +225 -0
  122. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +24 -0
  123. package/vscode/src/vs/workbench/contrib/chat/browser/chatContentParts/toolInvocationParts/chatToolProgressPart.js +101 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.d.ts +42 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/chatDiffBlockPart.js +127 -0
  126. package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.d.ts +43 -0
  127. package/vscode/src/vs/workbench/contrib/chat/browser/chatDragAndDrop.js +388 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +49 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +721 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.d.ts +13 -0
  131. package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +52 -0
  132. package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.d.ts +39 -0
  133. package/vscode/src/vs/workbench/contrib/chat/browser/chatInlineAnchorWidget.js +409 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.d.ts +334 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +2008 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.d.ts +52 -0
  137. package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPartWidgets.js +93 -0
  138. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.d.ts +217 -0
  139. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1573 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.d.ts +43 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +249 -0
  142. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.d.ts +50 -0
  143. package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +84 -0
  144. package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.d.ts +32 -0
  145. package/vscode/src/vs/workbench/contrib/chat/browser/chatSelectedTools.js +174 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +31 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +101 -0
  148. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.d.ts +19 -0
  149. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/common.js +76 -0
  150. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/media/chatSessionAction.css +39 -0
  151. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.d.ts +292 -0
  152. package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +2014 -0
  153. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css +171 -0
  154. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.d.ts +173 -0
  155. package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +797 -0
  156. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.d.ts +54 -0
  157. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatImplicitContext.js +345 -0
  158. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.d.ts +10 -0
  159. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.js +1069 -0
  160. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.d.ts +34 -0
  161. package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +139 -0
  162. package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css +2880 -0
  163. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css +87 -0
  164. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatCodeBlockPill.css +139 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatInlineAnchorWidget.css +61 -0
  166. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatViewWelcome.css +209 -0
  167. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.d.ts +28 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modePickerActionItem.js +135 -0
  169. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.d.ts +28 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/modelPicker/modelPickerActionItem.js +147 -0
  171. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +71 -0
  172. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +279 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.d.ts +28 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcome.js +28 -0
  175. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.d.ts +13 -0
  176. package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +38 -0
  177. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.d.ts +55 -0
  178. package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +176 -0
  179. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.d.ts +45 -0
  180. package/vscode/src/vs/workbench/contrib/chat/common/codeBlockModelCollection.js +207 -0
  181. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.d.ts +48 -0
  182. package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.js +373 -0
  183. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +171 -0
  184. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +1442 -0
  185. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.d.ts +199 -0
  186. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +482 -0
  187. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +28 -0
  188. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +37 -0
  189. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.d.ts +95 -0
  190. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +497 -0
  191. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.d.ts +76 -0
  192. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +464 -0
  193. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.d.ts +124 -0
  194. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +562 -0
  195. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.d.ts +42 -0
  196. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +279 -0
  197. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +411 -0
  198. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.d.ts +13 -0
  199. package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +66 -0
  200. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +61 -0
  201. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +154 -0
  202. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.d.ts +19 -0
  203. package/vscode/src/vs/workbench/contrib/markdown/browser/markedKatexSupport.js +201 -0
  204. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.d.ts +41 -0
  205. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpPromptArgumentPick.js +372 -0
  206. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.d.ts +4 -0
  207. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chat/notebookChatUtils.js +58 -0
  208. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
  209. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +594 -0
  210. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
  211. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
  212. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
  213. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1746 -0
  214. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
  215. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +269 -0
  216. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
  217. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +806 -0
  218. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
  219. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +116 -0
  220. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
  221. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +62 -0
  222. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
  223. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
  224. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +295 -0
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
  227. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +241 -0
  228. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
  229. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +146 -0
  230. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
  231. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +90 -0
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +41 -0
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +42 -0
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +77 -0
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
  239. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
  240. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +823 -0
  241. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
  242. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +29 -0
  243. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
  244. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +567 -0
  245. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
  246. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +189 -0
  247. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
  248. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +439 -0
  249. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
  250. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +263 -0
  251. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
  252. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +48 -0
  253. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
  254. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
  255. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
  256. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +89 -0
  257. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
  258. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
  259. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
  260. package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +108 -0
  261. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.d.ts +34 -0
  262. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +145 -0
@@ -0,0 +1,429 @@
1
+
2
+ import { registerCss } from '@codingame/monaco-vscode-api/css';
3
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
+ import { $, clearNode } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { ThinkingDisplayMode, ChatConfiguration } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
6
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
7
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
8
+ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
9
+ import { ChatCollapsibleContentPart } from './chatCollapsibleContentPart.js';
10
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
12
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
13
+ import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
14
+ import { CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
15
+ import { IChatMarkdownAnchorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContentParts/chatMarkdownAnchorService.service';
16
+ import { ChatMessageRole } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels';
17
+ import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
18
+ import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
19
+ import * as chatThinkingContent from './media/chatThinkingContent.css';
20
+ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
21
+
22
+ registerCss(chatThinkingContent);
23
+ function extractTextFromPart(content) {
24
+ const raw = Array.isArray(content.value) ? content.value.join('') : (content.value || '');
25
+ return raw.trim();
26
+ }
27
+ function extractTitleFromThinkingContent(content) {
28
+ const headerMatch = content.match(/^\*\*([^*]+)\*\*/);
29
+ return headerMatch ? headerMatch[1] : undefined;
30
+ }
31
+ let ChatThinkingContentPart = class ChatThinkingContentPart extends ChatCollapsibleContentPart {
32
+ constructor(content, context, chatContentMarkdownRenderer, instantiationService, configurationService, chatMarkdownAnchorService, languageModelsService) {
33
+ const initialText = extractTextFromPart(content);
34
+ const extractedTitle = extractTitleFromThinkingContent(initialText)
35
+ ?? 'Thinking...';
36
+ super(extractedTitle, context);
37
+ this.chatContentMarkdownRenderer = chatContentMarkdownRenderer;
38
+ this.instantiationService = instantiationService;
39
+ this.configurationService = configurationService;
40
+ this.chatMarkdownAnchorService = chatMarkdownAnchorService;
41
+ this.languageModelsService = languageModelsService;
42
+ this.defaultTitle = ( localize(5103, 'Thinking...'));
43
+ this.fixedScrollingMode = false;
44
+ this.extractedTitles = [];
45
+ this.toolInvocationCount = 0;
46
+ this.streamingCompleted = false;
47
+ this.isActive = true;
48
+ this.toolInvocations = [];
49
+ this.id = content.id;
50
+ this.content = content;
51
+ const configuredMode = this.configurationService.getValue('chat.agent.thinkingStyle') ?? ThinkingDisplayMode.Collapsed;
52
+ this.fixedScrollingMode = configuredMode === ThinkingDisplayMode.FixedScrolling;
53
+ this.currentTitle = extractedTitle;
54
+ if (extractedTitle !== this.defaultTitle) {
55
+ this.lastExtractedTitle = extractedTitle;
56
+ }
57
+ this.currentThinkingValue = initialText;
58
+ if (configuredMode === ThinkingDisplayMode.Collapsed) {
59
+ this.setExpanded(false);
60
+ }
61
+ else {
62
+ this.setExpanded(true);
63
+ }
64
+ if (this.fixedScrollingMode) {
65
+ this.setExpanded(false);
66
+ }
67
+ const node = this.domNode;
68
+ node.classList.add('chat-thinking-box');
69
+ node.tabIndex = 0;
70
+ if (this.fixedScrollingMode) {
71
+ node.classList.add('chat-thinking-fixed-mode');
72
+ this.currentTitle = this.defaultTitle;
73
+ if (this._collapseButton && !this.context.element.isComplete) {
74
+ this._collapseButton.icon = ThemeIcon.modify(Codicon.loading, 'spin');
75
+ }
76
+ }
77
+ this._register(autorun(r => {
78
+ this.expanded.read(r);
79
+ if (this._collapseButton && this.wrapper) {
80
+ if (this.wrapper.classList.contains('chat-thinking-streaming') && !this.context.element.isComplete) {
81
+ this._collapseButton.icon = ThemeIcon.modify(Codicon.loading, 'spin');
82
+ }
83
+ else {
84
+ this._collapseButton.icon = Codicon.check;
85
+ }
86
+ }
87
+ }));
88
+ if (this._collapseButton && !this.streamingCompleted && !this.context.element.isComplete) {
89
+ this._collapseButton.icon = ThemeIcon.modify(Codicon.loading, 'spin');
90
+ }
91
+ const label = this.lastExtractedTitle ?? '';
92
+ if (!this.fixedScrollingMode && !this._isExpanded.get()) {
93
+ this.setTitle(label);
94
+ }
95
+ if (this._collapseButton) {
96
+ this._register(this._collapseButton.onDidClick(() => {
97
+ if (this.streamingCompleted || this.fixedScrollingMode) {
98
+ return;
99
+ }
100
+ const expanded = this.isExpanded();
101
+ if (expanded) {
102
+ this.setTitle(this.defaultTitle, true);
103
+ this.currentTitle = this.defaultTitle;
104
+ }
105
+ else if (this.lastExtractedTitle) {
106
+ const collapsedLabel = this.lastExtractedTitle ?? '';
107
+ this.setTitle(collapsedLabel);
108
+ this.currentTitle = collapsedLabel;
109
+ }
110
+ }));
111
+ }
112
+ }
113
+ initContent() {
114
+ this.wrapper = $('.chat-used-context-list.chat-thinking-collapsible');
115
+ this.wrapper.classList.add('chat-thinking-streaming');
116
+ if (this.currentThinkingValue) {
117
+ this.textContainer = $('.chat-thinking-item.markdown-content');
118
+ this.wrapper.appendChild(this.textContainer);
119
+ this.renderMarkdown(this.currentThinkingValue);
120
+ }
121
+ this.updateDropdownClickability();
122
+ return this.wrapper;
123
+ }
124
+ renderMarkdown(content, reuseExisting) {
125
+ if (this._store.isDisposed) {
126
+ return;
127
+ }
128
+ const cleanedContent = content.trim();
129
+ if (!cleanedContent) {
130
+ if (this.markdownResult) {
131
+ this.markdownResult.dispose();
132
+ this.markdownResult = undefined;
133
+ }
134
+ clearNode(this.textContainer);
135
+ return;
136
+ }
137
+ let contentToRender = cleanedContent;
138
+ if (cleanedContent.startsWith('**') && cleanedContent.endsWith('**')) {
139
+ contentToRender = cleanedContent.slice(2, -2);
140
+ }
141
+ const target = reuseExisting ? this.markdownResult?.element : undefined;
142
+ if (this.markdownResult) {
143
+ this.markdownResult.dispose();
144
+ this.markdownResult = undefined;
145
+ }
146
+ const rendered = this._register(this.chatContentMarkdownRenderer.render(( new MarkdownString(contentToRender)), {
147
+ fillInIncompleteTokens: true,
148
+ asyncRenderCallback: () => this._onDidChangeHeight.fire(),
149
+ codeBlockRendererSync: (_languageId, text, raw) => {
150
+ const codeElement = $('code');
151
+ codeElement.textContent = text;
152
+ return codeElement;
153
+ }
154
+ }, target));
155
+ this.markdownResult = rendered;
156
+ if (!target) {
157
+ clearNode(this.textContainer);
158
+ this.textContainer.appendChild(rendered.element);
159
+ }
160
+ }
161
+ setDropdownClickable(clickable) {
162
+ if (this._collapseButton) {
163
+ this._collapseButton.element.style.pointerEvents = clickable ? 'auto' : 'none';
164
+ }
165
+ if (!clickable && this.streamingCompleted) {
166
+ super.setTitle(this.lastExtractedTitle ?? this.currentTitle);
167
+ }
168
+ }
169
+ updateDropdownClickability() {
170
+ if (!this.wrapper) {
171
+ return;
172
+ }
173
+ if (this.wrapper.children.length > 1 || this.toolInvocationCount > 0) {
174
+ this.setDropdownClickable(true);
175
+ return;
176
+ }
177
+ const contentWithoutTitle = this.currentThinkingValue.trim();
178
+ const titleToCompare = this.lastExtractedTitle ?? this.currentTitle;
179
+ const stripMarkdown = (text) => {
180
+ return text
181
+ .replace(/\*\*(.+?)\*\*/g, '$1').replace(/\*(.+?)\*/g, '$1').replace(/`(.+?)`/g, '$1').trim();
182
+ };
183
+ const strippedContent = stripMarkdown(contentWithoutTitle);
184
+ const shouldDisable = !strippedContent || strippedContent === titleToCompare;
185
+ this.setDropdownClickable(!shouldDisable);
186
+ }
187
+ resetId() {
188
+ this.id = undefined;
189
+ }
190
+ collapseContent() {
191
+ this.setExpanded(false);
192
+ }
193
+ updateThinking(content) {
194
+ if (this._store.isDisposed) {
195
+ return;
196
+ }
197
+ this.content = content;
198
+ const raw = extractTextFromPart(content);
199
+ const next = raw;
200
+ if (next === this.currentThinkingValue) {
201
+ return;
202
+ }
203
+ const previousValue = this.currentThinkingValue;
204
+ const reuseExisting = !!(this.markdownResult && next.startsWith(previousValue) && next.length > previousValue.length);
205
+ this.currentThinkingValue = next;
206
+ this.renderMarkdown(next, reuseExisting);
207
+ if (this.fixedScrollingMode && this.wrapper) {
208
+ this.wrapper.scrollTop = this.wrapper.scrollHeight;
209
+ }
210
+ const extractedTitle = extractTitleFromThinkingContent(raw);
211
+ if (extractedTitle && extractedTitle !== this.currentTitle) {
212
+ if (!this.extractedTitles.includes(extractedTitle)) {
213
+ this.extractedTitles.push(extractedTitle);
214
+ }
215
+ this.lastExtractedTitle = extractedTitle;
216
+ }
217
+ if (!extractedTitle || extractedTitle === this.currentTitle) {
218
+ return;
219
+ }
220
+ const label = this.lastExtractedTitle ?? '';
221
+ if (!this.fixedScrollingMode && !this._isExpanded.get()) {
222
+ this.setTitle(label);
223
+ }
224
+ this.updateDropdownClickability();
225
+ }
226
+ getIsActive() {
227
+ return this.isActive;
228
+ }
229
+ markAsInactive() {
230
+ this.isActive = false;
231
+ }
232
+ finalizeTitleIfDefault() {
233
+ this.wrapper.classList.remove('chat-thinking-streaming');
234
+ this.streamingCompleted = true;
235
+ if (this._collapseButton) {
236
+ this._collapseButton.icon = Codicon.check;
237
+ }
238
+ this.updateDropdownClickability();
239
+ if (this.content.generatedTitle) {
240
+ this.currentTitle = this.content.generatedTitle;
241
+ super.setTitle(this.content.generatedTitle);
242
+ return;
243
+ }
244
+ const existingToolTitle = this.toolInvocations.find(t => t.generatedTitle)?.generatedTitle;
245
+ if (existingToolTitle) {
246
+ this.currentTitle = existingToolTitle;
247
+ this.content.generatedTitle = existingToolTitle;
248
+ super.setTitle(existingToolTitle);
249
+ return;
250
+ }
251
+ if (this.toolInvocationCount === 1 && this.extractedTitles.length === 1 && this.currentToolCallLabel && this.currentThinkingValue.trim() === '') {
252
+ const title = this.currentToolCallLabel;
253
+ this.currentTitle = title;
254
+ this.setTitleWithWidgets(( new MarkdownString(title)), this.instantiationService, this.chatMarkdownAnchorService, this.chatContentMarkdownRenderer);
255
+ return;
256
+ }
257
+ if (this.extractedTitles.length === 1 && this.toolInvocationCount === 0) {
258
+ const title = this.extractedTitles[0];
259
+ this.currentTitle = title;
260
+ this.content.generatedTitle = title;
261
+ super.setTitle(title);
262
+ return;
263
+ }
264
+ const generateTitles = this.configurationService.getValue(ChatConfiguration.ThinkingGenerateTitles) ?? true;
265
+ if (!generateTitles) {
266
+ this.setFallbackTitle();
267
+ return;
268
+ }
269
+ this.generateTitleViaLLM();
270
+ }
271
+ setGeneratedTitleOnToolInvocations(title) {
272
+ for (const toolInvocation of this.toolInvocations) {
273
+ toolInvocation.generatedTitle = title;
274
+ }
275
+ }
276
+ async generateTitleViaLLM() {
277
+ try {
278
+ let models = await this.languageModelsService.selectLanguageModels({ vendor: 'copilot', id: 'copilot-fast' });
279
+ if (!models.length) {
280
+ models = await this.languageModelsService.selectLanguageModels({ vendor: 'copilot', family: 'gpt-4o-mini' });
281
+ }
282
+ if (!models.length) {
283
+ this.setFallbackTitle();
284
+ return;
285
+ }
286
+ let context;
287
+ if (this.extractedTitles.length > 0) {
288
+ context = this.extractedTitles.join(', ');
289
+ }
290
+ else {
291
+ context = this.currentThinkingValue.substring(0, 1000);
292
+ }
293
+ const prompt = `Summarize the following actions in 6-7 words using past tense. Be very concise - focus on the main action only. No subjects, quotes, or punctuation.
294
+
295
+ Examples:
296
+ - "Preparing to create new page file, Read HomePage.tsx, Creating new TypeScript file" → "Created new page file"
297
+ - "Searching for files, Reading configuration, Analyzing dependencies" → "Analyzed project structure"
298
+ - "Invoked terminal command, Checked build output, Fixed errors" → "Ran build and fixed errors"
299
+
300
+ Actions: ${context}`;
301
+ const response = await this.languageModelsService.sendChatRequest(models[0], ( new ExtensionIdentifier('core')), [{ role: ChatMessageRole.User, content: [{ type: 'text', value: prompt }] }], {}, CancellationToken.None);
302
+ let generatedTitle = '';
303
+ for await (const part of response.stream) {
304
+ if (Array.isArray(part)) {
305
+ for (const p of part) {
306
+ if (p.type === 'text') {
307
+ generatedTitle += p.value;
308
+ }
309
+ }
310
+ }
311
+ else if (part.type === 'text') {
312
+ generatedTitle += part.value;
313
+ }
314
+ }
315
+ await response.result;
316
+ generatedTitle = generatedTitle.trim();
317
+ if (generatedTitle && !this._store.isDisposed) {
318
+ this.currentTitle = generatedTitle;
319
+ if (this._collapseButton) {
320
+ this._collapseButton.label = generatedTitle;
321
+ }
322
+ this.content.generatedTitle = generatedTitle;
323
+ this.setGeneratedTitleOnToolInvocations(generatedTitle);
324
+ return;
325
+ }
326
+ }
327
+ catch (error) {
328
+ }
329
+ this.setFallbackTitle();
330
+ }
331
+ setFallbackTitle() {
332
+ const finalLabel = this.toolInvocationCount > 0
333
+ ? ( localize(
334
+ 5104,
335
+ 'Finished thinking and invoked {0} tool{1}',
336
+ this.toolInvocationCount,
337
+ this.toolInvocationCount === 1 ? '' : 's'
338
+ ))
339
+ : ( localize(5105, 'Finished Thinking'));
340
+ this.currentTitle = finalLabel;
341
+ this.wrapper.classList.remove('chat-thinking-streaming');
342
+ this.streamingCompleted = true;
343
+ if (this._collapseButton) {
344
+ this._collapseButton.icon = Codicon.check;
345
+ this._collapseButton.label = finalLabel;
346
+ }
347
+ this.updateDropdownClickability();
348
+ }
349
+ appendItem(content, toolInvocationId, toolInvocation) {
350
+ this.wrapper.appendChild(content);
351
+ if (toolInvocationId) {
352
+ this.toolInvocationCount++;
353
+ let toolCallLabel;
354
+ if (toolInvocation?.invocationMessage) {
355
+ const message = typeof toolInvocation.invocationMessage === 'string' ? toolInvocation.invocationMessage : toolInvocation.invocationMessage.value;
356
+ toolCallLabel = message;
357
+ }
358
+ else {
359
+ toolCallLabel = `Invoked \`${toolInvocationId}\``;
360
+ }
361
+ if (toolInvocation?.pastTenseMessage) {
362
+ this.currentToolCallLabel = typeof toolInvocation.pastTenseMessage === 'string' ? toolInvocation.pastTenseMessage : toolInvocation.pastTenseMessage.value;
363
+ }
364
+ if (toolInvocation) {
365
+ this.toolInvocations.push(toolInvocation);
366
+ }
367
+ if (!this.extractedTitles.includes(toolCallLabel)) {
368
+ this.extractedTitles.push(toolCallLabel);
369
+ }
370
+ if (!this.fixedScrollingMode && !this._isExpanded.get()) {
371
+ this.setTitle(toolCallLabel);
372
+ }
373
+ }
374
+ if (this.fixedScrollingMode && this.wrapper) {
375
+ this.wrapper.scrollTop = this.wrapper.scrollHeight;
376
+ }
377
+ this.updateDropdownClickability();
378
+ }
379
+ setupThinkingContainer(content, context) {
380
+ if (this._store.isDisposed) {
381
+ return;
382
+ }
383
+ this.textContainer = $('.chat-thinking-item.markdown-content');
384
+ if (content.value) {
385
+ this.wrapper.appendChild(this.textContainer);
386
+ this.id = content.id;
387
+ this.updateThinking(content);
388
+ }
389
+ this.updateDropdownClickability();
390
+ }
391
+ setTitle(title, omitPrefix) {
392
+ if (!title || this.context.element.isComplete) {
393
+ return;
394
+ }
395
+ if (omitPrefix) {
396
+ this.setTitleWithWidgets(( new MarkdownString(title)), this.instantiationService, this.chatMarkdownAnchorService, this.chatContentMarkdownRenderer);
397
+ this.currentTitle = title;
398
+ return;
399
+ }
400
+ const thinkingLabel = `Thinking: ${title}`;
401
+ this.lastExtractedTitle = title;
402
+ this.currentTitle = thinkingLabel;
403
+ this.setTitleWithWidgets(( new MarkdownString(thinkingLabel)), this.instantiationService, this.chatMarkdownAnchorService, this.chatContentMarkdownRenderer);
404
+ }
405
+ hasSameContent(other, _followingContent, _element) {
406
+ if (other.kind === 'toolInvocation' || other.kind === 'toolInvocationSerialized') {
407
+ return true;
408
+ }
409
+ if (other.kind !== 'thinking') {
410
+ return false;
411
+ }
412
+ return other?.id !== this.id;
413
+ }
414
+ dispose() {
415
+ if (this.markdownResult) {
416
+ this.markdownResult.dispose();
417
+ this.markdownResult = undefined;
418
+ }
419
+ super.dispose();
420
+ }
421
+ };
422
+ ChatThinkingContentPart = ( __decorate([
423
+ ( __param(3, IInstantiationService)),
424
+ ( __param(4, IConfigurationService)),
425
+ ( __param(5, IChatMarkdownAnchorService)),
426
+ ( __param(6, ILanguageModelsService))
427
+ ], ChatThinkingContentPart));
428
+
429
+ export { ChatThinkingContentPart };
@@ -0,0 +1,40 @@
1
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
4
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
5
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
6
+ import { IChatTodoListService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatTodoListService.service";
7
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
8
+ export declare class ChatTodoListWidget extends Disposable {
9
+ private readonly chatTodoListService;
10
+ private readonly configurationService;
11
+ private readonly instantiationService;
12
+ private readonly contextKeyService;
13
+ readonly domNode: HTMLElement;
14
+ private readonly _onDidChangeHeight;
15
+ readonly onDidChangeHeight: Event<void>;
16
+ private _isExpanded;
17
+ private _userManuallyExpanded;
18
+ private expandoButton;
19
+ private expandIcon;
20
+ private titleElement;
21
+ private todoListContainer;
22
+ private clearButtonContainer;
23
+ private clearButton;
24
+ private _currentSessionResource;
25
+ private _todoList;
26
+ constructor(chatTodoListService: IChatTodoListService, configurationService: IConfigurationService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService);
27
+ get height(): number;
28
+ private hideWidget;
29
+ private createChatTodoWidget;
30
+ private createClearButton;
31
+ render(sessionResource: URI | undefined): void;
32
+ clear(sessionResource: URI | undefined, force?: boolean): void;
33
+ private updateTodoDisplay;
34
+ private renderTodoList;
35
+ private toggleExpanded;
36
+ private clearAllTodos;
37
+ private updateClearButtonState;
38
+ private updateTitleElement;
39
+ private getStatusText;
40
+ }