@mcp-b/react-components 0.47.0 → 0.49.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 (274) hide show
  1. package/dist/AgentChatQueue-C_Jaw3Ia.d.ts +48 -0
  2. package/dist/AgentToolRunsContext-GMe_hSnD.d.ts +35 -0
  3. package/dist/Avatar-o2NO1fCG.d.ts +124 -0
  4. package/dist/{Button-CZt3yywF.d.ts → Button-DjONW5UW.d.ts} +1 -1
  5. package/dist/{CodeBlock-C380GD5t.d.ts → CodeBlock--r6GS8YV.d.ts} +8 -2
  6. package/dist/{CodeBlock-DMHZiw86.js → CodeBlock-g8sADidM.js} +7 -7
  7. package/dist/Correspondent-7K6uNLUm.d.ts +64 -0
  8. package/dist/{FileTree-BHebfvkK.js → FileTree-H8mMg4rV.js} +20 -29
  9. package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
  10. package/dist/{Message-D_vCVEGB.d.ts → Message-DyaTBiV7.d.ts} +17 -4
  11. package/dist/MessageScrollerVirtual-D4afYwVB.d.ts +84 -0
  12. package/dist/{PromptInput-DtJHyp0S.d.ts → PromptInput-C4Mofitz.d.ts} +44 -31
  13. package/dist/PromptInputApproval-D2hpn54U.d.ts +44 -0
  14. package/dist/Separator-CzhtLYE1.d.ts +41 -0
  15. package/dist/Toolbar-CGY004u0.d.ts +155 -0
  16. package/dist/{Workspace-C_zHq9KZ.d.ts → Workspace-HzGrWDX3.d.ts} +14 -3
  17. package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
  18. package/dist/{WorkspaceFileView-ChIJz-fl.js → WorkspaceFileView-DYPtRVpM.js} +4 -3
  19. package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
  20. package/dist/{WorkspaceMessageResponse-Dg_aNpoj.js → WorkspaceMessageResponse-CUJk9_P5.js} +6 -3
  21. package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
  22. package/dist/components/agents-sdk/AgentChat.js +525 -670
  23. package/dist/components/agents-sdk/AgentChatQueue.d.ts +2 -0
  24. package/dist/components/agents-sdk/AgentChatQueue.js +206 -0
  25. package/dist/components/agents-sdk/AgentEvent.js +1 -1
  26. package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
  27. package/dist/components/agents-sdk/AgentToolRunsContext.js +1 -36
  28. package/dist/components/agents-sdk/BrowserLiveScreen.js +21 -13
  29. package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
  30. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
  31. package/dist/components/agents-sdk/BrowserRunPanel.js +31 -30
  32. package/dist/components/agents-sdk/EmployeeChrome.d.ts +212 -0
  33. package/dist/components/agents-sdk/EmployeeChrome.js +555 -0
  34. package/dist/components/agents-sdk/ManagerOffice.d.ts +115 -85
  35. package/dist/components/agents-sdk/ManagerOffice.js +545 -1154
  36. package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
  37. package/dist/components/agents-sdk/McpConnectionRequest.js +3 -2
  38. package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
  39. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
  40. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -2
  41. package/dist/components/agents-sdk/McpServerIcon.d.ts +17 -0
  42. package/dist/components/agents-sdk/McpServerIcon.js +25 -0
  43. package/dist/components/agents-sdk/McpServerPicker.d.ts +4 -3
  44. package/dist/components/agents-sdk/McpServerPicker.js +2 -1
  45. package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
  46. package/dist/components/agents-sdk/ModelSelector.js +3 -3
  47. package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
  48. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  49. package/dist/components/agents-sdk/PromptInputCommands.js +1 -2
  50. package/dist/components/agents-sdk/SessionCompaction.d.ts +88 -1
  51. package/dist/components/agents-sdk/SessionCompaction.js +2 -2
  52. package/dist/components/agents-sdk/SubagentRunDetails.d.ts +30 -1
  53. package/dist/components/agents-sdk/SubagentRunDetails.js +57 -1
  54. package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +9 -9
  55. package/dist/components/agents-sdk/SubagentRunIndicator.js +18 -23
  56. package/dist/components/agents-sdk/SubagentRunList.d.ts +6 -3
  57. package/dist/components/agents-sdk/SubagentRunList.js +4 -2
  58. package/dist/components/agents-sdk/SubagentRunPanel.d.ts +60 -0
  59. package/dist/components/agents-sdk/SubagentRunPanel.js +255 -0
  60. package/dist/components/agents-sdk/SubagentRunSelector.d.ts +8 -4
  61. package/dist/components/agents-sdk/SubagentRunSelector.js +4 -2
  62. package/dist/components/agents-sdk/ThinkChat.d.ts +102 -2
  63. package/dist/components/agents-sdk/ThinkChat.js +233 -2
  64. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +76 -1
  65. package/dist/components/agents-sdk/ThinkChatActivity.js +17 -9
  66. package/dist/components/agents-sdk/ThinkChatContext.d.ts +27 -1
  67. package/dist/components/agents-sdk/ThinkChatContext.js +1 -1
  68. package/dist/components/agents-sdk/ThinkChatToolPanels.js +23 -18
  69. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  70. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
  71. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
  72. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +158 -101
  73. package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
  74. package/dist/components/agents-sdk/ThinkFullApp.js +71 -285
  75. package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
  76. package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +51 -0
  77. package/dist/components/agents-sdk/ThinkRoutineActions.js +201 -0
  78. package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +4 -1
  79. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +16 -14
  80. package/dist/components/agents-sdk/ThinkRoutineDetail.js +12 -12
  81. package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
  82. package/dist/components/agents-sdk/ThinkRoutineForm.js +11 -11
  83. package/dist/components/agents-sdk/ThinkRoutineRuns.js +6 -6
  84. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
  85. package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -2
  86. package/dist/components/agents-sdk/Workspace.d.ts +2 -2
  87. package/dist/components/agents-sdk/Workspace.js +20 -23
  88. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  89. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  90. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +3 -2
  91. package/dist/components/agents-sdk/WorkspaceConcept.js +3 -3
  92. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +15 -10
  93. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +43 -40
  94. package/dist/components/agents-sdk/WorkspaceExecution.d.ts +31 -31
  95. package/dist/components/agents-sdk/WorkspaceExecution.js +115 -192
  96. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +5 -2
  97. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -2
  98. package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
  99. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
  100. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  101. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  102. package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
  103. package/dist/components/agents-sdk/WorkspaceLive.js +33 -5
  104. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +47 -1
  105. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  106. package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +3 -2
  107. package/dist/components/agents-sdk/WorkspaceMountManager.js +5 -8
  108. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +38 -0
  109. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +86 -0
  110. package/dist/components/agents-sdk/WorkspaceProject.d.ts +44 -15
  111. package/dist/components/agents-sdk/WorkspaceProject.js +74 -51
  112. package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
  113. package/dist/components/agents-sdk/WorkspaceUserScript.js +5 -2
  114. package/dist/components/ai-sdk/Activity.d.ts +1 -1
  115. package/dist/components/ai-sdk/AgentAttention.d.ts +2 -2
  116. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +89 -2
  117. package/dist/components/ai-sdk/AgentChatStartScreen.js +63 -42
  118. package/dist/components/ai-sdk/AgentMessageParts.d.ts +45 -1
  119. package/dist/components/ai-sdk/Approval.d.ts +1 -1
  120. package/dist/components/ai-sdk/Artifact.d.ts +2 -2
  121. package/dist/components/ai-sdk/Artifact.js +2 -2
  122. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  123. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  124. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  125. package/dist/components/ai-sdk/ComposerLink.js +1 -2
  126. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +16 -1
  127. package/dist/components/ai-sdk/ConnectedAppCards.js +69 -94
  128. package/dist/components/ai-sdk/Context.d.ts +7 -3
  129. package/dist/components/ai-sdk/Context.js +7 -17
  130. package/dist/components/ai-sdk/Conversation.d.ts +2 -2
  131. package/dist/components/ai-sdk/Correspondent.d.ts +2 -0
  132. package/dist/components/ai-sdk/Correspondent.js +145 -0
  133. package/dist/components/ai-sdk/Goal.d.ts +3 -3
  134. package/dist/components/ai-sdk/Goal.js +2 -2
  135. package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
  136. package/dist/components/ai-sdk/InlineCitation.js +1 -1
  137. package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
  138. package/dist/components/ai-sdk/Message.d.ts +2 -2
  139. package/dist/components/ai-sdk/Message.js +11 -2
  140. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  141. package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
  142. package/dist/components/ai-sdk/MessageScrollerVirtual.js +38 -4
  143. package/dist/components/ai-sdk/Plan.d.ts +1 -1
  144. package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
  145. package/dist/components/ai-sdk/PromptInput.js +170 -226
  146. package/dist/components/ai-sdk/PromptInputComposerEditor.js +32 -9
  147. package/dist/components/ai-sdk/Queue.d.ts +28 -5
  148. package/dist/components/ai-sdk/Queue.js +19 -4
  149. package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
  150. package/dist/components/ai-sdk/Reasoning.js +4 -4
  151. package/dist/components/ai-sdk/Sources.d.ts +1 -1
  152. package/dist/components/ai-sdk/Task.d.ts +1 -1
  153. package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
  154. package/dist/components/extension/CodexModelSelector.d.ts +5 -0
  155. package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
  156. package/dist/components/extension/ConversationTabPicker.js +1 -1
  157. package/dist/components/foundations/AlertDialog.d.ts +1 -1
  158. package/dist/components/foundations/AppIcon.d.ts +3 -2
  159. package/dist/components/foundations/Autocomplete.js +6 -1
  160. package/dist/components/foundations/Avatar.d.ts +1 -121
  161. package/dist/components/foundations/Button.d.ts +1 -1
  162. package/dist/components/foundations/Card.d.ts +22 -27
  163. package/dist/components/foundations/Card.js +51 -32
  164. package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
  165. package/dist/components/foundations/Collapsible.d.ts +1 -1
  166. package/dist/components/foundations/Combobox.js +6 -1
  167. package/dist/components/foundations/Dialog.d.ts +106 -1
  168. package/dist/components/foundations/EmptyState.d.ts +1 -1
  169. package/dist/components/foundations/Field.d.ts +2 -1
  170. package/dist/components/foundations/Fieldset.d.ts +1 -1
  171. package/dist/components/foundations/Form.d.ts +4 -4
  172. package/dist/components/foundations/IconButton.d.ts +1 -1
  173. package/dist/components/foundations/Label.d.ts +1 -1
  174. package/dist/components/foundations/LinkButton.d.ts +2 -2
  175. package/dist/components/foundations/Meter.d.ts +1 -1
  176. package/dist/components/foundations/NumberField.d.ts +1 -1
  177. package/dist/components/foundations/ScrollArea.d.ts +1 -1
  178. package/dist/components/foundations/SearchField.d.ts +1 -1
  179. package/dist/components/foundations/Select.js +6 -1
  180. package/dist/components/foundations/Separator.d.ts +1 -40
  181. package/dist/components/foundations/Stepper.d.ts +1 -1
  182. package/dist/components/foundations/Textarea.d.ts +1 -1
  183. package/dist/components/foundations/Toast.d.ts +5 -1
  184. package/dist/components/foundations/Toggle.d.ts +70 -1
  185. package/dist/components/foundations/ToggleGroup.d.ts +3 -2
  186. package/dist/components/foundations/Toolbar.d.ts +1 -151
  187. package/dist/components/foundations/TransitionSurface.d.ts +1 -1
  188. package/dist/components/general-purpose/ActionGuide.d.ts +10 -26
  189. package/dist/components/general-purpose/ActionGuide.js +4 -18
  190. package/dist/components/general-purpose/AppTopBar.d.ts +4 -2
  191. package/dist/components/general-purpose/Commit.d.ts +2 -2
  192. package/dist/components/general-purpose/Commit.js +1 -1
  193. package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
  194. package/dist/components/general-purpose/FileTree.d.ts +1 -7
  195. package/dist/components/general-purpose/FileTree.js +1 -1
  196. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  197. package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
  198. package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
  199. package/dist/components/general-purpose/ResizableSidePanel.d.ts +2 -2
  200. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +128 -2
  201. package/dist/components/general-purpose/ResponsiveSidebarShell.js +119 -101
  202. package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
  203. package/dist/components/general-purpose/SettingsFormDialog.js +40 -70
  204. package/dist/components/general-purpose/SetupChecklist.d.ts +1 -0
  205. package/dist/components/general-purpose/SetupChecklist.js +76 -1
  206. package/dist/components/general-purpose/Terminal.d.ts +3 -3
  207. package/dist/components/general-purpose/Terminal.js +10 -5
  208. package/dist/components/general-purpose/TestResults.d.ts +23 -11
  209. package/dist/components/general-purpose/TestResults.js +48 -50
  210. package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
  211. package/dist/components/general-purpose/WebPreview.d.ts +29 -4
  212. package/dist/components/general-purpose/WebPreview.js +37 -12
  213. package/dist/components/nanites/AgentConnection.js +1 -1
  214. package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
  215. package/dist/components/nanites/AgentToolDetail.js +20 -41
  216. package/dist/{copy-button-C0JyjClr.d.ts → copy-button-OUwOdgEm.d.ts} +1 -1
  217. package/dist/mcp-server-mAErsxHU.js +27 -0
  218. package/dist/styles/activity.css +1 -96
  219. package/dist/styles/agent-chat.css +75 -102
  220. package/dist/styles/agent-tool-detail.css +0 -16
  221. package/dist/styles/base.css +3 -3
  222. package/dist/styles/browser-run-panel.css +1 -15
  223. package/dist/styles/button.css +7 -1
  224. package/dist/styles/code-block.css +12 -0
  225. package/dist/styles/composition-motion.css +0 -2
  226. package/dist/styles/correspondent.css +73 -0
  227. package/dist/styles/employee-chrome.css +43 -0
  228. package/dist/styles/file-tree.css +5 -0
  229. package/dist/styles/index.css +5 -2
  230. package/dist/styles/manager-office.css +380 -1086
  231. package/dist/styles/message.css +2 -10
  232. package/dist/styles/queue.css +71 -0
  233. package/dist/styles/subagent-run.css +122 -6
  234. package/dist/styles/test-results.css +2 -5
  235. package/dist/styles/think-chat-activity.css +13 -0
  236. package/dist/styles/think-chat-tool-panels.css +81 -0
  237. package/dist/styles/think-execution-workbench.css +2 -8
  238. package/dist/styles/think-full-app.css +42 -251
  239. package/dist/styles/{think-routine-library.css → think-routine.css} +64 -80
  240. package/dist/styles/web-preview.css +15 -1
  241. package/dist/utils/mcp-server-catalog.d.ts +1112 -2
  242. package/dist/utils/mcp-server-catalog.js +28 -9
  243. package/dist/utils/structured-code.d.ts +1 -1
  244. package/dist/{workspace-assets-CxpEHsac.js → workspace-assets-Bg7XhPsk.js} +16 -2
  245. package/package.json +7 -3
  246. package/dist/AgentChat-BLmQghkt.d.ts +0 -327
  247. package/dist/AgentChatStartScreen-Bkv7Avni.d.ts +0 -84
  248. package/dist/AgentMessageParts-C7L-Mv9U.d.ts +0 -46
  249. package/dist/AgentToolRunsContext-jtmveaRE.d.ts +0 -57
  250. package/dist/Dialog-B_FhRWaz.d.ts +0 -107
  251. package/dist/McpConnectorForm-CeYNY0MI.d.ts +0 -39
  252. package/dist/McpPluginCatalog-3qWu8oK1.d.ts +0 -92
  253. package/dist/ResponsiveSidebarShell-BTVPxLJK.d.ts +0 -123
  254. package/dist/SessionCompaction-CmTJFpzj.d.ts +0 -89
  255. package/dist/SetupChecklist-CwRjIDH4.js +0 -77
  256. package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
  257. package/dist/ThinkChat-DLDta57t.js +0 -332
  258. package/dist/ThinkChatActivity-B3lGVS-6.d.ts +0 -77
  259. package/dist/ThinkChatContext-COIgzkYp.d.ts +0 -28
  260. package/dist/ThinkRecoveryNotice-DGWr94rk.d.ts +0 -19
  261. package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +0 -91
  262. package/dist/Toggle-DLrIf5YH.d.ts +0 -69
  263. package/dist/WorkspaceLive-DLGhtIly.d.ts +0 -49
  264. package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +0 -48
  265. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +0 -31
  266. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +0 -34
  267. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +0 -80
  268. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +0 -159
  269. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +0 -200
  270. package/dist/components/agents-sdk/ThinkSidepanel.js +0 -775
  271. package/dist/mcp-server-7NR24ASj.js +0 -69
  272. package/dist/mcp-server-catalog-C_g7C-9o.d.ts +0 -1108
  273. package/dist/styles/think-sidepanel.css +0 -78
  274. package/dist/think-agent-Cip5KAPj.d.ts +0 -7
