@mcp-b/react-components 0.16.1 → 0.17.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 (284) hide show
  1. package/dist/{AgentChat-CrlpbvQJ.d.ts → AgentChat-CRuMi1Pb.d.ts} +4 -10
  2. package/dist/AgentMessageParts-CyD2UB3V.d.ts +46 -0
  3. package/dist/AgentToolRunsContext-BVe4stgw.d.ts +21 -0
  4. package/dist/{CodeBlock-BmB4Xaqq.js → CodeBlock-Co1noLbC.js} +2 -2
  5. package/dist/{CodeBlock-BRajW4QU.d.ts → CodeBlock-Dnpr88ZQ.d.ts} +2 -2
  6. package/dist/Collapsible-N64ASIQr.d.ts +119 -0
  7. package/dist/{Combobox-B9Fcd6q-.d.ts → Combobox-CYc37s5l.d.ts} +11 -33
  8. package/dist/{FileTree-CkVbIMWV.js → FileTree-B7bBsUyU.js} +7 -7
  9. package/dist/{Menu-Bgu-ufb5.d.ts → Menu-L6MZm-7N.d.ts} +15 -56
  10. package/dist/{Message-BkMdE3bS.js → Message-C4eYRogZ.js} +3 -3
  11. package/dist/{ModelSelector-SlJNgwKY.js → ModelSelector-BNrZlY_Y.js} +5 -5
  12. package/dist/{PromptInput-BWTuXMOD.d.ts → PromptInput-OLfXPuHM.d.ts} +39 -67
  13. package/dist/{ResponsiveSidebarShell-Dd9DCcBT.d.ts → ResponsiveSidebarShell-CsAh4NyL.d.ts} +1 -0
  14. package/dist/{Select-BeEsefzh.d.ts → Select-CwSqP07Y.d.ts} +14 -42
  15. package/dist/{Tabs-3Zc4tb9D.d.ts → Tabs-9zddXDQo.d.ts} +5 -19
  16. package/dist/{ThinkChat-CzC-zNGA.js → ThinkChat-DInElus-.js} +53 -26
  17. package/dist/{ThinkChatActivity-BFQnb2ct.d.ts → ThinkChatActivity-BgesTfZ4.d.ts} +12 -4
  18. package/dist/{ThinkChatContext-C3Eb1Xpi.d.ts → ThinkChatContext-DrsZqdaO.d.ts} +1 -1
  19. package/dist/ThinkRecoveryNotice-DFIcG9UX.d.ts +19 -0
  20. package/dist/{Toggle-CAAlNl-M.d.ts → Toggle-DaXpe1Lc.d.ts} +1 -1
  21. package/dist/{ToggleGroup-8hPv-b69.d.ts → ToggleGroup-yseEWkOC.d.ts} +3 -4
  22. package/dist/{Workspace-D39LxGvP.d.ts → Workspace-C9RFoxcu.d.ts} +1 -1
  23. package/dist/WorkspaceExplorer-sZewzT2O.d.ts +32 -0
  24. package/dist/{WorkspaceFile-DOZkPwzu.d.ts → WorkspaceFile-C8UzuSH4.d.ts} +1 -1
  25. package/dist/{WorkspaceFileView-rSN_yT0L.js → WorkspaceFileView-DNdGAEiX.js} +5 -5
  26. package/dist/{WorkspaceLink-DIPbXrUM.js → WorkspaceLink-B1ykV1dS.js} +15 -29
  27. package/dist/class-names-Bk-QLWWI.js +11 -0
  28. package/dist/components/Accordion.d.ts +5 -15
  29. package/dist/components/Accordion.js +11 -10
  30. package/dist/components/Activity.d.ts +5 -10
  31. package/dist/components/Activity.js +2 -2
  32. package/dist/components/AgentActivity.js +1 -1
  33. package/dist/components/AgentActivityPreview.js +2 -2
  34. package/dist/components/AgentAttention.d.ts +1 -1
  35. package/dist/components/AgentAttention.js +1 -1
  36. package/dist/components/AgentChat.d.ts +2 -2
  37. package/dist/components/AgentChat.js +27 -164
  38. package/dist/components/AgentChatMessageEditor.js +1 -1
  39. package/dist/components/AgentConnection.js +4 -4
  40. package/dist/components/AgentMessageParts.d.ts +2 -0
  41. package/dist/components/AgentMessageParts.js +119 -0
  42. package/dist/components/AgentToolDetail.d.ts +55 -0
  43. package/dist/components/AgentToolDetail.js +98 -0
  44. package/dist/components/AgentToolRunsContext.d.ts +2 -0
  45. package/dist/components/AgentToolRunsContext.js +16 -0
  46. package/dist/components/AlertDialog.d.ts +7 -19
  47. package/dist/components/AlertDialog.js +21 -32
  48. package/dist/components/AppTopBar.d.ts +4 -1
  49. package/dist/components/AppTopBar.js +5 -5
  50. package/dist/components/Approval.d.ts +102 -0
  51. package/dist/components/Approval.js +227 -0
  52. package/dist/components/Artifact.d.ts +2 -4
  53. package/dist/components/Artifact.js +3 -3
  54. package/dist/components/Autocomplete.d.ts +11 -33
  55. package/dist/components/Autocomplete.js +23 -30
  56. package/dist/components/Avatar.d.ts +3 -11
  57. package/dist/components/Avatar.js +13 -12
  58. package/dist/components/BrowserLiveView.js +2 -2
  59. package/dist/components/BrowserReplay.js +2 -2
  60. package/dist/components/BrowserRunPanel.js +58 -78
  61. package/dist/components/Button.js +4 -9
  62. package/dist/components/ChainOfThought.d.ts +5 -11
  63. package/dist/components/ChainOfThought.js +3 -2
  64. package/dist/components/ChatGptSignInScreen.js +3 -3
  65. package/dist/components/Checkbox.d.ts +2 -4
  66. package/dist/components/Checkbox.js +6 -5
  67. package/dist/components/CheckboxGroup.d.ts +1 -3
  68. package/dist/components/CheckboxGroup.js +15 -14
  69. package/dist/components/Checkpoint.d.ts +64 -0
  70. package/dist/components/Checkpoint.js +63 -0
  71. package/dist/components/CodeBlock.d.ts +1 -1
  72. package/dist/components/CodeBlock.js +1 -1
  73. package/dist/components/CodexModelSelector.d.ts +1 -1
  74. package/dist/components/CodexModelSelector.js +2 -2
  75. package/dist/components/Collapsible.d.ts +1 -124
  76. package/dist/components/Collapsible.js +7 -10
  77. package/dist/components/Combobox.d.ts +1 -1
  78. package/dist/components/Combobox.js +23 -30
  79. package/dist/components/Commit.d.ts +5 -11
  80. package/dist/components/Commit.js +6 -5
  81. package/dist/components/Context.js +1 -1
  82. package/dist/components/ContextMenu.d.ts +21 -37
  83. package/dist/components/ContextMenu.js +34 -51
  84. package/dist/components/Conversation.d.ts +2 -4
  85. package/dist/components/Conversation.js +2 -2
  86. package/dist/components/DescriptionListParts.js +1 -1
  87. package/dist/components/Dialog.d.ts +6 -17
  88. package/dist/components/Dialog.js +17 -24
  89. package/dist/components/EnvironmentVariables.d.ts +1 -1
  90. package/dist/components/EnvironmentVariables.js +4 -3
  91. package/dist/components/Field.d.ts +17 -20
  92. package/dist/components/Field.js +16 -16
  93. package/dist/components/Fieldset.d.ts +2 -7
  94. package/dist/components/Fieldset.js +7 -6
  95. package/dist/components/FileTree.js +1 -1
  96. package/dist/components/Form.d.ts +1 -4
  97. package/dist/components/Form.js +3 -2
  98. package/dist/components/GithubMotionMark.js +1 -1
  99. package/dist/components/InlineCitation.d.ts +66 -0
  100. package/dist/components/InlineCitation.js +142 -0
  101. package/dist/components/Input.d.ts +1 -4
  102. package/dist/components/Input.js +3 -2
  103. package/dist/components/Marker.js +1 -1
  104. package/dist/components/McpConnectionRequest.js +2 -2
  105. package/dist/components/McpServerPicker.d.ts +1 -1
  106. package/dist/components/McpServerPicker.js +6 -5
  107. package/dist/components/Menu.d.ts +1 -1
  108. package/dist/components/Menu.js +33 -52
  109. package/dist/components/Menubar.d.ts +22 -43
  110. package/dist/components/Menubar.js +36 -53
  111. package/dist/components/Message.d.ts +3 -6
  112. package/dist/components/Message.js +1 -1
  113. package/dist/components/MessageScroller.d.ts +1 -1
  114. package/dist/components/MessageScroller.js +3 -3
  115. package/dist/components/Meter.d.ts +5 -20
  116. package/dist/components/Meter.js +11 -10
  117. package/dist/components/ModelSelector.d.ts +2 -6
  118. package/dist/components/ModelSelector.js +1 -1
  119. package/dist/components/NavigationMenu.d.ts +11 -33
  120. package/dist/components/NavigationMenu.js +23 -30
  121. package/dist/components/NumberField.d.ts +6 -24
  122. package/dist/components/NumberField.js +13 -12
  123. package/dist/components/Plan.d.ts +103 -0
  124. package/dist/components/Plan.js +113 -0
  125. package/dist/components/Popover.d.ts +9 -36
  126. package/dist/components/Popover.js +23 -34
  127. package/dist/components/PreviewCard.d.ts +6 -24
  128. package/dist/components/PreviewCard.js +13 -24
  129. package/dist/components/PricingBillingToggle.js +1 -1
  130. package/dist/components/PricingFAQ.js +1 -1
  131. package/dist/components/PricingPlanCard.js +3 -3
  132. package/dist/components/PricingUsageCalculator.js +2 -2
  133. package/dist/components/Progress.d.ts +3 -8
  134. package/dist/components/Progress.js +7 -10
  135. package/dist/components/PromptInput.d.ts +2 -2
  136. package/dist/components/PromptInput.js +52 -200
  137. package/dist/components/Queue.d.ts +6 -16
  138. package/dist/components/Queue.js +2 -2
  139. package/dist/components/RadioGroup.d.ts +3 -8
  140. package/dist/components/RadioGroup.js +7 -10
  141. package/dist/components/Reasoning.d.ts +4 -8
  142. package/dist/components/Reasoning.js +3 -3
  143. package/dist/components/ResizableSidePanel.js +2 -2
  144. package/dist/components/ResponsiveSidebarShell.d.ts +1 -1
  145. package/dist/components/ResponsiveSidebarShell.js +4 -3
  146. package/dist/components/ScrollArea.d.ts +5 -20
  147. package/dist/components/ScrollArea.js +11 -10
  148. package/dist/components/Select.d.ts +1 -1
  149. package/dist/components/Select.js +32 -55
  150. package/dist/components/Separator.d.ts +1 -5
  151. package/dist/components/Separator.js +3 -6
  152. package/dist/components/Slider.d.ts +6 -19
  153. package/dist/components/Slider.js +15 -14
  154. package/dist/components/Sources.d.ts +4 -9
  155. package/dist/components/Sources.js +3 -2
  156. package/dist/components/Stepper.js +2 -2
  157. package/dist/components/SubagentRunDetails.js +1 -1
  158. package/dist/components/SubagentRunIndicator.js +2 -2
  159. package/dist/components/SubagentRunList.js +1 -2
  160. package/dist/components/SubagentRunSelector.d.ts +2 -11
  161. package/dist/components/SubagentRunSelector.js +16 -15
  162. package/dist/components/Switch.d.ts +2 -5
  163. package/dist/components/Switch.js +5 -8
  164. package/dist/components/Tabs.d.ts +2 -2
  165. package/dist/components/Tabs.js +10 -16
  166. package/dist/components/Task.d.ts +4 -9
  167. package/dist/components/Task.js +4 -3
  168. package/dist/components/Terminal.d.ts +2 -3
  169. package/dist/components/Terminal.js +3 -3
  170. package/dist/components/TestResults.d.ts +4 -9
  171. package/dist/components/TestResults.js +3 -2
  172. package/dist/components/Textarea.js +1 -1
  173. package/dist/components/ThemeModeControl.js +1 -1
  174. package/dist/components/ThinkChat.d.ts +21 -11
  175. package/dist/components/ThinkChat.js +5 -3
  176. package/dist/components/ThinkChatActivity.d.ts +1 -1
  177. package/dist/components/ThinkChatActivity.js +26 -7
  178. package/dist/components/ThinkChatContext.d.ts +1 -1
  179. package/dist/components/ThinkChatToolPanels.js +2 -2
  180. package/dist/components/ThinkExecutionDetail.js +2 -2
  181. package/dist/components/ThinkExecutionStatus.js +2 -2
  182. package/dist/components/ThinkExecutionWorkbench.js +2 -2
  183. package/dist/components/ThinkFullApp.d.ts +33 -9
  184. package/dist/components/ThinkFullApp.js +98 -69
  185. package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
  186. package/dist/components/ThinkFullAppViewSwitch.js +2 -2
  187. package/dist/components/ThinkPendingApproval.d.ts +60 -0
  188. package/dist/components/ThinkPendingApproval.js +99 -0
  189. package/dist/components/ThinkRecoveryNotice.d.ts +2 -0
  190. package/dist/components/ThinkRecoveryNotice.js +40 -0
  191. package/dist/components/ThinkRoutine.js +1 -0
  192. package/dist/components/ThinkRoutineBrowser.js +6 -6
  193. package/dist/components/ThinkRoutineDetail.js +1 -1
  194. package/dist/components/ThinkRoutineForm.js +2 -2
  195. package/dist/components/ThinkRoutineLibrary.d.ts +9 -0
  196. package/dist/components/ThinkRoutineLibrary.js +67 -20
  197. package/dist/components/ThinkRoutineRuns.js +1 -1
  198. package/dist/components/ThinkThreadPicker.js +2 -2
  199. package/dist/components/ThinkThreadShell.d.ts +1 -1
  200. package/dist/components/Toast.d.ts +7 -28
  201. package/dist/components/Toast.js +15 -14
  202. package/dist/components/Toggle.d.ts +1 -1
  203. package/dist/components/Toggle.js +5 -5
  204. package/dist/components/ToggleGroup.d.ts +1 -1
  205. package/dist/components/ToggleGroup.js +8 -15
  206. package/dist/components/ToolApproval.d.ts +28 -0
  207. package/dist/components/ToolApproval.js +35 -0
  208. package/dist/components/ToolInvocation.d.ts +26 -0
  209. package/dist/components/ToolInvocation.js +72 -0
  210. package/dist/components/Toolbar.d.ts +6 -24
  211. package/dist/components/Toolbar.js +13 -12
  212. package/dist/components/Tooltip.d.ts +3 -9
  213. package/dist/components/Tooltip.js +7 -10
  214. package/dist/components/WebPreview.d.ts +1 -2
  215. package/dist/components/WebPreview.js +4 -3
  216. package/dist/components/Workspace.d.ts +1 -1
  217. package/dist/components/Workspace.js +5 -20
  218. package/dist/components/WorkspaceBrowser.d.ts +1 -1
  219. package/dist/components/WorkspaceBrowser.js +3 -3
  220. package/dist/components/WorkspaceExplorer.d.ts +3 -31
  221. package/dist/components/WorkspaceExplorer.js +3 -3
  222. package/dist/components/WorkspaceFile.d.ts +1 -1
  223. package/dist/components/WorkspaceFileView.d.ts +1 -1
  224. package/dist/components/WorkspaceFileView.js +1 -1
  225. package/dist/components/WorkspaceHeader.js +1 -1
  226. package/dist/components/WorkspaceLink.js +1 -1
  227. package/dist/components/icons.d.ts +2 -2
  228. package/dist/components/icons.js +2 -2
  229. package/dist/{copy-button-DtPMgN7e.d.ts → copy-button-CQx3LQAC.d.ts} +1 -2
  230. package/dist/{copy-button-Dejn5heL.js → copy-button-cYsJBauI.js} +1 -1
  231. package/dist/{icons-CpfUer49.js → icons--FqCZEc3.js} +3 -2
  232. package/dist/{icons-GQd1xF4e.d.ts → icons-DpUqY8Mp.d.ts} +6 -1
  233. package/dist/styles/agent-activity-preview.css +4 -0
  234. package/dist/styles/agent-chat.css +0 -41
  235. package/dist/styles/agent-connection.css +0 -12
  236. package/dist/styles/agent-tool-detail.css +54 -0
  237. package/dist/styles/approval.css +172 -0
  238. package/dist/styles/artifact.css +0 -12
  239. package/dist/styles/browser-run-panel.css +5 -2
  240. package/dist/styles/chain-of-thought.css +0 -8
  241. package/dist/styles/checkpoint.css +58 -0
  242. package/dist/styles/combobox.css +1 -1
  243. package/dist/styles/commit.css +0 -21
  244. package/dist/styles/context-menu.css +0 -8
  245. package/dist/styles/environment-variables.css +0 -13
  246. package/dist/styles/file-tree.css +0 -16
  247. package/dist/styles/index.css +8 -4
  248. package/dist/styles/inline-citation.css +107 -0
  249. package/dist/styles/mcp-server-picker.css +0 -30
  250. package/dist/styles/menu.css +0 -29
  251. package/dist/styles/menubar.css +0 -8
  252. package/dist/styles/message-scroller.css +0 -12
  253. package/dist/styles/message.css +0 -12
  254. package/dist/styles/model-selector.css +0 -20
  255. package/dist/styles/plan.css +127 -0
  256. package/dist/styles/popover.css +0 -36
  257. package/dist/styles/prompt-input.css +2 -195
  258. package/dist/styles/recipes.css +114 -5
  259. package/dist/styles/responsive-sidebar-shell.css +16 -19
  260. package/dist/styles/sources.css +0 -8
  261. package/dist/styles/subagent-run.css +12 -70
  262. package/dist/styles/task.css +0 -16
  263. package/dist/styles/test-results.css +0 -13
  264. package/dist/styles/think-full-app.css +12 -38
  265. package/dist/styles/think-routine-library.css +12 -20
  266. package/dist/styles/think-thread-picker.css +15 -0
  267. package/dist/styles/toast.css +0 -7
  268. package/dist/styles/utilities.css +31 -0
  269. package/dist/styles/web-preview.css +0 -21
  270. package/dist/styles/workspace-explorer.css +5 -55
  271. package/dist/think-agent-Cip5KAPj.d.ts +7 -0
  272. package/dist/utils/codex-model-catalog.d.ts +4 -4
  273. package/dist/utils/structured-code.d.ts +1 -1
  274. package/dist/workspace-path-L_KmjRjq.js +26 -0
  275. package/package.json +3 -4
  276. package/dist/class-names-9UtZwb0J.js +0 -12
  277. package/dist/components/AppFrame.d.ts +0 -24
  278. package/dist/components/AppFrame.js +0 -25
  279. package/dist/components/Shell.d.ts +0 -163
  280. package/dist/components/Shell.js +0 -137
  281. package/dist/components/SubagentRun.d.ts +0 -86
  282. package/dist/components/SubagentRun.js +0 -108
  283. package/dist/styles/app-frame.css +0 -15
  284. package/dist/styles/shell.css +0 -122
