@mcp-b/react-components 0.17.0 → 0.18.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 (292) hide show
  1. package/dist/{AgentActivity-BNUNrP9O.d.ts → AgentActivity-D2SHSGFX.d.ts} +1 -1
  2. package/dist/{AgentChat-CRuMi1Pb.d.ts → AgentChat-ClxViuUM.d.ts} +1 -20
  3. package/dist/{Button-FX_hpqxm.d.ts → Button-DLGzHsjc.d.ts} +13 -7
  4. package/dist/{CodeBlock-Co1noLbC.js → CodeBlock-Bfp5PAg3.js} +9 -6
  5. package/dist/{CodeBlock-Dnpr88ZQ.d.ts → CodeBlock-gV4kZeCI.d.ts} +2 -9
  6. package/dist/{FileTree-B7bBsUyU.js → FileTree-3zYtrddG.js} +42 -16
  7. package/dist/{Message-C4eYRogZ.js → Message-BXtmfc9Q.js} +13 -20
  8. package/dist/{ModelSelector-BNrZlY_Y.js → ModelSelector-Cqw_qrUG.js} +15 -22
  9. package/dist/{PromptInput-OLfXPuHM.d.ts → PromptInput-Bdh9pqlo.d.ts} +4 -6
  10. package/dist/{Select-CwSqP07Y.d.ts → Select-B_13gg_J.d.ts} +2 -2
  11. package/dist/{Tabs-9zddXDQo.d.ts → Tabs-ColWK-XA.d.ts} +10 -2
  12. package/dist/{ThinkChat-DInElus-.js → ThinkChat-15EhfvYJ.js} +84 -61
  13. package/dist/{ThinkChatActivity-BgesTfZ4.d.ts → ThinkChatActivity-Bzot45kX.d.ts} +4 -7
  14. package/dist/{ThinkChatActivitySummary-BPmu9a-c.d.ts → ThinkChatActivitySummary-D1xOrNrq.d.ts} +1 -1
  15. package/dist/{Toggle-DaXpe1Lc.d.ts → Toggle-JKZ43D5S.d.ts} +1 -1
  16. package/dist/{ToggleGroup-yseEWkOC.d.ts → ToggleGroup-DNd6cDJZ.d.ts} +2 -2
  17. package/dist/Workspace-Jez8ffUj.d.ts +274 -0
  18. package/dist/{WorkspaceExplorer-sZewzT2O.d.ts → WorkspaceExplorer-B9dQWNVK.d.ts} +2 -2
  19. package/dist/{WorkspaceFile-C8UzuSH4.d.ts → WorkspaceFile-CzyHnESE.d.ts} +1 -1
  20. package/dist/{WorkspaceFileView-DNdGAEiX.js → WorkspaceFileView-C68Ub8S8.js} +120 -127
  21. package/dist/{WorkspaceLink-B1ykV1dS.js → WorkspaceLink-BYYeTQLf.js} +6 -27
  22. package/dist/{WorkspaceLink-DK1DWMHe.d.ts → WorkspaceLink-O-EBKUJ8.d.ts} +6 -9
  23. package/dist/{class-names-Bk-QLWWI.js → class-names-BiMDVpUo.js} +4 -1
  24. package/dist/components/Accordion.js +7 -2
  25. package/dist/components/Activity.js +2 -2
  26. package/dist/components/AgentActivity.d.ts +1 -1
  27. package/dist/components/AgentActivity.js +4 -5
  28. package/dist/components/AgentActivityPreview.d.ts +9 -9
  29. package/dist/components/AgentActivityPreview.js +8 -12
  30. package/dist/components/AgentAttention.d.ts +1 -1
  31. package/dist/components/AgentAttention.js +1 -1
  32. package/dist/components/AgentChat.d.ts +1 -1
  33. package/dist/components/AgentChat.js +94 -62
  34. package/dist/components/AgentChatMessageEditor.js +2 -2
  35. package/dist/components/AgentChatTurnError.js +2 -2
  36. package/dist/components/AgentConnection.js +3 -3
  37. package/dist/components/AgentMessageParts.js +1 -1
  38. package/dist/components/AgentToolDetail.d.ts +6 -4
  39. package/dist/components/AgentToolDetail.js +12 -10
  40. package/dist/components/AlertDialog.js +1 -1
  41. package/dist/components/AppTopBar.d.ts +24 -7
  42. package/dist/components/AppTopBar.js +32 -8
  43. package/dist/components/Approval.js +4 -4
  44. package/dist/components/Artifact.d.ts +1 -1
  45. package/dist/components/Artifact.js +6 -4
  46. package/dist/components/Autocomplete.js +1 -1
  47. package/dist/components/Avatar.d.ts +1 -1
  48. package/dist/components/Avatar.js +2 -2
  49. package/dist/components/Badge.js +3 -0
  50. package/dist/components/BrowserLiveView.js +27 -12
  51. package/dist/components/BrowserReplay.js +4 -3
  52. package/dist/components/BrowserRunPanel.js +5 -5
  53. package/dist/components/Button.d.ts +1 -1
  54. package/dist/components/Button.js +14 -11
  55. package/dist/components/Card.d.ts +7 -8
  56. package/dist/components/Card.js +19 -10
  57. package/dist/components/ChainOfThought.d.ts +1 -1
  58. package/dist/components/ChainOfThought.js +2 -2
  59. package/dist/components/ChatGptSignInScreen.js +8 -8
  60. package/dist/components/Checkbox.js +2 -2
  61. package/dist/components/CheckboxGroup.js +1 -1
  62. package/dist/components/Checkpoint.js +2 -2
  63. package/dist/components/CodeBlock.d.ts +1 -1
  64. package/dist/components/CodeBlock.js +1 -1
  65. package/dist/components/CodexModelSelector.js +2 -2
  66. package/dist/components/Collapsible.js +2 -2
  67. package/dist/components/Combobox.js +1 -1
  68. package/dist/components/Commit.d.ts +1 -1
  69. package/dist/components/Commit.js +3 -3
  70. package/dist/components/Context.js +1 -1
  71. package/dist/components/ContextMenu.js +2 -2
  72. package/dist/components/Conversation.d.ts +1 -1
  73. package/dist/components/Conversation.js +5 -4
  74. package/dist/components/DescriptionListParts.js +1 -1
  75. package/dist/components/Dialog.js +1 -1
  76. package/dist/components/EnvironmentVariables.d.ts +1 -1
  77. package/dist/components/EnvironmentVariables.js +3 -3
  78. package/dist/components/Field.js +5 -2
  79. package/dist/components/Fieldset.js +1 -1
  80. package/dist/components/FileTree.d.ts +6 -0
  81. package/dist/components/FileTree.js +1 -1
  82. package/dist/components/Form.js +1 -1
  83. package/dist/components/GithubMotionMark.js +1 -1
  84. package/dist/components/IconButton.d.ts +2 -3
  85. package/dist/components/IconButton.js +2 -1
  86. package/dist/components/InlineCitation.js +1 -1
  87. package/dist/components/Input.js +1 -1
  88. package/dist/components/Marker.js +1 -1
  89. package/dist/components/McpConnectionRequest.js +2 -2
  90. package/dist/components/McpServerPicker.js +2 -2
  91. package/dist/components/MediaPreviewCard.d.ts +103 -0
  92. package/dist/components/MediaPreviewCard.js +193 -0
  93. package/dist/components/Menu.js +1 -1
  94. package/dist/components/Menubar.js +2 -2
  95. package/dist/components/Message.d.ts +4 -1
  96. package/dist/components/Message.js +1 -1
  97. package/dist/components/MessageScroller.d.ts +1 -1
  98. package/dist/components/MessageScroller.js +5 -4
  99. package/dist/components/Meter.js +1 -1
  100. package/dist/components/ModelSelector.d.ts +4 -3
  101. package/dist/components/ModelSelector.js +1 -1
  102. package/dist/components/NavigationMenu.js +1 -1
  103. package/dist/components/NumberField.js +1 -1
  104. package/dist/components/Plan.js +2 -2
  105. package/dist/components/Popover.js +1 -1
  106. package/dist/components/PreviewCard.js +1 -1
  107. package/dist/components/PricingBillingToggle.js +1 -1
  108. package/dist/components/PricingFAQ.js +1 -1
  109. package/dist/components/PricingPage.js +2 -1
  110. package/dist/components/PricingPlanCard.js +4 -3
  111. package/dist/components/PricingUsageCalculator.js +2 -2
  112. package/dist/components/Progress.js +1 -1
  113. package/dist/components/PromptInput.d.ts +1 -1
  114. package/dist/components/PromptInput.js +33 -20
  115. package/dist/components/Queue.d.ts +1 -1
  116. package/dist/components/Queue.js +2 -3
  117. package/dist/components/RadioGroup.js +1 -1
  118. package/dist/components/Reasoning.js +3 -6
  119. package/dist/components/ResizableSidePanel.js +1 -1
  120. package/dist/components/ResponsiveSidebarShell.js +16 -10
  121. package/dist/components/ScrollArea.js +2 -1
  122. package/dist/components/SearchField.d.ts +43 -0
  123. package/dist/components/SearchField.js +52 -0
  124. package/dist/components/Select.d.ts +1 -1
  125. package/dist/components/Select.js +5 -6
  126. package/dist/components/Separator.js +1 -1
  127. package/dist/components/Slider.js +1 -1
  128. package/dist/components/Sources.js +2 -2
  129. package/dist/components/Stepper.js +16 -9
  130. package/dist/components/SubagentRunDetails.js +1 -1
  131. package/dist/components/SubagentRunIndicator.js +2 -2
  132. package/dist/components/SubagentRunList.d.ts +3 -5
  133. package/dist/components/SubagentRunList.js +3 -4
  134. package/dist/components/SubagentRunSelector.d.ts +8 -12
  135. package/dist/components/SubagentRunSelector.js +17 -20
  136. package/dist/components/Switch.d.ts +2 -2
  137. package/dist/components/Switch.js +4 -5
  138. package/dist/components/Tabs.d.ts +2 -2
  139. package/dist/components/Tabs.js +12 -3
  140. package/dist/components/Task.js +2 -2
  141. package/dist/components/Terminal.d.ts +2 -2
  142. package/dist/components/Terminal.js +5 -4
  143. package/dist/components/TestResults.js +10 -6
  144. package/dist/components/Textarea.js +1 -1
  145. package/dist/components/ThemeModeControl.js +1 -1
  146. package/dist/components/ThinkChat.d.ts +33 -20
  147. package/dist/components/ThinkChat.js +4 -4
  148. package/dist/components/ThinkChatActivity.d.ts +2 -2
  149. package/dist/components/ThinkChatActivity.js +8 -10
  150. package/dist/components/ThinkChatActivitySummary.d.ts +1 -1
  151. package/dist/components/ThinkChatActivitySummary.js +7 -3
  152. package/dist/components/ThinkChatToolPanels.js +26 -16
  153. package/dist/components/ThinkExecutionDetail.js +2 -2
  154. package/dist/components/ThinkExecutionStatus.js +2 -2
  155. package/dist/components/ThinkExecutionWorkbench.d.ts +30 -8
  156. package/dist/components/ThinkExecutionWorkbench.js +70 -134
  157. package/dist/components/ThinkFullApp.d.ts +36 -35
  158. package/dist/components/ThinkFullApp.js +156 -109
  159. package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
  160. package/dist/components/ThinkFullAppViewSwitch.js +1 -1
  161. package/dist/components/ThinkRecoveryNotice.js +18 -12
  162. package/dist/components/ThinkRoutineBrowser.d.ts +17 -9
  163. package/dist/components/ThinkRoutineBrowser.js +33 -40
  164. package/dist/components/ThinkRoutineDetail.d.ts +5 -2
  165. package/dist/components/ThinkRoutineDetail.js +4 -4
  166. package/dist/components/ThinkRoutineForm.d.ts +3 -2
  167. package/dist/components/ThinkRoutineForm.js +11 -10
  168. package/dist/components/ThinkRoutineLibrary.d.ts +24 -31
  169. package/dist/components/ThinkRoutineLibrary.js +57 -80
  170. package/dist/components/ThinkRoutineRuns.d.ts +3 -2
  171. package/dist/components/ThinkRoutineRuns.js +31 -24
  172. package/dist/components/ThinkThreadPicker.d.ts +17 -11
  173. package/dist/components/ThinkThreadPicker.js +163 -39
  174. package/dist/components/Toast.js +1 -1
  175. package/dist/components/Toggle.d.ts +1 -1
  176. package/dist/components/Toggle.js +9 -7
  177. package/dist/components/ToggleGroup.d.ts +1 -1
  178. package/dist/components/ToggleGroup.js +15 -13
  179. package/dist/components/ToolInvocation.js +1 -1
  180. package/dist/components/Toolbar.js +1 -1
  181. package/dist/components/Tooltip.d.ts +8 -1
  182. package/dist/components/Tooltip.js +11 -2
  183. package/dist/components/TransitionSurface.d.ts +27 -0
  184. package/dist/components/TransitionSurface.js +20 -0
  185. package/dist/components/WebPreview.d.ts +5 -5
  186. package/dist/components/WebPreview.js +68 -54
  187. package/dist/components/Workspace.d.ts +2 -2
  188. package/dist/components/Workspace.js +358 -328
  189. package/dist/components/WorkspaceBrowser.d.ts +4 -7
  190. package/dist/components/WorkspaceBrowser.js +15 -25
  191. package/dist/components/WorkspaceExplorer.d.ts +5 -5
  192. package/dist/components/WorkspaceExplorer.js +19 -32
  193. package/dist/components/WorkspaceFile.d.ts +1 -1
  194. package/dist/components/WorkspaceFileView.d.ts +14 -2
  195. package/dist/components/WorkspaceFileView.js +1 -1
  196. package/dist/components/WorkspaceHeader.d.ts +0 -8
  197. package/dist/components/WorkspaceHeader.js +3 -15
  198. package/dist/components/WorkspaceLink.d.ts +1 -1
  199. package/dist/components/WorkspaceLink.js +1 -1
  200. package/dist/components/icons.d.ts +2 -2
  201. package/dist/components/icons.js +2 -2
  202. package/dist/{copy-button-CQx3LQAC.d.ts → copy-button-D7aAYA-2.d.ts} +1 -1
  203. package/dist/{copy-button-cYsJBauI.js → copy-button-DeK6KXEV.js} +3 -2
  204. package/dist/{icons--FqCZEc3.js → icons-CQJ-aMnI.js} +6 -3
  205. package/dist/{icons-DpUqY8Mp.d.ts → icons-CYXmvKlJ.d.ts} +17 -2
  206. package/dist/navigation-link-Cob7KBlM.js +19 -0
  207. package/dist/styles/accordion.css +4 -19
  208. package/dist/styles/activity.css +48 -56
  209. package/dist/styles/agent-activity-preview.css +2 -0
  210. package/dist/styles/agent-chat.css +14 -22
  211. package/dist/styles/alert-dialog.css +16 -18
  212. package/dist/styles/app-top-bar.css +17 -9
  213. package/dist/styles/approval.css +11 -6
  214. package/dist/styles/artifact.css +6 -6
  215. package/dist/styles/autocomplete.css +2 -1
  216. package/dist/styles/avatar.css +35 -30
  217. package/dist/styles/badge.css +10 -10
  218. package/dist/styles/base-ui-motion.css +94 -39
  219. package/dist/styles/browser-control-overlay.css +0 -1
  220. package/dist/styles/browser-live-view.css +39 -22
  221. package/dist/styles/browser-replay.css +1 -1
  222. package/dist/styles/browser-run-panel.css +8 -4
  223. package/dist/styles/button.css +36 -33
  224. package/dist/styles/card.css +5 -6
  225. package/dist/styles/chain-of-thought.css +22 -16
  226. package/dist/styles/checkbox.css +18 -5
  227. package/dist/styles/codex-model-selector.css +3 -7
  228. package/dist/styles/collapsible.css +10 -10
  229. package/dist/styles/combobox.css +3 -2
  230. package/dist/styles/commit.css +19 -18
  231. package/dist/styles/composition-motion.css +83 -0
  232. package/dist/styles/context-menu.css +3 -3
  233. package/dist/styles/context.css +11 -10
  234. package/dist/styles/conversation.css +18 -23
  235. package/dist/styles/dialog.css +15 -15
  236. package/dist/styles/field.css +32 -12
  237. package/dist/styles/file-tree.css +69 -9
  238. package/dist/styles/form.css +1 -1
  239. package/dist/styles/index.css +5 -0
  240. package/dist/styles/input.css +2 -2
  241. package/dist/styles/marker.css +14 -13
  242. package/dist/styles/mcp-server-picker.css +20 -17
  243. package/dist/styles/media-preview-card.css +160 -0
  244. package/dist/styles/menu.css +11 -11
  245. package/dist/styles/menubar.css +12 -11
  246. package/dist/styles/message.css +27 -21
  247. package/dist/styles/meter.css +2 -2
  248. package/dist/styles/model-selector.css +16 -14
  249. package/dist/styles/motion-reduction.css +29 -0
  250. package/dist/styles/navigation-menu.css +14 -30
  251. package/dist/styles/number-field.css +22 -4
  252. package/dist/styles/plan.css +5 -0
  253. package/dist/styles/popover.css +15 -16
  254. package/dist/styles/preview-card.css +2 -32
  255. package/dist/styles/progress.css +8 -3
  256. package/dist/styles/prompt-input.css +75 -75
  257. package/dist/styles/queue.css +48 -32
  258. package/dist/styles/radio.css +19 -12
  259. package/dist/styles/reasoning.css +2 -1
  260. package/dist/styles/recipes.css +109 -37
  261. package/dist/styles/resizable-side-panel.css +4 -10
  262. package/dist/styles/responsive-sidebar-shell.css +16 -15
  263. package/dist/styles/scroll-area.css +32 -15
  264. package/dist/styles/search-field.css +21 -0
  265. package/dist/styles/select.css +19 -12
  266. package/dist/styles/slider.css +25 -29
  267. package/dist/styles/sources.css +3 -3
  268. package/dist/styles/stepper.css +36 -26
  269. package/dist/styles/subagent-run.css +1 -1
  270. package/dist/styles/switch.css +32 -29
  271. package/dist/styles/tabs.css +79 -23
  272. package/dist/styles/task.css +13 -9
  273. package/dist/styles/test-results.css +29 -23
  274. package/dist/styles/theme-mode-control.css +8 -0
  275. package/dist/styles/think-execution-workbench.css +18 -15
  276. package/dist/styles/think-full-app.css +45 -68
  277. package/dist/styles/think-routine-library.css +43 -24
  278. package/dist/styles/think-thread-picker.css +193 -51
  279. package/dist/styles/toast.css +48 -27
  280. package/dist/styles/toggle-group.css +2 -36
  281. package/dist/styles/toggle.css +29 -5
  282. package/dist/styles/toolbar.css +25 -27
  283. package/dist/styles/tooltip.css +2 -32
  284. package/dist/styles/transition-surface.css +55 -0
  285. package/dist/styles/workspace-explorer.css +99 -44
  286. package/dist/summarize-tool-input-CqTcGRYy.js +15 -0
  287. package/dist/utils/mcp-server-catalog.d.ts +132 -0
  288. package/dist/utils/mcp-server-catalog.js +90 -0
  289. package/dist/utils/structured-code.d.ts +1 -1
  290. package/package.json +13 -7
  291. package/dist/Workspace-C9RFoxcu.d.ts +0 -62
  292. package/dist/summarize-tool-input-BUJsENSn.js +0 -12
