@mcp-b/react-components 0.11.0 → 0.13.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 (253) hide show
  1. package/dist/{AgentChat-B9LD_WF1.d.ts → AgentChat-Br6tKEl8.d.ts} +38 -10
  2. package/dist/{BrowserLiveView-ZktFZiMD.d.ts → BrowserLiveView-BV5qgFgI.d.ts} +11 -10
  3. package/dist/{BrowserReplay-6G-mnwcn.d.ts → BrowserReplay-xWvRjRAC.d.ts} +2 -1
  4. package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
  5. package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
  6. package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
  7. package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
  8. package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
  9. package/dist/{Menu-B5vDqZe_.d.ts → Menu-Bgu-ufb5.d.ts} +29 -65
  10. package/dist/{ModelSelector-DXtpcRmT.js → ModelSelector-DVgVBdvw.js} +23 -20
  11. package/dist/{PromptInput-D6-G24p7.d.ts → PromptInput-p5KmOmt1.d.ts} +313 -89
  12. package/dist/Select-Dl_vF_Bt.d.ts +213 -0
  13. package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
  14. package/dist/ThinkChat-7DQ2CogF.js +222 -0
  15. package/dist/{ThinkChatActivity-B2UD95My.d.ts → ThinkChatActivity-Cuk28Js_.d.ts} +4 -4
  16. package/dist/ThinkChatContext-C3Eb1Xpi.d.ts +16 -0
  17. package/dist/{ThinkChatToolParts-DnUiZgCC.d.ts → ThinkChatToolParts-Cv4o7j6F.d.ts} +13 -5
  18. package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
  19. package/dist/components/Accordion.d.ts +17 -6
  20. package/dist/components/Accordion.js +23 -36
  21. package/dist/components/Activity.d.ts +5 -5
  22. package/dist/components/Activity.js +9 -9
  23. package/dist/components/AgentChat.d.ts +1 -1
  24. package/dist/components/AgentChat.js +354 -132
  25. package/dist/components/AgentConnection.js +6 -22
  26. package/dist/components/AlertDialog.d.ts +40 -32
  27. package/dist/components/AlertDialog.js +46 -39
  28. package/dist/components/Artifact.d.ts +1 -1
  29. package/dist/components/Artifact.js +5 -5
  30. package/dist/components/Autocomplete.js +10 -2
  31. package/dist/components/Avatar.d.ts +2 -2
  32. package/dist/components/Avatar.js +3 -3
  33. package/dist/components/Badge.d.ts +11 -14
  34. package/dist/components/Badge.js +11 -33
  35. package/dist/components/BrowserLiveView.d.ts +1 -1
  36. package/dist/components/BrowserLiveView.js +39 -45
  37. package/dist/components/BrowserReplay.d.ts +1 -1
  38. package/dist/components/BrowserReplay.js +4 -4
  39. package/dist/components/BrowserRunPanel.js +91 -55
  40. package/dist/components/Button.d.ts +2 -2
  41. package/dist/components/Button.js +7 -30
  42. package/dist/components/ChainOfThought.d.ts +5 -5
  43. package/dist/components/ChainOfThought.js +8 -5
  44. package/dist/components/ChatGptSignInScreen.js +3 -3
  45. package/dist/components/Checkbox.d.ts +10 -2
  46. package/dist/components/Checkbox.js +13 -6
  47. package/dist/components/CheckboxGroup.d.ts +6 -6
  48. package/dist/components/CheckboxGroup.js +6 -6
  49. package/dist/components/CodeBlock.d.ts +1 -1
  50. package/dist/components/CodeBlock.js +1 -1
  51. package/dist/components/CodexModelSelector.d.ts +58 -0
  52. package/dist/components/CodexModelSelector.js +170 -0
  53. package/dist/components/Collapsible.d.ts +2 -4
  54. package/dist/components/Collapsible.js +9 -7
  55. package/dist/components/Combobox.d.ts +2 -2
  56. package/dist/components/Combobox.js +20 -22
  57. package/dist/components/Commit.d.ts +6 -6
  58. package/dist/components/Commit.js +14 -26
  59. package/dist/components/Context.js +5 -1
  60. package/dist/components/ContextMenu.d.ts +20 -72
  61. package/dist/components/ContextMenu.js +46 -56
  62. package/dist/components/Conversation.d.ts +3 -7
  63. package/dist/components/Conversation.js +3 -4
  64. package/dist/components/Dialog.d.ts +38 -30
  65. package/dist/components/Dialog.js +46 -34
  66. package/dist/components/EnvironmentVariables.d.ts +2 -7
  67. package/dist/components/EnvironmentVariables.js +13 -36
  68. package/dist/components/Field.d.ts +3 -3
  69. package/dist/components/Field.js +7 -8
  70. package/dist/components/Fieldset.d.ts +2 -2
  71. package/dist/components/Fieldset.js +2 -2
  72. package/dist/components/FileTree.js +1 -1
  73. package/dist/components/Label.d.ts +1 -1
  74. package/dist/components/Label.js +1 -1
  75. package/dist/components/Marker.js +1 -15
  76. package/dist/components/McpServerPicker.d.ts +31 -6
  77. package/dist/components/McpServerPicker.js +136 -72
  78. package/dist/components/Menu.d.ts +2 -2
  79. package/dist/components/Menu.js +41 -51
  80. package/dist/components/Menubar.d.ts +16 -52
  81. package/dist/components/Menubar.js +44 -56
  82. package/dist/components/Message.d.ts +4 -3
  83. package/dist/components/Message.js +16 -9
  84. package/dist/components/MessageScroller.d.ts +1 -1
  85. package/dist/components/MessageScroller.js +1 -1
  86. package/dist/components/Meter.js +5 -0
  87. package/dist/components/ModelSelector.d.ts +12 -9
  88. package/dist/components/ModelSelector.js +1 -1
  89. package/dist/components/NavigationMenu.d.ts +3 -14
  90. package/dist/components/NavigationMenu.js +22 -38
  91. package/dist/components/NumberField.js +6 -0
  92. package/dist/components/Popover.d.ts +21 -44
  93. package/dist/components/Popover.js +33 -23
  94. package/dist/components/PreviewCard.d.ts +20 -18
  95. package/dist/components/PreviewCard.js +30 -20
  96. package/dist/components/PricingPage.js +30 -29
  97. package/dist/components/Progress.d.ts +7 -3
  98. package/dist/components/Progress.js +9 -4
  99. package/dist/components/PromptInput.d.ts +2 -2
  100. package/dist/components/PromptInput.js +184 -148
  101. package/dist/components/Queue.d.ts +8 -19
  102. package/dist/components/Queue.js +6 -6
  103. package/dist/components/RadioGroup.d.ts +10 -9
  104. package/dist/components/RadioGroup.js +8 -9
  105. package/dist/components/Reasoning.d.ts +4 -4
  106. package/dist/components/Reasoning.js +12 -21
  107. package/dist/components/ScrollArea.d.ts +2 -9
  108. package/dist/components/ScrollArea.js +5 -23
  109. package/dist/components/Select.d.ts +2 -2
  110. package/dist/components/Select.js +100 -134
  111. package/dist/components/Slider.d.ts +10 -7
  112. package/dist/components/Slider.js +12 -11
  113. package/dist/components/Sources.d.ts +4 -4
  114. package/dist/components/Sources.js +8 -5
  115. package/dist/components/Stepper.js +2 -8
  116. package/dist/components/Switch.d.ts +6 -3
  117. package/dist/components/Switch.js +7 -4
  118. package/dist/components/Tabs.d.ts +2 -2
  119. package/dist/components/Tabs.js +9 -4
  120. package/dist/components/Task.d.ts +4 -4
  121. package/dist/components/Task.js +10 -6
  122. package/dist/components/Terminal.d.ts +2 -2
  123. package/dist/components/Terminal.js +5 -5
  124. package/dist/components/TestResults.d.ts +4 -4
  125. package/dist/components/TestResults.js +5 -5
  126. package/dist/components/ThinkChat.d.ts +37 -30
  127. package/dist/components/ThinkChat.js +1 -152
  128. package/dist/components/ThinkChatActivity.d.ts +2 -2
  129. package/dist/components/ThinkChatActivity.js +4 -11
  130. package/dist/components/ThinkChatContext.d.ts +2 -2
  131. package/dist/components/ThinkChatContext.js +9 -2
  132. package/dist/components/ThinkChatToolPanels.d.ts +1 -1
  133. package/dist/components/ThinkChatToolPanels.js +27 -15
  134. package/dist/components/ThinkChatToolParts.d.ts +1 -1
  135. package/dist/components/ThinkExecutionWorkbench.d.ts +10 -7
  136. package/dist/components/ThinkExecutionWorkbench.js +382 -359
  137. package/dist/components/ThinkFullApp.d.ts +16 -13
  138. package/dist/components/ThinkFullApp.js +35 -25
  139. package/dist/components/ThinkThreadPicker.d.ts +1 -31
  140. package/dist/components/ThinkThreadPicker.js +32 -171
  141. package/dist/components/ThinkThreadShell.d.ts +35 -0
  142. package/dist/components/ThinkThreadShell.js +146 -0
  143. package/dist/components/Toast.js +7 -0
  144. package/dist/components/ToggleGroup.d.ts +6 -2
  145. package/dist/components/ToggleGroup.js +6 -2
  146. package/dist/components/Toolbar.js +6 -0
  147. package/dist/components/Tooltip.d.ts +36 -27
  148. package/dist/components/Tooltip.js +45 -29
  149. package/dist/components/WebPreview.d.ts +1 -1
  150. package/dist/components/WebPreview.js +3 -3
  151. package/dist/components/WorkspaceExplorer.d.ts +6 -8
  152. package/dist/components/WorkspaceExplorer.js +9 -7
  153. package/dist/components/icons.d.ts +2 -2
  154. package/dist/components/icons.js +2 -2
  155. package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
  156. package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
  157. package/dist/icons-Ba9THQKz.js +64 -0
  158. package/dist/icons-CUCz_Sft.d.ts +210 -0
  159. package/dist/merge-refs-DF_7w2x_.js +18 -0
  160. package/dist/styles/accessibility.css +14 -0
  161. package/dist/styles/accordion.css +21 -61
  162. package/dist/styles/activity.css +23 -58
  163. package/dist/styles/agent-chat.css +49 -5
  164. package/dist/styles/agent-connection.css +8 -10
  165. package/dist/styles/alert-dialog.css +20 -26
  166. package/dist/styles/artifact.css +6 -6
  167. package/dist/styles/attachment-preview.css +1 -1
  168. package/dist/styles/autocomplete.css +5 -170
  169. package/dist/styles/avatar.css +8 -8
  170. package/dist/styles/badge.css +8 -10
  171. package/dist/styles/base-ui-motion.css +176 -0
  172. package/dist/styles/base.css +19 -25
  173. package/dist/styles/browser-live-view.css +7 -7
  174. package/dist/styles/browser-replay.css +5 -5
  175. package/dist/styles/browser-run-panel.css +59 -112
  176. package/dist/styles/button.css +48 -43
  177. package/dist/styles/card.css +3 -5
  178. package/dist/styles/chain-of-thought.css +14 -70
  179. package/dist/styles/chatgpt-sign-in-screen.css +3 -3
  180. package/dist/styles/checkbox-group.css +1 -1
  181. package/dist/styles/checkbox.css +3 -7
  182. package/dist/styles/code-block.css +10 -10
  183. package/dist/styles/codex-model-selector.css +186 -0
  184. package/dist/styles/collapsible.css +11 -27
  185. package/dist/styles/combobox.css +3 -149
  186. package/dist/styles/commit.css +19 -35
  187. package/dist/styles/context-menu.css +1 -77
  188. package/dist/styles/context.css +12 -12
  189. package/dist/styles/conversation.css +7 -7
  190. package/dist/styles/dialog.css +34 -55
  191. package/dist/styles/environment-variables.css +10 -10
  192. package/dist/styles/field.css +16 -58
  193. package/dist/styles/fieldset.css +2 -2
  194. package/dist/styles/file-tree.css +7 -9
  195. package/dist/styles/index.css +12 -2
  196. package/dist/styles/input.css +1 -51
  197. package/dist/styles/label.css +2 -2
  198. package/dist/styles/marker.css +2 -4
  199. package/dist/styles/mcp-server-picker.css +66 -19
  200. package/dist/styles/menu.css +6 -153
  201. package/dist/styles/menubar.css +6 -105
  202. package/dist/styles/message-scroller.css +1 -1
  203. package/dist/styles/message.css +87 -9
  204. package/dist/styles/meter.css +4 -20
  205. package/dist/styles/model-selector.css +32 -20
  206. package/dist/styles/navigation-menu.css +14 -54
  207. package/dist/styles/number-field.css +8 -23
  208. package/dist/styles/popover.css +13 -68
  209. package/dist/styles/preview-card.css +5 -46
  210. package/dist/styles/pricing-page.css +43 -43
  211. package/dist/styles/progress.css +7 -16
  212. package/dist/styles/prompt-input.css +100 -44
  213. package/dist/styles/queue.css +12 -28
  214. package/dist/styles/radio.css +4 -8
  215. package/dist/styles/reasoning.css +3 -62
  216. package/dist/styles/recipes.css +475 -0
  217. package/dist/styles/select.css +7 -103
  218. package/dist/styles/shell.css +3 -3
  219. package/dist/styles/slider.css +5 -7
  220. package/dist/styles/sources.css +9 -66
  221. package/dist/styles/stepper.css +16 -14
  222. package/dist/styles/streamdown.css +11 -57
  223. package/dist/styles/switch.css +4 -7
  224. package/dist/styles/tabs.css +7 -8
  225. package/dist/styles/task.css +13 -42
  226. package/dist/styles/terminal.css +7 -7
  227. package/dist/styles/test-results.css +21 -37
  228. package/dist/styles/think-execution-workbench.css +337 -0
  229. package/dist/styles/think-full-app.css +27 -410
  230. package/dist/styles/think-resize-handle.css +33 -0
  231. package/dist/styles/think-thread-picker.css +18 -247
  232. package/dist/styles/think-thread-shell.css +219 -0
  233. package/dist/styles/toast.css +14 -25
  234. package/dist/styles/toggle-group.css +16 -14
  235. package/dist/styles/toggle.css +14 -15
  236. package/dist/styles/toolbar.css +13 -25
  237. package/dist/styles/tooltip.css +6 -16
  238. package/dist/styles/web-preview.css +15 -15
  239. package/dist/styles/workspace-explorer.css +21 -14
  240. package/dist/summarize-tool-input-BUJsENSn.js +12 -0
  241. package/dist/utils/codex-model-catalog.d.ts +142 -0
  242. package/dist/utils/codex-model-catalog.js +112 -0
  243. package/dist/utils/structured-code.d.ts +1 -1
  244. package/package.json +8 -2
  245. package/dist/Select-CRsKCJ9x.d.ts +0 -200
  246. package/dist/ThinkChatContext-BLAAb8J5.d.ts +0 -28
  247. package/dist/components/McpServerConnections.d.ts +0 -41
  248. package/dist/components/McpServerConnections.js +0 -188
  249. package/dist/components/useStickToBottom.d.ts +0 -33
  250. package/dist/components/useStickToBottom.js +0 -107
  251. package/dist/icons-CbjtbIJK.d.ts +0 -51
  252. package/dist/icons-D2Q5n5C1.js +0 -291
  253. package/dist/styles/mcp-server-connections.css +0 -145
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
3
  import { Slider as Slider$1 } from "@base-ui/react/slider";
