@codingame/monaco-vscode-katex-common 34.1.2 → 35.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 (244) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/base/browser/animationSync.d.ts +36 -0
  3. package/vscode/src/vs/base/browser/animationSync.js +23 -0
  4. package/vscode/src/vs/base/browser/ui/pixelSpinner/pixelSpinner.js +23 -2
  5. package/vscode/src/vs/platform/actions/browser/buttonbar.js +3 -2
  6. package/vscode/src/vs/platform/agentHost/common/claudeSessionConfigKeys.d.ts +5 -5
  7. package/vscode/src/vs/platform/agentHost/common/fileEditDiff.d.ts +32 -0
  8. package/vscode/src/vs/platform/agentHost/common/fileEditDiff.js +33 -0
  9. package/vscode/src/vs/platform/agentHost/common/meta/agentFeedbackAnnotations.d.ts +90 -0
  10. package/vscode/src/vs/platform/agentHost/common/meta/agentFeedbackAttachments.d.ts +30 -0
  11. package/vscode/src/vs/platform/agentHost/common/meta/agentToolCallMeta.d.ts +65 -0
  12. package/vscode/src/vs/platform/agentHost/common/sessionConfigKeys.d.ts +16 -5
  13. package/vscode/src/vs/platform/agentHost/common/sessionConfigKeys.js +3 -2
  14. package/vscode/src/vs/platform/agentHost/common/state/protocol/channels-resource-watch/reducer.d.ts +21 -0
  15. package/vscode/src/vs/platform/agentHost/common/state/protocol/reducers.d.ts +8 -0
  16. package/vscode/src/vs/platform/agentHost/common/state/sessionReducers.d.ts +9 -0
  17. package/vscode/src/vs/platform/mcp/common/modelContextProtocolApps.d.ts +2 -2
  18. package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
  19. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.d.ts +29 -0
  20. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +105 -28
  21. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
  22. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.d.ts +15 -1
  23. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +74 -44
  24. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
  25. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +11 -11
  26. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +2 -2
  27. package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +98 -24
  28. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.d.ts +8 -0
  29. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.contribution.js +31 -4
  30. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.d.ts +45 -4
  31. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatInputPicker.js +163 -37
  32. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFolderPickerActionItem.d.ts +47 -0
  33. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostFolderPickerActionItem.js +172 -0
  34. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.d.ts +3 -1
  35. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostGenericConfigChips.js +7 -4
  36. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionReferenceAttachment.d.ts +12 -0
  37. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSnapshotController.d.ts +116 -0
  38. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSnapshotController.js +348 -0
  39. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/media/agentHostChatInputPicker.css +1 -1
  40. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.d.ts +211 -0
  41. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.js +64 -0
  42. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +18 -0
  43. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +13 -2
  44. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.d.ts +1 -1
  45. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +30 -18
  46. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +4 -1
  47. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +29 -4
  48. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +9 -9
  49. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
  50. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +24 -1
  51. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +119 -41
  52. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +27 -0
  53. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionTypeAvailability.d.ts +63 -0
  54. package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/sessionTypeAvailability.js +97 -0
  55. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.d.ts +5 -6
  56. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +105 -88
  57. package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +13 -13
  58. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.d.ts +1 -0
  59. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +46 -48
  60. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.d.ts +28 -0
  61. package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelContentProviders.js +98 -0
  62. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.d.ts +3 -3
  63. package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +9 -7
  64. package/vscode/src/vs/workbench/contrib/chat/browser/media/chatTurnPills.css +162 -0
  65. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.d.ts +9 -2
  66. package/vscode/src/vs/workbench/contrib/chat/browser/tools/chatToolRiskAssessmentService.js +95 -24
  67. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +22 -1
  68. package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +151 -20
  69. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
  70. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +10 -10
  71. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +20 -2
  72. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
  73. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
  74. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +5 -0
  75. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +61 -17
  76. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAutoModeResolutionContentPart.d.ts +20 -0
  77. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAutoModeResolutionContentPart.js +55 -0
  78. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.d.ts +6 -2
  79. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +81 -30
  80. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
  81. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
  82. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
  83. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +2 -2
  84. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
  85. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.d.ts +11 -0
  86. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatEditPillElement.js +13 -1
  87. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatElicitationContentPart.js +9 -33
  88. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
  89. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.d.ts +6 -2
  90. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExternalEditContentPart.js +21 -11
  91. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
  92. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
  93. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +6 -2
  94. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +40 -19
  95. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpAuthenticationContentPart.d.ts +35 -0
  96. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpAuthenticationContentPart.js +140 -0
  97. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
  98. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersStartingContentPart.d.ts +24 -0
  99. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersStartingContentPart.js +58 -0
  100. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.d.ts +3 -1
  101. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +29 -8
  102. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatPlanReviewPart.js +30 -30
  103. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +1 -1
  104. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +44 -44
  105. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.d.ts +1 -2
  106. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +12 -66
  107. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
  108. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
  109. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.d.ts +39 -0
  110. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +167 -43
  111. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.d.ts +1 -15
  112. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +9 -86
  113. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSystemNotificationContentPart.d.ts +12 -0
  114. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSystemNotificationContentPart.js +23 -0
  115. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
  116. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +9 -1
  117. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +141 -72
  118. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
  119. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +17 -17
  120. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.d.ts +2 -0
  121. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +17 -3
  122. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
  123. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTurnPillsPart.d.ts +29 -0
  124. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTurnPillsPart.js +110 -0
  125. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
  126. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
  127. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatAgentFeedbackReviewConfirmation.css +133 -0
  128. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatAutoModeResolution.css +30 -0
  129. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatCodeBlockPill.css +4 -0
  130. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatConfirmationWidget.css +18 -8
  131. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatPlanReview.css +23 -7
  132. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +33 -18
  133. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatSubagentContent.css +23 -0
  134. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatTerminalToolProgressPart.css +44 -0
  135. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +2 -0
  136. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatToolConfirmationCarousel.css +1 -1
  137. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.d.ts +9 -1
  138. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +21 -4
  139. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatAgentFeedbackReviewConfirmationSubPart.d.ts +48 -0
  140. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatAgentFeedbackReviewConfirmationSubPart.js +279 -0
  141. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
  142. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.d.ts +43 -1
  143. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +53 -15
  144. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.d.ts +7 -9
  145. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
  146. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.d.ts +4 -1
  147. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +24 -10
  148. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/{chatMissingSandboxDepsConfirmationSubPart.d.ts → chatSandboxPrerequisiteConfirmationSubPart.d.ts} +3 -2
  149. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/{chatMissingSandboxDepsConfirmationSubPart.js → chatSandboxPrerequisiteConfirmationSubPart.js} +14 -10
  150. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.d.ts +0 -1
  151. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +30 -59
  152. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.d.ts +2 -1
  153. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +41 -29
  154. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationCarouselPart.js +8 -8
  155. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.d.ts +2 -1
  156. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +12 -9
  157. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.d.ts +1 -1
  158. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +43 -35
  159. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
  160. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
  161. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.d.ts +2 -1
  162. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +11 -8
  163. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeHelper.d.ts +18 -0
  164. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeHelper.js +51 -0
  165. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/toolRiskBadgeWidget.js +4 -4
  166. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
  167. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +18 -3
  168. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +266 -98
  169. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.d.ts +1 -0
  170. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +8 -3
  171. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatRestoreCheckpointActionViewItem.d.ts +32 -0
  172. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatRestoreCheckpointActionViewItem.js +135 -0
  173. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatTurnPills.d.ts +85 -0
  174. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatTurnPills.js +275 -0
  175. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +18 -1
  176. package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +84 -37
  177. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
  178. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatGoalBannerWidget.js +4 -4
  179. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.d.ts +14 -0
  180. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.d.ts +6 -1
  181. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationWidget.js +52 -4
  182. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +187 -13
  183. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +435 -139
  184. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatePersistence.d.ts +6 -0
  185. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatePersistence.js +21 -0
  186. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.d.ts +50 -0
  187. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.js +49 -0
  188. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.d.ts +79 -0
  189. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.js +127 -0
  190. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +84 -8
  191. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +658 -430
  192. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.d.ts +72 -8
  193. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelSelectionLogic.js +82 -7
  194. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatPhoneInputPresenter.js +2 -2
  195. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.d.ts +3 -3
  196. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +6 -3
  197. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +2 -1
  198. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +23 -9
  199. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatGoalBannerWidget.css +2 -2
  200. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/media/chatInputNotificationWidget.css +28 -12
  201. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +3 -0
  202. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +15 -14
  203. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.d.ts +60 -0
  204. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +18 -7
  205. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +49 -1
  206. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +141 -81
  207. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +7 -15
  208. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +30 -47
  209. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
  210. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerInputActionItem.d.ts +20 -0
  211. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerInputActionItem.js +18 -0
  212. package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +469 -148
  213. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.d.ts +11 -2
  214. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +79 -28
  215. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.d.ts +71 -2
  216. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +107 -45
  217. package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/media/chatContextUsageDetails.css +20 -0
  218. package/vscode/src/vs/workbench/contrib/chat/common/chatErrorMessages.d.ts +110 -0
  219. package/vscode/src/vs/workbench/contrib/chat/common/chatErrorMessages.js +37 -0
  220. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.d.ts +4 -1
  221. package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +13 -11
  222. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.d.ts +8 -1
  223. package/vscode/src/vs/workbench/contrib/chat/common/chatPermissionWarnings.js +57 -21
  224. package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +18 -18
  225. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +4 -4
  226. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
  227. package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
  228. package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +30 -30
  229. package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
  230. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.d.ts +39 -8
  231. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpToolCallUI.js +168 -72
  232. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
  233. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
  234. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +2 -2
  235. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +24 -24
  236. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +3 -3
  237. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +7 -7
  238. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +1 -1
  239. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +5 -5
  240. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +1 -1
  241. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
  242. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
  243. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.d.ts +0 -30
  244. package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputStatusActionViewItem.js +0 -147