@@ -1,5 +1,5 @@
1
- import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
2
- import { i as ArrowUpIcon, s as CheckIcon, t as ArrowDownIcon } from "../icons--FqCZEc3.js";
1
+ import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
2
+ import { a as ArrowUpIcon, l as CheckIcon, n as ArrowDownIcon } from "../icons-CQJ-aMnI.js";
3
3
  import "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Select as Select$1 } from "@base-ui/react/select";
@@ -44,13 +44,12 @@ function SelectLabel({ className, ref, ...props }) {
44
44
  ...props
45
45
  });
46
46
  }
47
- function SelectTrigger({ size = "default", className, ref, ...props }) {
48
- const normalizedSize = size === "md" ? "default" : size;
49
- const classes = mergeBaseClassName(["select__trigger", normalizedSize === "sm" && "select__trigger--sm"].filter(Boolean).join(" "), className);
47
+ function SelectTrigger({ size = "sm", className, ref, ...props }) {
48
+ const classes = mergeBaseClassName(["select__trigger", size === "sm" && "select__trigger--sm"].filter(Boolean).join(" "), className);
50
49
  return /* @__PURE__ */ jsx(Select$1.Trigger, {
51
50
  ref,
52
51
  "data-slot": "select-trigger",
53
- "data-size": normalizedSize,
52
+ "data-size": size,
54
53
  className: classes,
55
54
  ...props
56
55
  });
@@ -1,4 +1,4 @@
1
- import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
1
+ import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
2
2
  import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { Separator as Separator$1 } from "@base-ui/react/separator";
@@ -1,4 +1,4 @@
1
- import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
1
+ import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
2
2
  import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { Slider as Slider$1 } from "@base-ui/react/slider";
@@ -1,6 +1,6 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "./Collapsible.js";
3
- import { u as ChevronRightIcon, w as LinkIcon } from "../icons--FqCZEc3.js";
3
+ import { D as LinkIcon, f as ChevronRightIcon } from "../icons-CQJ-aMnI.js";
4
4
  import "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Sources.tsx
@@ -1,11 +1,12 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
2
- import { V as SpinnerIcon, s as CheckIcon } from "../icons--FqCZEc3.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
+ import { G as SpinnerIcon, l as CheckIcon } from "../icons-CQJ-aMnI.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";
6
6
  //#region src/components/Stepper.tsx
7
7
  const StepperContext = React.createContext(void 0);
8
8
  const StepItemContext = React.createContext(void 0);
9
+ const EMPTY_STEP_INDICATORS = {};
9
10
  function useStepper() {
10
11
  const context = React.useContext(StepperContext);
11
12
  if (!context) throw new Error("useStepper must be used within a Stepper");
@@ -36,7 +37,7 @@ function useStepItem() {
36
37
  *
37
38
  * @see {@link https://reui.io/docs/components/base/stepper | ReUI Stepper}
38
39
  */
39
- function Stepper({ defaultValue = 1, value, onValueChange, orientation = "horizontal", indicators = {}, className, children, ref, ...props }) {
40
+ function Stepper({ defaultValue = 1, value, onValueChange, orientation = "horizontal", indicators = EMPTY_STEP_INDICATORS, className, children, ref, ...props }) {
40
41
  const idPrefix = `stepper-${React.useId()}`;
41
42
  const [uncontrolledValue, setUncontrolledValue] = React.useState(defaultValue);
42
43
  const triggerNodes = React.useRef(/* @__PURE__ */ new Map());
@@ -135,13 +136,19 @@ function StepperItem({ step, completed = false, disabled = false, loading = fals
135
136
  const { activeStep } = useStepper();
136
137
  const isLoading = loading && step === activeStep;
137
138
  const state = isLoading ? "loading" : completed || step < activeStep ? "completed" : activeStep === step ? "active" : "inactive";
139
+ const contextValue = React.useMemo(() => ({
140
+ step,
141
+ state,
142
+ isDisabled: disabled,
143
+ isLoading
144
+ }), [
145
+ disabled,
146
+ isLoading,
147
+ state,
148
+ step
149
+ ]);
138
150
  return /* @__PURE__ */ jsx(StepItemContext.Provider, {
139
- value: {
140
- step,
141
- state,
142
- isDisabled: disabled,
143
- isLoading
144
- },
151
+ value: contextValue,
145
152
  children: /* @__PURE__ */ jsx("div", {
146
153
  ref,
147
154
  role: "presentation",
@@ -1,4 +1,4 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.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-Bk-QLWWI.js";
2
- import { J as WarningIcon, V as SpinnerIcon, W as StopIcon, s as CheckIcon } from "../icons--FqCZEc3.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
+ import { G as SpinnerIcon, Z as WarningIcon, l as CheckIcon, q as StopIcon } from "../icons-CQJ-aMnI.js";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/SubagentRunIndicator.tsx
@@ -6,16 +6,14 @@ import { AgentToolRunPart, AgentToolRunState } from "agents/agent-tools";
6
6
  interface SubagentRunListProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<React.HTMLAttributes<HTMLUListElement>, "children" | "onSelect"> {
7
7
  /** Complete retained runs returned by `useAgentToolEvents()`, in display order. */
8
8
  runs: readonly AgentToolRunState<Part>[];
9
- selectedRunId?: string | null;
10
- /** Called with the whole upstream run selected for the adjacent detail surface. */
11
- onSelect?: (run: AgentToolRunState<Part>) => void;
9
+ /** App-authored TanStack Router Link for every retained run destination. */
10
+ renderRunLink: (run: AgentToolRunState<Part>) => React.ReactElement;
12
11
  }
13
12
  /** Semantic, wrapping list of retained-run selectors. */
14
13
  declare function SubagentRunList<Part extends AgentToolRunPart = UIMessage["parts"][number]>({
15
14
  className,
16
- onSelect,
15
+ renderRunLink,
17
16
  runs,
18
- selectedRunId,
19
17
  ref,
20
18
  ...props
21
19
  }: SubagentRunListProps<Part> & {
@@ -1,10 +1,10 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { SubagentRunSelector } from "./SubagentRunSelector.js";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/SubagentRunList.tsx
6
6
  /** Semantic, wrapping list of retained-run selectors. */
7
- function SubagentRunList({ className, onSelect, runs, selectedRunId, ref, ...props }) {
7
+ function SubagentRunList({ className, renderRunLink, runs, ref, ...props }) {
8
8
  return /* @__PURE__ */ jsx("ul", {
9
9
  ref,
10
10
  "data-slot": "subagent-run-list",
@@ -15,8 +15,7 @@ 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
- selected: run.runId === selectedRunId,
19
- onSelect
18
+ render: renderRunLink(run)
20
19
  })
21
20
  }, run.runId))
22
21
  });
@@ -1,38 +1,34 @@
1
- import { r as ButtonProps } from "../Button-FX_hpqxm.js";
2
1
  import * as React from "react";
3
2
  import { UIMessage } from "ai";
4
3
  import { AgentToolRunPart, AgentToolRunState } from "agents/agent-tools";
5
4
 
6
5
  //#region src/components/SubagentRunSelector.d.ts
7
- interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<ButtonProps, "children" | "color" | "onSelect" | "size" | "variant"> {
6
+ interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "children"> {
8
7
  /** Complete retained-run state returned by `useAgentToolEvents()`. */
9
8
  run: AgentToolRunState<Part>;
10
- selected?: boolean;
9
+ /** App-authored TanStack Router Link for this retained run. */
10
+ render: React.ReactElement;
11
11
  /** Short supplementary status shown on hover and keyboard focus. `false` disables it. */
12
12
  tooltip?: React.ReactNode | false;
13
- /** Called with the whole upstream run when the selector is activated. */
14
- onSelect?: (run: AgentToolRunState<Part>) => void;
15
13
  }
16
14
  /**
17
15
  * Compact selector for a retained Cloudflare Agent Tool run.
18
16
  *
19
17
  * The component consumes `AgentToolRunState` whole and derives its label and
20
- * status from upstream fields. Selecting it should route `run.subAgent` into
21
- * an adjacent detail surface; it never invents a second transcript or expands
22
- * child content inline.
18
+ * status from upstream fields. The application-authored Link routes
19
+ * `run.subAgent` into an adjacent detail surface; this component never invents
20
+ * a second transcript or expands child content inline.
23
21
  */
24
22
  declare function SubagentRunSelector<Part extends AgentToolRunPart = UIMessage["parts"][number]>({
25
23
  className,
26
- onClick,
27
- onSelect,
24
+ render,
28
25
  run,
29
- selected,
30
26
  tooltip,
31
27
  ref,
32
28
  "aria-label": ariaLabel,
33
29
  ...props
34
30
  }: SubagentRunSelectorProps<Part> & {
35
- ref?: React.Ref<HTMLButtonElement>;
31
+ ref?: React.Ref<HTMLAnchorElement>;
36
32
  }): React.JSX.Element;
37
33
  //#endregion
38
34
  export { SubagentRunSelector, SubagentRunSelectorProps };
@@ -1,5 +1,6 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
2
- import { Button } from "./Button.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
+ import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
3
+ import { buttonVariants } from "./Button.js";
3
4
  import { Tooltip } from "./Tooltip.js";
4
5
  import { NaniteMark } from "./NaniteScene.js";
5
6
  import { SubagentRunIndicator, getSubagentRunName, getSubagentRunTooltip } from "./SubagentRunIndicator.js";
@@ -10,27 +11,23 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
11
  * Compact selector for a retained Cloudflare Agent Tool run.
11
12
  *
12
13
  * The component consumes `AgentToolRunState` whole and derives its label and
13
- * status from upstream fields. Selecting it should route `run.subAgent` into
14
- * an adjacent detail surface; it never invents a second transcript or expands
15
- * child content inline.
14
+ * status from upstream fields. The application-authored Link routes
15
+ * `run.subAgent` into an adjacent detail surface; this component never invents
16
+ * a second transcript or expands child content inline.
16
17
  */
17
- function SubagentRunSelector({ className, onClick, onSelect, run, selected = false, tooltip, ref, "aria-label": ariaLabel, ...props }) {
18
+ function SubagentRunSelector({ className, render, run, tooltip, ref, "aria-label": ariaLabel, ...props }) {
18
19
  const name = getSubagentRunName(run);
19
- const button = /* @__PURE__ */ jsxs(Button, {
20
+ const link = /* @__PURE__ */ jsxs(NavigationLink, {
20
21
  ref,
21
- type: "button",
22
- variant: "outline",
23
- color: "neutral",
24
- size: "xs",
22
+ render,
25
23
  "data-slot": "subagent-run-selector",
26
- "data-status": run.status,
27
- className: cx("subagent-run__selector", className),
28
- "aria-pressed": selected,
24
+ "data-run-status": run.status,
25
+ className: cx(buttonVariants({
26
+ variant: "outline",
27
+ color: "neutral",
28
+ size: "sm"
29
+ }), "subagent-run__selector", className),
29
30
  "aria-label": ariaLabel ?? `Open ${name}, ${run.status}`,
30
- onClick: (event) => {
31
- onClick?.(event);
32
- if (!event.defaultPrevented) onSelect?.(run);
33
- },
34
31
  ...props,
35
32
  children: [
36
33
  /* @__PURE__ */ jsx(NaniteMark, { index: run.order }),
@@ -42,9 +39,9 @@ function SubagentRunSelector({ className, onClick, onSelect, run, selected = fal
42
39
  ]
43
40
  });
44
41
  const tooltipContent = tooltip === false ? null : tooltip ?? getSubagentRunTooltip(run);
45
- if (!tooltipContent) return button;
42
+ if (!tooltipContent) return link;
46
43
  return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
47
- render: button,
44
+ render: link,
48
45
  delay: 0
49
46
  }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
50
47
  side: "top",
@@ -5,9 +5,9 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
5
5
  interface SwitchProps extends React.ComponentPropsWithRef<typeof Switch$1.Root> {
6
6
  /**
7
7
  * The size of the switch.
8
- * @default 'default'
8
+ * @default 'md'
9
9
  */
10
- size?: "sm" | "md" | "lg" | "default";
10
+ size?: "sm" | "md" | "lg";
11
11
  }
12
12
  interface SwitchThumbProps extends React.ComponentPropsWithRef<typeof Switch$1.Thumb> {}
13
13
  /**
@@ -1,4 +1,4 @@
1
- import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
1
+ import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
2
2
  import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { Switch as Switch$1 } from "@base-ui/react/switch";
@@ -24,13 +24,12 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
24
24
  *
25
25
  * @see {@link https://base-ui.com/react/components/switch | Base UI Switch}
26
26
  */
27
- function SwitchRoot({ size = "default", className, ref, ...props }) {
28
- const normalizedSize = size === "md" ? "default" : size;
29
- const classes = mergeBaseClassName(["switch", normalizedSize !== "default" && `switch--${normalizedSize}`].filter(Boolean).join(" "), className);
27
+ function SwitchRoot({ size = "md", className, ref, ...props }) {
28
+ const classes = mergeBaseClassName(["switch", size !== "md" && `switch--${size}`].filter(Boolean).join(" "), className);
30
29
  return /* @__PURE__ */ jsx(Switch$1.Root, {
31
30
  ref,
32
31
  "data-slot": "switch",
33
- "data-size": normalizedSize,
32
+ "data-size": size,
34
33
  className: classes,
35
34
  ...props
36
35
  });
@@ -1,2 +1,2 @@
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
+ import { a as TabsListProps, i as TabsIndicatorProps, n as TabProps, o as TabsProps, r as Tabs, t as TabPanelProps } from "../Tabs-ColWK-XA.js";
2
+ export { TabPanelProps, TabProps, Tabs, TabsIndicatorProps, TabsListProps, TabsProps };
@@ -1,4 +1,4 @@
1
- import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
1
+ import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
2
2
  import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
@@ -31,8 +31,8 @@ function TabsRoot({ orientation = "horizontal", variant = "default", className,
31
31
  const classes = mergeBaseClassName(["tabs", variant !== "default" && `tabs--${variant}`].filter(Boolean).join(" "), className);
32
32
  return /* @__PURE__ */ jsx(Tabs$1.Root, {
33
33
  ref,
34
- "data-orientation": orientation,
35
34
  "data-slot": "tabs",
35
+ "data-variant": variant,
36
36
  orientation,
37
37
  className: classes,
38
38
  ...props
@@ -57,6 +57,15 @@ function Tab({ className, ref, ...props }) {
57
57
  ...props
58
58
  });
59
59
  }
60
+ function TabsIndicator({ className, ref, ...props }) {
61
+ const classes = mergeBaseClassName("tabs__indicator", className);
62
+ return /* @__PURE__ */ jsx(Tabs$1.Indicator, {
63
+ ref,
64
+ "data-slot": "tabs-indicator",
65
+ className: classes,
66
+ ...props
67
+ });
68
+ }
60
69
  function TabPanel({ className, ref, ...props }) {
61
70
  const classes = mergeBaseClassName("tabs__panel", className);
62
71
  return /* @__PURE__ */ jsx(Tabs$1.Panel, {
@@ -70,7 +79,7 @@ const Tabs = {
70
79
  Root: TabsRoot,
71
80
  List: TabsList,
72
81
  Tab,
73
- Indicator: Tabs$1.Indicator,
82
+ Indicator: TabsIndicator,
74
83
  Panel: TabPanel
75
84
  };
76
85
  //#endregion
@@ -1,6 +1,6 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "./Collapsible.js";
3
- import { u as ChevronRightIcon, y as FileIcon, z as SearchIcon } from "../icons--FqCZEc3.js";
3
+ import { U as SearchIcon, f as ChevronRightIcon, x as FileIcon } from "../icons-CQJ-aMnI.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Task.tsx
@@ -1,5 +1,5 @@
1
- import { r as ButtonProps } from "../Button-FX_hpqxm.js";
2
- import { t as CopyButtonProps } from "../copy-button-CQx3LQAC.js";
1
+ import { r as ButtonProps } from "../Button-DLGzHsjc.js";
2
+ import { t as CopyButtonProps } from "../copy-button-D7aAYA-2.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/Terminal.d.ts
@@ -1,8 +1,8 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
2
- import { K as TerminalIcon, X as XIcon } from "../icons--FqCZEc3.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
+ import { $ as XIcon, Y as TerminalIcon } from "../icons-CQJ-aMnI.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Tooltip } from "./Tooltip.js";
5
- import { t as CopyButton } from "../copy-button-cYsJBauI.js";
5
+ import { t as CopyButton } from "../copy-button-DeK6KXEV.js";
6
6
  import { Badge } from "./Badge.js";
7
7
  import { ScrollArea } from "./ScrollArea.js";
8
8
  import * as React from "react";
@@ -219,7 +219,8 @@ function TerminalClearButton({ className, label = "Clear terminal", onClick, ...
219
219
  }, [onClear, onClick]);
220
220
  return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
221
221
  variant: "ghost",
222
- size: "icon",
222
+ size: "sm",
223
+ iconOnly: true,
223
224
  "aria-label": label,
224
225
  className: cx("terminal__clear", className),
225
226
  ...props,
@@ -1,6 +1,6 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "./Collapsible.js";
3
- import { V as SpinnerIcon, X as XIcon, s as CheckIcon, u as ChevronRightIcon } from "../icons--FqCZEc3.js";
3
+ import { $ as XIcon, G as SpinnerIcon, f as ChevronRightIcon, l as CheckIcon } from "../icons-CQJ-aMnI.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";
@@ -45,6 +45,7 @@ const TestResultsContext = React.createContext({});
45
45
  function TestResults({ className, summary, children, ref, ...props }) {
46
46
  const overall = summary && summary.failed > 0 ? "failed" : "passed";
47
47
  const contextValue = React.useMemo(() => ({ summary }), [summary]);
48
+ const isComposable = hasComposableTestResultsChildren(children);
48
49
  return /* @__PURE__ */ jsx(TestResultsContext.Provider, {
49
50
  value: contextValue,
50
51
  children: /* @__PURE__ */ jsx("div", {
@@ -53,7 +54,7 @@ function TestResults({ className, summary, children, ref, ...props }) {
53
54
  "data-status": overall,
54
55
  ...props,
55
56
  "data-recipe": "framed-panel",
56
- children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(TestResultsHeader, { children: [/* @__PURE__ */ jsx(TestResultsSummary, {}), /* @__PURE__ */ jsx(TestResultsProgress, {})] }), /* @__PURE__ */ jsx(TestResultsContent, {})] })
57
+ children: isComposable ? children : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(TestResultsHeader, { children: [/* @__PURE__ */ jsx(TestResultsSummary, {}), /* @__PURE__ */ jsx(TestResultsProgress, {})] }), /* @__PURE__ */ jsx(TestResultsContent, { children })] })
57
58
  })
58
59
  });
59
60
  }
@@ -85,7 +86,6 @@ function TestResultsSummary({ className, children, ref, ...props }) {
85
86
  ...props,
86
87
  children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Badge, {
87
88
  color: STATUS_COLOR[overall],
88
- className: "test-results__overall",
89
89
  children: overall === "passed" ? "All tests passed" : `${summary.failed} failed`
90
90
  }), /* @__PURE__ */ jsxs("span", {
91
91
  className: "test-results__stats",
@@ -129,13 +129,14 @@ function TestResultsProgress({ className, children, ref, ...props }) {
129
129
  "aria-valuenow": summary.passed,
130
130
  "aria-valuetext": `${summary.passed}/${summary.total} tests passed, ${summary.failed} failed`,
131
131
  className: "test-results__progress-track",
132
+ "data-slot": "progress-track",
132
133
  role: "progressbar",
133
134
  children: [/* @__PURE__ */ jsx("div", {
134
135
  className: "test-results__progress-segment test-results__progress-segment--passed",
135
- style: { width: `${passedPercent}%` }
136
+ style: { inlineSize: `${passedPercent}%` }
136
137
  }), /* @__PURE__ */ jsx("div", {
137
138
  className: "test-results__progress-segment test-results__progress-segment--failed",
138
- style: { width: `${failedPercent}%` }
139
+ style: { inlineSize: `${failedPercent}%` }
139
140
  })]
140
141
  }), /* @__PURE__ */ jsxs("span", {
141
142
  className: "test-results__progress-label",
@@ -158,6 +159,9 @@ function TestResultsContent({ className, children, ref, ...props }) {
158
159
  children
159
160
  });
160
161
  }
162
+ function hasComposableTestResultsChildren(children) {
163
+ return React.Children.toArray(children).some((child) => React.isValidElement(child) && (child.type === TestResultsHeader || child.type === TestResultsSummary || child.type === TestResultsProgress || child.type === TestResultsContent));
164
+ }
161
165
  const TestSuiteContext = React.createContext({
162
166
  name: "",
163
167
  status: "passed"
@@ -1,4 +1,4 @@
1
- import { t as cx } from "../class-names-Bk-QLWWI.js";
1
+ import { t as cx } from "../class-names-BiMDVpUo.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 MonitorIcon, G as SunIcon, j as MoonIcon } from "../icons--FqCZEc3.js";
1
+ import { J as SunIcon, N as MonitorIcon, P as MoonIcon } from "../icons-CQJ-aMnI.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,24 +1,29 @@
1
1
  import { i as AgentMessageRenderPartContext } from "../AgentMessageParts-CyD2UB3V.js";
2
- import { r as AgentChatProps } from "../AgentChat-CRuMi1Pb.js";
2
+ import { r as AgentChatProps } from "../AgentChat-ClxViuUM.js";
3
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
- 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-BgesTfZ4.js";
5
+ import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-D1xOrNrq.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-Bzot45kX.js";
7
7
  import { n as ThinkChatValue } from "../ThinkChatContext-DrsZqdaO.js";
8
8
  import { n as ThinkRecoveryNoticeProps, t as ThinkRecoveryNotice } from "../ThinkRecoveryNotice-DFIcG9UX.js";
9
9
  import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
10
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
+ import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../WorkspaceFile-CzyHnESE.js";
12
+ import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceFileStatQueryOptions, f as workspaceInfoQueryOptions, i as WorkspaceQueryKey, l as workspaceDirectoryQueryOptions, m as workspaceTextFileQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceQueryKey, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceFileAssetQueryOptions } from "../Workspace-Jez8ffUj.js";
13
+ import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../WorkspaceExplorer-B9dQWNVK.js";
14
14
  import * as React from "react";
15
15
  import { UIMessage } from "ai";
16
16
  import { UseAgentOptions } from "agents/react";
17
+ import { DataTag, UndefinedInitialDataOptions } from "@tanstack/react-query";
17
18
  import { PendingApproval, Think } from "@cloudflare/think";
18
19
  import { AgentStub } from "agents/client";
19
20
  import { UseVoiceInputReturn } from "@cloudflare/voice/react";
20
21
 
21
22
  //#region src/components/ThinkChat.d.ts
23
+ type ThinkPendingExecutionApprovalsQueryKey = readonly ["think", sourceKey: string, "pending-approvals"];
24
+ type ThinkPendingExecutionApprovalsQueryOptions = UndefinedInitialDataOptions<readonly PendingApproval[], Error, readonly PendingApproval[], ThinkPendingExecutionApprovalsQueryKey> & {
25
+ queryKey: DataTag<ThinkPendingExecutionApprovalsQueryKey, readonly PendingApproval[], Error>;
26
+ };
22
27
  interface ThinkChatProviderProps<State = unknown, MessageT extends UIMessage = UIMessage> {
23
28
  /** The `useAgentChat` value from `@cloudflare/think/react` that descendants read. */
24
29
  chat: ThinkChatValue<State, MessageT>;
@@ -31,6 +36,11 @@ interface ThinkChatRootProps<State = unknown> {
31
36
  agent: string | UseAgentOptions<State>;
32
37
  /** Instance name (e.g. a session or room id). Wins over `agent.name`. */
33
38
  name?: string;
39
+ /**
40
+ * Stable, non-secret identity for the remote Think agent. Include endpoint,
41
+ * account or tenant scope, and agent path so sources cannot share cached data.
42
+ */
43
+ sourceKey: string;
34
44
  children: React.ReactNode;
35
45
  }
36
46
  interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends ThinkChatActivityRendererOptions<MessageT> {
@@ -43,12 +53,6 @@ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends
43
53
  emptyState?: React.ReactNode;
44
54
  /** Extra controls rendered inside the composer, next to the send button. */
45
55
  composerTools?: React.ReactNode;
46
- /** Keep submitting composed follow-ups through `chat.sendMessage()` while busy. */
47
- allowSubmitWhileBusy?: AgentChatProps<MessageT>["allowSubmitWhileBusy"];
48
- /** Authoritative queued messages rendered outside the transcript. */
49
- queuedMessages?: AgentChatProps<MessageT>["queuedMessages"];
50
- onSteerQueuedMessage?: AgentChatProps<MessageT>["onSteerQueuedMessage"];
51
- onRemoveQueuedMessage?: AgentChatProps<MessageT>["onRemoveQueuedMessage"];
52
56
  /** Host-owned slash-command catalog and selection policy. */
53
57
  slashCommands?: AgentChatProps<MessageT>["slashCommands"];
54
58
  /** Controlled MCP catalog revealed by `@`; selections become composer references. */
@@ -100,7 +104,9 @@ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends
100
104
  */
101
105
  contextWindow?: AgentChatProps<MessageT>["contextWindow"];
102
106
  }
103
- declare function useThinkPendingApprovals(stub: AgentStub<Think>, refreshKey: unknown): {
107
+ /** Shared pending-approval options for components and TanStack Router loaders. */
108
+ declare function thinkPendingExecutionApprovalsQueryOptions(stub: AgentStub<Think>, sourceKey: string): ThinkPendingExecutionApprovalsQueryOptions;
109
+ declare function useThinkPendingExecutionApprovals(stub: AgentStub<Think>, sourceKey: string, refreshSignal?: unknown): {
104
110
  pendingApprovals: readonly PendingApproval[];
105
111
  refreshPendingApprovals: () => Promise<void>;
106
112
  };
@@ -117,18 +123,26 @@ declare function ThinkChatProvider<State = unknown, MessageT extends UIMessage =
117
123
  /**
118
124
  * Batteries-included root: connects to the named Think agent (upstream's
119
125
  * `useAgent` + `useAgentChat`) and provides the live chat to everything
120
- * inside. If the app already owns the chat hook, use `ThinkChat.Provider`.
126
+ * inside. Render it beneath the app's `QueryClientProvider`. If the app
127
+ * already owns the chat hook, use `ThinkChat.Provider`.
121
128
  *
122
129
  * @example
123
130
  * ```tsx
124
- * <ThinkChat.Root agent="my-agent" name="session-1">
125
- * <ThinkChat.Messages />
126
- * </ThinkChat.Root>
131
+ * <QueryClientProvider client={queryClient}>
132
+ * <ThinkChat.Root
133
+ * agent="my-agent"
134
+ * name="session-1"
135
+ * sourceKey="api.example.com:account:acme:agent:session-1"
136
+ * >
137
+ * <ThinkChat.Messages />
138
+ * </ThinkChat.Root>
139
+ * </QueryClientProvider>
127
140
  * ```
128
141
  */
129
142
  declare function ThinkChatRoot<State = unknown, MessageT extends UIMessage = UIMessage>({
130
143
  agent: agentOption,
131
144
  name,
145
+ sourceKey,
132
146
  children
133
147
  }: ThinkChatRootProps<State>): React.JSX.Element;
134
148
  /**
@@ -145,8 +159,7 @@ declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage =
145
159
  composerHeader,
146
160
  renderPart,
147
161
  excludeTools,
148
- onAgentToolRunSelect,
149
- selectedAgentToolRunId,
162
+ renderAgentToolRunLink,
150
163
  toolRenderers,
151
164
  thinkStub,
152
165
  onExecutionSettled,
@@ -194,4 +207,4 @@ declare const ThinkChat: {
194
207
  createActivityRenderer: typeof createThinkChatActivityRenderer;
195
208
  };
196
209
  //#endregion
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 };
210
+ 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, ThinkPendingExecutionApprovalsQueryKey, ThinkPendingExecutionApprovalsQueryOptions, ThinkRecoveryNotice, type ThinkRecoveryNoticeProps, type UseWorkspaceOptions, WorkspaceExplorer, type WorkspaceExplorerProps, type WorkspaceFileReadTarget, type WorkspaceFileState, type WorkspaceInfo, type WorkspaceQueryKey, type WorkspaceSource, type WorkspaceState, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, thinkPendingExecutionApprovalsQueryOptions, useOptionalAgentToolRuns, useThinkChat, useThinkPendingExecutionApprovals, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryOptions, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
@@ -1,12 +1,12 @@
1
1
  import { isThinkChatActivityPart } from "./ThinkChatToolParts.js";
2
2
  import { AgentToolRunsProvider, useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
3
3
  import { BrowserLiveView } from "./BrowserLiveView.js";
4
+ import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
4
5
  import { describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
5
6
  import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./ThinkChatActivity.js";
6
7
  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 { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../ThinkChat-15EhfvYJ.js";
8
9
  import { BrowserReplay } from "./BrowserReplay.js";
9
- import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
10
- import { useWorkspace } from "./Workspace.js";
10
+ import { useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryOptions, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions } from "./Workspace.js";
11
11
  import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
12
- export { AgentToolRunsProvider, BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, ThinkRecoveryNotice, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useOptionalAgentToolRuns, useThinkChat, useThinkPendingApprovals, useWorkspace };
12
+ export { AgentToolRunsProvider, BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, ThinkRecoveryNotice, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, thinkPendingExecutionApprovalsQueryOptions, useOptionalAgentToolRuns, useThinkChat, useThinkPendingExecutionApprovals, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryOptions, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
@@ -1,4 +1,4 @@
1
1
  import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
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-BgesTfZ4.js";
2
+ import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-D1xOrNrq.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-Bzot45kX.js";
4
4
  export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, describeThinkChatActivityPart, isThinkChatActivityPart, renderThinkChatActivityPart };