@mcp-b/react-components 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/dist/{AgentChat-CrlpbvQJ.d.ts → AgentChat-CRuMi1Pb.d.ts} +4 -10
  2. package/dist/AgentMessageParts-CyD2UB3V.d.ts +46 -0
  3. package/dist/AgentToolRunsContext-BVe4stgw.d.ts +21 -0
  4. package/dist/{CodeBlock-BmB4Xaqq.js → CodeBlock-Co1noLbC.js} +2 -2
  5. package/dist/{CodeBlock-BRajW4QU.d.ts → CodeBlock-Dnpr88ZQ.d.ts} +2 -2
  6. package/dist/Collapsible-N64ASIQr.d.ts +119 -0
  7. package/dist/{Combobox-B9Fcd6q-.d.ts → Combobox-CYc37s5l.d.ts} +11 -33
  8. package/dist/{FileTree-CkVbIMWV.js → FileTree-B7bBsUyU.js} +7 -7
  9. package/dist/{Menu-Bgu-ufb5.d.ts → Menu-L6MZm-7N.d.ts} +15 -56
  10. package/dist/{Message-BkMdE3bS.js → Message-C4eYRogZ.js} +3 -3
  11. package/dist/{ModelSelector-SlJNgwKY.js → ModelSelector-BNrZlY_Y.js} +5 -5
  12. package/dist/{PromptInput-BWTuXMOD.d.ts → PromptInput-OLfXPuHM.d.ts} +39 -67
  13. package/dist/{ResponsiveSidebarShell-Dd9DCcBT.d.ts → ResponsiveSidebarShell-CsAh4NyL.d.ts} +1 -0
  14. package/dist/{Select-BeEsefzh.d.ts → Select-CwSqP07Y.d.ts} +14 -42
  15. package/dist/{Tabs-3Zc4tb9D.d.ts → Tabs-9zddXDQo.d.ts} +5 -19
  16. package/dist/{ThinkChat-CzC-zNGA.js → ThinkChat-DInElus-.js} +53 -26
  17. package/dist/{ThinkChatActivity-BFQnb2ct.d.ts → ThinkChatActivity-BgesTfZ4.d.ts} +12 -4
  18. package/dist/{ThinkChatContext-C3Eb1Xpi.d.ts → ThinkChatContext-DrsZqdaO.d.ts} +1 -1
  19. package/dist/ThinkRecoveryNotice-DFIcG9UX.d.ts +19 -0
  20. package/dist/{Toggle-CAAlNl-M.d.ts → Toggle-DaXpe1Lc.d.ts} +1 -1
  21. package/dist/{ToggleGroup-8hPv-b69.d.ts → ToggleGroup-yseEWkOC.d.ts} +3 -4
  22. package/dist/{Workspace-D39LxGvP.d.ts → Workspace-C9RFoxcu.d.ts} +1 -1
  23. package/dist/WorkspaceExplorer-sZewzT2O.d.ts +32 -0
  24. package/dist/{WorkspaceFile-DOZkPwzu.d.ts → WorkspaceFile-C8UzuSH4.d.ts} +1 -1
  25. package/dist/{WorkspaceFileView-rSN_yT0L.js → WorkspaceFileView-DNdGAEiX.js} +5 -5
  26. package/dist/{WorkspaceLink-DIPbXrUM.js → WorkspaceLink-B1ykV1dS.js} +15 -29
  27. package/dist/class-names-Bk-QLWWI.js +11 -0
  28. package/dist/components/Accordion.d.ts +5 -15
  29. package/dist/components/Accordion.js +11 -10
  30. package/dist/components/Activity.d.ts +5 -10
  31. package/dist/components/Activity.js +2 -2
  32. package/dist/components/AgentActivity.js +1 -1
  33. package/dist/components/AgentActivityPreview.js +2 -2
  34. package/dist/components/AgentAttention.d.ts +1 -1
  35. package/dist/components/AgentAttention.js +1 -1
  36. package/dist/components/AgentChat.d.ts +2 -2
  37. package/dist/components/AgentChat.js +27 -164
  38. package/dist/components/AgentChatMessageEditor.js +1 -1
  39. package/dist/components/AgentConnection.js +4 -4
  40. package/dist/components/AgentMessageParts.d.ts +2 -0
  41. package/dist/components/AgentMessageParts.js +119 -0
  42. package/dist/components/AgentToolDetail.d.ts +55 -0
  43. package/dist/components/AgentToolDetail.js +98 -0
  44. package/dist/components/AgentToolRunsContext.d.ts +2 -0
  45. package/dist/components/AgentToolRunsContext.js +16 -0
  46. package/dist/components/AlertDialog.d.ts +7 -19
  47. package/dist/components/AlertDialog.js +21 -32
  48. package/dist/components/AppTopBar.d.ts +4 -1
  49. package/dist/components/AppTopBar.js +5 -5
  50. package/dist/components/Approval.d.ts +102 -0
  51. package/dist/components/Approval.js +227 -0
  52. package/dist/components/Artifact.d.ts +2 -4
  53. package/dist/components/Artifact.js +3 -3
  54. package/dist/components/Autocomplete.d.ts +11 -33
  55. package/dist/components/Autocomplete.js +23 -30
  56. package/dist/components/Avatar.d.ts +3 -11
  57. package/dist/components/Avatar.js +13 -12
  58. package/dist/components/BrowserLiveView.js +2 -2
  59. package/dist/components/BrowserReplay.js +2 -2
  60. package/dist/components/BrowserRunPanel.js +58 -78
  61. package/dist/components/Button.js +4 -9
  62. package/dist/components/ChainOfThought.d.ts +5 -11
  63. package/dist/components/ChainOfThought.js +3 -2
  64. package/dist/components/ChatGptSignInScreen.js +3 -3
  65. package/dist/components/Checkbox.d.ts +2 -4
  66. package/dist/components/Checkbox.js +6 -5
  67. package/dist/components/CheckboxGroup.d.ts +1 -3
  68. package/dist/components/CheckboxGroup.js +15 -14
  69. package/dist/components/Checkpoint.d.ts +64 -0
  70. package/dist/components/Checkpoint.js +63 -0
  71. package/dist/components/CodeBlock.d.ts +1 -1
  72. package/dist/components/CodeBlock.js +1 -1
  73. package/dist/components/CodexModelSelector.d.ts +1 -1
  74. package/dist/components/CodexModelSelector.js +2 -2
  75. package/dist/components/Collapsible.d.ts +1 -124
  76. package/dist/components/Collapsible.js +7 -10
  77. package/dist/components/Combobox.d.ts +1 -1
  78. package/dist/components/Combobox.js +23 -30
  79. package/dist/components/Commit.d.ts +5 -11
  80. package/dist/components/Commit.js +6 -5
  81. package/dist/components/Context.js +1 -1
  82. package/dist/components/ContextMenu.d.ts +21 -37
  83. package/dist/components/ContextMenu.js +34 -51
  84. package/dist/components/Conversation.d.ts +2 -4
  85. package/dist/components/Conversation.js +2 -2
  86. package/dist/components/DescriptionListParts.js +1 -1
  87. package/dist/components/Dialog.d.ts +6 -17
  88. package/dist/components/Dialog.js +17 -24
  89. package/dist/components/EnvironmentVariables.d.ts +1 -1
  90. package/dist/components/EnvironmentVariables.js +4 -3
  91. package/dist/components/Field.d.ts +17 -20
  92. package/dist/components/Field.js +16 -16
  93. package/dist/components/Fieldset.d.ts +2 -7
  94. package/dist/components/Fieldset.js +7 -6
  95. package/dist/components/FileTree.js +1 -1
  96. package/dist/components/Form.d.ts +1 -4
  97. package/dist/components/Form.js +3 -2
  98. package/dist/components/GithubMotionMark.js +1 -1
  99. package/dist/components/InlineCitation.d.ts +66 -0
  100. package/dist/components/InlineCitation.js +142 -0
  101. package/dist/components/Input.d.ts +1 -4
  102. package/dist/components/Input.js +3 -2
  103. package/dist/components/Marker.js +1 -1
  104. package/dist/components/McpConnectionRequest.js +2 -2
  105. package/dist/components/McpServerPicker.d.ts +1 -1
  106. package/dist/components/McpServerPicker.js +6 -5
  107. package/dist/components/Menu.d.ts +1 -1
  108. package/dist/components/Menu.js +33 -52
  109. package/dist/components/Menubar.d.ts +22 -43
  110. package/dist/components/Menubar.js +36 -53
  111. package/dist/components/Message.d.ts +3 -6
  112. package/dist/components/Message.js +1 -1
  113. package/dist/components/MessageScroller.d.ts +1 -1
  114. package/dist/components/MessageScroller.js +3 -3
  115. package/dist/components/Meter.d.ts +5 -20
  116. package/dist/components/Meter.js +11 -10
  117. package/dist/components/ModelSelector.d.ts +2 -6
  118. package/dist/components/ModelSelector.js +1 -1
  119. package/dist/components/NavigationMenu.d.ts +11 -33
  120. package/dist/components/NavigationMenu.js +23 -30
  121. package/dist/components/NumberField.d.ts +6 -24
  122. package/dist/components/NumberField.js +13 -12
  123. package/dist/components/Plan.d.ts +103 -0
  124. package/dist/components/Plan.js +113 -0
  125. package/dist/components/Popover.d.ts +9 -36
  126. package/dist/components/Popover.js +23 -34
  127. package/dist/components/PreviewCard.d.ts +6 -24
  128. package/dist/components/PreviewCard.js +13 -24
  129. package/dist/components/PricingBillingToggle.js +1 -1
  130. package/dist/components/PricingFAQ.js +1 -1
  131. package/dist/components/PricingPlanCard.js +3 -3
  132. package/dist/components/PricingUsageCalculator.js +2 -2
  133. package/dist/components/Progress.d.ts +3 -8
  134. package/dist/components/Progress.js +7 -10
  135. package/dist/components/PromptInput.d.ts +2 -2
  136. package/dist/components/PromptInput.js +52 -200
  137. package/dist/components/Queue.d.ts +6 -16
  138. package/dist/components/Queue.js +2 -2
  139. package/dist/components/RadioGroup.d.ts +3 -8
  140. package/dist/components/RadioGroup.js +7 -10
  141. package/dist/components/Reasoning.d.ts +4 -8
  142. package/dist/components/Reasoning.js +3 -3
  143. package/dist/components/ResizableSidePanel.js +2 -2
  144. package/dist/components/ResponsiveSidebarShell.d.ts +1 -1
  145. package/dist/components/ResponsiveSidebarShell.js +4 -3
  146. package/dist/components/ScrollArea.d.ts +5 -20
  147. package/dist/components/ScrollArea.js +11 -10
  148. package/dist/components/Select.d.ts +1 -1
  149. package/dist/components/Select.js +32 -55
  150. package/dist/components/Separator.d.ts +1 -5
  151. package/dist/components/Separator.js +3 -6
  152. package/dist/components/Slider.d.ts +6 -19
  153. package/dist/components/Slider.js +15 -14
  154. package/dist/components/Sources.d.ts +4 -9
  155. package/dist/components/Sources.js +3 -2
  156. package/dist/components/Stepper.js +2 -2
  157. package/dist/components/SubagentRunDetails.js +1 -1
  158. package/dist/components/SubagentRunIndicator.js +2 -2
  159. package/dist/components/SubagentRunList.js +1 -2
  160. package/dist/components/SubagentRunSelector.d.ts +2 -11
  161. package/dist/components/SubagentRunSelector.js +16 -15
  162. package/dist/components/Switch.d.ts +2 -5
  163. package/dist/components/Switch.js +5 -8
  164. package/dist/components/Tabs.d.ts +2 -2
  165. package/dist/components/Tabs.js +10 -16
  166. package/dist/components/Task.d.ts +4 -9
  167. package/dist/components/Task.js +4 -3
  168. package/dist/components/Terminal.d.ts +2 -3
  169. package/dist/components/Terminal.js +3 -3
  170. package/dist/components/TestResults.d.ts +4 -9
  171. package/dist/components/TestResults.js +3 -2
  172. package/dist/components/Textarea.js +1 -1
  173. package/dist/components/ThemeModeControl.js +1 -1
  174. package/dist/components/ThinkChat.d.ts +21 -11
  175. package/dist/components/ThinkChat.js +5 -3
  176. package/dist/components/ThinkChatActivity.d.ts +1 -1
  177. package/dist/components/ThinkChatActivity.js +26 -7
  178. package/dist/components/ThinkChatContext.d.ts +1 -1
  179. package/dist/components/ThinkChatToolPanels.js +2 -2
  180. package/dist/components/ThinkExecutionDetail.js +2 -2
  181. package/dist/components/ThinkExecutionStatus.js +2 -2
  182. package/dist/components/ThinkExecutionWorkbench.js +2 -2
  183. package/dist/components/ThinkFullApp.d.ts +33 -9
  184. package/dist/components/ThinkFullApp.js +118 -64
  185. package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
  186. package/dist/components/ThinkFullAppViewSwitch.js +2 -2
  187. package/dist/components/ThinkPendingApproval.d.ts +60 -0
  188. package/dist/components/ThinkPendingApproval.js +99 -0
  189. package/dist/components/ThinkRecoveryNotice.d.ts +2 -0
  190. package/dist/components/ThinkRecoveryNotice.js +40 -0
  191. package/dist/components/ThinkRoutine.js +1 -0
  192. package/dist/components/ThinkRoutineBrowser.js +6 -6
  193. package/dist/components/ThinkRoutineDetail.js +1 -1
  194. package/dist/components/ThinkRoutineForm.js +2 -2
  195. package/dist/components/ThinkRoutineLibrary.d.ts +9 -0
  196. package/dist/components/ThinkRoutineLibrary.js +67 -20
  197. package/dist/components/ThinkRoutineRuns.js +1 -1
  198. package/dist/components/ThinkThreadPicker.js +2 -2
  199. package/dist/components/ThinkThreadShell.d.ts +1 -1
  200. package/dist/components/Toast.d.ts +7 -28
  201. package/dist/components/Toast.js +15 -14
  202. package/dist/components/Toggle.d.ts +1 -1
  203. package/dist/components/Toggle.js +5 -5
  204. package/dist/components/ToggleGroup.d.ts +1 -1
  205. package/dist/components/ToggleGroup.js +8 -15
  206. package/dist/components/ToolApproval.d.ts +28 -0
  207. package/dist/components/ToolApproval.js +35 -0
  208. package/dist/components/ToolInvocation.d.ts +26 -0
  209. package/dist/components/ToolInvocation.js +72 -0
  210. package/dist/components/Toolbar.d.ts +6 -24
  211. package/dist/components/Toolbar.js +13 -12
  212. package/dist/components/Tooltip.d.ts +3 -9
  213. package/dist/components/Tooltip.js +7 -10
  214. package/dist/components/WebPreview.d.ts +1 -2
  215. package/dist/components/WebPreview.js +4 -3
  216. package/dist/components/Workspace.d.ts +1 -1
  217. package/dist/components/Workspace.js +5 -20
  218. package/dist/components/WorkspaceBrowser.d.ts +1 -1
  219. package/dist/components/WorkspaceBrowser.js +3 -3
  220. package/dist/components/WorkspaceExplorer.d.ts +3 -31
  221. package/dist/components/WorkspaceExplorer.js +3 -3
  222. package/dist/components/WorkspaceFile.d.ts +1 -1
  223. package/dist/components/WorkspaceFileView.d.ts +1 -1
  224. package/dist/components/WorkspaceFileView.js +1 -1
  225. package/dist/components/WorkspaceHeader.js +1 -1
  226. package/dist/components/WorkspaceLink.js +1 -1
  227. package/dist/components/icons.d.ts +2 -2
  228. package/dist/components/icons.js +2 -2
  229. package/dist/{copy-button-DtPMgN7e.d.ts → copy-button-CQx3LQAC.d.ts} +1 -2
  230. package/dist/{copy-button-Dejn5heL.js → copy-button-cYsJBauI.js} +1 -1
  231. package/dist/{icons-CpfUer49.js → icons--FqCZEc3.js} +3 -2
  232. package/dist/{icons-GQd1xF4e.d.ts → icons-DpUqY8Mp.d.ts} +6 -1
  233. package/dist/styles/agent-activity-preview.css +13 -11
  234. package/dist/styles/agent-attention.css +19 -13
  235. package/dist/styles/agent-chat.css +0 -41
  236. package/dist/styles/agent-connection.css +9 -21
  237. package/dist/styles/agent-tool-detail.css +54 -0
  238. package/dist/styles/alert-dialog.css +11 -11
  239. package/dist/styles/app-top-bar.css +9 -7
  240. package/dist/styles/approval.css +172 -0
  241. package/dist/styles/artifact.css +0 -12
  242. package/dist/styles/browser-run-panel.css +5 -2
  243. package/dist/styles/card.css +8 -8
  244. package/dist/styles/chain-of-thought.css +5 -13
  245. package/dist/styles/checkpoint.css +58 -0
  246. package/dist/styles/codex-model-selector.css +3 -3
  247. package/dist/styles/combobox.css +3 -2
  248. package/dist/styles/commit.css +0 -21
  249. package/dist/styles/context-menu.css +1 -9
  250. package/dist/styles/dialog.css +11 -11
  251. package/dist/styles/environment-variables.css +0 -13
  252. package/dist/styles/field.css +14 -14
  253. package/dist/styles/fieldset.css +5 -5
  254. package/dist/styles/file-tree.css +0 -16
  255. package/dist/styles/index.css +8 -4
  256. package/dist/styles/inline-citation.css +107 -0
  257. package/dist/styles/mcp-connection-request.css +3 -3
  258. package/dist/styles/mcp-server-picker.css +1 -30
  259. package/dist/styles/menu.css +1 -30
  260. package/dist/styles/menubar.css +0 -8
  261. package/dist/styles/message-scroller.css +0 -12
  262. package/dist/styles/message.css +0 -12
  263. package/dist/styles/model-selector.css +18 -32
  264. package/dist/styles/plan.css +127 -0
  265. package/dist/styles/popover.css +7 -43
  266. package/dist/styles/preview-card.css +1 -1
  267. package/dist/styles/prompt-input.css +2 -195
  268. package/dist/styles/recipes.css +139 -12
  269. package/dist/styles/responsive-sidebar-shell.css +16 -19
  270. package/dist/styles/select.css +3 -3
  271. package/dist/styles/sources.css +6 -14
  272. package/dist/styles/subagent-run.css +12 -70
  273. package/dist/styles/task.css +17 -26
  274. package/dist/styles/test-results.css +17 -23
  275. package/dist/styles/textarea.css +1 -1
  276. package/dist/styles/think-execution-workbench.css +9 -9
  277. package/dist/styles/think-full-app.css +49 -33
  278. package/dist/styles/think-routine-library.css +30 -38
  279. package/dist/styles/think-thread-picker.css +15 -0
  280. package/dist/styles/toast.css +4 -11
  281. package/dist/styles/tooltip.css +1 -1
  282. package/dist/styles/utilities.css +31 -0
  283. package/dist/styles/web-preview.css +0 -21
  284. package/dist/styles/workspace-explorer.css +20 -65
  285. package/dist/think-agent-Cip5KAPj.d.ts +7 -0
  286. package/dist/utils/codex-model-catalog.d.ts +4 -4
  287. package/dist/utils/structured-code.d.ts +1 -1
  288. package/dist/workspace-path-L_KmjRjq.js +26 -0
  289. package/package.json +3 -4
  290. package/dist/class-names-9UtZwb0J.js +0 -12
  291. package/dist/components/AppFrame.d.ts +0 -24
  292. package/dist/components/AppFrame.js +0 -25
  293. package/dist/components/Shell.d.ts +0 -163
  294. package/dist/components/Shell.js +0 -137
  295. package/dist/components/SubagentRun.d.ts +0 -86
  296. package/dist/components/SubagentRun.js +0 -108
  297. package/dist/styles/app-frame.css +0 -15
  298. package/dist/styles/shell.css +0 -122