@@ -28,6 +28,7 @@ export declare class ChatSubagentContentPart extends ChatCollapsibleContentPart
28
28
  private readonly configurationService;
29
29
  private wrapper;
30
30
  private isActive;
31
+ private isExternallyActive;
31
32
  private hasToolItems;
32
33
  private readonly isInitiallyComplete;
33
34
  private promptContainer;
@@ -43,8 +44,17 @@ export declare class ChatSubagentContentPart extends ChatCollapsibleContentPart
43
44
  private pendingResultText;
44
45
  private currentRunningToolMessage;
45
46
  private modelName;
47
+ private credits;
46
48
  private _isDefaultDescription;
47
49
  private readonly _hoverDisposable;
50
+ private readonly _subagentToolInvocation;
51
+ /**
52
+ * Toolbar hosting the `MenuId.ChatSubagentContent` menu in the subagent
53
+ * header. The Agents window contributes an "Open Subagent" action (rendered
54
+ * as a pill) into this menu; elsewhere the menu is empty and nothing shows.
55
+ */
56
+ private _openChatToolbar;
57
+ private _openChatToolbarContainer;
48
58
  private toolsWaitingForConfirmation;
49
59
  private userManuallyExpanded;
50
60
  private autoExpandedForConfirmation;
@@ -56,6 +66,8 @@ export declare class ChatSubagentContentPart extends ChatCollapsibleContentPart
56
66
  private readonly _confirmationPlaceholderDisposable;