@@ -1,6 +1,6 @@
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
1
2
  import { Collapsible } from "./Collapsible.js";
2
- import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { C as LinkIcon, l as ChevronRightIcon } from "../icons-CpfUer49.js";
3
+ import { u as ChevronRightIcon, w as LinkIcon } from "../icons--FqCZEc3.js";
4
4
  import "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Sources.tsx
@@ -29,6 +29,7 @@ function Sources({ className, ref, ...props }) {
29
29
  ref,
30
30
  className: cx("sources", className),
31
31
  ...props,
32
+ "data-recipe": "disclosure-stack",
32
33
  unstyled: true
33
34
  });
34
35
  }
@@ -1,5 +1,5 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { B as SpinnerIcon, o as CheckIcon } from "../icons-CpfUer49.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
+ import { V as SpinnerIcon, s as CheckIcon } from "../icons--FqCZEc3.js";
3
3
  import { t as assignRef } from "../merge-refs-DF_7w2x_.js";
4
4
  import * as React from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
2
  import { Progress } from "./Progress.js";
3
3
  import * as React from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { B as SpinnerIcon, U as StopIcon, o as CheckIcon, q as WarningIcon } from "../icons-CpfUer49.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
+ import { J as WarningIcon, V as SpinnerIcon, W as StopIcon, s as CheckIcon } from "../icons--FqCZEc3.js";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/SubagentRunIndicator.tsx
@@ -1,4 +1,4 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
2
  import { SubagentRunSelector } from "./SubagentRunSelector.js";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -15,7 +15,6 @@ function SubagentRunList({ className, onSelect, runs, selectedRunId, ref, ...pro
15
15
  className: "subagent-run__list-item",
16
16
  children: /* @__PURE__ */ jsx(SubagentRunSelector, {
17
17
  run,
18
- naniteIndex: run.order,
19
18
  selected: run.runId === selectedRunId,
20
19
  onSelect
21
20
  })
@@ -4,16 +4,9 @@ import { UIMessage } from "ai";
4
4
  import { AgentToolRunPart, AgentToolRunState } from "agents/agent-tools";
5
5
 
6
6
  //#region src/components/SubagentRunSelector.d.ts
7
- interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<ButtonProps, "children" | "className" | "color" | "onSelect" | "size" | "variant"> {
8
- className?: string;
7
+ interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<ButtonProps, "children" | "color" | "onSelect" | "size" | "variant"> {
9
8
  /** Complete retained-run state returned by `useAgentToolEvents()`. */
10
- run?: AgentToolRunState<Part>;
11
- /**
12
- * @deprecated Pass `run` so the selector derives its content from the whole
13
- * upstream object. Retained for the pre-0.15 presentation-only API.
14
- */
15
- children?: React.ReactNode;
16
- naniteIndex?: number;
9
+ run: AgentToolRunState<Part>;
17
10
  selected?: boolean;
18
11
  /** Short supplementary status shown on hover and keyboard focus. `false` disables it. */
19
12
  tooltip?: React.ReactNode | false;
@@ -30,8 +23,6 @@ interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["pa
30
23
  */
31
24
  declare function SubagentRunSelector<Part extends AgentToolRunPart = UIMessage["parts"][number]>({
32
25
  className,
33
- children,
34
- naniteIndex,
35
26
  onClick,
36
27
  onSelect,
37
28
  run,
@@ -1,10 +1,10 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
2
  import { Button } from "./Button.js";
3
3
  import { Tooltip } from "./Tooltip.js";
4
4
  import { NaniteMark } from "./NaniteScene.js";
5
5
  import { SubagentRunIndicator, getSubagentRunName, getSubagentRunTooltip } from "./SubagentRunIndicator.js";
6
6
  import "react";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/SubagentRunSelector.tsx
9
9
  /**
10
10
  * Compact selector for a retained Cloudflare Agent Tool run.
@@ -14,8 +14,8 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  * an adjacent detail surface; it never invents a second transcript or expands
15
15
  * child content inline.
16
16
  */
17
- function SubagentRunSelector({ className, children, naniteIndex = 0, onClick, onSelect, run, selected = false, tooltip, ref, "aria-label": ariaLabel, ...props }) {
18
- const name = run ? getSubagentRunName(run) : void 0;
17
+ function SubagentRunSelector({ className, onClick, onSelect, run, selected = false, tooltip, ref, "aria-label": ariaLabel, ...props }) {
18
+ const name = getSubagentRunName(run);
19
19
  const button = /* @__PURE__ */ jsxs(Button, {
20
20
  ref,
21
21
  type: "button",
@@ -23,24 +23,25 @@ function SubagentRunSelector({ className, children, naniteIndex = 0, onClick, on
23
23
  color: "neutral",
24
24
  size: "xs",
25
25
  "data-slot": "subagent-run-selector",
26
- "data-status": run?.status,
26
+ "data-status": run.status,
27
27
  className: cx("subagent-run__selector", className),
28
28
  "aria-pressed": selected,
29
- "aria-label": ariaLabel ?? (run ? `Open ${name}, ${run.status}` : void 0),
29
+ "aria-label": ariaLabel ?? `Open ${name}, ${run.status}`,
30
30
  onClick: (event) => {
31
31
  onClick?.(event);
32
- if (!event.defaultPrevented && run) onSelect?.(run);
32
+ if (!event.defaultPrevented) onSelect?.(run);
33
33
  },
34
34
  ...props,
35
- children: [/* @__PURE__ */ jsx(NaniteMark, { index: naniteIndex }), run ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
36
- className: "subagent-run__title",
37
- children: name
38
- }), /* @__PURE__ */ jsx(SubagentRunIndicator, { run })] }) : /* @__PURE__ */ jsx("span", {
39
- className: "subagent-run__trigger-content",
40
- children
41
- })]
35
+ children: [
36
+ /* @__PURE__ */ jsx(NaniteMark, { index: run.order }),
37
+ /* @__PURE__ */ jsx("span", {
38
+ className: "subagent-run__title",
39
+ children: name
40
+ }),
41
+ /* @__PURE__ */ jsx(SubagentRunIndicator, { run })
42
+ ]
42
43
  });
43
- const tooltipContent = tooltip === false ? null : tooltip ?? (run ? getSubagentRunTooltip(run) : null);
44
+ const tooltipContent = tooltip === false ? null : tooltip ?? getSubagentRunTooltip(run);
44
45
  if (!tooltipContent) return button;
45
46
  return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
46
47
  render: button,
@@ -2,17 +2,14 @@ import * as React from "react";
2
2
  import { Switch as Switch$1 } from "@base-ui/react/switch";
3
3
 
4
4
  //#region src/components/Switch.d.ts
5
- interface SwitchProps extends Omit<React.ComponentPropsWithRef<typeof Switch$1.Root>, "className"> {
6
- className?: string;
5
+ interface SwitchProps extends React.ComponentPropsWithRef<typeof Switch$1.Root> {
7
6
  /**
8
7
  * The size of the switch.
9
8
  * @default 'default'
10
9
  */
11
10
  size?: "sm" | "md" | "lg" | "default";
12
11
  }
13
- interface SwitchThumbProps extends Omit<React.ComponentPropsWithRef<typeof Switch$1.Thumb>, "className"> {
14
- className?: string;
15
- }
12
+ interface SwitchThumbProps extends React.ComponentPropsWithRef<typeof Switch$1.Thumb> {}
16
13
  /**
17
14
  * A toggle switch component for binary choices.
18
15
  *
@@ -1,3 +1,4 @@
1
+ import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
1
2
  import "react";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import { Switch as Switch$1 } from "@base-ui/react/switch";
@@ -23,13 +24,9 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
23
24
  *
24
25
  * @see {@link https://base-ui.com/react/components/switch | Base UI Switch}
25
26
  */
26
- function SwitchRoot({ size = "default", className = "", ref, ...props }) {
27
+ function SwitchRoot({ size = "default", className, ref, ...props }) {
27
28
  const normalizedSize = size === "md" ? "default" : size;
28
- const classes = [
29
- "switch",
30
- normalizedSize !== "default" && `switch--${normalizedSize}`,
31
- className
32
- ].filter(Boolean).join(" ");
29
+ const classes = mergeBaseClassName(["switch", normalizedSize !== "default" && `switch--${normalizedSize}`].filter(Boolean).join(" "), className);
33
30
  return /* @__PURE__ */ jsx(Switch$1.Root, {
34
31
  ref,
35
32
  "data-slot": "switch",
@@ -41,8 +38,8 @@ function SwitchRoot({ size = "default", className = "", ref, ...props }) {
41
38
  /**
42
39
  * The thumb indicator for the Switch component.
43
40
  */
44
- function SwitchThumb({ className = "", ref, ...props }) {
45
- const classes = ["switch__thumb", className].filter(Boolean).join(" ");
41
+ function SwitchThumb({ className, ref, ...props }) {
42
+ const classes = mergeBaseClassName(["switch__thumb"].filter(Boolean).join(" "), className);
46
43
  return /* @__PURE__ */ jsx(Switch$1.Thumb, {
47
44
  ref,
48
45
  "data-slot": "switch-thumb",
@@ -1,2 +1,2 @@
1
- import { a as TabsListVariantsOptions, i as TabsListProps, n as TabProps, o as TabsProps, r as Tabs, s as tabsListVariants, t as TabPanelProps } from "../Tabs-3Zc4tb9D.js";
2
- export { TabPanelProps, TabProps, Tabs, TabsListProps, TabsListVariantsOptions, TabsProps, tabsListVariants };
1
+ import { a as TabsProps, i as TabsListProps, n as TabProps, r as Tabs, t as TabPanelProps } from "../Tabs-9zddXDQo.js";
2
+ export { TabPanelProps, TabProps, Tabs, TabsListProps, TabsProps };
@@ -1,3 +1,4 @@
1
+ import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
1
2
  import "react";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
@@ -26,12 +27,8 @@ function tabsListVariants({ variant = "default", className } = {}) {
26
27
  *
27
28
  * @see {@link https://base-ui.com/react/components/tabs | Base UI Tabs}
28
29
  */
29
- function TabsRoot({ orientation = "horizontal", variant = "default", className = "", ref, ...props }) {
30
- const classes = [
31
- "tabs",
32
- variant !== "default" && `tabs--${variant}`,
33
- className
34
- ].filter(Boolean).join(" ");
30
+ function TabsRoot({ orientation = "horizontal", variant = "default", className, ref, ...props }) {
31
+ const classes = mergeBaseClassName(["tabs", variant !== "default" && `tabs--${variant}`].filter(Boolean).join(" "), className);
35
32
  return /* @__PURE__ */ jsx(Tabs$1.Root, {
36
33
  ref,
37
34
  "data-orientation": orientation,
@@ -41,11 +38,8 @@ function TabsRoot({ orientation = "horizontal", variant = "default", className =
41
38
  ...props
42
39
  });
43
40
  }
44
- function TabsList({ className = "", variant = "default", ref, ...props }) {
45
- const classes = tabsListVariants({
46
- variant,
47
- className
48
- });
41
+ function TabsList({ className, variant = "default", ref, ...props }) {
42
+ const classes = mergeBaseClassName(tabsListVariants({ variant }), className);
49
43
  return /* @__PURE__ */ jsx(Tabs$1.List, {
50
44
  ref,
51
45
  "data-slot": "tabs-list",
@@ -54,8 +48,8 @@ function TabsList({ className = "", variant = "default", ref, ...props }) {
54
48
  ...props
55
49
  });
56
50
  }
57
- function Tab({ className = "", ref, ...props }) {
58
- const classes = ["tabs__tab", className].filter(Boolean).join(" ");
51
+ function Tab({ className, ref, ...props }) {
52
+ const classes = mergeBaseClassName("tabs__tab", className);
59
53
  return /* @__PURE__ */ jsx(Tabs$1.Tab, {
60
54
  ref,
61
55
  "data-slot": "tabs-trigger",
@@ -63,8 +57,8 @@ function Tab({ className = "", ref, ...props }) {
63
57
  ...props
64
58
  });
65
59
  }
66
- function TabPanel({ className = "", ref, ...props }) {
67
- const classes = ["tabs__panel", className].filter(Boolean).join(" ");
60
+ function TabPanel({ className, ref, ...props }) {
61
+ const classes = mergeBaseClassName("tabs__panel", className);
68
62
  return /* @__PURE__ */ jsx(Tabs$1.Panel, {
69
63
  ref,
70
64
  "data-slot": "tabs-content",
@@ -80,4 +74,4 @@ const Tabs = {
80
74
  Panel: TabPanel
81
75
  };
82
76
  //#endregion
83
- export { Tabs, tabsListVariants };
77
+ export { Tabs };
@@ -1,10 +1,8 @@
1
- import { Collapsible } from "./Collapsible.js";
1
+ import { t as Collapsible } from "../Collapsible-N64ASIQr.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/Task.d.ts
5
- interface TaskProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
6
- className?: string;
7
- }
5
+ interface TaskProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {}
8
6
  /**
9
7
  * A collapsible task/workflow list. Compose with TaskTrigger, TaskContent,
10
8
  * TaskItem, and TaskItemFile to show structured progress for a multi-step
@@ -36,8 +34,7 @@ declare function Task({
36
34
  }: TaskProps & {
37
35
  ref?: React.Ref<HTMLDivElement>;
38
36
  }): React.JSX.Element;
39
- interface TaskTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
40
- className?: string;
37
+ interface TaskTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled"> {
41
38
  /** Heading text shown in the trigger row. */
42
39
  title: string;
43
40
  }
@@ -53,9 +50,7 @@ declare function TaskTrigger({
53
50
  }: TaskTriggerProps & {
54
51
  ref?: React.Ref<HTMLButtonElement>;
55
52
  }): React.JSX.Element;
56
- interface TaskContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
57
- className?: string;
58
- }
53
+ interface TaskContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "unstyled"> {}
59
54
  /**
60
55
  * The collapsible panel containing TaskItem children.
61
56
  */
@@ -1,6 +1,6 @@
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
1
2
  import { Collapsible } from "./Collapsible.js";
2
- import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { R as SearchIcon, l as ChevronRightIcon, v as FileIcon } from "../icons-CpfUer49.js";
3
+ import { u as ChevronRightIcon, y as FileIcon, z as SearchIcon } from "../icons--FqCZEc3.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Task.tsx
@@ -33,6 +33,7 @@ function Task({ className, defaultOpen = true, ref, ...props }) {
33
33
  className: cx("task", className),
34
34
  defaultOpen,
35
35
  ...props,
36
+ "data-recipe": "disclosure-stack",
36
37
  unstyled: true
37
38
  });
38
39
  }
@@ -61,7 +62,7 @@ function TaskTrigger({ className, title, children, ref, ...props }) {
61
62
  children: /* @__PURE__ */ jsx(SearchIcon, {})
62
63
  }),
63
64
  /* @__PURE__ */ jsx("span", {
64
- className: "task__trigger-title",
65
+ className: "task__trigger-title sigvelo-truncate",
65
66
  children: title
66
67
  }),
67
68
  /* @__PURE__ */ jsx("span", {
@@ -1,5 +1,5 @@
1
1
  import { r as ButtonProps } from "../Button-FX_hpqxm.js";
2
- import { t as CopyButtonProps } from "../copy-button-DtPMgN7e.js";
2
+ import { t as CopyButtonProps } from "../copy-button-CQx3LQAC.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/Terminal.d.ts
@@ -103,8 +103,7 @@ declare function TerminalCopyButton({
103
103
  onClick,
104
104
  ...props
105
105
  }: TerminalCopyButtonProps): React.JSX.Element;
106
- interface TerminalClearButtonProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color" | "className" | "onClick"> {
107
- className?: string;
106
+ interface TerminalClearButtonProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color" | "onClick"> {
108
107
  label?: string;
109
108
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
110
109
  }
@@ -1,8 +1,8 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { G as TerminalIcon, Y as XIcon } from "../icons-CpfUer49.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
+ import { K as TerminalIcon, X as XIcon } from "../icons--FqCZEc3.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Tooltip } from "./Tooltip.js";
5
- import { t as CopyButton } from "../copy-button-Dejn5heL.js";
5
+ import { t as CopyButton } from "../copy-button-cYsJBauI.js";
6
6
  import { Badge } from "./Badge.js";
7
7
  import { ScrollArea } from "./ScrollArea.js";
8
8
  import * as React from "react";
@@ -1,4 +1,4 @@
1
- import { Collapsible } from "./Collapsible.js";
1
+ import { t as Collapsible } from "../Collapsible-N64ASIQr.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/TestResults.d.ts
@@ -101,8 +101,7 @@ declare function TestResultsContent({
101
101
  }: TestResultsContentProps & {
102
102
  ref?: React.Ref<HTMLDivElement>;
103
103
  }): React.JSX.Element;
104
- interface TestSuiteProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
105
- className?: string;
104
+ interface TestSuiteProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {
106
105
  name: string;
107
106
  status: TestStatusValue;
108
107
  }
@@ -117,9 +116,7 @@ declare function TestSuite({
117
116
  }: TestSuiteProps & {
118
117
  ref?: React.Ref<HTMLDivElement>;
119
118
  }): React.JSX.Element;
120
- type TestSuiteNameProps = Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> & {
121
- className?: string;
122
- };
119
+ type TestSuiteNameProps = Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled"> & {};
123
120
  declare function TestSuiteName({
124
121
  className,
125
122
  children,
@@ -144,9 +141,7 @@ declare function TestSuiteStats({
144
141
  }: TestSuiteStatsProps & {
145
142
  ref?: React.Ref<HTMLDivElement>;
146
143
  }): React.JSX.Element;
147
- type TestSuiteContentProps = Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> & {
148
- className?: string;
149
- };
144
+ type TestSuiteContentProps = Omit<React.ComponentProps<typeof Collapsible.Panel>, "unstyled"> & {};
150
145
  declare function TestSuiteContent({
151
146
  className,
152
147
  children,
@@ -1,6 +1,6 @@
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
1
2
  import { Collapsible } from "./Collapsible.js";
2
- import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { B as SpinnerIcon, Y as XIcon, l as ChevronRightIcon, o as CheckIcon } from "../icons-CpfUer49.js";
3
+ import { V as SpinnerIcon, X as XIcon, s as CheckIcon, u as ChevronRightIcon } from "../icons--FqCZEc3.js";
4
4
  import { Badge } from "./Badge.js";
5
5
  import * as React from "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -52,6 +52,7 @@ function TestResults({ className, summary, children, ref, ...props }) {
52
52
  className: cx("test-results", className),
53
53
  "data-status": overall,
54
54
  ...props,
55
+ "data-recipe": "framed-panel",
55
56
  children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(TestResultsHeader, { children: [/* @__PURE__ */ jsx(TestResultsSummary, {}), /* @__PURE__ */ jsx(TestResultsProgress, {})] }), /* @__PURE__ */ jsx(TestResultsContent, {})] })
56
57
  })
57
58
  });
@@ -1,4 +1,4 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
2
  import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/components/Textarea.tsx
@@ -1,4 +1,4 @@
1
- import { A as MoonIcon, W as SunIcon, k as MonitorIcon } from "../icons-CpfUer49.js";
1
+ import { A as MonitorIcon, G as SunIcon, j as MoonIcon } from "../icons--FqCZEc3.js";
2
2
  import { Radio, RadioGroup } from "./RadioGroup.js";
3
3
  import { useTheme } from "./ThemeProvider.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,13 +1,16 @@
1
- import { i as AgentChatProps, o as AgentChatRenderPartContext } from "../AgentChat-CrlpbvQJ.js";
2
- import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
3
- import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-xWvRjRAC.js";
1
+ import { i as AgentMessageRenderPartContext } from "../AgentMessageParts-CyD2UB3V.js";
2
+ import { r as AgentChatProps } from "../AgentChat-CRuMi1Pb.js";
3
+ import { i as useOptionalAgentToolRuns, n as AgentToolRunsProvider, r as AgentToolRunsProviderProps, t as AgentToolEventsValue } from "../AgentToolRunsContext-BVe4stgw.js";
4
4
  import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
5
5
  import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-BPmu9a-c.js";
6
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-BFQnb2ct.js";
7
- import { n as ThinkChatValue } from "../ThinkChatContext-C3Eb1Xpi.js";
8
- import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../WorkspaceFile-DOZkPwzu.js";
9
- import { a as useWorkspace, i as WorkspaceState, n as WorkspaceInfo, r as WorkspaceSource, t as UseWorkspaceOptions } from "../Workspace-D39LxGvP.js";
10
- import { WorkspaceExplorer, WorkspaceExplorerProps } from "./WorkspaceExplorer.js";
6
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-BgesTfZ4.js";
7
+ import { n as ThinkChatValue } from "../ThinkChatContext-DrsZqdaO.js";
8
+ import { n as ThinkRecoveryNoticeProps, t as ThinkRecoveryNotice } from "../ThinkRecoveryNotice-DFIcG9UX.js";
9
+ import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
10
+ import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-xWvRjRAC.js";
11
+ import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../WorkspaceFile-C8UzuSH4.js";
12
+ import { a as useWorkspace, i as WorkspaceState, n as WorkspaceInfo, r as WorkspaceSource, t as UseWorkspaceOptions } from "../Workspace-C9RFoxcu.js";
13
+ import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../WorkspaceExplorer-sZewzT2O.js";
11
14
  import * as React from "react";
12
15
  import { UIMessage } from "ai";
13
16
  import { UseAgentOptions } from "agents/react";
@@ -19,6 +22,8 @@ import { UseVoiceInputReturn } from "@cloudflare/voice/react";
19
22
  interface ThinkChatProviderProps<State = unknown, MessageT extends UIMessage = UIMessage> {
20
23
  /** The `useAgentChat` value from `@cloudflare/think/react` that descendants read. */
21
24
  chat: ThinkChatValue<State, MessageT>;
25
+ /** Optional whole `useAgentToolEvents` result when the app owns the parent connection. */
26
+ agentTools?: AgentToolEventsValue<MessageT["parts"][number]>;
22
27
  children: React.ReactNode;
23
28
  }
24
29
  interface ThinkChatRootProps<State = unknown> {
@@ -28,7 +33,7 @@ interface ThinkChatRootProps<State = unknown> {
28
33
  name?: string;
29
34
  children: React.ReactNode;
30
35
  }
31
- interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends ThinkChatActivityRendererOptions {
36
+ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends ThinkChatActivityRendererOptions<MessageT> {
32
37
  className?: string;
33
38
  /** Disable the composer (e.g. while the agent is unreachable). */
34
39
  disabled?: boolean;
@@ -105,6 +110,7 @@ declare function useThinkPendingApprovals(stub: AgentStub<Think>, refreshKey: un
105
110
  * stream with agent work folded into collapsed Activity blocks.
106
111
  */
107
112
  declare function ThinkChatProvider<State = unknown, MessageT extends UIMessage = UIMessage>({
113
+ agentTools,
108
114
  chat,
109
115
  children
110
116
  }: ThinkChatProviderProps<State, MessageT>): React.JSX.Element;
@@ -136,8 +142,11 @@ declare function ThinkChatRoot<State = unknown, MessageT extends UIMessage = UIM
136
142
  * card) — see README "App-specific tools" and the Custom Tool Panel story.
137
143
  */
138
144
  declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage = UIMessage>({
145
+ composerHeader,
139
146
  renderPart,
140
147
  excludeTools,
148
+ onAgentToolRunSelect,
149
+ selectedAgentToolRunId,
141
150
  toolRenderers,
142
151
  thinkStub,
143
152
  onExecutionSettled,
@@ -180,8 +189,9 @@ declare const ThinkChat: {
180
189
  Root: typeof ThinkChatRoot;
181
190
  Messages: typeof ThinkChatMessages;
182
191
  Activity: typeof ThinkChatActivity;
183
- renderActivityPart: (context: AgentChatRenderPartContext<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>) => React.ReactNode | undefined;
192
+ RecoveryNotice: typeof ThinkRecoveryNotice;
193
+ renderActivityPart: (context: AgentMessageRenderPartContext<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>) => React.ReactNode | undefined;
184
194
  createActivityRenderer: typeof createThinkChatActivityRenderer;
185
195
  };
186
196
  //#endregion
187
- export { BrowserLiveView, type BrowserLiveViewProps, BrowserReplay, type BrowserReplayProps, ThinkChat, ThinkChatActivity, type ThinkChatActivityProps, type ThinkChatActivityRendererOptions, ThinkChatMessages, ThinkChatMessagesProps, ThinkChatProvider, ThinkChatProviderProps, ThinkChatRoot, ThinkChatRootProps, type ThinkChatToolRenderer, type ThinkChatToolRenderers, type UseWorkspaceOptions, WorkspaceExplorer, type WorkspaceExplorerProps, type WorkspaceFileState, type WorkspaceInfo, type WorkspaceSource, type WorkspaceState, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useThinkChat, useThinkPendingApprovals, useWorkspace };
197
+ export { type AgentToolEventsValue, AgentToolRunsProvider, type AgentToolRunsProviderProps, BrowserLiveView, type BrowserLiveViewProps, BrowserReplay, type BrowserReplayProps, ThinkChat, ThinkChatActivity, type ThinkChatActivityProps, type ThinkChatActivityRendererOptions, ThinkChatMessages, ThinkChatMessagesProps, ThinkChatProvider, ThinkChatProviderProps, ThinkChatRoot, ThinkChatRootProps, type ThinkChatToolRenderer, type ThinkChatToolRenderers, ThinkRecoveryNotice, type ThinkRecoveryNoticeProps, type UseWorkspaceOptions, WorkspaceExplorer, type WorkspaceExplorerProps, type WorkspaceFileState, type WorkspaceInfo, type WorkspaceSource, type WorkspaceState, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useOptionalAgentToolRuns, useThinkChat, useThinkPendingApprovals, useWorkspace };
@@ -1,10 +1,12 @@
1
1
  import { isThinkChatActivityPart } from "./ThinkChatToolParts.js";
2
+ import { AgentToolRunsProvider, useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
2
3
  import { BrowserLiveView } from "./BrowserLiveView.js";
3
- import { BrowserReplay } from "./BrowserReplay.js";
4
4
  import { describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
5
5
  import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./ThinkChatActivity.js";
6
- import { a as useThinkChat, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkPendingApprovals, r as ThinkChatProvider, t as ThinkChat } from "../ThinkChat-CzC-zNGA.js";
6
+ import { ThinkRecoveryNotice } from "./ThinkRecoveryNotice.js";
7
+ import { a as useThinkChat, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkPendingApprovals, r as ThinkChatProvider, t as ThinkChat } from "../ThinkChat-DInElus-.js";
8
+ import { BrowserReplay } from "./BrowserReplay.js";
7
9
  import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
8
10
  import { useWorkspace } from "./Workspace.js";
9
11
  import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
10
- export { BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useThinkChat, useThinkPendingApprovals, useWorkspace };
12
+ export { AgentToolRunsProvider, BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, ThinkRecoveryNotice, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useOptionalAgentToolRuns, useThinkChat, useThinkPendingApprovals, useWorkspace };
@@ -1,4 +1,4 @@
1
1
  import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
2
2
  import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-BPmu9a-c.js";
3
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-BFQnb2ct.js";
3
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-BgesTfZ4.js";
4
4
  export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, describeThinkChatActivityPart, isThinkChatActivityPart, renderThinkChatActivityPart };
@@ -1,11 +1,13 @@
1
1
  import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "./Activity.js";
2
2
  import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
3
3
  import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
4
+ import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
5
+ import { SubagentRunList } from "./SubagentRunList.js";
4
6
  import { useOptionalThinkChatContext } from "./ThinkChatContext.js";
5
7
  import { ThinkChatBrowserPanel, ThinkChatExecutePanel, ThinkChatFetchPanel, ThinkChatSessionContextPanel, ThinkChatSkillPanel, ThinkChatWorkspacePanel } from "./ThinkChatToolPanels.js";
6
8
  import { activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
7
- import "react";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
+ import * as React from "react";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
11
  import { getToolName, isReasoningUIPart, isToolUIPart } from "ai";
10
12
  //#region src/components/ThinkChatActivity.tsx
11
13
  function activityPartIcon(part) {
@@ -103,14 +105,29 @@ function ThinkChatActivityStep({ text, part, toolRenderers }) {
103
105
  children: text
104
106
  });
105
107
  }
106
- function ThinkChatActivityGroup({ message, parts, isTrailing, toolRenderers }) {
108
+ function ThinkChatActivityGroup({ message, onAgentToolRunSelect, parts, selectedAgentToolRunId, isTrailing, toolRenderers }) {
107
109
  const chat = useOptionalThinkChatContext();
108
110
  const chatStillWorking = isTrailing && Boolean(chat?.isStreaming) && chat?.messages.at(-1)?.id === message.id;
109
- return /* @__PURE__ */ jsx(ThinkChatActivity, {
111
+ const agentTools = useOptionalAgentToolRuns();
112
+ const runs = React.useMemo(() => {
113
+ if (!agentTools || !onAgentToolRunSelect) return [];
114
+ return parts.flatMap((part) => isToolUIPart(part) ? agentTools.getRunsForToolCall(part.toolCallId) : []);
115
+ }, [
116
+ agentTools,
117
+ onAgentToolRunSelect,
118
+ parts
119
+ ]);
120
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ThinkChatActivity, {
110
121
  parts,
111
122
  isStreaming: parts.some(isPartWorking) || chatStillWorking,
112
123
  toolRenderers
113
- });
124
+ }), runs.length ? /* @__PURE__ */ jsx(SubagentRunList, {
125
+ className: "subagent-run__list--adjacent",
126
+ "aria-label": "Delegated agent runs",
127
+ runs,
128
+ selectedRunId: selectedAgentToolRunId,
129
+ onSelect: onAgentToolRunSelect
130
+ }) : null] });
114
131
  }
115
132
  /**
116
133
  * Builds a renderPart handler that folds every run of consecutive activity
@@ -119,7 +136,7 @@ function ThinkChatActivityGroup({ message, parts, isTrailing, toolRenderers }) {
119
136
  * state. Excluded tools split the run and return undefined so your own
120
137
  * renderPart (or AgentChat's generic activity row) takes over for them.
121
138
  */
122
- function createThinkChatActivityRenderer({ excludeTools, toolRenderers } = {}) {
139
+ function createThinkChatActivityRenderer({ excludeTools, onAgentToolRunSelect, selectedAgentToolRunId, toolRenderers } = {}) {
123
140
  const excluded = excludeTools?.length ? new Set(excludeTools) : void 0;
124
141
  const isActivity = (part) => isThinkChatActivityPart(part, excluded);
125
142
  return (context) => {
@@ -134,7 +151,9 @@ function createThinkChatActivityRenderer({ excludeTools, toolRenderers } = {}) {
134
151
  message,
135
152
  parts: message.parts.slice(start, end + 1),
136
153
  isTrailing: end === message.parts.length - 1,
137
- toolRenderers
154
+ toolRenderers,
155
+ selectedAgentToolRunId,
156
+ onAgentToolRunSelect
138
157
  });
139
158
  };
140
159
  }
@@ -1,2 +1,2 @@
1
- import { i as useThinkChatContext, n as ThinkChatValue, r as useOptionalThinkChatContext, t as ThinkChatContext } from "../ThinkChatContext-C3Eb1Xpi.js";
1
+ import { i as useThinkChatContext, n as ThinkChatValue, r as useOptionalThinkChatContext, t as ThinkChatContext } from "../ThinkChatContext-DrsZqdaO.js";
2
2
  export { ThinkChatContext, ThinkChatValue, useOptionalThinkChatContext, useThinkChatContext };
@@ -1,7 +1,7 @@
1
1
  import { ActivityOutput, ActivityPanel } from "./Activity.js";
2
- import { Tabs } from "./Tabs.js";
3
2
  import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
4
- import { t as CodeBlock } from "../CodeBlock-BmB4Xaqq.js";
3
+ import { Tabs } from "./Tabs.js";
4
+ import { t as CodeBlock } from "../CodeBlock-Co1noLbC.js";
5
5
  import { BrowserLiveView } from "./BrowserLiveView.js";
6
6
  import * as React from "react";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { G as TerminalIcon, L as RefreshIcon, S as InfoIcon, Y as XIcon, o as CheckIcon, t as ArrowDownIcon, v as FileIcon } from "../icons-CpfUer49.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
+ import { C as InfoIcon, K as TerminalIcon, R as RefreshIcon, X as XIcon, s as CheckIcon, t as ArrowDownIcon, y as FileIcon } from "../icons--FqCZEc3.js";
3
3
  import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "./Activity.js";
4
4
  import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, formatThinkExecutionTimestamp, getThinkExecutionRunError, getThinkExecutionRunId, getThinkExecutionRunProgressedAt, getThinkExecutionRunProgressedLabel, getThinkExecutionRunStatus, getThinkExecutionRunTitle, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
5
5
  import { ThinkExecutionStatus } from "./ThinkExecutionStatus.js";