@@ -1,5 +1,6 @@
1
1
  import { Collapsible } from "../foundations/Collapsible.js";
2
2
  import * as React from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
3
4
 
4
5
  //#region src/components/general-purpose/TestResults.d.ts
5
6
  type TestStatusValue = "passed" | "failed" | "skipped" | "running";
@@ -15,12 +16,12 @@ interface TestSummary {
15
16
  /** Total runtime in milliseconds. */
16
17
  duration?: number;
17
18
  }
18
- interface TestResultsProps extends React.HTMLAttributes<HTMLDivElement> {
19
+ interface TestResultsProps extends useRender.ComponentProps<"div"> {
19
20
  /** Aggregate test counts used by the summary and progress bar. */
20
21
  summary?: TestSummary;
21
22
  /** Additional class names for layout only; do not override status colors from apps. */
22
23
  className?: string;
23
- /** Optional custom report content; defaults to summary and empty content slots. */
24
+ /** Explicit header, summary, progress, and suite content parts. */
24
25
  children?: React.ReactNode;
25
26
  }
26
27
  /**
@@ -39,22 +40,33 @@ interface TestResultsProps extends React.HTMLAttributes<HTMLDivElement> {
39
40
  * @example
40
41
  * ```tsx
41
42
  * <TestResults summary={{ passed: 10, failed: 1, skipped: 0, total: 11 }}>
42
- * <TestSuite name="auth.test.ts" status="failed">
43
- * <Test name="rejects bad tokens" status="failed">
44
- * <TestError message="Expected 401, received 500" />
45
- * </Test>
46
- * </TestSuite>
43
+ * <TestResultsHeader>
44
+ * <TestResultsSummary />
45
+ * <TestResultsProgress />
46
+ * </TestResultsHeader>
47
+ * <TestResultsContent>
48
+ * <TestSuite name="auth.test.ts" status="failed">
49
+ * <TestSuiteName />
50
+ * <TestSuiteContent>
51
+ * <Test name="rejects bad tokens" status="failed">
52
+ * <TestStatus />
53
+ * <TestName />
54
+ * <TestError message="Expected 401, received 500" />
55
+ * </Test>
56
+ * </TestSuiteContent>
57
+ * </TestSuite>
58
+ * </TestResultsContent>
47
59
  * </TestResults>
48
60
  * ```
49
61
  */
50
62
  declare function TestResults({
51
- className,
63
+ render,
52
64
  summary,
53
65
  children,
54
66
  ref,
55
67
  ...props
56
68
  }: TestResultsProps & {
57
- ref?: React.Ref<HTMLDivElement>;
69
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
58
70
  }): React.JSX.Element;
59
71
  interface TestResultsHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
60
72
  declare function TestResultsHeader({
@@ -150,13 +162,13 @@ declare function TestSuiteContent({
150
162
  }: TestSuiteContentProps & {
151
163
  ref?: React.Ref<HTMLDivElement>;
152
164
  }): React.JSX.Element;
153
- interface TestProps extends React.HTMLAttributes<HTMLDivElement> {
165
+ interface TestProps extends useRender.ComponentProps<"div"> {
154
166
  name: string;
155
167
  status: TestStatusValue;
156
168
  duration?: number;
157
169
  }
158
170
  declare function Test({
159
- className,
171
+ render,
160
172
  name,
161
173
  status,
162
174
  duration,
@@ -1,9 +1,11 @@
1
- import { t as cx } from "../../class-names-BiMDVpUo.js";
1
+ import { n as mergeBaseClassName, t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { K as SpinnerIcon, d as CheckIcon, nt as XIcon, p as ChevronRightIcon } from "../../icons-cuEtsgj9.js";
3
3
  import { Collapsible } from "../foundations/Collapsible.js";
4
4
  import { Progress } from "../foundations/Progress.js";
5
5
  import * as React from "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { useRender } from "@base-ui/react/use-render";
8
+ import { mergeProps } from "@base-ui/react/merge-props";
7
9
  //#region src/components/general-purpose/TestResults.tsx
8
10
  const TestResultsContext = React.createContext({});
9
11
  /**
@@ -22,28 +24,42 @@ const TestResultsContext = React.createContext({});
22
24
  * @example
23
25
  * ```tsx
24
26
  * <TestResults summary={{ passed: 10, failed: 1, skipped: 0, total: 11 }}>
25
- * <TestSuite name="auth.test.ts" status="failed">
26
- * <Test name="rejects bad tokens" status="failed">
27
- * <TestError message="Expected 401, received 500" />
28
- * </Test>
29
- * </TestSuite>
27
+ * <TestResultsHeader>
28
+ * <TestResultsSummary />
29
+ * <TestResultsProgress />
30
+ * </TestResultsHeader>
31
+ * <TestResultsContent>
32
+ * <TestSuite name="auth.test.ts" status="failed">
33
+ * <TestSuiteName />
34
+ * <TestSuiteContent>
35
+ * <Test name="rejects bad tokens" status="failed">
36
+ * <TestStatus />
37
+ * <TestName />
38
+ * <TestError message="Expected 401, received 500" />
39
+ * </Test>
40
+ * </TestSuiteContent>
41
+ * </TestSuite>
42
+ * </TestResultsContent>
30
43
  * </TestResults>
31
44
  * ```
32
45
  */
33
- function TestResults({ className, summary, children, ref, ...props }) {
46
+ function TestResults({ render, summary, children, ref, ...props }) {
34
47
  const overall = summary && summary.failed > 0 ? "failed" : "passed";
35
48
  const contextValue = React.useMemo(() => ({ summary }), [summary]);
36
- const isComposable = hasComposableTestResultsChildren(children);
37
- return /* @__PURE__ */ jsx(TestResultsContext.Provider, {
38
- value: contextValue,
39
- children: /* @__PURE__ */ jsx("div", {
40
- ref,
41
- className: cx("test-results", className),
49
+ const element = useRender({
50
+ defaultTagName: "div",
51
+ render,
52
+ ref,
53
+ props: mergeProps({
54
+ className: "test-results",
42
55
  "data-status": overall,
43
- ...props,
44
56
  "data-recipe": "framed-panel",
45
- children: isComposable ? children : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(TestResultsHeader, { children: [/* @__PURE__ */ jsx(TestResultsSummary, {}), /* @__PURE__ */ jsx(TestResultsProgress, {})] }), /* @__PURE__ */ jsx(TestResultsContent, { children })] })
46
- })
57
+ children
58
+ }, props)
59
+ });
60
+ return /* @__PURE__ */ jsx(TestResultsContext.Provider, {
61
+ value: contextValue,
62
+ children: element
47
63
  });
48
64
  }
49
65
  function TestResultsHeader({ className, children, ref, ...props }) {
@@ -147,9 +163,6 @@ function TestResultsContent({ className, children, ref, ...props }) {
147
163
  children
148
164
  });
149
165
  }
150
- function hasComposableTestResultsChildren(children) {
151
- return React.Children.toArray(children).some((child) => React.isValidElement(child) && (child.type === TestResultsHeader || child.type === TestResultsSummary || child.type === TestResultsProgress || child.type === TestResultsContent));
152
- }
153
166
  const TestSuiteContext = React.createContext({
154
167
  name: "",
155
168
  status: "passed"
@@ -159,20 +172,16 @@ function TestSuite({ className, name, status, defaultOpen, children, ref, ...pro
159
172
  name,
160
173
  status
161
174
  }), [name, status]);
162
- const isComposable = hasComposableTestSuiteChildren(children);
163
175
  return /* @__PURE__ */ jsx(TestSuiteContext.Provider, {
164
176
  value: contextValue,
165
177
  children: /* @__PURE__ */ jsx(Collapsible.Root, {
166
178
  ref,
167
- className: cx("test-results__suite", className),
179
+ className: mergeBaseClassName("test-results__suite", className),
168
180
  defaultOpen: defaultOpen ?? status === "failed",
169
181
  "data-status": status,
170
182
  ...props,
171
183
  unstyled: true,
172
- children: isComposable ? children : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(TestSuiteName, {}), /* @__PURE__ */ jsx(TestSuiteContent, { children: /* @__PURE__ */ jsx("div", {
173
- className: "test-results__suite-tests",
174
- children
175
- }) })] })
184
+ children
176
185
  })
177
186
  });
178
187
  }
@@ -180,7 +189,7 @@ function TestSuiteName({ className, children, ref, ...props }) {
180
189
  const { name, status } = React.useContext(TestSuiteContext);
181
190
  return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
182
191
  ref,
183
- className: cx("test-results__suite-trigger", className),
192
+ className: mergeBaseClassName("test-results__suite-trigger", className),
184
193
  ...props,
185
194
  unstyled: true,
186
195
  children: [
@@ -224,20 +233,17 @@ function TestSuiteStats({ className, passed = 0, failed = 0, skipped = 0, childr
224
233
  function TestSuiteContent({ className, children, ref, ...props }) {
225
234
  return /* @__PURE__ */ jsx(Collapsible.Panel, {
226
235
  ref,
227
- className: cx("test-results__suite-content", className),
236
+ className: mergeBaseClassName("test-results__suite-content", className),
228
237
  ...props,
229
238
  unstyled: true,
230
239
  children
231
240
  });
232
241
  }
233
- function hasComposableTestSuiteChildren(children) {
234
- return React.Children.toArray(children).some((child) => React.isValidElement(child) && (child.type === TestSuiteName || child.type === TestSuiteContent));
235
- }
236
242
  const TestContext = React.createContext({
237
243
  name: "",
238
244
  status: "passed"
239
245
  });
240
- function Test({ className, name, status, duration, children, ref, ...props }) {
246
+ function Test({ render, name, status, duration, children, ref, ...props }) {
241
247
  const contextValue = React.useMemo(() => ({
242
248
  duration,
243
249
  name,
@@ -247,24 +253,19 @@ function Test({ className, name, status, duration, children, ref, ...props }) {
247
253
  name,
248
254
  status
249
255
  ]);
250
- const isComposable = hasComposableTestChildren(children);
256
+ const element = useRender({
257
+ defaultTagName: "div",
258
+ render,
259
+ ref,
260
+ props: mergeProps({
261
+ className: cx("test-results__test", `test-results__test--${status}`),
262
+ "data-status": status,
263
+ children
264
+ }, props)
265
+ });
251
266
  return /* @__PURE__ */ jsx(TestContext.Provider, {
252
267
  value: contextValue,
253
- children: /* @__PURE__ */ jsx("div", {
254
- ref,
255
- className: cx("test-results__test", `test-results__test--${status}`, className),
256
- "data-status": status,
257
- ...props,
258
- children: isComposable ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
259
- /* @__PURE__ */ jsx(TestStatus, {}),
260
- /* @__PURE__ */ jsx(TestName, {}),
261
- /* @__PURE__ */ jsx(TestDuration, {}),
262
- children ? /* @__PURE__ */ jsx("div", {
263
- className: "test-results__test-children",
264
- children
265
- }) : null
266
- ] })
267
- })
268
+ children: element
268
269
  });
269
270
  }
270
271
  function TestStatus({ className, children, status, ref, ...props }) {
@@ -301,9 +302,6 @@ function TestDuration({ className, children, ref, ...props }) {
301
302
  children: children ?? `${duration}ms`
302
303
  });
303
304
  }
304
- function hasComposableTestChildren(children) {
305
- return React.Children.toArray(children).some((child) => React.isValidElement(child) && (child.type === TestStatus || child.type === TestName || child.type === TestDuration));
306
- }
307
305
  function TestError({ className, message, children, ref, ...props }) {
308
306
  return /* @__PURE__ */ jsx("div", {
309
307
  ref,
@@ -6,7 +6,9 @@ interface ThemeModeControlProps {
6
6
  "aria-label"?: string;
7
7
  /** Name used by the radio group's hidden form input. @default "theme" */
8
8
  name?: string;
9
+ /** Prevents changing the current theme preference. */
9
10
  disabled?: boolean;
11
+ /** Additional class name for layout in the consuming surface. */
10
12
  className?: string;
11
13
  }
12
14
  /**
@@ -1,5 +1,6 @@
1
- import { n as IconButtonProps } from "../../IconButton-BAUFhUk8.js";
1
+ import { n as IconButtonProps } from "../../IconButton-ByiyjkYE.js";
2
2
  import * as React from "react";
3
+ import { useRender } from "@base-ui/react/use-render";
3
4
 
4
5
  //#region src/components/general-purpose/WebPreview.d.ts
5
6
  interface WebPreviewContextValue {
@@ -15,6 +16,8 @@ interface WebPreviewContextValue {
15
16
  reloadToken: number;
16
17
  }
17
18
  interface WebPreviewProps extends React.HTMLAttributes<HTMLDivElement> {
19
+ /** Omit the frame when the host already supplies panel chrome. */
20
+ surface?: "framed" | "plain";
18
21
  /** Initial URL for uncontrolled preview history. */
19
22
  defaultUrl?: string;
20
23
  /** Controlled URL. Controlled previews leave history ownership to the caller. */
@@ -60,6 +63,7 @@ interface WebPreviewProps extends React.HTMLAttributes<HTMLDivElement> {
60
63
  * ```
61
64
  */
62
65
  declare function WebPreview({
66
+ surface,
63
67
  className,
64
68
  defaultUrl,
65
69
  url: controlledUrl,
@@ -69,10 +73,14 @@ declare function WebPreview({
69
73
  "data-recipe": recipe,
70
74
  ...props
71
75
  }: WebPreviewProps & {
72
- ref?: React.Ref<HTMLDivElement>;
76
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
73
77
  }): React.JSX.Element;
74
- interface WebPreviewNavigationProps extends React.HTMLAttributes<HTMLDivElement> {}
78
+ interface WebPreviewNavigationProps extends React.HTMLAttributes<HTMLDivElement> {
79
+ /** Tabs join the address row below them without a second dividing edge. */
80
+ variant?: "address" | "tabs";
81
+ }
75
82
  declare function WebPreviewNavigation({
83
+ variant,
76
84
  className,
77
85
  children,
78
86
  ref,
@@ -115,6 +123,23 @@ declare function WebPreviewUrl({
115
123
  }: WebPreviewUrlProps & {
116
124
  ref?: React.Ref<HTMLInputElement>;
117
125
  }): React.JSX.Element;
126
+ interface WebPreviewViewportProps extends useRender.ComponentProps<"div"> {}
127
+ /** Media surface shared by iframe previews and host-provided live views.
128
+ * Compose a behavior part such as Tabs.Panel through render to keep one element. */
129
+ declare function WebPreviewViewport({
130
+ render,
131
+ ref,
132
+ ...props
133
+ }: WebPreviewViewportProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
134
+ interface WebPreviewEmptyProps extends React.HTMLAttributes<HTMLDivElement> {}
135
+ /** Centered placeholder or session state inside a preview surface. */
136
+ declare function WebPreviewEmpty({
137
+ className,
138
+ ref,
139
+ ...props
140
+ }: WebPreviewEmptyProps & {
141
+ ref?: React.Ref<HTMLDivElement>;
142
+ }): React.JSX.Element;
118
143
  interface WebPreviewBodyProps extends Omit<React.IframeHTMLAttributes<HTMLIFrameElement>, "loading"> {
119
144
  /** Optional placeholder shown while the iframe has no src. */
120
145
  loading?: React.ReactNode;
@@ -149,4 +174,4 @@ declare function WebPreviewConsole({
149
174
  ref?: React.Ref<HTMLDivElement>;
150
175
  }): React.JSX.Element;
151
176
  //#endregion
152
- export { ConsoleLog, ConsoleLogLevel, WebPreview, WebPreviewBody, WebPreviewBodyProps, WebPreviewConsole, WebPreviewConsoleProps, WebPreviewContextValue, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewNavigationButtonProps, WebPreviewNavigationProps, WebPreviewProps, WebPreviewUrl, WebPreviewUrlProps };
177
+ export { ConsoleLog, ConsoleLogLevel, WebPreview, WebPreviewBody, WebPreviewBodyProps, WebPreviewConsole, WebPreviewConsoleProps, WebPreviewContextValue, WebPreviewEmpty, WebPreviewEmptyProps, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewNavigationButtonProps, WebPreviewNavigationProps, WebPreviewProps, WebPreviewUrl, WebPreviewUrlProps, WebPreviewViewport, WebPreviewViewportProps };
@@ -6,6 +6,8 @@ import { ScrollArea } from "../foundations/ScrollArea.js";
6
6
  import { Input } from "../foundations/Input.js";
7
7
  import * as React from "react";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ import { useRender } from "@base-ui/react/use-render";
10
+ import { mergeProps } from "@base-ui/react/merge-props";
9
11
  //#region src/components/general-purpose/WebPreview.tsx
10
12
  const WebPreviewContext = React.createContext(null);
11
13
  function useWebPreviewContext() {
@@ -44,7 +46,7 @@ function useWebPreviewContext() {
44
46
  * </WebPreview>
45
47
  * ```
46
48
  */
47
- function WebPreview({ className, defaultUrl = "", url: controlledUrl, onUrlChange, children, ref, "data-recipe": recipe, ...props }) {
49
+ function WebPreview({ surface = "framed", className, defaultUrl = "", url: controlledUrl, onUrlChange, children, ref, "data-recipe": recipe, ...props }) {
48
50
  const [navigation, setNavigation] = React.useState(() => ({
49
51
  history: defaultUrl ? [defaultUrl] : [],
50
52
  index: defaultUrl ? 0 : -1
@@ -125,16 +127,18 @@ function WebPreview({ className, defaultUrl = "", url: controlledUrl, onUrlChang
125
127
  children: /* @__PURE__ */ jsx("div", {
126
128
  ref,
127
129
  className: cx("web-preview", className),
130
+ "data-surface": surface,
128
131
  ...props,
129
132
  "data-recipe": cx("framed-panel", recipe),
130
133
  children
131
134
  })
132
135
  });
133
136
  }
134
- function WebPreviewNavigation({ className, children, ref, ...props }) {
137
+ function WebPreviewNavigation({ variant = "address", className, children, ref, ...props }) {
135
138
  return /* @__PURE__ */ jsx("div", {
136
139
  ref,
137
140
  className: cx("web-preview__nav", className),
141
+ "data-variant": variant,
138
142
  ...props,
139
143
  children
140
144
  });
@@ -220,21 +224,42 @@ function WebPreviewUrl({ className, placeholder = "Enter URL…", value, onChang
220
224
  })
221
225
  });
222
226
  }
227
+ /** Media surface shared by iframe previews and host-provided live views.
228
+ * Compose a behavior part such as Tabs.Panel through render to keep one element. */
229
+ function WebPreviewViewport({ render, ref, ...props }) {
230
+ return useRender({
231
+ defaultTagName: "div",
232
+ render,
233
+ ref,
234
+ props: mergeProps({ className: "web-preview__body" }, props)
235
+ });
236
+ }
237
+ /** Centered placeholder or session state inside a preview surface. */
238
+ function WebPreviewEmpty({ className, ref, ...props }) {
239
+ return /* @__PURE__ */ jsx("div", {
240
+ ref,
241
+ className: cx("web-preview__empty", className),
242
+ ...props
243
+ });
244
+ }
223
245
  function WebPreviewBody({ className, loading, src, ref, interactive = true, ...props }) {
224
246
  const { url, reloadToken } = useWebPreviewContext();
225
247
  const effectiveSrc = src ?? url;
226
248
  const iframeSrc = effectiveSrc ? `${effectiveSrc}${reloadToken ? `#reload-${reloadToken}` : ""}` : void 0;
227
- if (!iframeSrc) return /* @__PURE__ */ jsx("div", {
228
- className: cx("web-preview__body", "web-preview__body--empty", className),
249
+ if (!iframeSrc) return /* @__PURE__ */ jsx(WebPreviewViewport, {
250
+ className,
251
+ render: /* @__PURE__ */ jsx(WebPreviewEmpty, {}),
229
252
  children: loading ?? "Enter a URL above to preview a site."
230
253
  });
231
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("iframe", {
232
- ref,
233
- src: iframeSrc,
234
- sandbox: "allow-scripts allow-forms allow-popups allow-presentation",
235
- title: "Web preview",
236
- className: cx("web-preview__body", !interactive && "web-preview__body--readonly", className),
237
- ...props
254
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(WebPreviewViewport, {
255
+ className: cx(!interactive && "web-preview__body--readonly", className),
256
+ render: /* @__PURE__ */ jsx("iframe", {
257
+ ref,
258
+ src: iframeSrc,
259
+ sandbox: "allow-scripts allow-forms allow-popups allow-presentation",
260
+ title: "Web preview",
261
+ ...props
262
+ })
238
263
  }, iframeSrc), loading] });
239
264
  }
240
265
  function WebPreviewConsole({ className, logs = [], children, ref, ...props }) {
@@ -289,4 +314,4 @@ function WebPreviewConsole({ className, logs = [], children, ref, ...props }) {
289
314
  });
290
315
  }
291
316
  //#endregion
292
- export { WebPreview, WebPreviewBody, WebPreviewConsole, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl };
317
+ export { WebPreview, WebPreviewBody, WebPreviewConsole, WebPreviewEmpty, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl, WebPreviewViewport };
@@ -2,7 +2,7 @@ import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { D as LinkIcon } from "../../icons-cuEtsgj9.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { Popover } from "../foundations/Popover.js";
5
- import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../../CodeBlock-DMHZiw86.js";
5
+ import { a as CodeBlockCopyButton, i as CodeBlockContent, n as CodeBlockActions, p as CodeBlockTitle, r as CodeBlockContainer, s as CodeBlockHeader, t as CodeBlock } from "../../CodeBlock-g8sADidM.js";
6
6
  import { ToggleGroup } from "../foundations/ToggleGroup.js";
7
7
  import * as React from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,15 +1,19 @@
1
- import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
2
- import { i as ThinkChatMessagesProps } from "../../ThinkChat-CwMdEum8.js";
3
- import { t as ThinkAgent } from "../../think-agent-Cip5KAPj.js";
1
+ import { n as AgentToolRunValue } from "../../AgentToolRunsContext-GMe_hSnD.js";
2
+ import { SubagentRunMetadataProps } from "../agents-sdk/SubagentRunDetails.js";
3
+ import { ThinkChatValue } from "../agents-sdk/ThinkChatContext.js";
4
4
  import * as React from "react";
5
5
  import { UIMessage } from "ai";
6
6
  import { UseAgentOptions, useAgent } from "agents/react";
7
- import { AgentToolRunState } from "agents/agent-tools";
7
+ import { Think } from "@cloudflare/think";
8
8
 
9
+ //#region src/components/_internal/think-agent.d.ts
10
+ /** Shared complete Think specialization for stateful React agent hooks. */
11
+ type ThinkAgent<State = unknown> = Think<object, State>;
12
+ //#endregion
9
13
  //#region src/components/nanites/AgentToolDetail.d.ts
10
14
  interface AgentToolDetailProps<State = unknown, MessageT extends UIMessage = UIMessage> extends React.HTMLAttributes<HTMLDivElement> {
11
15
  /** Whole retained run selected from the parent `useAgentToolEvents` result. */
12
- run: AgentToolRunState<MessageT["parts"][number]>;
16
+ run: AgentToolRunValue<MessageT["parts"][number]>;
13
17
  /**
14
18
  * Whole child Think chat hook result; it owns the stored child transcript.
15
19
  * Optional because the run's chrome is parent-side data: while the child
@@ -17,7 +21,6 @@ interface AgentToolDetailProps<State = unknown, MessageT extends UIMessage = UIM
17
21
  * region shows a loading status instead.
18
22
  */
19
23
  chat?: ThinkChatValue<State, MessageT>;
20
- messages?: ThinkChatMessagesProps<MessageT>;
21
24
  /** App-authored TanStack Router Link to the parent conversation. */
22
25
  backLink?: React.ReactElement;
23
26
  /**
@@ -25,6 +28,7 @@ interface AgentToolDetailProps<State = unknown, MessageT extends UIMessage = UIM
25
28
  * rendered in the top bar's trailing slot after the status mark.
26
29
  */
27
30
  actions?: React.ReactNode;
31
+ renderMilestone?: SubagentRunMetadataProps["renderMilestone"];
28
32
  }
29
33
  /**
30
34
  * Live retained-child detail composed from upstream connection and chat values.
@@ -36,15 +40,15 @@ declare function AgentToolDetail<State = unknown, MessageT extends UIMessage = U
36
40
  backLink,
37
41
  chat,
38
42
  className,
39
- messages,
40
43
  ref,
41
44
  run,
45
+ renderMilestone,
42
46
  ...props
43
47
  }: AgentToolDetailProps<State, MessageT> & {
44
48
  ref?: React.Ref<HTMLDivElement>;
45
49
  }): React.JSX.Element;
46
50
  interface SelectedAgentToolChildProps<ParentAgentT extends ThinkAgent<ParentState>, ParentState = unknown, ChildState = unknown, MessageT extends UIMessage = UIMessage> {
47
- run: AgentToolRunState<MessageT["parts"][number]>;
51
+ run: AgentToolRunValue<MessageT["parts"][number]>;
48
52
  /** Whole parent `useAgent` result used to derive the standard root-first route. */
49
53
  parentAgent: ReturnType<typeof useAgent<ParentAgentT, ParentState>>;
50
54
  /**
@@ -59,7 +63,6 @@ interface SelectedAgentToolChildProps<ParentAgentT extends ThinkAgent<ParentStat
59
63
  * wired into `useAgentChat({ getInitialMessages })`.
60
64
  */
61
65
  getInitialMessages?: (childAgent: ReturnType<typeof useAgent<ThinkAgent<ChildState>, ChildState>>) => Promise<MessageT[]>;
62
- messages?: ThinkChatMessagesProps<MessageT>;
63
66
  /** App-authored TanStack Router Link to the parent conversation. */
64
67
  backLink?: React.ReactElement;
65
68
  /**
@@ -84,7 +87,7 @@ declare function selectedAgentToolChildOptions<ChildState = unknown>(parentAgent
84
87
  agent: string;
85
88
  name: string;
86
89
  }>;
87
- }, run: Pick<AgentToolRunState, "subAgent">, connectionOptions?: UseAgentOptions<ChildState>): UseAgentOptions<ChildState>;
90
+ }, run: Pick<AgentToolRunValue, "subAgent">, connectionOptions?: UseAgentOptions<ChildState>): UseAgentOptions<ChildState>;
88
91
  /**
89
92
  * Lazily connects one selected retained child and renders its real Think chat.
90
93
  *
@@ -101,7 +104,6 @@ declare function SelectedAgentToolChild<ParentAgentT extends ThinkAgent<ParentSt
101
104
  connectionOptions,
102
105
  fallback,
103
106
  getInitialMessages,
104
- messages,
105
107
  parentAgent,
106
108
  run
107
109
  }: SelectedAgentToolChildProps<ParentAgentT, ParentState, ChildState, MessageT>): React.JSX.Element;
@@ -1,25 +1,26 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { r as ArrowLeftIcon } from "../../icons-cuEtsgj9.js";
3
- import { NaniteMark } from "./NaniteScene.js";
3
+ import { MessageActions } from "../ai-sdk/Message.js";
4
4
  import { SubagentRunIndicator, getSubagentRunName } from "../agents-sdk/SubagentRunIndicator.js";
5
+ import { NaniteMark } from "./NaniteScene.js";
5
6
  import { TransitionSurface } from "../foundations/TransitionSurface.js";
7
+ import { AgentChat } from "../agents-sdk/AgentChat.js";
6
8
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
7
- import { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress } from "../agents-sdk/SubagentRunDetails.js";
8
- import { t as ThinkChat } from "../../ThinkChat-DLDta57t.js";
9
+ import { SubagentRunMetadata } from "../agents-sdk/SubagentRunDetails.js";
10
+ import { ThinkChat } from "../agents-sdk/ThinkChat.js";
9
11
  import * as React from "react";
10
12
  import { jsx, jsxs } from "react/jsx-runtime";
11
- import { useAgent } from "agents/react";
12
13
  import { useAgentChat } from "@cloudflare/think/react";
14
+ import { useAgent } from "agents/react";
13
15
  //#region src/components/nanites/AgentToolDetail.tsx
14
16
  /**
15
17
  * Live retained-child detail composed from upstream connection and chat values.
16
18
  * The full child transcript comes from `chat.messages`; `run.parts` remains a
17
19
  * compact parent-side stream projection and is never promoted to fake history.
18
20
  */
19
- function AgentToolDetail({ actions, backLink, chat, className, messages, ref, run, ...props }) {
21
+ function AgentToolDetail({ actions, backLink, chat, className, ref, run, renderMilestone, ...props }) {
20
22
  const backRef = React.useRef(null);
21
23
  const name = getSubagentRunName(run);
22
- const progressLabel = run.progress?.message ?? run.progress?.phase;
23
24
  React.useEffect(() => {
24
25
  backRef.current?.focus();
25
26
  }, [run.runId]);
@@ -48,40 +49,21 @@ function AgentToolDetail({ actions, backLink, chat, className, messages, ref, ru
48
49
  /* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [/* @__PURE__ */ jsx(SubagentRunIndicator, { run }), actions] })
49
50
  ]
50
51
  }),
51
- progressLabel || run.milestones?.length || run.error || run.summary ? /* @__PURE__ */ jsxs("div", {
52
+ /* @__PURE__ */ jsx(SubagentRunMetadata, {
52
53
  className: "agent-tool-detail__run-state",
53
- children: [
54
- progressLabel ? /* @__PURE__ */ jsx(SubagentRunProgress, {
55
- label: progressLabel,
56
- value: run.progress?.fraction
57
- }) : null,
58
- run.milestones?.length ? /* @__PURE__ */ jsx(SubagentRunMilestones, {
59
- "aria-label": `${name} milestones`,
60
- children: run.milestones.map((milestone) => /* @__PURE__ */ jsx(SubagentRunMilestone, { children: milestone.name }, milestone.sequence))
61
- }) : null,
62
- run.error ? /* @__PURE__ */ jsx("p", {
63
- className: "agent-tool-detail__error",
64
- children: run.error
65
- }) : null,
66
- !run.error && run.summary ? /* @__PURE__ */ jsx("p", {
67
- className: "agent-tool-detail__summary",
68
- children: run.summary
69
- }) : null
70
- ]
71
- }) : null,
54
+ run,
55
+ renderMilestone
56
+ }),
72
57
  /* @__PURE__ */ jsx("div", {
73
58
  className: "agent-tool-detail__chat",
74
- children: chat ? /* @__PURE__ */ jsx(ThinkChat.Provider, {
59
+ children: chat ? /* @__PURE__ */ jsxs(ThinkChat.Root, {
75
60
  chat,
76
- children: /* @__PURE__ */ jsx(ThinkChat.Messages, {
77
- ...messages,
78
- showComposer: false
79
- })
80
- }) : /* @__PURE__ */ jsx(ThinkChat.Messages, {
81
- ...messages,
82
- showComposer: false,
83
- loading: true
84
- })
61
+ children: [/* @__PURE__ */ jsx(AgentChat.Transcript, { children: ({ message, messageIndex }) => /* @__PURE__ */ jsxs(AgentChat.Message, {
62
+ message,
63
+ messageIndex,
64
+ children: [/* @__PURE__ */ jsx(ThinkChat.MessageContent, { message }), /* @__PURE__ */ jsx(MessageActions, { children: /* @__PURE__ */ jsx(AgentChat.CopyAction, {}) })]
65
+ }) }), /* @__PURE__ */ jsx(AgentChat.Dock, { children: /* @__PURE__ */ jsx(ThinkChat.RecoveryNotice, {}) })]
66
+ }) : /* @__PURE__ */ jsx(AgentChat.Loading, {})
85
67
  })
86
68
  ]
87
69
  });
@@ -111,12 +93,11 @@ function selectedAgentToolChildOptions(parentAgent, run, connectionOptions) {
111
93
  * this component holds the connection and always commits, while the chat
112
94
  * suspends behind the internal boundary.
113
95
  */
114
- function SelectedAgentToolChild({ actions, backLink, connectionOptions, fallback, getInitialMessages, messages, parentAgent, run }) {
96
+ function SelectedAgentToolChild({ actions, backLink, connectionOptions, fallback, getInitialMessages, parentAgent, run }) {
115
97
  const childAgent = useAgent(selectedAgentToolChildOptions(parentAgent, run, connectionOptions));
116
98
  return /* @__PURE__ */ jsx(React.Suspense, {
117
99
  fallback: fallback ?? /* @__PURE__ */ jsx(AgentToolDetail, {
118
100
  run,
119
- messages,
120
101
  backLink,
121
102
  actions
122
103
  }),
@@ -125,19 +106,17 @@ function SelectedAgentToolChild({ actions, backLink, connectionOptions, fallback
125
106
  backLink,
126
107
  childAgent,
127
108
  getInitialMessages,
128
- messages,
129
109
  run
130
110
  }, run.runId)
131
111
  });
132
112
  }
133
- function SelectedAgentToolChildChat({ actions, backLink, childAgent, getInitialMessages, messages, run }) {
113
+ function SelectedAgentToolChildChat({ actions, backLink, childAgent, getInitialMessages, run }) {
134
114
  return /* @__PURE__ */ jsx(AgentToolDetail, {
135
115
  run,
136
116
  chat: useAgentChat({
137
117
  agent: childAgent,
138
118
  ...getInitialMessages ? { getInitialMessages: () => getInitialMessages(childAgent) } : {}
139
119
  }),
140
- messages,
141
120
  backLink,
142
121
  actions
143
122
  });
@@ -1,4 +1,4 @@
1
- import { n as IconButtonProps } from "./IconButton-BAUFhUk8.js";
1
+ import { n as IconButtonProps } from "./IconButton-ByiyjkYE.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/_internal/copy-button.d.ts