@@ -1,3 +1,4 @@
1
+ import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
1
2
  import "react";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import { PreviewCard as PreviewCard$1 } from "@base-ui/react/preview-card";
@@ -31,8 +32,8 @@ const PreviewCardRoot = (props) => {
31
32
  /**
32
33
  * Link element that triggers the preview card on hover.
33
34
  */
34
- function PreviewCardTrigger({ className = "", ref, ...props }) {
35
- const classes = ["preview-card__trigger", className].filter(Boolean).join(" ");
35
+ function PreviewCardTrigger({ className, ref, ...props }) {
36
+ const classes = mergeBaseClassName(["preview-card__trigger"].filter(Boolean).join(" "), className);
36
37
  return /* @__PURE__ */ jsx(PreviewCard$1.Trigger, {
37
38
  ref,
38
39
  "data-slot": "hover-card-trigger",
@@ -52,12 +53,8 @@ const PreviewCardPortal = (props) => {
52
53
  /**
53
54
  * Optional backdrop behind the preview card.
54
55
  */
55
- function PreviewCardBackdrop({ className = "", ref, ...props }) {
56
- const classes = [
57
- "preview-card__backdrop",
58
- "base-ui-backdrop",
59
- className
60
- ].filter(Boolean).join(" ");
56
+ function PreviewCardBackdrop({ className, ref, ...props }) {
57
+ const classes = mergeBaseClassName(["preview-card__backdrop", "base-ui-backdrop"].filter(Boolean).join(" "), className);
61
58
  return /* @__PURE__ */ jsx(PreviewCard$1.Backdrop, {
62
59
  ref,
63
60
  "data-slot": "hover-card-backdrop",
@@ -68,12 +65,8 @@ function PreviewCardBackdrop({ className = "", ref, ...props }) {
68
65
  /**
69
66
  * Positions the preview card relative to the trigger.
70
67
  */
71
- function PreviewCardPositioner({ className = "", ref, ...props }) {
72
- const classes = [
73
- "preview-card__positioner",
74
- "base-ui-positioner",
75
- className
76
- ].filter(Boolean).join(" ");
68
+ function PreviewCardPositioner({ className, ref, ...props }) {
69
+ const classes = mergeBaseClassName(["preview-card__positioner", "base-ui-positioner"].filter(Boolean).join(" "), className);
77
70
  return /* @__PURE__ */ jsx(PreviewCard$1.Positioner, {
78
71
  ref,
79
72
  "data-slot": "hover-card-positioner",
@@ -84,12 +77,8 @@ function PreviewCardPositioner({ className = "", ref, ...props }) {
84
77
  /**
85
78
  * Container for preview card content.
86
79
  */
87
- function PreviewCardPopup({ className = "", ref, ...props }) {
88
- const classes = [
89
- "preview-card__popup",
90
- "base-ui-popup",
91
- className
92
- ].filter(Boolean).join(" ");
80
+ function PreviewCardPopup({ className, ref, ...props }) {
81
+ const classes = mergeBaseClassName(["preview-card__popup", "base-ui-popup"].filter(Boolean).join(" "), className);
93
82
  return /* @__PURE__ */ jsx(PreviewCard$1.Popup, {
94
83
  ref,
95
84
  "data-slot": "hover-card-content",
@@ -102,8 +91,8 @@ function PreviewCardPopup({ className = "", ref, ...props }) {
102
91
  * between triggers. Pair the adaptive classes from `base-ui-motion.css` with
103
92
  * the positioner, popup, and this viewport when that behavior is needed.
104
93
  */
105
- function PreviewCardViewport({ className = "", ref, ...props }) {
106
- const classes = ["preview-card__viewport", className].filter(Boolean).join(" ");
94
+ function PreviewCardViewport({ className, ref, ...props }) {
95
+ const classes = mergeBaseClassName(["preview-card__viewport"].filter(Boolean).join(" "), className);
107
96
  return /* @__PURE__ */ jsx(PreviewCard$1.Viewport, {
108
97
  ref,
109
98
  "data-slot": "hover-card-viewport",
@@ -114,8 +103,8 @@ function PreviewCardViewport({ className = "", ref, ...props }) {
114
103
  /**
115
104
  * Decorative arrow pointing to the trigger.
116
105
  */
117
- function PreviewCardArrow({ className = "", ref, ...props }) {
118
- const classes = ["preview-card__arrow", className].filter(Boolean).join(" ");
106
+ function PreviewCardArrow({ className, ref, ...props }) {
107
+ const classes = mergeBaseClassName(["preview-card__arrow"].filter(Boolean).join(" "), className);
119
108
  return /* @__PURE__ */ jsx(PreviewCard$1.Arrow, {
120
109
  ref,
121
110
  "data-slot": "hover-card-arrow",
@@ -1,4 +1,4 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
2
  import { Badge } from "./Badge.js";
3
3
  import { Checkbox } from "./Checkbox.js";
4
4
  import { Switch } from "./Switch.js";
@@ -1,5 +1,5 @@
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
1
2
  import { Accordion } from "./Accordion.js";
2
- import { t as cx } from "../class-names-9UtZwb0J.js";
3
3
  import * as React from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/PricingFAQ.tsx
@@ -1,8 +1,8 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { O as MinusIcon, S as InfoIcon, o as CheckIcon } from "../icons-CpfUer49.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
+ import { C as InfoIcon, k as MinusIcon, s as CheckIcon } from "../icons--FqCZEc3.js";
3
3
  import { Button } from "./Button.js";
4
- import { Separator } from "./Separator.js";
5
4
  import { Tooltip } from "./Tooltip.js";
5
+ import { Separator } from "./Separator.js";
6
6
  import { Badge } from "./Badge.js";
7
7
  import { Card } from "./Card.js";
8
8
  import { getPlanPrice, getPlanYearlySavings } from "./Pricing.js";
@@ -1,9 +1,9 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
2
2
  import { Separator } from "./Separator.js";
3
+ import { Progress } from "./Progress.js";
3
4
  import { Slider } from "./Slider.js";
4
5
  import { Card } from "./Card.js";
5
6
  import { formatPricingUsage, getUsagePrice } from "./Pricing.js";
6
- import { Progress } from "./Progress.js";
7
7
  import * as React from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/components/PricingUsageCalculator.tsx
@@ -3,20 +3,15 @@ import { Progress as Progress$1 } from "@base-ui/react/progress";
3
3
 
4
4
  //#region src/components/Progress.d.ts
5
5
  type ProgressColor = "primary" | "success" | "warning" | "destructive";
6
- interface ProgressProps extends Omit<React.ComponentPropsWithRef<typeof Progress$1.Root>, "className"> {
7
- className?: string;
6
+ interface ProgressProps extends React.ComponentPropsWithRef<typeof Progress$1.Root> {
8
7
  /**
9
8
  * The semantic color of the progress bar.
10
9
  * @default 'primary'
11
10
  */
12
11
  color?: ProgressColor;
13
12
  }
14
- interface ProgressTrackProps extends Omit<React.ComponentPropsWithRef<typeof Progress$1.Track>, "className"> {
15
- className?: string;
16
- }
17
- interface ProgressIndicatorProps extends Omit<React.ComponentPropsWithRef<typeof Progress$1.Indicator>, "className"> {
18
- className?: string;
19
- }
13
+ interface ProgressTrackProps extends React.ComponentPropsWithRef<typeof Progress$1.Track> {}
14
+ interface ProgressIndicatorProps extends React.ComponentPropsWithRef<typeof Progress$1.Indicator> {}
20
15
  /**
21
16
  * A progress indicator component for showing completion status.
22
17
  *
@@ -1,3 +1,4 @@
1
+ import { n as mergeBaseClassName } from "../class-names-Bk-QLWWI.js";
1
2
  import "react";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  import { Progress as Progress$1 } from "@base-ui/react/progress";
@@ -16,12 +17,8 @@ import { Progress as Progress$1 } from "@base-ui/react/progress";
16
17
  *
17
18
  * @see {@link https://base-ui.com/react/components/progress | Base UI Progress}
18
19
  */
19
- function ProgressRoot({ color = "primary", className = "", ref, ...props }) {
20
- const classes = [
21
- "progress",
22
- `progress--${color}`,
23
- className
24
- ].filter(Boolean).join(" ");
20
+ function ProgressRoot({ color = "primary", className, ref, ...props }) {
21
+ const classes = mergeBaseClassName(["progress", `progress--${color}`].filter(Boolean).join(" "), className);
25
22
  return /* @__PURE__ */ jsx(Progress$1.Root, {
26
23
  ref,
27
24
  "data-slot": "progress",
@@ -29,8 +26,8 @@ function ProgressRoot({ color = "primary", className = "", ref, ...props }) {
29
26
  ...props
30
27
  });
31
28
  }
32
- function ProgressTrack({ className = "", ref, ...props }) {
33
- const classes = ["progress__track", className].filter(Boolean).join(" ");
29
+ function ProgressTrack({ className, ref, ...props }) {
30
+ const classes = mergeBaseClassName(["progress__track"].filter(Boolean).join(" "), className);
34
31
  return /* @__PURE__ */ jsx(Progress$1.Track, {
35
32
  ref,
36
33
  "data-slot": "progress-track",
@@ -38,8 +35,8 @@ function ProgressTrack({ className = "", ref, ...props }) {
38
35
  ...props
39
36
  });
40
37
  }
41
- function ProgressIndicator({ className = "", ref, ...props }) {
42
- const classes = ["progress__indicator", className].filter(Boolean).join(" ");
38
+ function ProgressIndicator({ className, ref, ...props }) {
39
+ const classes = mergeBaseClassName(["progress__indicator"].filter(Boolean).join(" "), className);
43
40
  return /* @__PURE__ */ jsx(Progress$1.Indicator, {
44
41
  ref,
45
42
  "data-slot": "progress-indicator",
@@ -1,2 +1,2 @@
1
- import { $ as PromptInputDictation, A as PromptInputCommandComposerProps, At as PromptInputTabLabelProps, B as PromptInputCommandItem, Bt as TooltipSide, C as PromptInputBody, Ct as PromptInputSubmitProps, D as PromptInputButtonTooltip, Dt as PromptInputTabItem, E as PromptInputButtonProps, Et as PromptInputTabBodyProps, F as PromptInputCommandGroupLabel, Ft as PromptInputTextareaProps, G as PromptInputCommandSeparator, Gt as usePromptInputController, H as PromptInputCommandList, Ht as getApprovalStateKey, I as PromptInputCommandGroupLabelProps, It as PromptInputTools, J as PromptInputContextAction, K as PromptInputCommandSeparatorProps, Kt as useProviderAttachments, L as PromptInputCommandGroupProps, Lt as PromptInputToolsProps, M as PromptInputCommandEmpty, Mt as PromptInputTabsList, N as PromptInputCommandEmptyProps, Nt as PromptInputTabsListProps, O as PromptInputCommand, Ot as PromptInputTabItemProps, P as PromptInputCommandGroup, Pt as PromptInputTextarea, Q as PromptInputControllerProps, R as PromptInputCommandInput, Rt as PromptInputTooltipConfig, S as PromptInputAttachmentsProps, St as PromptInputSubmit, T as PromptInputButton, Tt as PromptInputTabBody, U as PromptInputCommandListProps, Ut as getPendingToolApprovals, V as PromptInputCommandItemProps, Vt as getApprovalRequestId, W as PromptInputCommandProps, Wt as usePromptInputAttachments, X as PromptInputContextSelector, Y as PromptInputContextItem, Z as PromptInputContextSelectorProps, _ as PromptInputApproval, _t as PromptInputReference, a as PromptInputActionAddAttachments, at as PromptInputHoverCard, b as PromptInputAttachmentProps, bt as PromptInputSelect, c as PromptInputActionAddScreenshotProps, ct as PromptInputHoverCardProps, d as PromptInputActionMenuContentProps, dt as PromptInputMessage, et as PromptInputDictationProps, f as PromptInputActionMenuItem, ft as PromptInputPermissionSelector, g as PromptInputActionMenuTriggerProps, gt as PromptInputProviderProps, h as PromptInputActionMenuTrigger, ht as PromptInputProvider, i as PromptInput, it as PromptInputHeaderProps, j as PromptInputCommandDefinition, jt as PromptInputTabProps, k as PromptInputCommandComposer, kt as PromptInputTabLabel, l as PromptInputActionMenu, lt as PromptInputHoverCardTrigger, m as PromptInputActionMenuProps, mt as PromptInputProps, n as PendingToolApproval, nt as PromptInputFooterProps, o as PromptInputActionAddAttachmentsProps, ot as PromptInputHoverCardContent, p as PromptInputActionMenuItemProps, pt as PromptInputPermissionSelectorProps, q as PromptInputCommandTrigger, r as PermissionMode, rt as PromptInputHeader, s as PromptInputActionAddScreenshot, st as PromptInputHoverCardContentProps, t as AttachmentsContext, tt as PromptInputFooter, u as PromptInputActionMenuContent, ut as PromptInputHoverCardTriggerProps, v as PromptInputApprovalProps, vt as PromptInputReferences, w as PromptInputBodyProps, wt as PromptInputTab, x as PromptInputAttachments, xt as PromptInputSelectProps, y as PromptInputAttachment, yt as PromptInputReferencesProps, z as PromptInputCommandInputProps, zt as TextInputContext } from "../PromptInput-BWTuXMOD.js";
2
- export { AttachmentsContext, PendingToolApproval, PermissionMode, PromptInput, PromptInputActionAddAttachments, PromptInputActionAddAttachmentsProps, PromptInputActionAddScreenshot, PromptInputActionAddScreenshotProps, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuContentProps, PromptInputActionMenuItem, PromptInputActionMenuItemProps, PromptInputActionMenuProps, PromptInputActionMenuTrigger, PromptInputActionMenuTriggerProps, PromptInputApproval, PromptInputApprovalProps, PromptInputAttachment, PromptInputAttachmentProps, PromptInputAttachments, PromptInputAttachmentsProps, PromptInputBody, PromptInputBodyProps, PromptInputButton, PromptInputButtonProps, PromptInputButtonTooltip, PromptInputCommand, PromptInputCommandComposer, PromptInputCommandComposerProps, PromptInputCommandDefinition, PromptInputCommandEmpty, PromptInputCommandEmptyProps, PromptInputCommandGroup, PromptInputCommandGroupLabel, PromptInputCommandGroupLabelProps, PromptInputCommandGroupProps, PromptInputCommandInput, PromptInputCommandInputProps, PromptInputCommandItem, PromptInputCommandItemProps, PromptInputCommandList, PromptInputCommandListProps, PromptInputCommandProps, PromptInputCommandSeparator, PromptInputCommandSeparatorProps, PromptInputCommandTrigger, PromptInputContextAction, PromptInputContextItem, PromptInputContextSelector, PromptInputContextSelectorProps, PromptInputControllerProps, PromptInputDictation, PromptInputDictationProps, PromptInputFooter, PromptInputFooterProps, PromptInputHeader, PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTrigger, PromptInputHoverCardTriggerProps, PromptInputMessage, PromptInputPermissionSelector, PromptInputPermissionSelectorProps, PromptInputProps, PromptInputProvider, PromptInputProviderProps, PromptInputReference, PromptInputReferences, PromptInputReferencesProps, PromptInputSelect, PromptInputSelectProps, PromptInputSubmit, PromptInputSubmitProps, PromptInputTab, PromptInputTabBody, PromptInputTabBodyProps, PromptInputTabItem, PromptInputTabItemProps, PromptInputTabLabel, PromptInputTabLabelProps, PromptInputTabProps, PromptInputTabsList, PromptInputTabsListProps, PromptInputTextarea, PromptInputTextareaProps, PromptInputTools, PromptInputToolsProps, PromptInputTooltipConfig, TextInputContext, TooltipSide, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
1
+ import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, At as PromptInputTabProps, B as PromptInputCommandItemProps, Bt as getApprovalRequestId, C as PromptInputBodyProps, Ct as PromptInputTab, D as PromptInputCommand, Dt as PromptInputTabItemProps, E as PromptInputButtonTooltip, Et as PromptInputTabItem, F as PromptInputCommandGroupLabelProps, Ft as PromptInputTools, G as PromptInputCommandSeparatorProps, Gt as useProviderAttachments, H as PromptInputCommandListProps, Ht as getPendingToolApprovals, I as PromptInputCommandGroupProps, It as PromptInputToolsProps, J as PromptInputContextItem, K as PromptInputCommandTrigger, L as PromptInputCommandInput, Lt as PromptInputTooltipConfig, M as PromptInputCommandEmptyProps, Mt as PromptInputTabsListProps, N as PromptInputCommandGroup, Nt as PromptInputTextarea, O as PromptInputCommandComposer, Ot as PromptInputTabLabel, P as PromptInputCommandGroupLabel, Pt as PromptInputTextareaProps, Q as PromptInputDictation, R as PromptInputCommandInputProps, Rt as TextInputContext, S as PromptInputBody, St as PromptInputSubmitProps, T as PromptInputButtonProps, Tt as PromptInputTabBodyProps, U as PromptInputCommandProps, Ut as usePromptInputAttachments, V as PromptInputCommandList, Vt as getApprovalStateKey, W as PromptInputCommandSeparator, Wt as usePromptInputController, X as PromptInputContextSelectorProps, Y as PromptInputContextSelector, Z as PromptInputControllerProps, _ as PromptInputApprovalProps, _t as PromptInputReferences, a as PromptInputActionAddAttachmentsProps, at as PromptInputHoverCardContent, b as PromptInputAttachments, bt as PromptInputSelectProps, c as PromptInputActionMenu, ct as PromptInputHoverCardTrigger, d as PromptInputActionMenuItem, dt as PromptInputPermissionSelector, et as PromptInputFooter, f as PromptInputActionMenuItemProps, ft as PromptInputPermissionSelectorProps, g as PromptInputApproval, gt as PromptInputReference, h as PromptInputActionMenuTriggerProps, ht as PromptInputProviderProps, i as PromptInputActionAddAttachments, it as PromptInputHoverCard, j as PromptInputCommandEmpty, jt as PromptInputTabsList, k as PromptInputCommandComposerProps, kt as PromptInputTabLabelProps, l as PromptInputActionMenuContent, lt as PromptInputHoverCardTriggerProps, m as PromptInputActionMenuTrigger, mt as PromptInputProvider, n as PermissionMode, nt as PromptInputHeader, o as PromptInputActionAddScreenshot, ot as PromptInputHoverCardContentProps, p as PromptInputActionMenuProps, pt as PromptInputProps, q as PromptInputContextAction, r as PromptInput, rt as PromptInputHeaderProps, s as PromptInputActionAddScreenshotProps, st as PromptInputHoverCardProps, t as AttachmentsContext, tt as PromptInputFooterProps, u as PromptInputActionMenuContentProps, ut as PromptInputMessage, v as PromptInputAttachment, vt as PromptInputReferencesProps, w as PromptInputButton, wt as PromptInputTabBody, x as PromptInputAttachmentsProps, xt as PromptInputSubmit, y as PromptInputAttachmentProps, yt as PromptInputSelect, z as PromptInputCommandItem, zt as TooltipSide } from "../PromptInput-OLfXPuHM.js";
2
+ export { AttachmentsContext, PermissionMode, PromptInput, PromptInputActionAddAttachments, PromptInputActionAddAttachmentsProps, PromptInputActionAddScreenshot, PromptInputActionAddScreenshotProps, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuContentProps, PromptInputActionMenuItem, PromptInputActionMenuItemProps, PromptInputActionMenuProps, PromptInputActionMenuTrigger, PromptInputActionMenuTriggerProps, PromptInputApproval, PromptInputApprovalProps, PromptInputAttachment, PromptInputAttachmentProps, PromptInputAttachments, PromptInputAttachmentsProps, PromptInputBody, PromptInputBodyProps, PromptInputButton, PromptInputButtonProps, PromptInputButtonTooltip, PromptInputCommand, PromptInputCommandComposer, PromptInputCommandComposerProps, PromptInputCommandDefinition, PromptInputCommandEmpty, PromptInputCommandEmptyProps, PromptInputCommandGroup, PromptInputCommandGroupLabel, PromptInputCommandGroupLabelProps, PromptInputCommandGroupProps, PromptInputCommandInput, PromptInputCommandInputProps, PromptInputCommandItem, PromptInputCommandItemProps, PromptInputCommandList, PromptInputCommandListProps, PromptInputCommandProps, PromptInputCommandSeparator, PromptInputCommandSeparatorProps, PromptInputCommandTrigger, PromptInputContextAction, PromptInputContextItem, PromptInputContextSelector, PromptInputContextSelectorProps, PromptInputControllerProps, PromptInputDictation, PromptInputDictationProps, PromptInputFooter, PromptInputFooterProps, PromptInputHeader, PromptInputHeaderProps, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardContentProps, PromptInputHoverCardProps, PromptInputHoverCardTrigger, PromptInputHoverCardTriggerProps, PromptInputMessage, PromptInputPermissionSelector, PromptInputPermissionSelectorProps, PromptInputProps, PromptInputProvider, PromptInputProviderProps, PromptInputReference, PromptInputReferences, PromptInputReferencesProps, PromptInputSelect, PromptInputSelectProps, PromptInputSubmit, PromptInputSubmitProps, PromptInputTab, PromptInputTabBody, PromptInputTabBodyProps, PromptInputTabItem, PromptInputTabItemProps, PromptInputTabLabel, PromptInputTabLabelProps, PromptInputTabProps, PromptInputTabsList, PromptInputTabsListProps, PromptInputTextarea, PromptInputTextareaProps, PromptInputTools, PromptInputToolsProps, PromptInputTooltipConfig, TextInputContext, TooltipSide, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
@@ -1,5 +1,5 @@
1
- import { t as cx } from "../class-names-9UtZwb0J.js";
2
- import { B as SpinnerIcon, D as MicrophoneIcon, F as PlusIcon, J as WrenchIcon, N as PencilIcon, U as StopIcon, V as SquareIcon, Y as XIcon, i as ArrowUpIcon, j as PaperclipIcon, k as MonitorIcon, o as CheckIcon, q as WarningIcon, s as ChevronDownIcon, v as FileIcon, y as FolderIcon } from "../icons-CpfUer49.js";
1
+ import { n as mergeBaseClassName, t as cx } from "../class-names-Bk-QLWWI.js";
2
+ import { A as MonitorIcon, H as SquareIcon, I as PlusIcon, J as WarningIcon, M as PaperclipIcon, O as MicrophoneIcon, V as SpinnerIcon, W as StopIcon, X as XIcon, Y as WrenchIcon, b as FolderIcon, c as ChevronDownIcon, i as ArrowUpIcon, s as CheckIcon, y as FileIcon } from "../icons--FqCZEc3.js";
3
3
  import { Button } from "./Button.js";
4
4
  import { Tooltip } from "./Tooltip.js";
5
5
  import { t as AttachmentPreview } from "../attachment-preview-DIs50Q0h.js";
@@ -7,10 +7,12 @@ import { Menu } from "./Menu.js";
7
7
  import { Combobox } from "./Combobox.js";
8
8
  import { Select } from "./Select.js";
9
9
  import { Tabs } from "./Tabs.js";
10
+ import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
11
+ import { ToolApproval } from "./ToolApproval.js";
10
12
  import * as React from "react";
11
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- import { getToolApproval, getToolInput, getToolOutput } from "@cloudflare/think/react";
13
- import { getToolName, isToolUIPart } from "ai";
14
+ import { isToolUIPart } from "ai";
15
+ import { getToolApproval } from "@cloudflare/think/react";
14
16
  //#region src/components/PromptInput.tsx
15
17
  const PromptInputController = React.createContext(null);
16
18
  const LocalAttachmentsContext = React.createContext(null);
@@ -611,7 +613,7 @@ function PromptInputDictation({ voice, beforeStart, className, disabled, ref, ..
611
613
  ]
612
614
  }) : null,
613
615
  /* @__PURE__ */ jsx("span", {
614
- className: "prompt-input__dictation-status",
616
+ className: "prompt-input__dictation-status sigvelo-visually-hidden",
615
617
  role: "status",
616
618
  "aria-live": "polite",
617
619
  "aria-atomic": "true",
@@ -730,7 +732,7 @@ function PromptInputActionMenuContent({ anchor, positionMethod, side, sideOffset
730
732
  collisionAvoidance,
731
733
  children: /* @__PURE__ */ jsx(Menu.Popup, {
732
734
  tabIndex,
733
- className: cx("prompt-input__action-menu", className),
735
+ className: mergeBaseClassName("prompt-input__action-menu", className),
734
736
  ...props,
735
737
  children
736
738
  })
@@ -738,7 +740,7 @@ function PromptInputActionMenuContent({ anchor, positionMethod, side, sideOffset
738
740
  }
739
741
  function PromptInputActionMenuItem({ className, ...props }) {
740
742
  return /* @__PURE__ */ jsx(Menu.Item, {
741
- className: cx("prompt-input__action-menu-item", className),
743
+ className: mergeBaseClassName("prompt-input__action-menu-item", className),
742
744
  ...props
743
745
  });
744
746
  }
@@ -867,11 +869,20 @@ function PromptInputSubmit({ className, status = "ready", onStop, variant = "nor
867
869
  children: children ?? (isQueueing ? /* @__PURE__ */ jsx(ArrowUpIcon, {}) : defaultSubmitIcon(status))
868
870
  });
869
871
  }
870
- function getPausedExecution(part) {
871
- if (part.state !== "output-available") return void 0;
872
- const output = getToolOutput(part);
873
- return output?.status === "paused" && typeof output.executionId === "string" ? output : void 0;
874
- }
872
+ /**
873
+ * Resolve Think execution approvals that do not use the AI SDK
874
+ * `approval-requested` part: paused codemode executions and durable-pause
875
+ * approvals from `pendingApprovals()`. Pass the whole upstream Think agent
876
+ * stub; the component calls its client-callable RPCs directly:
877
+ *
878
+ * ```tsx
879
+ * <PromptInputApproval part={part} thinkStub={agent.stub} />
880
+ * ```
881
+ *
882
+ * On approve, upstream resumes or runs the parked execution and auto-continues
883
+ * the chat. Both RPCs are idempotent, so a stale click resolves to "already
884
+ * handled".
885
+ */
875
886
  /** The id a response must carry: the approval id, or the paused run's executionId. */
876
887
  function getApprovalRequestId(part) {
877
888
  if (part.state === "approval-requested") return getToolApproval(part)?.id;
@@ -888,22 +899,13 @@ function getApprovalStateKey(part) {
888
899
  /** Derives pending tool approvals straight from the messages — no app-owned shapes. */
889
900
  function getPendingToolApprovals(messages, { pausedExecutions = false } = {}) {
890
901
  const pending = [];
891
- messages.forEach((message, messageIndex) => {
892
- message.parts.forEach((part, partIndex) => {
893
- if (isToolUIPart(part) && (part.state === "approval-requested" || pausedExecutions && getPausedExecution(part))) pending.push({
894
- message,
895
- messageIndex,
896
- part,
897
- partIndex
898
- });
902
+ messages.forEach((message) => {
903
+ message.parts.forEach((part) => {
904
+ if (isToolUIPart(part) && (part.state === "approval-requested" || pausedExecutions && getPausedExecution(part))) pending.push(part);
899
905
  });
900
906
  });
901
907
  return pending;
902
908
  }
903
- function formatApprovalValue(value) {
904
- if (typeof value === "string") return value;
905
- return JSON.stringify(value);
906
- }
907
909
  /**
908
910
  * The composer's approval state: when a tool call awaits human approval the
909
911
  * prompt input area becomes the confirmation. "Yes" approves on click; typing
@@ -912,183 +914,32 @@ function formatApprovalValue(value) {
912
914
  * current selection — approve by default.
913
915
  */
914
916
  function PromptInputApproval({ part, approval: durableApproval, onRespond, thinkStub, onExecutionSettled, onSkip, question, count, className, ref, ...props }) {
915
- const [selected, setSelected] = React.useState("approve");
916
- const [reason, setReason] = React.useState("");
917
- const [busy, setBusy] = React.useState(false);
918
- const yesRef = React.useRef(null);
919
- const reasonRef = React.useRef(null);
920
- const approval = part?.state === "approval-requested" ? part.approval : void 0;
921
- const paused = part ? getPausedExecution(part) : void 0;
922
- const approvalId = part ? getApprovalStateKey(part) : durableApproval?.executionId;
923
- React.useEffect(() => {
924
- setSelected("approve");
925
- setReason("");
926
- setBusy(false);
927
- }, [approvalId]);
928
- if (!part && !durableApproval) return null;
929
- if (approval ? !onRespond : !(thinkStub && (paused || durableApproval))) return null;
930
- const toolName = durableApproval?.descriptor.action ?? (part ? getToolName(part) : "action");
931
- const respond = async (approved) => {
932
- if (busy) return;
933
- setBusy(true);
934
- const trimmed = reason.trim();
935
- const denyReason = !approved && trimmed ? trimmed : void 0;
936
- try {
937
- if (approval) await onRespond?.({
938
- id: approval.id,
939
- approved,
940
- reason: denyReason
941
- });
942
- else if (paused && thinkStub) await (approved ? thinkStub.approveExecution(paused.executionId) : thinkStub.rejectExecution(paused.executionId, denyReason));
943
- else if (durableApproval && thinkStub) await (approved ? thinkStub.approveExecution(durableApproval.executionId) : thinkStub.rejectExecution(durableApproval.executionId, denyReason));
944
- } finally {
945
- setBusy(false);
946
- if (!approval) onExecutionSettled?.();
947
- }
948
- };
949
- const submit = () => void respond(selected === "approve");
950
- const input = durableApproval?.descriptor.input ?? (part ? getToolInput(part) : void 0);
951
- const inputEntries = input && typeof input === "object" && !Array.isArray(input) ? Object.entries(input) : void 0;
952
- return /* @__PURE__ */ jsxs("div", {
953
- ref,
954
- role: "group",
955
- "aria-label": `Approve ${toolName}`,
917
+ const shared = {
956
918
  className: cx("prompt-input__approval", className),
957
- onKeyDown: (event) => {
958
- if (event.key === "ArrowDown" || event.key === "ArrowUp") {
959
- event.preventDefault();
960
- (selected === "approve" ? reasonRef : yesRef).current?.focus();
961
- } else if (event.key === "1" && event.target !== reasonRef.current) yesRef.current?.focus();
962
- },
963
- ...props,
964
- children: [
965
- /* @__PURE__ */ jsxs("div", {
966
- className: "prompt-input__approval-question",
967
- children: [/* @__PURE__ */ jsx("span", { children: question ?? (durableApproval ? /* @__PURE__ */ jsxs(Fragment, { children: [
968
- "Do you want to allow ",
969
- /* @__PURE__ */ jsx("code", { children: durableApproval.descriptor.summary }),
970
- "?"
971
- ] }) : paused ? /* @__PURE__ */ jsx(Fragment, { children: "The agent's code is paused on these calls. Allow it to continue?" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
972
- "Do you want to allow the agent to run ",
973
- /* @__PURE__ */ jsx("code", { children: toolName }),
974
- "?"
975
- ] })) }), count && count > 1 ? /* @__PURE__ */ jsxs("span", {
976
- className: "prompt-input__approval-count",
977
- children: ["1 of ", count]
978
- }) : null]
979
- }),
980
- paused ? /* @__PURE__ */ jsx("div", {
981
- className: "prompt-input__approval-preview",
982
- children: paused.pending.map((action) => /* @__PURE__ */ jsxs("div", {
983
- className: "prompt-input__approval-preview-row",
984
- children: [
985
- /* @__PURE__ */ jsxs("span", {
986
- className: "prompt-input__approval-preview-key",
987
- children: [
988
- action.connector,
989
- ".",
990
- action.method
991
- ]
992
- }),
993
- " ",
994
- action.args === void 0 ? null : formatApprovalValue(action.args)
995
- ]
996
- }, action.seq))
997
- }) : input !== void 0 ? /* @__PURE__ */ jsx("div", {
998
- className: "prompt-input__approval-preview",
999
- children: inputEntries ? inputEntries.map(([key, value]) => /* @__PURE__ */ jsxs("div", {
1000
- className: "prompt-input__approval-preview-row",
1001
- children: [
1002
- /* @__PURE__ */ jsx("span", {
1003
- className: "prompt-input__approval-preview-key",
1004
- children: key
1005
- }),
1006
- " ",
1007
- formatApprovalValue(value)
1008
- ]
1009
- }, key)) : /* @__PURE__ */ jsx("div", {
1010
- className: "prompt-input__approval-preview-row",
1011
- children: formatApprovalValue(input)
1012
- })
1013
- }) : null,
1014
- /* @__PURE__ */ jsxs("div", {
1015
- className: "prompt-input__approval-options",
1016
- children: [/* @__PURE__ */ jsxs("button", {
1017
- ref: yesRef,
1018
- type: "button",
1019
- className: "prompt-input__approval-option",
1020
- "data-selected": selected === "approve" || void 0,
1021
- disabled: busy,
1022
- onClick: () => void respond(true),
1023
- onFocus: () => setSelected("approve"),
1024
- children: [
1025
- /* @__PURE__ */ jsx("span", {
1026
- className: "prompt-input__approval-key",
1027
- children: "1"
1028
- }),
1029
- "Yes",
1030
- /* @__PURE__ */ jsx("span", {
1031
- className: "prompt-input__approval-arrows",
1032
- "aria-hidden": "true",
1033
- children: "↑↓"
1034
- })
1035
- ]
1036
- }), /* @__PURE__ */ jsxs("div", {
1037
- className: "prompt-input__approval-option prompt-input__approval-deny",
1038
- "data-selected": selected === "deny" || void 0,
1039
- children: [
1040
- /* @__PURE__ */ jsx("span", {
1041
- className: "prompt-input__approval-key",
1042
- "aria-hidden": "true",
1043
- children: /* @__PURE__ */ jsx(PencilIcon, { size: 11 })
1044
- }),
1045
- /* @__PURE__ */ jsx("input", {
1046
- ref: reasonRef,
1047
- type: "text",
1048
- className: "prompt-input__approval-reason",
1049
- "aria-label": `Deny ${toolName} and tell the agent what to do differently`,
1050
- placeholder: "No, and tell the agent what to do differently",
1051
- value: reason,
1052
- disabled: busy,
1053
- onFocus: () => setSelected("deny"),
1054
- onChange: (event) => {
1055
- setSelected("deny");
1056
- setReason(event.currentTarget.value);
1057
- },
1058
- onKeyDown: (event) => {
1059
- if (event.key === "Enter" && !event.nativeEvent.isComposing) {
1060
- event.preventDefault();
1061
- respond(false);
1062
- }
1063
- }
1064
- }),
1065
- onSkip ? /* @__PURE__ */ jsx(Button, {
1066
- type: "button",
1067
- size: "xs",
1068
- variant: "ghost",
1069
- color: "neutral",
1070
- className: "prompt-input__approval-skip",
1071
- disabled: busy,
1072
- onClick: onSkip,
1073
- children: "Skip"
1074
- }) : null,
1075
- /* @__PURE__ */ jsxs(Button, {
1076
- type: "button",
1077
- size: "xs",
1078
- color: "primary",
1079
- className: "prompt-input__approval-submit",
1080
- disabled: busy,
1081
- onClick: submit,
1082
- children: [selected === "approve" ? "Approve" : "Submit", /* @__PURE__ */ jsx("kbd", {
1083
- className: "prompt-input__approval-kbd",
1084
- children: "⏎"
1085
- })]
1086
- })
1087
- ]
1088
- })]
1089
- })
1090
- ]
919
+ count,
920
+ onSkip,
921
+ question,
922
+ ref,
923
+ ...props
924
+ };
925
+ if (part?.state === "approval-requested" && onRespond) return /* @__PURE__ */ jsx(ToolApproval, {
926
+ ...shared,
927
+ part,
928
+ onRespond
929
+ });
930
+ if (part && thinkStub && getPausedExecution(part)) return /* @__PURE__ */ jsx(ThinkExecutionApproval, {
931
+ ...shared,
932
+ part,
933
+ thinkStub,
934
+ onSettled: onExecutionSettled
935
+ });
936
+ if (durableApproval && thinkStub) return /* @__PURE__ */ jsx(ThinkPendingApproval, {
937
+ ...shared,
938
+ approval: durableApproval,
939
+ thinkStub,
940
+ onSettled: onExecutionSettled
1091
941
  });
942
+ return null;
1092
943
  }
1093
944
  const PromptInputSelect = Select;
1094
945
  const PromptInputHoverCardContext = React.createContext(null);
@@ -1169,7 +1020,7 @@ const PromptInputCommandInput = Combobox.Input;
1169
1020
  function PromptInputCommandList({ className, ref, ...props }) {
1170
1021
  return /* @__PURE__ */ jsx(Combobox.List, {
1171
1022
  ref,
1172
- className: cx("prompt-input__command-list", className),
1023
+ className: mergeBaseClassName("prompt-input__command-list", className),
1173
1024
  ...props
1174
1025
  });
1175
1026
  }
@@ -1240,6 +1091,7 @@ function PromptInputCommandComposer({ commands, mentionCommands, value, onValueC
1240
1091
  className: "prompt-input__command-positioner",
1241
1092
  children: /* @__PURE__ */ jsxs(Combobox.Popup, {
1242
1093
  className: "prompt-input__command-popup",
1094
+ "data-recipe": "composer-command-surface",
1243
1095
  children: [/* @__PURE__ */ jsx(PromptInputCommandList, {
1244
1096
  "data-command-trigger": trigger,
1245
1097
  children: (group) => /* @__PURE__ */ jsxs(PromptInputCommandGroup, {
@@ -1,4 +1,4 @@
1
- import { Collapsible } from "./Collapsible.js";
1
+ import { t as Collapsible } from "../Collapsible-N64ASIQr.js";
2
2
  import { r as ButtonProps } from "../Button-FX_hpqxm.js";
3
3
  import { ScrollArea } from "./ScrollArea.js";
4
4
  import * as React from "react";
@@ -61,9 +61,7 @@ declare function Queue({
61
61
  }: QueueProps & {
62
62
  ref?: React.Ref<HTMLDivElement>;
63
63
  }): React.JSX.Element;
64
- interface QueueSectionProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
65
- className?: string;
66
- }
64
+ interface QueueSectionProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {}
67
65
  /**
68
66
  * A collapsible section within a Queue. Holds a trigger label and a list
69
67
  * of QueueItem children.
@@ -76,9 +74,7 @@ declare function QueueSection({
76
74
  }: QueueSectionProps & {
77
75
  ref?: React.Ref<HTMLDivElement>;
78
76
  }): React.JSX.Element;
79
- interface QueueSectionTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
80
- className?: string;
81
- }
77
+ interface QueueSectionTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled"> {}
82
78
  declare function QueueSectionTrigger({
83
79
  className,
84
80
  children,
@@ -104,9 +100,7 @@ declare function QueueSectionLabel({
104
100
  }: QueueSectionLabelProps & {
105
101
  ref?: React.Ref<HTMLSpanElement>;
106
102
  }): React.JSX.Element;
107
- interface QueueListProps extends Omit<React.ComponentProps<typeof ScrollArea.Root>, "className"> {
108
- className?: string;
109
- }
103
+ interface QueueListProps extends React.ComponentProps<typeof ScrollArea.Root> {}
110
104
  declare function QueueList({
111
105
  className,
112
106
  children,
@@ -115,9 +109,7 @@ declare function QueueList({
115
109
  }: QueueListProps & {
116
110
  ref?: React.Ref<HTMLDivElement>;
117
111
  }): React.JSX.Element;
118
- interface QueueSectionContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
119
- className?: string;
120
- }
112
+ interface QueueSectionContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "unstyled"> {}
121
113
  declare function QueueSectionContent({
122
114
  className,
123
115
  ref,
@@ -176,9 +168,7 @@ declare function QueueItemDescription({
176
168
  ref?: React.Ref<HTMLParagraphElement>;
177
169
  }): React.JSX.Element;
178
170
  interface QueueItemActionsProps extends React.HTMLAttributes<HTMLDivElement> {}
179
- interface QueueItemActionProps extends Omit<ButtonProps, "variant" | "color" | "size" | "className"> {
180
- className?: string;
181
- }
171
+ interface QueueItemActionProps extends Omit<ButtonProps, "variant" | "color" | "size"> {}
182
172
  declare function QueueItemActions({
183
173
  className,
184
174
  children,
@@ -1,6 +1,6 @@
1
+ import { t as cx } from "../class-names-Bk-QLWWI.js";
1
2
  import { Collapsible } from "./Collapsible.js";
2
- import { t as cx } from "../class-names-9UtZwb0J.js";
3
- import { l as ChevronRightIcon, o as CheckIcon, p as DotIcon, v as FileIcon } from "../icons-CpfUer49.js";
3
+ import { m as DotIcon, s as CheckIcon, u as ChevronRightIcon, y as FileIcon } from "../icons--FqCZEc3.js";
4
4
  import { Button } from "./Button.js";
5
5
  import { Badge } from "./Badge.js";
6
6
  import { ScrollArea } from "./ScrollArea.js";
@@ -3,20 +3,15 @@ import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
3
3
  import { Radio as Radio$1 } from "@base-ui/react/radio";
4
4
 
5
5
  //#region src/components/RadioGroup.d.ts
6
- interface RadioGroupProps extends Omit<React.ComponentPropsWithRef<typeof RadioGroup$1>, "className"> {
7
- className?: string;
6
+ interface RadioGroupProps extends React.ComponentPropsWithRef<typeof RadioGroup$1> {
8
7
  /**
9
8
  * The orientation of the radio group.
10
9
  * @default 'vertical'
11
10
  */
12
11
  orientation?: "horizontal" | "vertical";
13
12
  }
14
- interface RadioProps extends Omit<React.ComponentPropsWithRef<typeof Radio$1.Root>, "className"> {
15
- className?: string;
16
- }
17
- interface RadioIndicatorProps extends Omit<React.ComponentPropsWithRef<typeof Radio$1.Indicator>, "className"> {
18
- className?: string;
19
- }
13
+ interface RadioProps extends React.ComponentPropsWithRef<typeof Radio$1.Root> {}
14
+ interface RadioIndicatorProps extends React.ComponentPropsWithRef<typeof Radio$1.Indicator> {}
20
15
  /**
21
16
  * A radio group component for selecting one option from a list.
22
17
  *