4
4
  //#region src/components/Slider.tsx
5
5
  /**
@@ -33,20 +33,13 @@ import { Slider as Slider$1 } from "@base-ui/react/slider";
33
33
  *
34
34
  * @see {@link https://base-ui.com/react/components/slider | Base UI Slider}
35
35
  */
36
- function Slider({ className = "", children, defaultValue, max = 100, min = 0, ref, value, ...props }) {
36
+ function SliderRoot({ className = "", ref, ...props }) {
37
37
  const classes = ["slider", className].filter(Boolean).join(" ");
38
- const resolvedDefaultValue = children == null && value === void 0 && defaultValue === void 0 ? [min, max] : defaultValue;
39
- const thumbValues = Array.isArray(value) ? value : Array.isArray(resolvedDefaultValue) ? resolvedDefaultValue : [value ?? resolvedDefaultValue ?? min];
40
38
  return /* @__PURE__ */ jsx(Slider$1.Root, {
41
39
  ref,
42
40
  "data-slot": "slider",
43
41
  className: classes,
44
- defaultValue: resolvedDefaultValue,
45
- max,
46
- min,
47
- value,
48
- ...props,
49
- children: children ?? /* @__PURE__ */ jsx(SliderControl, { children: /* @__PURE__ */ jsxs(SliderTrack, { children: [/* @__PURE__ */ jsx(SliderIndicator, {}), thumbValues.map((_, index) => /* @__PURE__ */ jsx(SliderThumb, { index }, index))] }) })
42
+ ...props
50
43
  });
51
44
  }
52
45
  /**
@@ -111,5 +104,13 @@ function SliderOutput({ className = "", children, ref, ...props }) {
111
104
  children: (formattedValues, values) => typeof children === "function" ? children(values[0] ?? 0, values, formattedValues) : formattedValues.join(" - ")
112
105
  });
113
106
  }
107
+ const Slider = {
108
+ Root: SliderRoot,
109
+ Value: SliderOutput,
110
+ Control: SliderControl,
111
+ Track: SliderTrack,
112
+ Indicator: SliderIndicator,
113
+ Thumb: SliderThumb
114
+ };
114
115
  //#endregion
115
- export { Slider, SliderControl, SliderIndicator, SliderOutput, SliderThumb, SliderTrack };
116
+ export { Slider };
@@ -1,11 +1,11 @@
1
- import { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from "./Collapsible.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/Sources.d.ts
5
5
  /**
6
6
  * Props for the Sources root. Wraps Base UI Collapsible.Root.
7
7
  */
8
- interface SourcesProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
8
+ interface SourcesProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
9
9
  className?: string;
10
10
  }
