@codingame/monaco-vscode-katex-common 26.2.2 → 28.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 (230) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.d.ts +10 -4
  3. package/vscode/src/vs/platform/actionWidget/browser/actionWidgetDropdown.js +37 -11
  4. package/vscode/src/vs/platform/actions/browser/buttonbar.d.ts +3 -0
  5. package/vscode/src/vs/platform/actions/browser/buttonbar.js +15 -4
  6. package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +576 -0
  7. package/vscode/src/vs/{workbench/contrib → platform}/mcp/common/modelContextProtocolApps.js +1 -0
  8. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +15 -15
  9. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +5 -0
  10. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +176 -17
  11. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  12. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +5 -0
  13. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +127 -64
  14. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.d.ts +1 -0
  15. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -11
  16. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +26 -0
  17. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +106 -0
  18. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +9 -9
  19. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +14 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +105 -29
  21. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +13 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +69 -43
  23. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +2 -2
  24. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +35 -7
  25. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +187 -78
  26. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +138 -32
  27. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +23 -6
  28. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +394 -87
  29. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.d.ts +1 -0
  30. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatImplicitContext.js +28 -13
  31. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +38 -19
  32. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +113 -116
  33. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +16 -15
  34. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.d.ts +2 -2
  35. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +8 -8
  36. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +14 -14
  37. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingEditorOverlay.css +5 -5
  38. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/media/chatEditingExplanationWidget.css +1 -1
  39. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +2 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +30 -11
  41. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +250 -132
  42. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
  43. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.d.ts +1 -16
  44. package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -110
  45. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  46. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.d.ts +1 -1
  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.d.ts +1 -1
  49. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  50. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +3 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +9 -4
  52. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +2 -4
  53. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +7 -10
  54. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.d.ts +1 -1
  55. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  56. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.d.ts +4 -2
  57. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleContentPart.js +22 -4
  58. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.d.ts +3 -2
  59. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCollapsibleMarkdownContentPart.js +11 -3
  60. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.d.ts +1 -1
  61. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  62. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.d.ts +1 -1
  63. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  64. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.d.ts +1 -1
  65. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
  66. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.d.ts +59 -0
  67. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentParts.js +29 -0
  68. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.d.ts +0 -2
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDiffBlockPart.js +0 -6
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +1 -1
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +2 -2
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.d.ts +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.d.ts +4 -2
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorConfirmationPart.js +6 -3
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatErrorContentPart.d.ts +1 -1
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.d.ts +3 -2
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +7 -6
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +0 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +26 -27
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +4 -1
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +53 -20
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.d.ts +15 -0
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownTableScrolling.js +55 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.d.ts +1 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -7
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +1 -1
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.d.ts +3 -2
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +24 -10
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.d.ts +4 -4
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPullRequestContentPart.js +11 -6
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +62 -7
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +414 -129
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -1
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -4
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.d.ts +4 -3
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +19 -12
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.d.ts +22 -0
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +263 -0
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +14 -5
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +98 -26
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.d.ts +1 -1
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTaskContentPart.js +1 -0
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.d.ts +1 -1
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +11 -2
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +252 -80
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.d.ts +29 -1
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +246 -8
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +4 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +39 -18
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +6 -4
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +36 -23
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.d.ts +3 -13
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +6 -260
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.d.ts +1 -1
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.d.ts +1 -1
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.d.ts +5 -7
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +42 -37
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +12 -3
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +65 -18
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +9 -6
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatInlineAnchorWidget.css +2 -2
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +356 -415
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +14 -7
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +102 -7
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTipContent.css +68 -19
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/codeBlockPart.css +48 -15
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +5 -2
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +47 -23
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.d.ts +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.d.ts +1 -2
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatInputOutputMarkdownProgressPart.js +0 -5
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +8 -1
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +57 -4
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +5 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +24 -8
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatResultListSubPart.d.ts +1 -1
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.d.ts +18 -0
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatSimpleToolProgressPart.js +103 -0
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +1 -1
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +15 -18
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +44 -1
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +85 -89
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +3 -5
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +15 -17
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +4 -2
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +41 -2
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.d.ts +1 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +3 -3
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +2 -2
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +6 -5
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.d.ts +1 -1
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +13 -1
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.d.ts +1 -1
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolStreamingSubPart.js +2 -1
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +21 -5
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +341 -88
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +6 -0
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +13 -4
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.d.ts +35 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatQuestionCarouselAutoReply.js +440 -0
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +24 -10
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +437 -241
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +77 -17
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +521 -284
  176. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.d.ts +1 -1
  177. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPickerActionItem.js +7 -1
  178. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +71 -0
  179. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +664 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +104 -0
  181. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +127 -0
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +12 -1
  183. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +57 -16
  184. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +4 -7
  185. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +89 -49
  186. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +1 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +28 -0
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +87 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +22 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +213 -0
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +1 -0
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +15 -17
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +7 -4
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +563 -140
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chatViewWelcome.css +35 -26
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +2 -2
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +26 -23
  198. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +26 -6
  199. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +145 -79
  200. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +36 -50
  201. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageWidget.css +35 -15
  202. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.d.ts +7 -0
  203. package/vscode/src/vs/workbench/contrib/chat/common/widget/annotations.js +127 -30
  204. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.d.ts +1 -0
  205. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +20 -14
  206. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.d.ts +6 -6
  207. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatAffordance.js +96 -34
  208. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.d.ts +11 -2
  209. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +68 -27
  210. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.d.ts +5 -0
  211. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatEditorAffordance.js +125 -13
  212. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.d.ts +8 -11
  213. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +54 -45
  214. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.d.ts +11 -10
  215. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +172 -112
  216. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
  217. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  218. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css +2 -44
  219. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatEditorAffordance.css +28 -4
  220. package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatOverlayWidget.css +84 -3
  221. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.d.ts +9 -2
  222. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +58 -41
  223. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  224. package/vscode/src/vs/workbench/contrib/mcp/common/modelContextProtocolApps.d.ts +1 -548
  225. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  226. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  227. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  228. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  229. package/vscode/src/vs/workbench/contrib/terminal/browser/chatTerminalCommandMirror.js +6 -10
  230. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +0 -187
@@ -16,6 +16,7 @@ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/even
16
16
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
17
17
  import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
18
18
  import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
19
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
19
20
  import { Disposable, DisposableStore, dispose, toDisposable, thenIfNotDisposed } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
20
21
  import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