57
67
  private _useCarouselForConfirmations;
58
68
  private toolsWaitingForCarouselConfirmation;
69
+ /** Per-tool-invocation autoruns observing tool state; each is disposed once its tool reaches a terminal state so listeners don't accumulate for the widget's lifetime. */
70
+ private readonly _toolStateTracking;
59
71
  private workingSpinnerElement;
60
72
  private workingSpinnerLabel;
61
73
  private availableMessages;
@@ -71,6 +83,17 @@ export declare class ChatSubagentContentPart extends ChatCollapsibleContentPart
71
83
  * Extracts subagent info (description, agentName, prompt) from a tool invocation.
72
84
  */
73
85
  private static extractSubagentInfo;
86
+ /** The subagent's own chat resource (URI string), when it runs as a distinct chat. */
87
+ private _getChatResource;
88
+ /**
89
+ * Creates (once) and toggles the subagent header toolbar that hosts the
90
+ * `MenuId.ChatSubagentContent` menu. The Agents window contributes an "Open
91
+ * Subagent" pill into that menu to reveal the subagent's own (read-only)
92
+ * chat; in the regular chat view the menu is empty and nothing renders. The
93
+ * subagent chat resource can arrive after the part is first constructed, so
94
+ * this is also called from the tool-completion autorun.
95
+ */
96
+ private _updateOpenChatLink;
74
97
  constructor(subAgentInvocationId: string, toolInvocation: IChatToolInvocation | IChatToolInvocationSerialized, context: IChatContentPartRenderContext, chatContentMarkdownRenderer: IMarkdownRenderer, listPool: CollapsibleListPool, editorPool: EditorPool, currentWidthDelegate: () => number, announcedToolProgressKeys: Set<string>, instantiationService: IInstantiationService, chatMarkdownAnchorService: IChatMarkdownAnchorService, hoverService: IHoverService, configurationService: IConfigurationService);
75
98
  private getRandomWorkingMessage;
76
99
  private createWorkingSpinner;
@@ -85,14 +108,30 @@ export declare class ChatSubagentContentPart extends ChatCollapsibleContentPart
85
108
  private renderPromptSection;
86
109
  private doRenderPromptSection;
87
110
  getIsActive(): boolean;
111
+ shouldRemainActive(): boolean;
88
112
  get hasToolsWaitingForConfirmation(): boolean;
89
113
  /** Routes this subagent's initial confirmations to the input carousel. */
90
114
  enableCarouselMode(navigateToCarousel: (subAgentInvocationId: string) => void, addToolToCarousel: (tool: IChatToolInvocation) => void, shouldUseCarouselForTool: (tool: IChatToolInvocation, state: IChatToolInvocation.State) => boolean): void;
91
115
  getAgentLabel(): string;
92
116
  markAsInactive(): void;
117
+ private markAsActive;
118
+ private refreshActiveStateFromToolData;
93
119
  finalizeTitle(): void;
94
120
  private updateTitle;
95
121
  private updateHover;