11
11
  /**
@@ -35,7 +35,7 @@ declare function Sources({
35
35
  }: SourcesProps & {
36
36
  ref?: React.Ref<HTMLDivElement>;
37
37
  }): React.JSX.Element;
38
- interface SourcesTriggerProps extends Omit<CollapsibleTriggerProps, "className" | "unstyled"> {
38
+ interface SourcesTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
39
39
  className?: string;
40
40
  /** Number of sources to show in the trigger label. */
41
41
  count: number;
@@ -53,7 +53,7 @@ declare function SourcesTrigger({
53
53
  }: SourcesTriggerProps & {
54
54
  ref?: React.Ref<HTMLButtonElement>;
55
55
  }): React.JSX.Element;
56
- interface SourcesContentProps extends Omit<CollapsiblePanelProps, "className" | "unstyled"> {
56
+ interface SourcesContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
57
57
  className?: string;
58
58
  }
59
59
  /**
@@ -1,6 +1,6 @@
1
- import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { b as LinkIcon, c as ChevronRightIcon } from "../icons-D2Q5n5C1.js";
3
+ import { b as LinkIcon, c as ChevronRightIcon } from "../icons-Ba9THQKz.js";
4
4
  import "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Sources.tsx
@@ -25,7 +25,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
25
25
  * @see {@link https://elements.ai-sdk.dev/components/sources | AI Elements Sources}
26
26
  */