21
22
  import { FileAccess, Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
@@ -23,7 +24,7 @@ import { clamp } from '@codingame/monaco-vscode-api/vscode/vs/base/common/number
23
24
  import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
24
25
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
25
26
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
26
- import { createActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
27
+ import { MenuEntryActionViewItem, createActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
27
28
  import { MenuWorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
28
29
  import { MenuId, MenuItemAction } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
29
30
  import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
@@ -36,22 +37,26 @@ import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platfo
36
37
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
37
38
  import { isDark } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme';
38
39
  import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
40
+ import { AccessibilitySignal } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
41
+ import { IAccessibilitySignalService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
39
42
  import { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
40
43
  import { IWorkbenchIssueService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/issue/common/issue.service';
41
44
  import { CodiconActionViewItem } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView';
42
- import { annotateSpecialMarkdownContent, hasCodeblockUriTag, extractSubAgentInvocationIdFromText } from '../../common/widget/annotations.js';
45
+ import { annotateSpecialMarkdownContent, hasEditCodeblockUriTag, extractSubAgentInvocationIdFromText } from '../../common/widget/annotations.js';
43
46
  import { checkModeOption } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chat';
44
47
  import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/actions/chatContextKeys';
45
48
  import { chatSubcommandLeader } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/requestParser/chatParserTypes';
46
49
  import { ChatAgentVoteDirection, ChatRequestQueueKind, IChatToolInvocation, isChatFollowup, ChatErrorLevel, ChatAgentVoteDownReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
47
50
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService.service';
51
+ import { ChatQuestionCarouselData } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatProgressTypes/chatQuestionCarouselData';
48
52
  import { localChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService';
49
53
  import { getChatSessionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatUri';
50
54
  import { isResponseVM, isPendingDividerVM, isRequestVM } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel';
51
55
  import { getNWords } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatWordCounter';
52
56
  import { CodeBlockModelCollection } from '../../common/widget/codeBlockModelCollection.js';
53
- import { ChatAgentLocation, ChatConfiguration, CollapsedToolsDisplayMode, ThinkingDisplayMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
54
- import { MarkUnhelpfulActionId } from '../actions/chatTitleActions.js';
57
+ import { ChatAgentLocation, ChatConfiguration, CollapsedToolsDisplayMode, ThinkingDisplayMode, ChatModeKind, ChatPermissionLevel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
58
+ import { ClickAnimation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/animations/animations';
59
+ import { MarkUnhelpfulActionId, MarkHelpfulActionId } from '../actions/chatTitleActions.js';
55
60
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
56
61
  import { ChatAgentHover, getChatAgentHoverOptions } from './chatAgentHover.js';
57
62
  import { ChatContentMarkdownRenderer } from './chatContentMarkdownRenderer.js';
@@ -63,6 +68,7 @@ import { ChatCodeCitationContentPart } from './chatContentParts/chatCodeCitation
63
68
  import { ChatCommandButtonContentPart } from './chatContentParts/chatCommandContentPart.js';
64
69
  import { ChatConfirmationContentPart } from './chatContentParts/chatConfirmationContentPart.js';
65
70
  import { EditorPool, DiffEditorPool } from './chatContentParts/chatContentCodePools.js';
71
+ import { InlineTextModelCollection } from './chatContentParts/chatContentParts.js';
66
72
  import { ChatElicitationContentPart } from './chatContentParts/chatElicitationContentPart.js';
67
73
  import { ChatErrorConfirmationContentPart } from './chatContentParts/chatErrorConfirmationPart.js';
68
74
  import { ChatErrorContentPart } from './chatContentParts/chatErrorContentPart.js';
@@ -80,18 +86,19 @@ import { ChatTaskContentPart } from './chatContentParts/chatTaskContentPart.js';
80
86
  import { ChatTextEditContentPart } from './chatContentParts/chatTextEditContentPart.js';
81
87
  import { ChatThinkingContentPart } from './chatContentParts/chatThinkingContentPart.js';
82
88
  import { ChatSubagentContentPart } from './chatContentParts/chatSubagentContentPart.js';
83
- import { ChatTipContentPart } from './chatContentParts/chatTipContentPart.js';
84
89
  import { TreePool, ChatTreeContentPart } from './chatContentParts/chatTreeContentPart.js';
85
90
  import { ChatWorkspaceEditContentPart } from './chatContentParts/chatWorkspaceEditContentPart.js';
86
91
  import { ChatToolInvocationPart } from './chatContentParts/toolInvocationParts/chatToolInvocationPart.js';
87
92
  import { ChatMarkdownDecorationsRenderer } from './chatContentParts/chatMarkdownDecorationsRenderer.js';
88
93
  import { ChatCodeBlockContentProvider } from './chatContentParts/codeBlockPart.js';
89
94
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
90
- import { RunSubagentTool } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool';
91
95
  import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
92
- import { IChatTipService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatTipService.service';
96
+ import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
93
97
  import { ChatHookContentPart } from './chatContentParts/chatHookContentPart.js';
94
- import { HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookSchema';
98
+ import { HookType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/hookTypes';
99
+ import { ChatQuestionCarouselAutoReply } from './chatQuestionCarouselAutoReply.js';
100
+ import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
101
+ import { AccessibilityWorkbenchSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
95
102
  import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
96
103
  import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
97
104
 
@@ -99,6 +106,20 @@ var ChatListItemRenderer_1;
99
106
  const $ = $$1;
100
107
  const COPILOT_USERNAME = "GitHub Copilot";
101
108
  const mostRecentResponseClassName = "chat-most-recent-response";
109
+ function upvoteAnimationSettingToEnum(value) {
110
+ switch (value) {
111
+ case "confetti":
112
+ return ClickAnimation.Confetti;
113
+ case "floatingThumbs":
114
+ return ClickAnimation.FloatingIcons;
115
+ case "pulseWave":
116
+ return ClickAnimation.PulseWave;
117
+ case "radiantLines":
118
+ return ClickAnimation.RadiantLines;
119
+ default:
120
+ return undefined;
121
+ }
122
+ }
102
123
  let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
103
124
  static {
104
125
  ChatListItemRenderer_1 = this;
@@ -123,7 +144,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
123
144
  chatWidgetService,
124
145
  chatEntitlementService,
125
146
  chatService,
126
- chatTipService
147
+ accessibilitySignalService,
148
+ accessibilityService,
149
+ environmentService
127
150
  ) {
128
151
  super();
129
152
  this.rendererOptions = rendererOptions;
@@ -140,16 +163,21 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
140
163
  this.chatWidgetService = chatWidgetService;
141
164
  this.chatEntitlementService = chatEntitlementService;
142
165
  this.chatService = chatService;
143
- this.chatTipService = chatTipService;
166
+ this.accessibilitySignalService = accessibilitySignalService;
167
+ this.accessibilityService = accessibilityService;
168
+ this.environmentService = environmentService;
144
169
  this.codeBlocksByResponseId = ( new Map());
145
170
  this.codeBlocksByEditorUri = ( new ResourceMap());
146
171
  this.fileTreesByResponseId = ( new Map());
147
172
  this.focusedFileTreesByResponseId = ( new Map());
148
173
  this.templateDataByRequestId = ( new Map());
174
+ this.responseTemplateDataByRequestId = ( new Map());
149
175
  this.pendingQuestionCarousels = ( new ResourceMap());
176
+ this._autoRepliedQuestionCarousels = ( new Set());
177
+ this._notifiedQuestionCarousels = ( new Set());
150
178
  this._onDidClickFollowup = this._register(( new Emitter()));
151
179
  this.onDidClickFollowup = this._onDidClickFollowup.event;
152
- this._onDidClickRerunWithAgentOrCommandDetection = ( new Emitter());
180
+ this._onDidClickRerunWithAgentOrCommandDetection = this._register(( new Emitter()));
153
181
  this.onDidClickRerunWithAgentOrCommandDetection = this._onDidClickRerunWithAgentOrCommandDetection.event;
154
182
  this._onDidClickRequest = this._register(( new Emitter()));
155
183
  this.onDidClickRequest = this._onDidClickRequest.event;
@@ -187,9 +215,11 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
187
215
  undefined
188
216
  ));
189
217
  this._register(this.instantiationService.createInstance(ChatCodeBlockContentProvider));
218
+ this._inlineTextModels = this._register(this.instantiationService.createInstance(InlineTextModelCollection));
190
219
  this._toolInvocationCodeBlockCollection = this._register(
191
220
  this.instantiationService.createInstance(CodeBlockModelCollection, "tools")
192
221
  );
222
+ this._autoReply = this._register(this.instantiationService.createInstance(ChatQuestionCarouselAutoReply));
193
223
  this._register(this.chatService.onDidSubmitRequest(e => {
194
224
  const carousels = this.pendingQuestionCarousels.get(e.chatSessionResource);
195
225
  if (carousels) {
@@ -220,10 +250,27 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
220
250
  this.logService.trace(`ChatListItemRenderer#${method}: ${message}`);
221
251
  }
222
252
  }
253
+ fireItemHeightChange(template, measuredHeight) {
254
+ if (!template.currentElement || !template.rowContainer.isConnected) {
255
+ return;
256
+ }
257
+ const height = measuredHeight ?? template.rowContainer.getBoundingClientRect().height;
258
+ if (height === 0 || !height) {
259
+ return;
260
+ }
261
+ const normalizedHeight = Math.ceil(height);
262
+ template.currentElement.currentRenderedHeight = normalizedHeight;
263
+ if (template.currentElement !== this._elementBeingRendered) {
264
+ this._onDidChangeItemHeight.fire({
265
+ element: template.currentElement,
266
+ height: normalizedHeight
267
+ });
268
+ }
269
+ }
223
270
  getProgressiveRenderRate(element) {
224
271
  let Rate;
225
272
  (function(Rate) {
226
- Rate[Rate["Min"] = 5] = "Min";
273
+ Rate[Rate["Min"] = 40] = "Min";
227
274
  Rate[Rate["Max"] = 2000] = "Max";
228
275
  })(Rate || (Rate = {}));
229
276
  const minAfterComplete = 80;
@@ -247,10 +294,13 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
247
294
  updateViewModel(viewModel) {
248
295
  this.viewModel = viewModel;
249
296
  this._announcedToolProgressKeys.clear();
297
+ this._autoRepliedQuestionCarousels.clear();
298
+ this._notifiedQuestionCarousels.clear();
250
299
  this.codeBlocksByEditorUri.clear();
251
300
  this.codeBlocksByResponseId.clear();
252
301
  this.fileTreesByResponseId.clear();
253
302
  this.focusedFileTreesByResponseId.clear();
303
+ this.responseTemplateDataByRequestId.clear();
254
304
  this._editorPool.clear();
255
305
  this._toolEditorPool.clear();
256
306
  this._diffEditorPool.clear();
@@ -345,8 +395,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
345
395
  }
346
396
  this.hoverHidden(requestHover);
347
397
  const checkpointContainer = append(rowContainer, $(".checkpoint-container"));
348
- const codiconContainer = append(checkpointContainer, $(".codicon-container"));
349
- append(codiconContainer, $("span.codicon.codicon-bookmark"));
398
+ append(checkpointContainer, $(".checkpoint-line-left"));
350
399
  const checkpointToolbar = templateDisposables.add(
351
400
  scopedInstantiationService.createInstance(MenuWorkbenchToolBar, checkpointContainer, MenuId.ChatMessageCheckpoint, {
352
401
  actionViewItemProvider: (action, options) => {
@@ -366,7 +415,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
366
415
  }
367
416
  })
368
417
  );
369
- append(checkpointContainer, $(".checkpoint-divider"));
418
+ append(checkpointContainer, $(".checkpoint-line-right"));
370
419
  const user = append(header, $(".user"));
371
420
  const avatarContainer = append(user, $(".avatar-container"));
372
421
  const username = append(user, $("h3.username"));
@@ -382,7 +431,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
382
431
  }
383
432
  const footerToolbar = templateDisposables.add(
384
433
  scopedInstantiationService.createInstance(MenuWorkbenchToolBar, footerToolbarContainer, MenuId.ChatMessageFooter, {
385
- eventDebounceDelay: 0,
386
434
  menuOptions: {
387
435
  shouldForwardArgs: true,
388
436
  renderShortTitle: true
@@ -394,6 +442,13 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
394
442
  if (action instanceof MenuItemAction && action.item.id === MarkUnhelpfulActionId) {
395
443
  return scopedInstantiationService.createInstance(ChatVoteDownButton, action, options);
396
444
  }
445
+ if (action instanceof MenuItemAction && action.item.id === MarkHelpfulActionId) {
446
+ const animation = upvoteAnimationSettingToEnum(this.configService.getValue("chat.upvoteAnimation"));
447
+ return scopedInstantiationService.createInstance(MenuEntryActionViewItem, action, {
448
+ ...options,
449
+ onClickAnimation: animation
450
+ });
451
+ }
397
452
  return createActionViewItem(scopedInstantiationService, action, options);
398
453
  }
399
454
  })
@@ -401,10 +456,12 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
401
456
  const footerDetailsContainer = append(footerToolbar.getElement(), $(".chat-footer-details"));
402
457
  footerDetailsContainer.tabIndex = 0;
403
458
  const checkpointRestoreContainer = append(rowContainer, $(".checkpoint-restore-container"));
404
- const codiconRestoreContainer = append(checkpointRestoreContainer, $(".codicon-container"));
405
- append(codiconRestoreContainer, $("span.codicon.codicon-bookmark"));
459
+ append(checkpointRestoreContainer, $(".checkpoint-line-left"));
406
460
  const label = append(checkpointRestoreContainer, $("span.checkpoint-label-text"));
407
- label.textContent = ( localize(6107, "Checkpoint Restored"));
461
+ label.textContent = ( localize(6726, "Checkpoint Restored"));
462
+ const dot = append(checkpointRestoreContainer, $("span.checkpoint-dot-separator"));
463
+ dot.textContent = "·";
464
+ dot.setAttribute("aria-hidden", "true");
408
465
  const checkpointRestoreToolbar = templateDisposables.add(scopedInstantiationService.createInstance(
409
466
  MenuWorkbenchToolBar,
410
467
  checkpointRestoreContainer,
@@ -427,7 +484,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
427
484
  }
428
485
  }
429
486
  ));
430
- append(checkpointRestoreContainer, $(".checkpoint-divider"));
487
+ append(checkpointRestoreContainer, $(".checkpoint-line-right"));
431
488
  const agentHover = templateDisposables.add(this.instantiationService.createInstance(ChatAgentHover));
432
489
  const hoverContent = () => {
433
490
  if (isResponseVM(template.currentElement) && template.currentElement.agent && !template.currentElement.agent.isDefault) {
@@ -506,23 +563,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
506
563
  }
507
564
  }));
508
565
  const resizeObserver = templateDisposables.add(new DisposableResizeObserver(entries => {
509
- if (!template.currentElement) {
510
- return;
511
- }
512
566
  const entry = entries[0];
513
567
  if (entry) {
514
- const height = entry.borderBoxSize.at(0)?.blockSize;
515
- if (height === 0 || !height || !template.rowContainer.isConnected) {
516
- return;
517
- }
518
- const normalizedHeight = Math.ceil(height);
519
- template.currentElement.currentRenderedHeight = normalizedHeight;
520
- if (template.currentElement !== this._elementBeingRendered) {
521
- this._onDidChangeItemHeight.fire({
522
- element: template.currentElement,
523
- height: normalizedHeight
524
- });
525
- }
568
+ this.fireItemHeightChange(template, entry.borderBoxSize.at(0)?.blockSize);
526
569
  }
527
570
  }));
528
571
  templateDisposables.add(resizeObserver.observe(rowContainer));
@@ -616,8 +659,14 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
616
659
  this.renderAvatar(element, templateData);
617
660
  }
618
661
  templateData.username.textContent = element.username;
619
- templateData.username.classList.toggle("hidden", element.username === COPILOT_USERNAME);
620
- templateData.avatarContainer.classList.toggle("hidden", element.username === COPILOT_USERNAME);
662
+ templateData.username.classList.toggle(
663
+ "hidden",
664
+ element.username === COPILOT_USERNAME || this.environmentService.isSessionsWindow
665
+ );
666
+ templateData.avatarContainer.classList.toggle(
667
+ "hidden",
668
+ element.username === COPILOT_USERNAME || this.environmentService.isSessionsWindow
669
+ );
621
670
  this.hoverHidden(templateData.requestHover);
622
671
  clearNode(templateData.detail);
623
672
  if (isResponseVM(element)) {
@@ -627,6 +676,38 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
627
676
  const checkpointEnabled = this.configService.getValue(ChatConfiguration.CheckpointsEnabled) && (this.rendererOptions.restorable ?? true);
628
677
  const isPendingRequest = isRequestVM(element) && !!element.pendingKind;
629
678
  templateData.checkpointContainer.classList.toggle("hidden", isResponseVM(element) || isPendingRequest || !checkpointEnabled);
679
+ templateData.footerToolbar.refresh();
680
+ templateData.checkpointToolbar.refresh();
681
+ templateData.checkpointRestoreToolbar.refresh();
682
+ if (isResponseVM(element)) {
683
+ this.responseTemplateDataByRequestId.set(element.requestId, templateData);
684
+ templateData.elementDisposables.add(
685
+ toDisposable(() => this.responseTemplateDataByRequestId.delete(element.requestId))
686
+ );
687
+ }
688
+ if (!isPendingRequest) {
689
+ const setGroupHover = hovered => {
690
+ const requestId = isRequestVM(element) ? element.id : isResponseVM(element) ? element.requestId : undefined;
691
+ if (!requestId) {
692
+ return;
693
+ }
694
+ const reqData = this.templateDataByRequestId.get(requestId);
695
+ const resData = this.responseTemplateDataByRequestId.get(requestId);
696
+ reqData?.checkpointContainer.classList.toggle("group-hovered", hovered);
697
+ resData?.rowContainer.classList.toggle("group-hovered", hovered);
698
+ };
699
+ templateData.elementDisposables.add(addDisposableListener(
700
+ templateData.rowContainer,
701
+ EventType.MOUSE_ENTER,
702
+ () => setGroupHover(true)
703
+ ));
704
+ templateData.elementDisposables.add(addDisposableListener(
705
+ templateData.rowContainer,
706
+ EventType.MOUSE_LEAVE,
707
+ () => setGroupHover(false)
708
+ ));
709
+ templateData.elementDisposables.add(toDisposable(() => setGroupHover(false)));
710
+ }
630
711
  const shouldShowRestore = this.viewModel?.model.checkpoint && !this.viewModel?.editing && (index === this.delegate.getListLength() - 1) && !isPendingRequest;
631
712
  templateData.checkpointRestoreContainer.classList.toggle("hidden", !(shouldShowRestore && checkpointEnabled));
632
713
  const editing = element.id === this.viewModel?.editing?.id;
@@ -657,7 +738,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
657
738
  }
658
739
  })
659
740
  );
660
- templateData.rowContainer.parentElement?.parentElement?.parentElement?.classList.toggle("request", isRequestVM(element));
741
+ const rowRoot = templateData.rowContainer.parentElement?.parentElement?.parentElement;
742
+ rowRoot?.classList.toggle("request", isRequestVM(element));
743
+ rowRoot?.classList.toggle("response", isResponseVM(element));
661
744
  templateData.rowContainer.classList.toggle(mostRecentResponseClassName, index === this.delegate.getListLength() - 1);
662
745
  templateData.rowContainer.classList.toggle("confirmation-message", isRequestVM(element) && !!element.confirmation);
663
746
  const shouldShowHeader = isResponseVM(element) && !this.rendererOptions.noHeader;
@@ -707,11 +790,11 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
707
790
  const dividerContent = $$1(".pending-divider-content");
708
791
  const label = append(dividerContent, $$1("span.pending-divider-label"));
709
792
  if (element.dividerKind === ChatRequestQueueKind.Steering) {
710
- label.textContent = ( localize(6108, "Steering"));
711
- label.title = ( localize(6109, "Steering message will be sent after the next tool call happens"));
793
+ label.textContent = ( localize(6727, "Steering"));
794
+ label.title = ( localize(6728, "Steering message will be sent after the next tool call happens"));
712
795
  } else {
713
- label.textContent = ( localize(6110, "Queued"));
714
- label.title = ( localize(6111, "Queued messages will be sent after the current request completes"));
796
+ label.textContent = ( localize(6729, "Queued"));
797
+ label.title = ( localize(6730, "Queued messages will be sent after the current request completes"));
715
798
  }
716
799
  templateData.value.appendChild(dividerContent);
717
800
  }
@@ -719,10 +802,10 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
719
802
  clearNode(templateData.detail);
720
803
  if (element.agentOrSlashCommandDetected) {
721
804
  const msg = element.slashCommand ? ( localize(
722
- 6112,
805
+ 6731,
723
806
  "used {0} [[(rerun without)]]",
724
807
  `${chatSubcommandLeader}${element.slashCommand.name}`
725
- )) : ( localize(6113, "[[(rerun without)]]"));
808
+ )) : ( localize(6732, "[[(rerun without)]]"));
726
809
  reset(templateData.detail, renderFormattedText(msg, {
727
810
  actionHandler: {
728
811
  disposables: templateData.elementDisposables,
@@ -735,7 +818,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
735
818
  this.delegate.currentChatMode(),
736
819
  this.rendererOptions.progressMessageAtBottomOfResponse
737
820
  )) {
738
- templateData.detail.textContent = ( localize(6114, "Working"));
821
+ templateData.detail.textContent = ( localize(6733, "Working"));
739
822
  }
740
823
  }
741
824
  renderConfirmationAction(element, templateData) {
@@ -744,9 +827,19 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
744
827
  append(templateData.detail, $("span.codicon.codicon-check", {
745
828
  "aria-hidden": "true"
746
829
  }));
747
- append(templateData.detail, $("span.confirmation-text", undefined, ( localize(6115, "Selected \"{0}\"", element.confirmation))));
830
+ append(templateData.detail, $("span.confirmation-text", undefined, ( localize(6734, "Selected \"{0}\"", element.confirmation))));
748
831
  templateData.header?.classList.remove("header-disabled");
749
832
  templateData.header?.classList.add("partially-disabled");
833
+ const updateCheckmarks = () => templateData.detail.classList.toggle(
834
+ "show-checkmarks",
835
+ !!this.configService.getValue(AccessibilityWorkbenchSettingId.ShowChatCheckmarks)
836
+ );
837
+ updateCheckmarks();
838
+ templateData.elementDisposables.add(this.configService.onDidChangeConfiguration(e => {
839
+ if (e.affectsConfiguration(AccessibilityWorkbenchSettingId.ShowChatCheckmarks)) {
840
+ updateCheckmarks();
841
+ }
842
+ }));
750
843
  }
751
844
  }
752
845
  renderAvatar(element, templateData) {
@@ -845,10 +938,15 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
845
938
  }
846
939
  const collapsedToolsMode = this.configService.getValue("chat.agent.thinking.collapsedTools");
847
940
  if (collapsedToolsMode !== CollapsedToolsDisplayMode.Off && ( partsToRender.some(
848
- part => (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.presentation !== "hidden" && this.shouldPinPart(part, element)
941
+ part => (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && this.shouldPinPart(part, element)
849
942
  ))) {
850
943
  return false;
851
944
  }
945
+ const hasRenderedThinkingPart = ( (templateData.renderedParts ?? []).some(part => part instanceof ChatThinkingContentPart));
946
+ const hasEditPillMarkdown = ( partsToRender.some(part => part.kind === "markdownContent" && this.hasEditCodeblockUri(part)));
947
+ if (hasRenderedThinkingPart && hasEditPillMarkdown) {
948
+ return false;
949
+ }
852
950
  if (this.getSubagentPart(templateData.renderedParts)) {
853
951
  return false;
854
952
  }
@@ -930,12 +1028,6 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
930
1028
  }
931
1029
  clearNode(templateData.value);
932
1030
  const parts = [];
933
- const tip = this.chatTipService.getNextTip(element.id, element.timestamp, this.contextKeyService);
934
- if (tip) {
935
- const tipPart = ( new ChatTipContentPart(tip, this.chatContentMarkdownRenderer));
936
- templateData.value.appendChild(tipPart.domNode);
937
- templateData.elementDisposables.add(tipPart);
938
- }
939
1031
  let inlineSlashCommandRendered = false;
940
1032
  content.forEach((data, contentIndex) => {
941
1033
  const context = {
@@ -949,6 +1041,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
949
1041
  codeBlockModelCollection: this.codeBlockModelCollection,
950
1042
  currentWidth: this._currentLayoutWidth,
951
1043
  onDidChangeVisibility: this._onDidChangeVisibility.event,
1044
+ inlineTextModels: this._inlineTextModels,
952
1045
  get codeBlockStartIndex() {
953
1046
  return parts.reduce((acc, part) => acc + (part.codeblocks?.length ?? 0), 0);
954
1047
  },
@@ -1041,8 +1134,10 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1041
1134
  renderChatContentDiff(partsToRender, contentForThisTurn, element, elementIndex, templateData) {
1042
1135
  const renderedParts = templateData.renderedParts ?? [];
1043
1136
  templateData.renderedParts = renderedParts;
1137
+ const lastMarkdownIndex = partsToRender.findLastIndex(part => part?.kind === "markdownContent");
1044
1138
  partsToRender.forEach((partToRender, contentIndex) => {
1045
1139
  const alreadyRenderedPart = templateData.renderedParts?.[contentIndex];
1140
+ const isFinalAnswerPart = partToRender?.kind === "markdownContent" && contentIndex === lastMarkdownIndex && element.isComplete;
1046
1141
  if (!partToRender) {
1047
1142
  if (!templateData.renderedPartsMounted) {
1048
1143
  alreadyRenderedPart?.onDidRemount?.();
@@ -1056,11 +1151,17 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1056
1151
  }
1057
1152
  renderedParts[contentIndex] = alreadyRenderedPart;
1058
1153
  return;
1059
- } else if (alreadyRenderedPart instanceof ChatThinkingContentPart && this.shouldPinPart(partToRender, element)) {
1154
+ } else if (alreadyRenderedPart instanceof ChatThinkingContentPart && this.shouldPinPart(partToRender, element) && !isFinalAnswerPart) {
1060
1155
  renderedParts[contentIndex] = alreadyRenderedPart;
1061
1156
  return;
1062
1157
  }
1063
1158
  alreadyRenderedPart.dispose();
1159
+ if (alreadyRenderedPart.domNode) {
1160
+ const thinkingToolWrapper = findParentWithClass(alreadyRenderedPart.domNode, "chat-thinking-tool-wrapper");
1161
+ if (thinkingToolWrapper) {
1162
+ thinkingToolWrapper.replaceWith(alreadyRenderedPart.domNode);
1163
+ }
1164
+ }
1064
1165
  }
1065
1166
  const preceedingContentParts = renderedParts.slice(0, contentIndex);
1066
1167
  const context = {
@@ -1074,6 +1175,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1074
1175
  codeBlockModelCollection: this.codeBlockModelCollection,
1075
1176
  currentWidth: this._currentLayoutWidth,
1076
1177
  onDidChangeVisibility: this._onDidChangeVisibility.event,
1178
+ inlineTextModels: this._inlineTextModels,
1077
1179
  get codeBlockStartIndex() {
1078
1180
  return preceedingContentParts.reduce((acc, part) => acc + (part.codeblocks?.length ?? 0), 0);
1079
1181
  },
@@ -1082,7 +1184,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1082
1184
  }
1083
1185
  };
1084
1186
  const lastThinking = this.getLastThinkingPart(renderedParts);
1085
- if (lastThinking && (partToRender.kind === "toolInvocation" || partToRender.kind === "toolInvocationSerialized" || partToRender.kind === "markdownContent" || partToRender.kind === "textEditGroup" || partToRender.kind === "hook") && this.shouldPinPart(partToRender, element)) {
1187
+ if (lastThinking && (partToRender.kind === "toolInvocation" || partToRender.kind === "toolInvocationSerialized" || partToRender.kind === "markdownContent" || partToRender.kind === "textEditGroup" || partToRender.kind === "hook") && this.shouldPinPart(partToRender, element) && !isFinalAnswerPart) {
1086
1188
  const newPart = this.renderChatContentPart(partToRender, templateData, context);
1087
1189
  if (newPart) {
1088
1190
  renderedParts[contentIndex] = newPart;
@@ -1228,9 +1330,16 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1228
1330
  }
1229
1331
  diff(renderedParts, contentToRender, element) {
1230
1332
  const diff = [];
1333
+ const elementIsComplete = isResponseVM(element) && element.isComplete;
1334
+ const lastMarkdownContentIndex = contentToRender.findLastIndex(part => part.kind === "markdownContent");
1231
1335
  for (let i = 0; i < contentToRender.length; i++) {
1232
1336
  const content = contentToRender[i];
1233
1337
  const renderedPart = renderedParts[i];
1338
+ const isFinalAnswerPart = content.kind === "markdownContent" && i === lastMarkdownContentIndex && elementIsComplete;
1339
+ if (isFinalAnswerPart && this.isRenderedPartInsideThinking(renderedPart)) {
1340
+ diff.push(content);
1341
+ continue;
1342
+ }
1234
1343
  if (!renderedPart || !renderedPart.hasSameContent(content, contentToRender.slice(i + 1), element)) {
1235
1344
  diff.push(content);
1236
1345
  } else {
@@ -1239,11 +1348,17 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1239
1348
  }
1240
1349
  return diff;
1241
1350
  }
1242
- hasCodeblockUri(part) {
1351
+ isRenderedPartInsideThinking(renderedPart) {
1352
+ if (!renderedPart?.domNode) {
1353
+ return false;
1354
+ }
1355
+ return !!findParentWithClass(renderedPart.domNode, "chat-thinking-box");
1356
+ }
1357
+ hasEditCodeblockUri(part) {
1243
1358
  if (part.kind !== "markdownContent") {
1244
1359
  return false;
1245
1360
  }
1246
- return hasCodeblockUriTag(part.content.value);
1361
+ return hasEditCodeblockUriTag(part.content.value);
1247
1362
  }
1248
1363
  isCodeblockComplete(part, element) {
1249
1364
  if (part.kind !== "markdownContent") {
@@ -1268,7 +1383,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1268
1383
  if (collapsedToolsMode === CollapsedToolsDisplayMode.Off) {
1269
1384
  return false;
1270
1385
  }
1271
- if (this.hasCodeblockUri(part) || part.kind === "textEditGroup") {
1386
+ if (this.hasEditCodeblockUri(part) || part.kind === "textEditGroup") {
1272
1387
  return true;
1273
1388
  }
1274
1389
  const isMcpTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.source?.type === "mcp";
@@ -1279,12 +1394,11 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1279
1394
  if (isMermaidTool) {
1280
1395
  return false;
1281
1396
  }
1282
- const isAskQuestionsTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.toolId === "copilot_askQuestions";
1397
+ const isAskQuestionsTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && (part.toolId === "copilot_askQuestions" || part.toolId === "vscode_askQuestions");
1283
1398
  if (isAskQuestionsTool) {
1284
1399
  return false;
1285
1400
  }
1286
- const isSubagentTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && (part.subAgentInvocationId || part.toolId === RunSubagentTool.Id);
1287
- if (isSubagentTool) {
1401
+ if ((part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && isSubagentToolInvocation(part)) {
1288
1402
  return false;
1289
1403
  }
1290
1404
  const isTerminalTool = (part.kind === "toolInvocation" || part.kind === "toolInvocationSerialized") && part.toolSpecificData?.kind === "terminal";
@@ -1367,7 +1481,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1367
1481
  this.finalizeCurrentThinkingPart(context, templateData);
1368
1482
  const lastSubagent = this.getSubagentPart(templateData.renderedParts, subagentId);
1369
1483
  if (lastSubagent) {
1370
- if (toolInvocation.toolId !== RunSubagentTool.Id) {
1484
+ if (!isParentSubagentTool(toolInvocation)) {
1371
1485
  lastSubagent.appendToolInvocation(toolInvocation, codeBlockStartIndex);
1372
1486
  }
1373
1487
  return lastSubagent;
@@ -1384,7 +1498,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1384
1498
  this._toolInvocationCodeBlockCollection,
1385
1499
  this._announcedToolProgressKeys
1386
1500
  );
1387
- if (toolInvocation.toolId !== RunSubagentTool.Id) {
1501
+ if (!isParentSubagentTool(toolInvocation)) {
1388
1502
  subagentPart.appendToolInvocation(toolInvocation, codeBlockStartIndex);
1389
1503
  }
1390
1504
  return subagentPart;
@@ -1421,7 +1535,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1421
1535
  }
1422
1536
  }
1423
1537
  }
1424
- const isSubagentContent = (content.kind === "toolInvocation" || content.kind === "toolInvocationSerialized") && (content.subAgentInvocationId || content.toolId === RunSubagentTool.Id);
1538
+ const isSubagentContent = (content.kind === "toolInvocation" || content.kind === "toolInvocationSerialized") && isSubagentToolInvocation(content);
1425
1539
  if (context.element.isComplete && !isSubagentContent) {
1426
1540
  for (const templateData of ( this.templateDataByRequestId.values())) {
1427
1541
  this.finalizeAllSubagentParts(templateData);
@@ -1440,7 +1554,8 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1440
1554
  undefined,
1441
1555
  undefined,
1442
1556
  undefined,
1443
- undefined
1557
+ undefined,
1558
+ content.shimmer
1444
1559
  );
1445
1560
  } else if (content.kind === "working") {
1446
1561
  return this.instantiationService.createInstance(
@@ -1470,6 +1585,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1470
1585
  } else if (content.kind === "markdownContent") {
1471
1586
  return this.renderMarkdown(content, templateData, context);
1472
1587
  } else if (content.kind === "references") {
1588
+ if (isResponseVM(context.element) && context.element.agent?.isDefault && !context.element.agent.modes.includes(ChatModeKind.Ask)) {
1589
+ return this.renderNoContent(other => other.kind === content.kind);
1590
+ }
1473
1591
  return this.renderContentReferencesListData(content, undefined, context, templateData);
1474
1592
  } else if (content.kind === "codeCitations") {
1475
1593
  return this.renderCodeCitations(content, context, templateData);
@@ -1510,7 +1628,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1510
1628
  "ChatListItemRenderer#renderChatContentPart: error rendering content",
1511
1629
  toErrorMessage(err, true)
1512
1630
  );
1513
- const errorPart = this.instantiationService.createInstance(ChatErrorContentPart, ChatErrorLevel.Error, ( new MarkdownString(( localize(6116, "Failed to render content")) + `: ${toErrorMessage(err, false)}`)), content, this.chatContentMarkdownRenderer);
1631
+ const errorPart = this.instantiationService.createInstance(ChatErrorContentPart, ChatErrorLevel.Error, ( new MarkdownString(( localize(6735, "Failed to render content")) + `: ${toErrorMessage(err, false)}`)), content, this.chatContentMarkdownRenderer);
1514
1632
  return {
1515
1633
  dispose: () => errorPart.dispose(),
1516
1634
  domNode: errorPart.domNode,
@@ -1701,7 +1819,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1701
1819
  this.finalizeCurrentThinkingPart(context, templateData);
1702
1820
  }
1703
1821
  }
1704
- const subagentId = toolInvocation.toolId === RunSubagentTool.Id ? toolInvocation.toolCallId : toolInvocation.subAgentInvocationId;
1822
+ const subagentId = getSubagentId(toolInvocation);
1705
1823
  if (subagentId && isResponseVM(context.element) && toolInvocation.presentation !== "hidden") {
1706
1824
  return this.handleSubagentToolGrouping(toolInvocation, subagentId, context, templateData, codeBlockStartIndex);
1707
1825
  }
@@ -1786,7 +1904,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1786
1904
  }
1787
1905
  const shouldPinToThinking = hookPart.hookType === HookType.PreToolUse || hookPart.hookType === HookType.PostToolUse;
1788
1906
  if (shouldPinToThinking) {
1789
- const hookTitle = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(6117, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(6118, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(6119, "Used {0}, but received a warning", hookPart.toolDisplayName)) : ( localize(6120, "Tool call received a warning")));
1907
+ const hookTitle = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(6736, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(6737, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(6738, "Used {0}, but received a warning", hookPart.toolDisplayName)) : ( localize(6739, "Tool call received a warning")));
1790
1908
  let thinkingPart = this.getLastThinkingPart(templateData.renderedParts);
1791
1909
  if (!thinkingPart) {
1792
1910
  const newThinking = this.renderThinkingPart({
@@ -1841,24 +1959,46 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1841
1959
  }
1842
1960
  renderQuestionCarousel(context, carousel, templateData) {
1843
1961
  this.finalizeCurrentThinkingPart(context, templateData);
1962
+ this._notifyOnQuestionCarousel(context, carousel);
1844
1963
  const widget = isResponseVM(context.element) ? this.chatWidgetService.getWidgetBySessionResource(context.element.sessionResource) : undefined;
1845
1964
  const shouldAutoFocus = widget ? widget.getInput() === "" : true;
1965
+ const modelName = widget?.input.currentLanguageModel;
1846
1966
  const responseId = isResponseVM(context.element) ? context.element.requestId : undefined;
1967
+ const requestMessageText = isResponseVM(context.element) ? this.getRequestMessageText(context.element) : undefined;
1847
1968
  const handleSubmit = async (answers, part) => {
1848
1969
  const answersRecord = answers ? Object.fromEntries(answers) : undefined;
1849
- if (answersRecord) {
1850
- carousel.data = answersRecord;
1851
- }
1970
+ carousel.data = answersRecord ?? {};
1852
1971
  carousel.isUsed = true;
1972
+ if (carousel instanceof ChatQuestionCarouselData) {
1973
+ carousel.draftAnswers = undefined;
1974
+ carousel.draftCurrentIndex = undefined;
1975
+ carousel.completion.complete({
1976
+ answers: answersRecord
1977
+ });
1978
+ }
1853
1979
  if (isResponseVM(context.element) && carousel.resolveId) {
1854
1980
  this.chatService.notifyQuestionCarouselAnswer(context.element.requestId, carousel.resolveId, answersRecord);
1855
1981
  }
1856
1982
  this.removeCarouselFromTracking(context, part);
1857
- widget?.input.clearQuestionCarousel();
1983
+ const carouselKey = carousel.resolveId ?? `${responseId}_${context.contentIndex}`;
1984
+ widget?.input.clearQuestionCarousel(undefined, carouselKey);
1858
1985
  };
1859
1986
  const responseIsComplete = isResponseVM(context.element) && context.element.isComplete;
1860
1987
  const inputPartHasCarousel = widget?.input.questionCarousel !== undefined;
1861
1988
  if (carousel.isUsed || responseIsComplete) {
1989
+ if (responseIsComplete && !carousel.isUsed && isResponseVM(context.element) && carousel.resolveId) {
1990
+ carousel.data = {};
1991
+ carousel.isUsed = true;
1992
+ if (carousel instanceof ChatQuestionCarouselData) {
1993
+ carousel.draftAnswers = undefined;
1994
+ carousel.draftCurrentIndex = undefined;
1995
+ carousel.completion.complete({
1996
+ answers: undefined
1997
+ });
1998
+ }
1999
+ this.chatService.notifyQuestionCarouselAnswer(context.element.requestId, carousel.resolveId, undefined);
2000
+ this.pendingQuestionCarousels.get(context.element.sessionResource)?.clear();
2001
+ }
1862
2002
  if (responseIsComplete && inputPartHasCarousel && responseId) {
1863
2003
  widget?.input.clearQuestionCarousel(responseId);
1864
2004
  }
@@ -1878,11 +2018,24 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1878
2018
  shouldAutoFocus,
1879
2019
  onSubmit: async answers => handleSubmit(answers, fallbackPart)
1880
2020
  });
2021
+ this.maybeAutoReplyToQuestionCarousel(
2022
+ context,
2023
+ carousel,
2024
+ fallbackPart,
2025
+ answers => handleSubmit(answers, fallbackPart),
2026
+ modelName,
2027
+ requestMessageText
2028
+ );
1881
2029
  return fallbackPart;
1882
2030
  }
1883
- if (!carousel.isUsed && this.configService.getValue(ChatConfiguration.GlobalAutoApprove)) {
1884
- part.skip();
1885
- }
2031
+ this.maybeAutoReplyToQuestionCarousel(
2032
+ context,
2033
+ carousel,
2034
+ part,
2035
+ answers => handleSubmit(answers, part),
2036
+ modelName,
2037
+ requestMessageText
2038
+ );
1886
2039
  if (isResponseVM(context.element) && carousel.allowSkip && !carousel.isUsed) {
1887
2040
  let carousels = this.pendingQuestionCarousels.get(context.element.sessionResource);
1888
2041
  if (!carousels) {
@@ -1910,6 +2063,87 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1910
2063
  return false;
1911
2064
  });
1912
2065
  }
2066
+ _getCarouselStableKey(context, carousel) {
2067
+ const requestId = isResponseVM(context.element) ? context.element.requestId : undefined;
2068
+ if (!requestId || !carousel.resolveId) {
2069
+ return undefined;
2070
+ }
2071
+ return `${requestId}::${carousel.resolveId}`;
2072
+ }
2073
+ _notifyOnQuestionCarousel(context, carousel) {
2074
+ if (carousel.isUsed) {
2075
+ return;
2076
+ }
2077
+ const stableKey = this._getCarouselStableKey(context, carousel);
2078
+ if (stableKey ? ( this._notifiedQuestionCarousels.has(stableKey)) : false) {
2079
+ return;
2080
+ }
2081
+ const questionCount = carousel.questions.length;
2082
+ const question = carousel.questions.length > 0 && carousel.questions[0].message ? carousel.questions[0].message : ( localize(6740, "Chat input required."));
2083
+ const stringQuestion = typeof question === "string" ? question : question.value;
2084
+ const alertMessage = questionCount === 1 ? ( localize(6741, "Chat input required (1 question): {0}", stringQuestion)) : ( localize(
2085
+ 6742,
2086
+ "Chat input required ({0} questions): {1}",
2087
+ questionCount,
2088
+ stringQuestion
2089
+ ));
2090
+ this.accessibilityService.alert(alertMessage);
2091
+ if (stableKey) {
2092
+ this._notifiedQuestionCarousels.add(stableKey);
2093
+ }
2094
+ const signalMessage = questionCount === 1 ? ( localize(6743, "Chat needs your input (1 question).")) : ( localize(6744, "Chat needs your input ({0} questions).", questionCount));
2095
+ this.accessibilitySignalService.playSignal(AccessibilitySignal.chatUserActionRequired, {
2096
+ allowManyInParallel: true,
2097
+ customAlertMessage: signalMessage
2098
+ });
2099
+ }
2100
+ maybeAutoReplyToQuestionCarousel(context, carousel, part, submit, modelName, requestMessageText) {
2101
+ if (carousel.isUsed) {
2102
+ return;
2103
+ }
2104
+ const stableKey = this._getCarouselStableKey(context, carousel);
2105
+ if (stableKey) {
2106
+ if (( this._autoRepliedQuestionCarousels.has(stableKey))) {
2107
+ return;
2108
+ }
2109
+ this._autoRepliedQuestionCarousels.add(stableKey);
2110
+ }
2111
+ void this._autoReply.shouldAutoReply().then(shouldAutoReply => {
2112
+ const isAutopilot = this._isAutopilotForContext(context);
2113
+ if (!shouldAutoReply && !isAutopilot) {
2114
+ if (stableKey) {
2115
+ this._autoRepliedQuestionCarousels.delete(stableKey);
2116
+ }
2117
+ return;
2118
+ }
2119
+ const cts = ( new CancellationTokenSource());
2120
+ part.addDisposable(toDisposable(() => {
2121
+ cts.cancel();
2122
+ cts.dispose();
2123
+ }));
2124
+ this._autoReply.autoReply(carousel, submit, modelName, requestMessageText, cts.token).catch(err => {
2125
+ this.logService.debug("#ChatQuestionCarousel: Auto reply failed", toErrorMessage(err));
2126
+ });
2127
+ });
2128
+ }
2129
+ getRequestMessageText(response) {
2130
+ const requestId = response.requestId;
2131
+ const items = response.session.getItems();
2132
+ const request = items.find(item => isRequestVM(item) && item.id === requestId);
2133
+ return request?.messageText;
2134
+ }
2135
+ _isAutopilotForContext(context) {
2136
+ if (isResponseVM(context.element) && context.element.model.request?.modeInfo?.permissionLevel === ChatPermissionLevel.Autopilot) {
2137
+ return true;
2138
+ }
2139
+ if (isResponseVM(context.element)) {
2140
+ const widget = this.chatWidgetService.getWidgetBySessionResource(context.element.sessionResource) ?? this.chatWidgetService.lastFocusedWidget;
2141
+ if (widget?.input.currentModeInfo.permissionLevel === ChatPermissionLevel.Autopilot) {
2142
+ return true;
2143
+ }
2144
+ }
2145
+ return false;
2146
+ }
1913
2147
  removeCarouselFromTracking(context, part) {
1914
2148
  if (isResponseVM(context.element)) {
1915
2149
  const carousels = this.pendingQuestionCarousels.get(context.element.sessionResource);
@@ -1942,8 +2176,12 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1942
2176
  }
1943
2177
  renderMarkdown(markdown, templateData, context) {
1944
2178
  const element = context.element;
1945
- const isFinalAnswerPart = isResponseVM(element) && element.isComplete && context.contentIndex === context.content.length - 1;
1946
- if (!this.hasCodeblockUri(markdown) || isFinalAnswerPart) {
2179
+ const isFinalRenderPass = isResponseVM(element) && element.isComplete && !element.renderData;
2180
+ const lastPinnedPartIndex = isFinalRenderPass ? context.content.findLastIndex(
2181
+ c => c.kind === "thinking" || c.kind === "toolInvocation" || c.kind === "toolInvocationSerialized"
2182
+ ) : -1;
2183
+ const isFinalAnswerPart = isFinalRenderPass && context.contentIndex > lastPinnedPartIndex;
2184
+ if (!this.hasEditCodeblockUri(markdown) || isFinalAnswerPart) {
1947
2185
  this.finalizeCurrentThinkingPart(context, templateData);
1948
2186
  }
1949
2187
  const fillInIncompleteTokens = isResponseVM(element) && (!element.isComplete || element.isCanceled || element.errorDetails?.responseIsFiltered || element.errorDetails?.responseIsIncomplete || !!element.renderData);
@@ -1961,6 +2199,9 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1961
2199
  this.codeBlockModelCollection,
1962
2200
  {}
1963
2201
  );
2202
+ markdownPart.addDisposable(
2203
+ markdownPart.onDidChangeHeight(() => this.fireItemHeightChange(templateData))
2204
+ );
1964
2205
  if (isRequestVM(element)) {
1965
2206
  markdownPart.domNode.tabIndex = 0;
1966
2207
  if (this.configService.getValue("chat.editRequests") === "inline" && this.rendererOptions.editable) {
@@ -1991,7 +2232,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
1991
2232
  })
1992
2233
  );
1993
2234
  markdownPart.addDisposable(
1994
- this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), markdownPart.domNode, ( localize(6121, "Click to Edit")), {
2235
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("element"), markdownPart.domNode, ( localize(6745, "Click to Edit")), {
1995
2236
  trapFocus: true
1996
2237
  })
1997
2238
  );
@@ -2136,7 +2377,7 @@ let ChatListItemRenderer = class ChatListItemRenderer extends Disposable {
2136
2377
  requestHover.style.opacity = "0";
2137
2378
  }
2138
2379
  };
2139
- ChatListItemRenderer = ChatListItemRenderer_1 = ( __decorate([( __param(6, IInstantiationService)), ( __param(7, IConfigurationService)), ( __param(8, ILogService)), ( __param(9, IContextKeyService)), ( __param(10, IThemeService)), ( __param(11, ICommandService)), ( __param(12, IHoverService)), ( __param(13, IChatWidgetService)), ( __param(14, IChatEntitlementService)), ( __param(15, IChatService)), ( __param(16, IChatTipService))], ChatListItemRenderer));
2380
+ ChatListItemRenderer = ChatListItemRenderer_1 = ( __decorate([( __param(6, IInstantiationService)), ( __param(7, IConfigurationService)), ( __param(8, ILogService)), ( __param(9, IContextKeyService)), ( __param(10, IThemeService)), ( __param(11, ICommandService)), ( __param(12, IHoverService)), ( __param(13, IChatWidgetService)), ( __param(14, IChatEntitlementService)), ( __param(15, IChatService)), ( __param(16, IAccessibilitySignalService)), ( __param(17, IAccessibilityService)), ( __param(18, IWorkbenchEnvironmentService))], ChatListItemRenderer));
2140
2381
  class ChatListDelegate extends CachedListVirtualDelegate {
2141
2382
  constructor(defaultElementHeight) {
2142
2383
  super();
@@ -2153,15 +2394,15 @@ class ChatListDelegate extends CachedListVirtualDelegate {
2153
2394
  }
2154
2395
  }
2155
2396
  const voteDownDetailLabels = {
2156
- [ChatAgentVoteDownReason.IncorrectCode]: ( localize(6122, "Suggested incorrect code")),
2157
- [ChatAgentVoteDownReason.DidNotFollowInstructions]: ( localize(6123, "Didn't follow instructions")),
2158
- [ChatAgentVoteDownReason.MissingContext]: ( localize(6124, "Missing context")),
2159
- [ChatAgentVoteDownReason.OffensiveOrUnsafe]: ( localize(6125, "Offensive or unsafe")),
2160
- [ChatAgentVoteDownReason.PoorlyWrittenOrFormatted]: ( localize(6126, "Poorly written or formatted")),
2161
- [ChatAgentVoteDownReason.RefusedAValidRequest]: ( localize(6127, "Refused a valid request")),
2162
- [ChatAgentVoteDownReason.IncompleteCode]: ( localize(6128, "Incomplete code")),
2163
- [ChatAgentVoteDownReason.WillReportIssue]: ( localize(6129, "Report an issue")),
2164
- [ChatAgentVoteDownReason.Other]: ( localize(6130, "Other"))
2397
+ [ChatAgentVoteDownReason.IncorrectCode]: ( localize(6746, "Suggested incorrect code")),
2398
+ [ChatAgentVoteDownReason.DidNotFollowInstructions]: ( localize(6747, "Didn't follow instructions")),
2399
+ [ChatAgentVoteDownReason.MissingContext]: ( localize(6748, "Missing context")),
2400
+ [ChatAgentVoteDownReason.OffensiveOrUnsafe]: ( localize(6749, "Offensive or unsafe")),
2401
+ [ChatAgentVoteDownReason.PoorlyWrittenOrFormatted]: ( localize(6750, "Poorly written or formatted")),
2402
+ [ChatAgentVoteDownReason.RefusedAValidRequest]: ( localize(6751, "Refused a valid request")),
2403
+ [ChatAgentVoteDownReason.IncompleteCode]: ( localize(6752, "Incomplete code")),
2404
+ [ChatAgentVoteDownReason.WillReportIssue]: ( localize(6753, "Report an issue")),
2405
+ [ChatAgentVoteDownReason.Other]: ( localize(6754, "Other"))
2165
2406
  };
2166
2407
  let ChatVoteDownButton = class ChatVoteDownButton extends DropdownMenuActionViewItem {
2167
2408
  constructor(
@@ -2235,5 +2476,17 @@ let ChatVoteDownButton = class ChatVoteDownButton extends DropdownMenuActionView
2235
2476
  }
2236
2477
  };
2237
2478
  ChatVoteDownButton = ( __decorate([( __param(2, ICommandService)), ( __param(3, IWorkbenchIssueService)), ( __param(4, ILogService)), ( __param(5, IContextMenuService))], ChatVoteDownButton));
2479
+ function isParentSubagentTool(invocation) {
2480
+ return invocation.toolSpecificData?.kind === "subagent" && !invocation.subAgentInvocationId;
2481
+ }
2482
+ function getSubagentId(invocation) {
2483
+ if (isParentSubagentTool(invocation)) {
2484
+ return invocation.toolCallId;
2485
+ }
2486
+ return invocation.subAgentInvocationId;
2487
+ }
2488
+ function isSubagentToolInvocation(invocation) {
2489
+ return !!getSubagentId(invocation);
2490
+ }
2238
2491
 
2239
2492
  export { ChatListDelegate, ChatListItemRenderer, ChatVoteDownButton };