122
+ /**
123
+ * Re-reads the subagent's credit (AIC) usage from `toolSpecificData` and
124
+ * refreshes the hover tooltip when it has changed. Credits can arrive
125
+ * incrementally while the subagent runs and continue updating until its
126
+ * child turns report their final usage.
127
+ */
128
+ private refreshCreditsFromToolData;
129
+ /**
130
+ * Re-reads the subagent's model name from `toolSpecificData` and refreshes
131
+ * the hover when it changes. The model can arrive incrementally (e.g. agent
132
+ * host subagents report it via their child turns' usage events).
133
+ */
134
+ private refreshModelFromToolData;
96
135
  /**
97
136
  * Tracks a tool invocation's state for:
98
137
  * 1. Updating the title with the current tool message (persists even after completion)
@@ -1,7 +1,8 @@
1
1
 
2
2
  import { registerCss } from '@codingame/monaco-vscode-api/css';
3
3
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
4
- import { $, AnimationFrameScheduler, DisposableResizeObserver, append, addDisposableListener } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
+ import { $, addDisposableListener, EventType, AnimationFrameScheduler, DisposableResizeObserver, append } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
5
+ import { Gesture, EventType as EventType$1 } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/touch';
5
6
  import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
6
7
  import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
7
8
  import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
@@ -9,10 +10,12 @@ import { MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api
9
10
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
10
11
  import { rcut } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
11
12
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
13
+ import { MenuWorkbenchToolBar, HiddenItemStrategy } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
14
+ import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
12
15
  import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
13
16
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
14
17
  import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
15
- import { IChatToolInvocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
18
+ import { IChatToolInvocation, formatCopilotCredits } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService/chatService';
16
19
  import { ChatCollapsibleContentPart } from './chatCollapsibleContentPart.js';
17
20
  import { ChatCollapsibleMarkdownContentPart } from './chatCollapsibleMarkdownContentPart.js';
18
21
  import { renderFileWidgets } from './chatInlineAnchorWidget.js';
@@ -25,20 +28,21 @@ import { autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/obse
25
28
  var ChatSubagentContentPart_1;
26
29
  registerCss(chatSubagentContent);
27
30
  const MAX_TITLE_LENGTH = 100;
28
- const subagentWorkingMessages = [( localize(7407, "Processing")), ( localize(7408, "Preparing")), ( localize(7409, "Loading")), ( localize(7410, "Analyzing")), ( localize(7411, "Evaluating"))];
31
+ const subagentWorkingMessages = [( localize(7951, "Processing")), ( localize(7952, "Preparing")), ( localize(7953, "Loading")), ( localize(7954, "Analyzing")), ( localize(7955, "Evaluating"))];
29
32
  let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentContentPart extends ChatCollapsibleContentPart {
30
33
  static isParentSubagentTool(toolInvocation) {
31
34
  return toolInvocation.toolSpecificData?.kind === "subagent" && !toolInvocation.subAgentInvocationId;
32
35
  }
33
36
  static extractSubagentInfo(toolInvocation) {
34
- const defaultDescription = ( localize(7412, "Running subagent"));
37
+ const defaultDescription = ( localize(7956, "Running subagent"));
35
38
  if (!ChatSubagentContentPart_1.isParentSubagentTool(toolInvocation)) {
36
39
  return {
37
40
  description: defaultDescription,
38
41
  isDefaultDescription: true,
39
42
  agentName: undefined,
40
43
  prompt: undefined,
41
- modelName: undefined
44
+ modelName: undefined,
45
+ credits: undefined
42
46
  };
43
47
  }
44
48
  if (toolInvocation.toolSpecificData?.kind === "subagent") {
@@ -48,7 +52,8 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
48
52
  isDefaultDescription: !hasDescription,
49
53
  agentName: toolInvocation.toolSpecificData.agentName,
50
54
  prompt: toolInvocation.toolSpecificData.prompt,
51
- modelName: toolInvocation.toolSpecificData.modelName
55
+ modelName: toolInvocation.toolSpecificData.modelName,
56
+ credits: toolInvocation.toolSpecificData.credits
52
57
  };
53
58
  }
54
59
  if (toolInvocation.kind === "toolInvocation") {
@@ -60,7 +65,8 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
60
65
  isDefaultDescription: !hasDescription,
61
66
  agentName: params?.agentName,
62
67
  prompt: params?.prompt,
63
- modelName: undefined
68
+ modelName: undefined,
69
+ credits: undefined
64
70
  };
65
71
  }
66
72
  return {
@@ -68,9 +74,57 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
68
74
  isDefaultDescription: true,
69
75
  agentName: undefined,
70
76
  prompt: undefined,
71
- modelName: undefined
77
+ modelName: undefined,
78
+ credits: undefined
72
79
  };
73
80
  }
81
+ _getChatResource() {
82
+ const data = this._subagentToolInvocation.toolSpecificData;
83
+ return data?.kind === "subagent" ? data.chatResource : undefined;
84
+ }
85
+ _updateOpenChatLink() {
86
+ const resource = this._getChatResource();
87
+ if (!this._collapseButton) {
88
+ return;
89
+ }
90
+ this.domNode.classList.toggle("chat-subagent-has-chat", !!resource);
91
+ if (!resource) {
92
+ this._openChatToolbarContainer?.classList.add("hidden");
93
+ return;
94
+ }
95
+ if (!this._openChatToolbar) {
96
+ const container = $(".chat-subagent-open-chat-toolbar");
97
+ this._collapseButton.element.insertBefore(container, this._collapseButton.labelElement);
98
+ this._openChatToolbarContainer = container;
99
+ this._openChatToolbar = this._register(
100
+ this.instantiationService.createInstance(MenuWorkbenchToolBar, container, MenuId.ChatSubagentContent, {
101
+ hiddenItemStrategy: HiddenItemStrategy.Ignore,
102
+ menuOptions: {
103
+ shouldForwardArgs: true
104
+ },
105
+ toolbarOptions: {
106
+ primaryGroup: () => true
107
+ }
108
+ })
109
+ );
110
+ const pill = this._openChatToolbar.getElement();
111
+ this._register(Gesture.addTarget(pill));
112
+ this._register(
113
+ addDisposableListener(pill, EventType.MOUSE_DOWN, e => e.stopPropagation())
114
+ );
115
+ this._register(
116
+ addDisposableListener(pill, EventType.CLICK, e => e.stopPropagation())
117
+ );
118
+ this._register(
119
+ addDisposableListener(pill, EventType$1.Tap, e => e.stopPropagation())
120
+ );
121
+ }
122
+ this._openChatToolbar.context = {
123
+ chatResource: resource,
124
+ agentName: this.agentName
125
+ };
126
+ this._openChatToolbarContainer.classList.remove("hidden");
127
+ }
74
128
  constructor(
75
129
  subAgentInvocationId,
76
130
  toolInvocation,
@@ -90,9 +144,10 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
90
144
  isDefaultDescription,
91
145
  agentName,
92
146
  prompt,
93
- modelName
147
+ modelName,
148
+ credits
94
149
  } = ChatSubagentContentPart_1.extractSubagentInfo(toolInvocation);
95
- const rawPrefix = agentName || ( localize(7413, "Subagent"));
150
+ const rawPrefix = agentName || ( localize(7957, "Subagent"));
96
151
  const prefix = rawPrefix.charAt(0).toUpperCase() + rawPrefix.slice(1);
97
152
  const initialTitle = `${prefix}: ${description}`;
98
153
  super(initialTitle, context, undefined, hoverService, configurationService);
@@ -106,7 +161,6 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
106
161
  this.instantiationService = instantiationService;
107
162
  this.chatMarkdownAnchorService = chatMarkdownAnchorService;
108
163
  this.configurationService = configurationService;
109
- this.isActive = true;
110
164
  this.hasToolItems = false;
111
165
  this.lazyItems = [];
112
166
  this.hasExpandedOnce = false;
@@ -118,32 +172,38 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
118
172
  this._confirmationPlaceholderDisposable = this._register(( new MutableDisposable()));
119
173
  this._useCarouselForConfirmations = false;
120
174
  this.toolsWaitingForCarouselConfirmation = 0;
175
+ this._toolStateTracking = this._register(( new DisposableStore()));
121
176
  this._titleDetailRendered = this._register(( new MutableDisposable()));
122
177
  this.description = rcut(description, MAX_TITLE_LENGTH);
123
178
  this._isDefaultDescription = isDefaultDescription;
124
179
  this.agentName = agentName;
125
180
  this.prompt = prompt;
126
181
  this.modelName = modelName;
127
- this.isInitiallyComplete = this.element.isComplete;
182
+ this.credits = credits;
183
+ this.isInitiallyComplete = IChatToolInvocation.isComplete(toolInvocation);
184
+ this.isExternallyActive = toolInvocation.toolSpecificData?.kind === "subagent" && toolInvocation.toolSpecificData.isActive === true;
185
+ this.isActive = toolInvocation.toolSpecificData?.kind === "subagent" ? toolInvocation.toolSpecificData.isActive ?? !this.isInitiallyComplete : !this.isInitiallyComplete;
186
+ this._subagentToolInvocation = toolInvocation;
128
187
  const node = this.domNode;
129
188
  node.classList.add("chat-thinking-box", "chat-thinking-fixed-mode", "chat-subagent-part");
130
- if (!this.element.isComplete) {
189
+ this._updateOpenChatLink();
190
+ if (this.isActive) {
131
191
  node.classList.add("chat-thinking-active");
132
192
  }
133
- if (!this.element.isComplete && this._collapseButton) {
193
+ if (this.isActive && this._collapseButton) {
134
194
  const labelElement = this._collapseButton.labelElement;
135
195
  labelElement.textContent = "";
136
196
  this.titleShimmerSpan = $("span.chat-thinking-title-shimmer");
137
197
  this.titleShimmerSpan.textContent = initialTitle;
138
198
  labelElement.appendChild(this.titleShimmerSpan);
139
199
  }
140
- if (this._collapseButton && !this.element.isComplete) {
200
+ if (this._collapseButton && this.isActive) {
141
201
  this._collapseButton.icon = Codicon.circleFilled;
142
202
  }
143
203
  this._register(autorun(r => {
144
204
  this.expanded.read(r);
145
205
  if (this._collapseButton) {
146
- if (!this.element.isComplete && this.isActive) {
206
+ if (this.isActive) {
147
207
  this._collapseButton.icon = Codicon.circleFilled;
148
208
  } else {
149
209
  this._collapseButton.icon = Codicon.check;
@@ -239,7 +299,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
239
299
  return;
240
300
  }
241
301
  const lines = this.prompt.split("\n");
242
- const rawFirstLine = lines[0] || ( localize(7414, "Prompt"));
302
+ const rawFirstLine = lines[0] || ( localize(7958, "Prompt"));
243
303
  const restOfLines = lines.slice(1).join("\n").trim();
244
304
  const titleContent = rcut(rawFirstLine, MAX_TITLE_LENGTH);
245
305
  const wasTruncated = rawFirstLine.length > MAX_TITLE_LENGTH;
@@ -271,6 +331,9 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
271
331
  getIsActive() {
272
332
  return this.isActive;
273
333
  }
334
+ shouldRemainActive() {
335
+ return this.isExternallyActive;
336
+ }
274
337
  get hasToolsWaitingForConfirmation() {
275
338
  return this.toolsWaitingForConfirmation > 0;
276
339
  }
@@ -287,7 +350,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
287
350
  if (!this._isDefaultDescription && this.description) {
288
351
  return this.description;
289
352
  }
290
- return localize(7413, "Subagent");
353
+ return localize(7957, "Subagent");
291
354
  }
292
355
  markAsInactive() {
293
356
  this.isActive = false;
@@ -298,11 +361,36 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
298
361
  this.removeWorkingSpinner();
299
362
  this.hideConfirmationPlaceholder();
300
363
  if (this._isDefaultDescription) {
301
- this.description = ( localize(7415, "Ran subagent"));
364
+ this.description = ( localize(7959, "Ran subagent"));
302
365
  }
303
366
  this.finalizeTitle();
304
367
  this.setExpanded(false);
305
368
  }
369
+ markAsActive() {
370
+ if (this.isActive) {
371
+ return;
372
+ }
373
+ this.isActive = true;
374
+ this.domNode.classList.add("chat-thinking-active");
375
+ if (this._collapseButton) {
376
+ this._collapseButton.icon = Codicon.circleFilled;
377
+ }
378
+ if (this.wrapper && !this.hasToolsWaitingForConfirmation) {
379
+ this.showWorkingSpinner();
380
+ }
381
+ this.updateTitle();
382
+ }
383
+ refreshActiveStateFromToolData(toolInvocation) {
384
+ if (toolInvocation.toolSpecificData?.kind !== "subagent" || toolInvocation.toolSpecificData.isActive === undefined) {
385
+ return;
386
+ }
387
+ this.isExternallyActive = toolInvocation.toolSpecificData.isActive;
388
+ if (toolInvocation.toolSpecificData.isActive) {
389
+ this.markAsActive();
390
+ } else {
391
+ this.markAsInactive();
392
+ }
393
+ }
306
394
  finalizeTitle() {
307
395
  this.updateTitle();
308
396
  if (this._collapseButton) {
@@ -310,7 +398,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
310
398
  }
311
399
  }
312
400
  updateTitle() {
313
- const rawName = this.agentName || ( localize(7413, "Subagent"));
401
+ const rawName = this.agentName || ( localize(7957, "Subagent"));
314
402
  const prefix = rawName.charAt(0).toUpperCase() + rawName.slice(1);
315
403
  const shimmerText = `${prefix}: ${this.description}`;
316
404
  const toolCallText = this.currentRunningToolMessage && this.isActive ? ` \u2014 ${this.currentRunningToolMessage}` : ``;
@@ -369,13 +457,45 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
369
457
  this._collapseButton.element.ariaExpanded = String(this.isExpanded());
370
458
  }
371
459
  updateHover() {
372
- if (!this.modelName || !this._collapseButton) {
460
+ if (!this._collapseButton) {
461
+ return;
462
+ }
463
+ const parts = [];
464
+ if (this.modelName) {
465
+ parts.push(( localize(7960, "Model: {0}", this.modelName)));
466
+ }
467
+ if (typeof this.credits === "number" && this.credits > 0) {
468
+ const formatted = formatCopilotCredits(this.credits);
469
+ parts.push(formatted === "1" ? ( localize(7961, "{0} credit", formatted)) : ( localize(7962, "{0} credits", formatted)));
470
+ }
471
+ if (parts.length === 0) {
472
+ this._hoverDisposable.clear();
373
473
  return;
374
474
  }
375
475
  this._hoverDisposable.value = this.hoverService.setupDelayedHover(this._collapseButton.element, {
376
- content: ( localize(7416, "Model: {0}", this.modelName))
476
+ content: parts.join(" ")
377
477
  });
378
478
  }
479
+ refreshCreditsFromToolData(toolInvocation) {
480
+ if (toolInvocation.toolSpecificData?.kind !== "subagent") {
481
+ return;
482
+ }
483
+ const credits = toolInvocation.toolSpecificData.credits;
484
+ if (typeof credits === "number" && credits !== this.credits) {
485
+ this.credits = credits;
486
+ this.updateHover();
487
+ }
488
+ }
489
+ refreshModelFromToolData(toolInvocation) {
490
+ if (toolInvocation.toolSpecificData?.kind !== "subagent") {
491
+ return;
492
+ }
493
+ const modelName = toolInvocation.toolSpecificData.modelName;
494
+ if (modelName && modelName !== this.modelName) {
495
+ this.modelName = modelName;
496
+ this.updateHover();
497
+ }
498
+ }
379
499
  trackToolState(toolInvocation) {
380
500
  if (toolInvocation.kind !== "toolInvocation") {
381
501
  return;
@@ -388,7 +508,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
388
508
  const shouldUseCarouselForTool = this._shouldUseCarouselForTool;
389
509
  let wasWaitingForConfirmation = false;
390
510
  let wasWaitingForCarouselConfirmation = false;
391
- this._register(autorun(r => {
511
+ const toolStateAutorun = autorun(r => {
392
512
  const state = toolInvocation.state.read(r);
393
513
  const isWaitingForConfirmation = state.type === IChatToolInvocation.StateKind.WaitingForConfirmation || state.type === IChatToolInvocation.StateKind.WaitingForPostApproval;
394
514
  const isWaitingForCarouselConfirmation = !!addToolToCarousel && shouldUseCarouselForTool?.(toolInvocation, state) === true;
@@ -423,11 +543,15 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
423
543
  }
424
544
  wasWaitingForConfirmation = isWaitingForConfirmation;
425
545
  wasWaitingForCarouselConfirmation = isWaitingForCarouselConfirmation;
426
- }));
546
+ if (state.type === IChatToolInvocation.StateKind.Completed || state.type === IChatToolInvocation.StateKind.Cancelled) {
547
+ queueMicrotask(() => this._toolStateTracking.delete(toolStateAutorun));
548
+ }
549
+ });
550
+ this._toolStateTracking.add(toolStateAutorun);
427
551
  }
428
552
  getConfirmationPlaceholderText() {
429
553
  const count = this.toolsWaitingForCarouselConfirmation;
430
- return count === 1 ? ( localize(7417, "1 pending confirmation")) : ( localize(7418, "{0} pending confirmations", count));
554
+ return count === 1 ? ( localize(7963, "1 pending confirmation")) : ( localize(7964, "{0} pending confirmations", count));
431
555
  }
432
556
  updateConfirmationPlaceholderLabel() {
433
557
  if (this._confirmationPlaceholderLabel) {
@@ -489,6 +613,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
489
613
  let wasStreaming = toolInvocation.state.get().type === IChatToolInvocation.StateKind.Streaming;
490
614
  this._register(autorun(r => {
491
615
  const state = toolInvocation.state.read(r);
616
+ this.refreshActiveStateFromToolData(toolInvocation);
492
617
  if (state.type === IChatToolInvocation.StateKind.Completed) {
493
618
  wasStreaming = false;
494
619
  const textParts = ( (state.contentForModel || []).filter(part => part.kind === "text").map(part => part.value));
@@ -505,7 +630,11 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
505
630
  this.updateHover();
506
631
  }
507
632
  }
508
- this.markAsInactive();
633
+ this.refreshCreditsFromToolData(toolInvocation);
634
+ this._updateOpenChatLink();
635
+ if (!this.isExternallyActive) {
636
+ this.markAsInactive();
637
+ }
509
638
  } else if (wasStreaming && state.type !== IChatToolInvocation.StateKind.Streaming) {
510
639
  wasStreaming = false;
511
640
  const {
@@ -523,6 +652,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
523
652
  this.modelName = modelName;
524
653
  this.updateHover();
525
654
  }
655
+ this.refreshCreditsFromToolData(toolInvocation);
526
656
  this.renderPromptSection();
527
657
  this.updateTitle();
528
658
  } else if (toolInvocation.toolSpecificData?.kind === "subagent") {
@@ -543,6 +673,9 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
543
673
  }
544
674
  this.updateTitle();
545
675
  }
676
+ this.refreshCreditsFromToolData(toolInvocation);
677
+ this.refreshModelFromToolData(toolInvocation);
678
+ this._updateOpenChatLink();
546
679
  }
547
680
  }));
548
681
  } else if (toolInvocation.toolSpecificData?.kind === "subagent" && toolInvocation.toolSpecificData.result) {
@@ -632,7 +765,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
632
765
  }
633
766
  }
634
767
  appendHookItem(factory, hookPart) {
635
- const hookMessage = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(7419, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(7420, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(7421, "Warning for {0}", hookPart.toolDisplayName)) : ( localize(7422, "Hook warning")));
768
+ const hookMessage = hookPart.stopReason ? (hookPart.toolDisplayName ? ( localize(7965, "Blocked {0}", hookPart.toolDisplayName)) : ( localize(7966, "Blocked by hook"))) : (hookPart.toolDisplayName ? ( localize(7967, "Warning for {0}", hookPart.toolDisplayName)) : ( localize(7968, "Hook warning")));
636
769
  this.currentRunningToolMessage = hookMessage;
637
770
  this.updateTitle();
638
771
  if (this.isExpanded() || this.hasExpandedOnce) {
@@ -719,7 +852,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
719
852
  itemWrapper.appendChild(content);
720
853
  if (toolInvocation.kind === "toolInvocation") {
721
854
  const shouldUseCarouselForTool = this._shouldUseCarouselForTool;
722
- this._register(autorun(r => {
855
+ const iconAutorun = autorun(r => {
723
856
  const state = toolInvocation.state.read(r);
724
857
  const hasConfirmation = state.type === IChatToolInvocation.StateKind.WaitingForConfirmation || state.type === IChatToolInvocation.StateKind.WaitingForPostApproval;
725
858
  const shouldHideInline = shouldUseCarouselForTool?.(toolInvocation, state) === true;
@@ -739,7 +872,11 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
739
872
  this.ensurePlaceholderAtBottom();
740
873
  }
741
874
  }
742
- }));
875
+ if (state.type === IChatToolInvocation.StateKind.Completed || state.type === IChatToolInvocation.StateKind.Cancelled) {
876
+ queueMicrotask(() => this._toolStateTracking.delete(iconAutorun));
877
+ }
878
+ });
879
+ this._toolStateTracking.add(iconAutorun);
743
880
  } else {
744
881
  itemWrapper.insertBefore(iconElement, itemWrapper.firstChild);
745
882
  }
@@ -805,20 +942,7 @@ let ChatSubagentContentPart = ChatSubagentContentPart_1 = class ChatSubagentCont
805
942
  }
806
943
  }
807
944
  hasSameContent(other, _followingContent, _element) {
808
- if (other.kind === "markdownContent") {
809
- return true;
810
- }
811
- if (other.kind === "hook" && other.subAgentInvocationId) {
812
- return this.subAgentInvocationId === other.subAgentInvocationId;
813
- }
814
- if ((other.kind === "toolInvocation" || other.kind === "toolInvocationSerialized") && (other.subAgentInvocationId || ChatSubagentContentPart_1.isParentSubagentTool(other))) {
815
- const otherEffectiveId = other.subAgentInvocationId ?? other.toolCallId;
816
- if (this.subAgentInvocationId && otherEffectiveId) {
817
- return this.subAgentInvocationId === otherEffectiveId;
818
- }
819
- return !this.subAgentInvocationId && !otherEffectiveId;
820
- }
821
- return false;
945
+ return (other.kind === "toolInvocation" || other.kind === "toolInvocationSerialized") && ChatSubagentContentPart_1.isParentSubagentTool(other) && this.subAgentInvocationId === other.toolCallId;
822
946
  }
823
947
  };
824
948
  ChatSubagentContentPart = ChatSubagentContentPart_1 = ( __decorate([( __param(8, IInstantiationService)), ( __param(9, IChatMarkdownAnchorService)), ( __param(10, IHoverService)), ( __param(11, IConfigurationService))], ChatSubagentContentPart));
@@ -1,14 +1,11 @@
1
1
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
- import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
4
3
  import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
5
4
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
6
5
  import { IContextMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
7
- import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
8
6
  import { IChatMode } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatModes";
9
7
  import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
10
8
  import { IHandOff } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptFileParser";
11
- import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
12
9
  export interface INextPromptSelection {
13
10
  readonly handoff: IHandOff;
14
11
  readonly agentId?: string;
@@ -19,9 +16,6 @@ export declare class ChatSuggestNextWidget extends Disposable {
19
16
  private readonly contextMenuService;
20
17
  private readonly chatSessionsService;
21
18
  private readonly contextKeyService;
22
- private readonly commandService;
23
- private readonly workspaceContextService;
24
- private readonly chatWidgetService;
25
19
  readonly domNode: HTMLElement;
26
20
  private readonly _onDidChangeHeight;
27
21
  readonly onDidChangeHeight: Event<void>;
@@ -31,19 +25,11 @@ export declare class ChatSuggestNextWidget extends Disposable {
31
25
  private titleElement;
32
26
  private _currentMode;
33
27
  private buttonDisposables;
34
- constructor(configurationService: IConfigurationService, contextMenuService: IContextMenuService, chatSessionsService: IChatSessionsService, contextKeyService: IContextKeyService, commandService: ICommandService, workspaceContextService: IWorkspaceContextService, chatWidgetService: IChatWidgetService);
28
+ constructor(configurationService: IConfigurationService, contextMenuService: IContextMenuService, chatSessionsService: IChatSessionsService, contextKeyService: IContextKeyService);
35
29
  get height(): number;
36
30
  getCurrentMode(): IChatMode | undefined;
37
31
  private createSuggestNextWidget;
38
32
  render(mode: IChatMode): void;
39
- private createAgentsWindowHandoffButton;
40
- /**
41
- * Pull a compact transcript of the current chat — last user request and
42
- * the assistant reply — so the Agents-window CLI session has the context
43
- * that produced this handoff, not just the static handoff prompt.
44
- */
45
- private captureChatTranscript;
46
- private composeAgentsWindowQuery;
47
33
  private createPromptButton;
48
34
  private createAutopilotButton;
49
35
  hide(): void;