27
27
  function Sources({ className, ref, ...props }) {
28
- return /* @__PURE__ */ jsx(CollapsibleRoot, {
28
+ return /* @__PURE__ */ jsx(Collapsible.Root, {
29
29
  ref,
30
30
  className: cx("sources", className),
31
31
  ...props,
@@ -37,8 +37,9 @@ function Sources({ className, ref, ...props }) {
37
37
  * chevron that rotates when open.
38
38
  */
39
39
  function SourcesTrigger({ className, count, children, ref, ...props }) {
40
- return /* @__PURE__ */ jsx(CollapsibleTrigger, {
40
+ return /* @__PURE__ */ jsx(Collapsible.Trigger, {
41
41
  ref,
42
+ "data-slot": "sources-trigger",
42
43
  className: cx("sources__trigger", className),
43
44
  ...props,
44
45
  unstyled: true,
@@ -51,6 +52,7 @@ function SourcesTrigger({ className, count, children, ref, ...props }) {
51
52
  count === 1 ? "source" : "sources"
52
53
  ]
53
54
  }), /* @__PURE__ */ jsx("span", {
55
+ "data-slot": "sources-trigger-icon",
54
56
  className: "sources__trigger-icon",
55
57
  "aria-hidden": "true",
56
58
  children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
@@ -61,8 +63,9 @@ function SourcesTrigger({ className, count, children, ref, ...props }) {
61
63
  * The collapsible panel that contains Source children.
62
64
  */
63
65
  function SourcesContent({ className, children, ref, ...props }) {
64
- return /* @__PURE__ */ jsx(CollapsiblePanel, {
66
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
65
67
  ref,
68
+ "data-slot": "sources-content",
66
69
  className: cx("sources__content", className),
67
70
  ...props,
68
71
  unstyled: true,
@@ -1,5 +1,6 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { M as SpinnerIcon, a as CheckIcon } from "../icons-D2Q5n5C1.js";
2
+ import { N as SpinnerIcon, a as CheckIcon } from "../icons-Ba9THQKz.js";
3
+ import { t as assignRef } from "../merge-refs-DF_7w2x_.js";
3
4
  import * as React from "react";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  //#region src/components/Stepper.tsx
@@ -304,12 +305,5 @@ function getIndicatorContent({ children, indicators, isLoading, state, step }) {
304
305
  if (state === "completed") return /* @__PURE__ */ jsx(CheckIcon, {});
305
306
  return step;
306
307
  }
307
- function assignRef(ref, value) {
308
- if (typeof ref === "function") {
309
- ref(value);
310
- return;
311
- }
312
- if (ref) ref.current = value;
313
- }
314
308
  //#endregion
315
309
  export { Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperNav, StepperPanel, StepperSeparator, StepperTitle, StepperTrigger, useStepItem, useStepper };
@@ -34,10 +34,9 @@ interface SwitchThumbProps extends Omit<React.ComponentPropsWithRef<typeof Switc
34
34
  *
35
35
  * @see {@link https://base-ui.com/react/components/switch | Base UI Switch}
36
36
  */
37
- declare function Switch({
37
+ declare function SwitchRoot({
38
38
  size,
39
39
  className,
40
- children,
41
40
  ref,
42
41
  ...props
43
42
  }: SwitchProps & {
@@ -53,5 +52,9 @@ declare function SwitchThumb({
53
52
  }: SwitchThumbProps & {
54
53
  ref?: React.Ref<HTMLSpanElement>;
55
54
  }): React.JSX.Element;
55
+ declare const Switch: {
56
+ Root: typeof SwitchRoot;
57
+ Thumb: typeof SwitchThumb;
58
+ };
56
59
  //#endregion
57
- export { Switch, SwitchProps, SwitchThumb, SwitchThumbProps };
60
+ export { Switch, SwitchProps, SwitchThumbProps };
@@ -23,7 +23,7 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
23
23
  *
24
24
  * @see {@link https://base-ui.com/react/components/switch | Base UI Switch}
25
25
  */
26
- function Switch({ size = "default", className = "", children, ref, ...props }) {
26
+ function SwitchRoot({ size = "default", className = "", ref, ...props }) {
27
27
  const normalizedSize = size === "md" ? "default" : size;
28
28
  const classes = [
29
29
  "switch",
@@ -35,8 +35,7 @@ function Switch({ size = "default", className = "", children, ref, ...props }) {
35
35
  "data-slot": "switch",
36
36
  "data-size": normalizedSize,
37
37
  className: classes,
38
- ...props,
39
- children: children ?? /* @__PURE__ */ jsx(SwitchThumb, {})
38
+ ...props
40
39
  });
41
40
  }
42
41
  /**
@@ -51,5 +50,9 @@ function SwitchThumb({ className = "", ref, ...props }) {
51
50
  ...props
52
51
  });
53
52
  }
53
+ const Switch = {
54
+ Root: SwitchRoot,
55
+ Thumb: SwitchThumb
56
+ };
54
57
  //#endregion
55
- export { Switch, SwitchThumb };
58
+ export { Switch };
@@ -1,2 +1,2 @@
1
- import { a as Tabs, c as TabsList, d as TabsProps, f as TabsTrigger, i as TabProps, l as TabsListProps, m as tabsListVariants, n as TabPanel, o as TabsContent, p as TabsTriggerProps, r as TabPanelProps, s as TabsContentProps, t as Tab, u as TabsListVariantsOptions } from "../Tabs-D9EAq09D.js";
2
- export { Tab, TabPanel, TabPanelProps, TabProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsListVariantsOptions, TabsProps, TabsTrigger, TabsTriggerProps, tabsListVariants };
1
+ import { a as TabsListVariantsOptions, i as TabsListProps, n as TabProps, o as TabsProps, r as Tabs, s as tabsListVariants, t as TabPanelProps } from "../Tabs-3Zc4tb9D.js";
2
+ export { TabPanelProps, TabProps, Tabs, TabsListProps, TabsListVariantsOptions, TabsProps, tabsListVariants };
@@ -26,7 +26,7 @@ function tabsListVariants({ variant = "default", className } = {}) {
26
26
  *
27
27
  * @see {@link https://base-ui.com/react/components/tabs | Base UI Tabs}
28
28
  */
29
- function Tabs({ orientation = "horizontal", variant = "default", className = "", ref, ...props }) {
29
+ function TabsRoot({ orientation = "horizontal", variant = "default", className = "", ref, ...props }) {
30
30
  const classes = [
31
31
  "tabs",
32
32
  variant !== "default" && `tabs--${variant}`,
@@ -72,7 +72,12 @@ function TabPanel({ className = "", ref, ...props }) {
72
72
  ...props
73
73
  });
74
74
  }
75
- const TabsTrigger = Tab;
76
- const TabsContent = TabPanel;
75
+ const Tabs = {
76
+ Root: TabsRoot,
77
+ List: TabsList,
78
+ Tab,
79
+ Indicator: Tabs$1.Indicator,
80
+ Panel: TabPanel
81
+ };
77
82
  //#endregion
78
- export { Tab, TabPanel, Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants };
83
+ export { Tabs, tabsListVariants };
@@ -1,8 +1,8 @@
1
- import { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from "./Collapsible.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/Task.d.ts
5
- interface TaskProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
5
+ interface TaskProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
6
6
  className?: string;
7
7
  }
8
8
  /**
@@ -36,7 +36,7 @@ declare function Task({
36
36
  }: TaskProps & {
37
37
  ref?: React.Ref<HTMLDivElement>;
38
38
  }): React.JSX.Element;
39
- interface TaskTriggerProps extends Omit<CollapsibleTriggerProps, "className" | "unstyled"> {
39
+ interface TaskTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
40
40
  className?: string;
41
41
  /** Heading text shown in the trigger row. */
42
42
  title: string;
@@ -53,7 +53,7 @@ declare function TaskTrigger({
53
53
  }: TaskTriggerProps & {
54
54
  ref?: React.Ref<HTMLButtonElement>;
55
55
  }): React.JSX.Element;
56
- interface TaskContentProps extends Omit<CollapsiblePanelProps, "className" | "unstyled"> {
56
+ interface TaskContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
57
57
  className?: string;
58
58
  }
59
59
  /**
@@ -1,6 +1,6 @@
1
- import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { A as SearchIcon, c as ChevronRightIcon, h as FileIcon } from "../icons-D2Q5n5C1.js";
3
+ import { c as ChevronRightIcon, h as FileIcon, j as SearchIcon } from "../icons-Ba9THQKz.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Task.tsx
@@ -28,7 +28,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
28
28
  * @see {@link https://elements.ai-sdk.dev/components/task | AI Elements Task}
29
29
  */
30
30
  function Task({ className, defaultOpen = true, ref, ...props }) {
31
- return /* @__PURE__ */ jsx(CollapsibleRoot, {
31
+ return /* @__PURE__ */ jsx(Collapsible.Root, {
32
32
  ref,
33
33
  className: cx("task", className),
34
34
  defaultOpen,
@@ -40,15 +40,17 @@ function Task({ className, defaultOpen = true, ref, ...props }) {
40
40
  * Clickable header that toggles the task content.
41
41
  */
42
42
  function TaskTrigger({ className, title, children, ref, ...props }) {
43
- if (children !== void 0 && children !== null) return /* @__PURE__ */ jsx(CollapsibleTrigger, {
43
+ if (children !== void 0 && children !== null) return /* @__PURE__ */ jsx(Collapsible.Trigger, {
44
44
  ref,
45
+ "data-slot": "task-trigger",
45
46
  className: cx("task__trigger", className),
46
47
  ...props,
47
48
  unstyled: true,
48
49
  children
49
50
  });
50
- return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
51
+ return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
51
52
  ref,
53
+ "data-slot": "task-trigger",
52
54
  className: cx("task__trigger", className),
53
55
  ...props,
54
56
  unstyled: true,
@@ -63,6 +65,7 @@ function TaskTrigger({ className, title, children, ref, ...props }) {
63
65
  children: title
64
66
  }),
65
67
  /* @__PURE__ */ jsx("span", {
68
+ "data-slot": "task-trigger-icon",
66
69
  className: "task__trigger-icon",
67
70
  "aria-hidden": "true",
68
71
  children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
@@ -74,8 +77,9 @@ function TaskTrigger({ className, title, children, ref, ...props }) {
74
77
  * The collapsible panel containing TaskItem children.
75
78
  */
76
79
  function TaskContent({ className, children, ref, ...props }) {
77
- return /* @__PURE__ */ jsx(CollapsiblePanel, {
80
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
78
81
  ref,
82
+ "data-slot": "task-content",
79
83
  className: cx("task__content", className),
80
84
  ...props,
81
85
  unstyled: true,
@@ -1,5 +1,5 @@
1
- import { r as ButtonProps } from "../Button-Ct5I6aTu.js";
2
- import { t as CopyButtonProps } from "../copy-button-BKXqGiNm.js";
1
+ import { r as ButtonProps } from "../Button-FX_hpqxm.js";
2
+ import { t as CopyButtonProps } from "../copy-button-DtPMgN7e.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/Terminal.d.ts
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { L as XIcon, P as TerminalIcon } from "../icons-D2Q5n5C1.js";
2
+ import { I as TerminalIcon, z as XIcon } from "../icons-Ba9THQKz.js";
3
3
  import { Button } from "./Button.js";
4
- import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./Tooltip.js";
5
- import { t as CopyButton } from "../copy-button-C6JSKtFE.js";
4
+ import { Tooltip } from "./Tooltip.js";
5
+ import { t as CopyButton } from "../copy-button-DUMLYdsk.js";
6
6
  import { Badge } from "./Badge.js";
7
7
  import { ScrollArea } from "./ScrollArea.js";
8
8
  import * as React from "react";
@@ -217,7 +217,7 @@ function TerminalClearButton({ className, label = "Clear terminal", onClick, ...
217
217
  onClear?.();
218
218
  onClick?.(e);
219
219
  }, [onClear, onClick]);
220
- return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(Button, {
220
+ return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
221
221
  variant: "ghost",
222
222
  size: "icon",
223
223
  "aria-label": label,
@@ -225,7 +225,7 @@ function TerminalClearButton({ className, label = "Clear terminal", onClick, ...
225
225
  ...props,
226
226
  onClick: handleClick,
227
227
  children: /* @__PURE__ */ jsx(XIcon, {})
228
- }) }), /* @__PURE__ */ jsx(TooltipPortal, { children: /* @__PURE__ */ jsx(TooltipPositioner, { children: /* @__PURE__ */ jsx(TooltipPopup, { children: label }) }) })] });
228
+ }) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: label }) }) })] });
229
229
  }
230
230
  const ANSI_REGEX = /\u001b\[[0-9;?]*[a-zA-Z]/g;
231
231
  function stripAnsi(input) {
@@ -1,4 +1,4 @@
1
- import { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from "./Collapsible.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/TestResults.d.ts
@@ -101,7 +101,7 @@ declare function TestResultsContent({
101
101
  }: TestResultsContentProps & {
102
102
  ref?: React.Ref<HTMLDivElement>;
103
103
  }): React.JSX.Element;
104
- interface TestSuiteProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
104
+ interface TestSuiteProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
105
105
  className?: string;
106
106
  name: string;
107
107
  status: TestStatusValue;
@@ -117,7 +117,7 @@ declare function TestSuite({
117
117
  }: TestSuiteProps & {
118
118
  ref?: React.Ref<HTMLDivElement>;
119
119
  }): React.JSX.Element;
120
- type TestSuiteNameProps = Omit<CollapsibleTriggerProps, "className" | "unstyled"> & {
120
+ type TestSuiteNameProps = Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> & {
121
121
  className?: string;
122
122
  };
123
123
  declare function TestSuiteName({
@@ -144,7 +144,7 @@ declare function TestSuiteStats({
144
144
  }: TestSuiteStatsProps & {
145
145
  ref?: React.Ref<HTMLDivElement>;
146
146
  }): React.JSX.Element;
147
- type TestSuiteContentProps = Omit<CollapsiblePanelProps, "className" | "unstyled"> & {
147
+ type TestSuiteContentProps = Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> & {
148
148
  className?: string;
149
149
  };
150
150
  declare function TestSuiteContent({
@@ -1,6 +1,6 @@
1
- import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
1
+ import { Collapsible } from "./Collapsible.js";
2
2
  import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { L as XIcon, M as SpinnerIcon, a as CheckIcon, c as ChevronRightIcon } from "../icons-D2Q5n5C1.js";
3
+ import { N as SpinnerIcon, a as CheckIcon, c as ChevronRightIcon, z as XIcon } from "../icons-Ba9THQKz.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";
@@ -169,7 +169,7 @@ function TestSuite({ className, name, status, defaultOpen, children, ref, ...pro
169
169
  const isComposable = hasComposableTestSuiteChildren(children);
170
170
  return /* @__PURE__ */ jsx(TestSuiteContext.Provider, {
171
171
  value: contextValue,
172
- children: /* @__PURE__ */ jsx(CollapsibleRoot, {
172
+ children: /* @__PURE__ */ jsx(Collapsible.Root, {
173
173
  ref,
174
174
  className: cx("test-results__suite", className),
175
175
  defaultOpen: defaultOpen ?? status === "failed",
@@ -185,7 +185,7 @@ function TestSuite({ className, name, status, defaultOpen, children, ref, ...pro
185
185
  }
186
186
  function TestSuiteName({ className, children, ref, ...props }) {
187
187
  const { name, status } = React.useContext(TestSuiteContext);
188
- return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
188
+ return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
189
189
  ref,
190
190
  className: cx("test-results__suite-trigger", className),
191
191
  ...props,
@@ -230,7 +230,7 @@ function TestSuiteStats({ className, passed = 0, failed = 0, skipped = 0, childr
230
230
  });
231
231
  }
232
232
  function TestSuiteContent({ className, children, ref, ...props }) {
233
- return /* @__PURE__ */ jsx(CollapsiblePanel, {
233
+ return /* @__PURE__ */ jsx(Collapsible.Panel, {
234
234
  ref,
235
235
  className: cx("test-results__suite-content", className),
236
236
  ...props,
@@ -1,10 +1,9 @@
1
- import { n as ExecutionApprovals } from "../PromptInput-D6-G24p7.js";
2
- import { a as AgentChatRenderPartContext, r as AgentChatProps } from "../AgentChat-B9LD_WF1.js";
3
- import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-ZktFZiMD.js";
4
- import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-6G-mnwcn.js";
5
- import { _ as isThinkChatActivityPart } from "../ThinkChatToolParts-DnUiZgCC.js";
6
- import { a as ThinkChatToolRenderers, c as renderThinkChatActivityPart, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as describeThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-B2UD95My.js";
7
- import { n as ThinkChatValue } from "../ThinkChatContext-BLAAb8J5.js";
1
+ import { a as AgentChatRenderPartContext, r as AgentChatProps } from "../AgentChat-Br6tKEl8.js";
2
+ import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
3
+ import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-xWvRjRAC.js";
4
+ import { _ as isThinkChatActivityPart } from "../ThinkChatToolParts-Cv4o7j6F.js";
5
+ import { a as ThinkChatToolRenderers, c as renderThinkChatActivityPart, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as describeThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-Cuk28Js_.js";
6
+ import { n as ThinkChatValue } from "../ThinkChatContext-C3Eb1Xpi.js";
8
7
  import { FileInfo, UseWorkspaceOptions, WorkspaceExplorer, WorkspaceExplorerProps, WorkspaceFileState, WorkspaceInfo, WorkspaceSource, WorkspaceState, inferWorkspaceLanguage, useWorkspace } from "./WorkspaceExplorer.js";
9
8
  import * as React from "react";
10
9
  import { UIMessage } from "ai";
@@ -13,11 +12,9 @@ import { PendingApproval, Think } from "@cloudflare/think";
13
12
  import { AgentStub } from "agents/client";
14
13
 
15
14
  //#region src/components/ThinkChat.d.ts
16
- type ThinkAgent<State> = Think<object, State>;
17
- type ThinkApprovalStub<State = unknown> = AgentStub<ThinkAgent<State>>;
18
- interface ThinkChatProviderProps {
15
+ interface ThinkChatProviderProps<State = unknown, MessageT extends UIMessage = UIMessage> {
19
16
  /** The `useAgentChat` value from `@cloudflare/think/react` that descendants read. */
20
- chat: ThinkChatValue;
17
+ chat: ThinkChatValue<State, MessageT>;
21
18
  children: React.ReactNode;
22
19
  }
23
20
  interface ThinkChatRootProps<State = unknown> {
@@ -27,7 +24,7 @@ interface ThinkChatRootProps<State = unknown> {
27
24
  name?: string;
28
25
  children: React.ReactNode;
29
26
  }
30
- interface ThinkChatMessagesProps extends ThinkChatActivityRendererOptions {
27
+ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends ThinkChatActivityRendererOptions {
31
28
  className?: string;
32
29
  /** Disable the composer (e.g. while the agent is unreachable). */
33
30
  disabled?: boolean;
@@ -35,43 +32,52 @@ interface ThinkChatMessagesProps extends ThinkChatActivityRendererOptions {
35
32
  emptyState?: React.ReactNode;
36
33
  /** Extra controls rendered inside the composer, next to the send button. */
37
34
  composerTools?: React.ReactNode;
35
+ /** Optional product state rendered in the PromptInput header, such as an Activity. */
36
+ composerHeader?: AgentChatProps<MessageT>["composerHeader"];
38
37
  /** Extra rows rendered in the built-in plus menu after files. */
39
- composerAddMenuItems?: AgentChatProps["composerAddMenuItems"];
38
+ composerAddMenuItems?: AgentChatProps<MessageT>["composerAddMenuItems"];
40
39
  /** Composer placeholder text. */
41
40
  placeholder?: string;
42
41
  /** Rendered after each message (e.g. per-message actions). */
43
- renderMessageAfter?: AgentChatProps["renderMessageAfter"];
42
+ renderMessageAfter?: AgentChatProps<MessageT>["renderMessageAfter"];
43
+ /**
44
+ * Durable backend edit/resend operation. Think does not synchronize
45
+ * `setMessages`, so wire this to an agent callable that creates the branch.
46
+ */
47
+ onEditAndResend?: AgentChatProps<MessageT>["onEditAndResend"];
44
48
  /**
45
49
  * Overrides the built-in connection notice (derived from the hook's
46
50
  * `isRecovering`/`connectionError`) shown between transcript and composer.
47
51
  */
48
- notice?: AgentChatProps["notice"];
52
+ notice?: AgentChatProps<MessageT>["notice"];
49
53
  /** Full replacement for part rendering; wins over excludeTools/toolRenderers. */
50
- renderPart?: AgentChatProps["renderPart"];
51
- /** Resolves Think execution approvals. `ThinkChat.Root` wires this automatically. */
52
- executionApprovals?: ExecutionApprovals;
54
+ renderPart?: AgentChatProps<MessageT>["renderPart"];
55
+ /** Whole upstream Think stub. `ThinkChat.Root` wires `agent.stub` automatically. */
56
+ thinkStub?: AgentStub<Think>;
57
+ /** Called after a Think approve/reject RPC settles. Root uses this to refresh approvals. */
58
+ onExecutionSettled?: AgentChatProps<MessageT>["onExecutionSettled"];
53
59
  /** Think durable-pause approvals from `pendingApprovals()`. */
54
- pendingApprovals?: AgentChatProps["pendingApprovals"];
60
+ pendingApprovals?: AgentChatProps<MessageT>["pendingApprovals"];
55
61
  /**
56
62
  * Shows a Context ring in the composer footer — how much of the model's
57
63
  * window the conversation occupies, from `metadata.usage` on the newest
58
64
  * message that reports it.
59
65
  */
60
- contextWindow?: AgentChatProps["contextWindow"];
66
+ contextWindow?: AgentChatProps<MessageT>["contextWindow"];
61
67
  }
62
- declare function useThinkPendingApprovals(stub: ThinkApprovalStub, refreshKey: unknown): {
68
+ declare function useThinkPendingApprovals(stub: AgentStub<Think>, refreshKey: unknown): {
63
69
  pendingApprovals: readonly PendingApproval[];
64
- executionApprovals: ExecutionApprovals;
70
+ refreshPendingApprovals: () => Promise<void>;
65
71
  };
66
72
  /**
67
73
  * Chat UI for Cloudflare Think agents. Provide a `useAgentChat` value (or let
68
74
  * `ThinkChat.Root` create one) and `ThinkChat.Messages` renders the message
69
75
  * stream with agent work folded into collapsed Activity blocks.
70
76
  */
71
- declare function ThinkChatProvider({
77
+ declare function ThinkChatProvider<State = unknown, MessageT extends UIMessage = UIMessage>({
72
78
  chat,
73
79
  children
74
- }: ThinkChatProviderProps): React.JSX.Element;
80
+ }: ThinkChatProviderProps<State, MessageT>): React.JSX.Element;
75
81
  /**
76
82
  * Batteries-included root: connects to the named Think agent (upstream's
77
83
  * `useAgent` + `useAgentChat`) and provides the live chat to everything
@@ -84,7 +90,7 @@ declare function ThinkChatProvider({
84
90
  * </ThinkChat.Root>
85
91
  * ```
86
92
  */
87
- declare function ThinkChatRoot<State = unknown>({
93
+ declare function ThinkChatRoot<State = unknown, MessageT extends UIMessage = UIMessage>({
88
94
  agent: agentOption,
89
95
  name,
90
96
  children
@@ -97,21 +103,22 @@ declare function ThinkChatRoot<State = unknown>({
97
103
  * inside the log) or `excludeTools` + your own `renderPart` (standalone
98
104
  * card) — see README "App-specific tools" and the Custom Tool Panel story.
99
105
  */
100
- declare function ThinkChatMessages({
106
+ declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage = UIMessage>({
101
107
  renderPart,
102
108
  excludeTools,
103
109
  toolRenderers,
104
- executionApprovals,
110
+ thinkStub,
111
+ onExecutionSettled,
105
112
  pendingApprovals,
106
113
  notice,
107
114
  ...props
108
- }: ThinkChatMessagesProps): React.JSX.Element;
115
+ }: ThinkChatMessagesProps<MessageT>): React.JSX.Element;
109
116
  /**
110
117
  * The ambient chat value from `ThinkChat.Root`/`Provider` — for custom tool
111
118
  * panels, cards, or composer actions that need `messages`, `status`, or
112
119
  * `sendMessage`. Throws outside a provider.
113
120
  */
114
- declare function useThinkChat(): Omit<import("@ai-sdk/react").UseChatHelpers<UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>, "addToolOutput"> & {
121
+ declare function useThinkChat<State = unknown, MessageT extends UIMessage = UIMessage>(): Omit<import("@ai-sdk/react").UseChatHelpers<MessageT>, "addToolOutput"> & {
115
122
  clearHistory: () => void;
116
123
  addToolOutput: (opts: {
117
124
  toolCallId: string;
@@ -145,4 +152,4 @@ declare const ThinkChat: {
145
152
  createActivityRenderer: typeof createThinkChatActivityRenderer;
146
153
  };
147
154
  //#endregion
148
- export { BrowserLiveView, type BrowserLiveViewProps, BrowserReplay, type BrowserReplayProps, type ExecutionApprovals, type FileInfo, ThinkApprovalStub, ThinkChat, ThinkChatActivity, type ThinkChatActivityProps, type ThinkChatActivityRendererOptions, ThinkChatMessages, ThinkChatMessagesProps, ThinkChatProvider, ThinkChatProviderProps, ThinkChatRoot, ThinkChatRootProps, type ThinkChatToolRenderer, type ThinkChatToolRenderers, type UseWorkspaceOptions, WorkspaceExplorer, type WorkspaceExplorerProps, type WorkspaceFileState, type WorkspaceInfo, type WorkspaceSource, type WorkspaceState, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useThinkChat, useThinkPendingApprovals, useWorkspace };
155
+ export { BrowserLiveView, type BrowserLiveViewProps, BrowserReplay, type BrowserReplayProps, type FileInfo, ThinkChat, ThinkChatActivity, type ThinkChatActivityProps, type ThinkChatActivityRendererOptions, ThinkChatMessages, ThinkChatMessagesProps, ThinkChatProvider, ThinkChatProviderProps, ThinkChatRoot, ThinkChatRootProps, type ThinkChatToolRenderer, type ThinkChatToolRenderers, type UseWorkspaceOptions, WorkspaceExplorer, type WorkspaceExplorerProps, type WorkspaceFileState, type WorkspaceInfo, type WorkspaceSource, type WorkspaceState, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, useThinkChat, useThinkPendingApprovals, useWorkspace };