@mcp-b/react-components 0.48.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/dist/AgentChatQueue-C_Jaw3Ia.d.ts +48 -0
  2. package/dist/AgentToolRunsContext-GMe_hSnD.d.ts +35 -0
  3. package/dist/Avatar-o2NO1fCG.d.ts +124 -0
  4. package/dist/{Button-CZt3yywF.d.ts → Button-DjONW5UW.d.ts} +1 -1
  5. package/dist/{CodeBlock-C380GD5t.d.ts → CodeBlock--r6GS8YV.d.ts} +8 -2
  6. package/dist/{CodeBlock-BSJl682D.js → CodeBlock-g8sADidM.js} +8 -8
  7. package/dist/{FileTree-DvE0hNZu.js → FileTree-H8mMg4rV.js} +21 -30
  8. package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
  9. package/dist/{Message-D_vCVEGB.d.ts → Message-DyaTBiV7.d.ts} +17 -4
  10. package/dist/MessageScrollerVirtual-D4afYwVB.d.ts +84 -0
  11. package/dist/{PromptInput-DtJHyp0S.d.ts → PromptInput-C4Mofitz.d.ts} +44 -31
  12. package/dist/PromptInputApproval-D2hpn54U.d.ts +44 -0
  13. package/dist/Separator-CzhtLYE1.d.ts +41 -0
  14. package/dist/Toolbar-CGY004u0.d.ts +155 -0
  15. package/dist/{Workspace-LIoU30n7.d.ts → Workspace-HzGrWDX3.d.ts} +1 -1
  16. package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
  17. package/dist/{WorkspaceFileView-C_WnYm-a.js → WorkspaceFileView-DYPtRVpM.js} +5 -4
  18. package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
  19. package/dist/{WorkspaceMessageResponse-BqOezptB.js → WorkspaceMessageResponse-CUJk9_P5.js} +2 -2
  20. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  21. package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
  22. package/dist/components/agents-sdk/AgentChat.js +527 -672
  23. package/dist/components/agents-sdk/AgentChatQueue.d.ts +2 -0
  24. package/dist/components/agents-sdk/AgentChatQueue.js +206 -0
  25. package/dist/components/agents-sdk/AgentEvent.js +2 -2
  26. package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +2 -2
  27. package/dist/components/agents-sdk/AgentToolRunsContext.js +1 -36
  28. package/dist/components/agents-sdk/BrowserLiveScreen.js +22 -14
  29. package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
  30. package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
  31. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  32. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
  33. package/dist/components/agents-sdk/BrowserRunPanel.js +32 -31
  34. package/dist/components/agents-sdk/EmployeeChrome.d.ts +212 -0
  35. package/dist/components/agents-sdk/EmployeeChrome.js +555 -0
  36. package/dist/components/agents-sdk/ManagerOffice.d.ts +79 -40
  37. package/dist/components/agents-sdk/ManagerOffice.js +291 -281
  38. package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
  39. package/dist/components/agents-sdk/McpConnectionRequest.js +4 -3
  40. package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
  41. package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
  42. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
  43. package/dist/components/agents-sdk/McpPluginCatalog.js +5 -4
  44. package/dist/components/agents-sdk/McpServerIcon.d.ts +17 -0
  45. package/dist/components/agents-sdk/McpServerIcon.js +25 -0
  46. package/dist/components/agents-sdk/McpServerPicker.d.ts +4 -3
  47. package/dist/components/agents-sdk/McpServerPicker.js +4 -3
  48. package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
  49. package/dist/components/agents-sdk/ModelSelector.js +4 -4
  50. package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
  51. package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
  52. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  53. package/dist/components/agents-sdk/PromptInputCommands.js +2 -3
  54. package/dist/components/agents-sdk/SessionCompaction.d.ts +88 -1
  55. package/dist/components/agents-sdk/SessionCompaction.js +2 -2
  56. package/dist/components/agents-sdk/SubagentRunDetails.d.ts +30 -1
  57. package/dist/components/agents-sdk/SubagentRunDetails.js +57 -1
  58. package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +9 -9
  59. package/dist/components/agents-sdk/SubagentRunIndicator.js +19 -24
  60. package/dist/components/agents-sdk/SubagentRunList.d.ts +6 -3
  61. package/dist/components/agents-sdk/SubagentRunList.js +4 -2
  62. package/dist/components/agents-sdk/SubagentRunPanel.d.ts +60 -0
  63. package/dist/components/agents-sdk/SubagentRunPanel.js +255 -0
  64. package/dist/components/agents-sdk/SubagentRunSelector.d.ts +8 -4
  65. package/dist/components/agents-sdk/SubagentRunSelector.js +5 -3
  66. package/dist/components/agents-sdk/ThinkChat.d.ts +102 -2
  67. package/dist/components/agents-sdk/ThinkChat.js +233 -2
  68. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +76 -1
  69. package/dist/components/agents-sdk/ThinkChatActivity.js +18 -10
  70. package/dist/components/agents-sdk/ThinkChatContext.d.ts +27 -1
  71. package/dist/components/agents-sdk/ThinkChatContext.js +1 -1
  72. package/dist/components/agents-sdk/ThinkChatToolPanels.js +24 -19
  73. package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
  74. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
  75. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  76. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
  77. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +159 -102
  78. package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
  79. package/dist/components/agents-sdk/ThinkFullApp.js +71 -290
  80. package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
  81. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
  82. package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +51 -0
  83. package/dist/components/agents-sdk/ThinkRoutineActions.js +201 -0
  84. package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +4 -1
  85. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +17 -15
  86. package/dist/components/agents-sdk/ThinkRoutineDetail.js +11 -11
  87. package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
  88. package/dist/components/agents-sdk/ThinkRoutineForm.js +14 -14
  89. package/dist/components/agents-sdk/ThinkRoutineRuns.js +7 -7
  90. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
  91. package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
  92. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  93. package/dist/components/agents-sdk/Workspace.js +7 -13
  94. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  95. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  96. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  97. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +10 -1
  98. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +10 -7
  99. package/dist/components/agents-sdk/WorkspaceExecution.d.ts +5 -14
  100. package/dist/components/agents-sdk/WorkspaceExecution.js +24 -38
  101. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +5 -2
  102. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -2
  103. package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
  104. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
  105. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  106. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  107. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  108. package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
  109. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +47 -1
  110. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  111. package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +3 -2
  112. package/dist/components/agents-sdk/WorkspaceMountManager.js +6 -9
  113. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +38 -0
  114. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +86 -0
  115. package/dist/components/agents-sdk/WorkspaceProject.d.ts +5 -14
  116. package/dist/components/agents-sdk/WorkspaceProject.js +21 -35
  117. package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
  118. package/dist/components/agents-sdk/WorkspaceUserScript.js +8 -5
  119. package/dist/components/ai-sdk/Activity.d.ts +1 -1
  120. package/dist/components/ai-sdk/Activity.js +1 -1
  121. package/dist/components/ai-sdk/AgentAttention.d.ts +2 -2
  122. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +89 -2
  123. package/dist/components/ai-sdk/AgentChatStartScreen.js +64 -43
  124. package/dist/components/ai-sdk/AgentMessageParts.d.ts +45 -1
  125. package/dist/components/ai-sdk/Approval.d.ts +1 -1
  126. package/dist/components/ai-sdk/Approval.js +2 -2
  127. package/dist/components/ai-sdk/Artifact.d.ts +2 -2
  128. package/dist/components/ai-sdk/Artifact.js +1 -1
  129. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  130. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  131. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  132. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  133. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  134. package/dist/components/ai-sdk/ComposerLink.js +2 -3
  135. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +9 -1
  136. package/dist/components/ai-sdk/ConnectedAppCards.js +28 -21
  137. package/dist/components/ai-sdk/Context.d.ts +7 -3
  138. package/dist/components/ai-sdk/Context.js +7 -17
  139. package/dist/components/ai-sdk/Conversation.d.ts +2 -2
  140. package/dist/components/ai-sdk/Conversation.js +1 -1
  141. package/dist/components/ai-sdk/Goal.d.ts +3 -3
  142. package/dist/components/ai-sdk/Goal.js +3 -3
  143. package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
  144. package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
  145. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  146. package/dist/components/ai-sdk/Message.d.ts +2 -2
  147. package/dist/components/ai-sdk/Message.js +12 -3
  148. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  149. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  150. package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
  151. package/dist/components/ai-sdk/MessageScrollerVirtual.js +39 -5
  152. package/dist/components/ai-sdk/Plan.d.ts +1 -1
  153. package/dist/components/ai-sdk/Plan.js +1 -1
  154. package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
  155. package/dist/components/ai-sdk/PromptInput.js +175 -231
  156. package/dist/components/ai-sdk/PromptInputComposerEditor.js +32 -9
  157. package/dist/components/ai-sdk/Queue.d.ts +28 -5
  158. package/dist/components/ai-sdk/Queue.js +20 -5
  159. package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
  160. package/dist/components/ai-sdk/Reasoning.js +5 -5
  161. package/dist/components/ai-sdk/Sources.d.ts +1 -1
  162. package/dist/components/ai-sdk/Sources.js +1 -1
  163. package/dist/components/ai-sdk/Task.d.ts +1 -1
  164. package/dist/components/ai-sdk/Task.js +1 -1
  165. package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
  166. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  167. package/dist/components/extension/CodexModelSelector.d.ts +5 -0
  168. package/dist/components/extension/CodexModelSelector.js +2 -2
  169. package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
  170. package/dist/components/extension/ConversationTabPicker.js +2 -2
  171. package/dist/components/foundations/AlertDialog.d.ts +1 -1
  172. package/dist/components/foundations/AppIcon.d.ts +3 -2
  173. package/dist/components/foundations/Autocomplete.js +6 -1
  174. package/dist/components/foundations/Avatar.d.ts +1 -121
  175. package/dist/components/foundations/Button.d.ts +1 -1
  176. package/dist/components/foundations/Card.d.ts +22 -27
  177. package/dist/components/foundations/Card.js +51 -32
  178. package/dist/components/foundations/Checkbox.js +1 -1
  179. package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
  180. package/dist/components/foundations/Collapsible.d.ts +1 -1
  181. package/dist/components/foundations/Collapsible.js +1 -1
  182. package/dist/components/foundations/Combobox.js +6 -1
  183. package/dist/components/foundations/ContextMenu.js +1 -1
  184. package/dist/components/foundations/Dialog.d.ts +106 -1
  185. package/dist/components/foundations/EmptyState.d.ts +1 -1
  186. package/dist/components/foundations/Field.d.ts +2 -1
  187. package/dist/components/foundations/Fieldset.d.ts +1 -1
  188. package/dist/components/foundations/Form.d.ts +4 -4
  189. package/dist/components/foundations/IconButton.d.ts +1 -1
  190. package/dist/components/foundations/Label.d.ts +1 -1
  191. package/dist/components/foundations/LinkButton.d.ts +2 -2
  192. package/dist/components/foundations/Menubar.js +1 -1
  193. package/dist/components/foundations/Meter.d.ts +1 -1
  194. package/dist/components/foundations/NumberField.d.ts +1 -1
  195. package/dist/components/foundations/ScrollArea.d.ts +1 -1
  196. package/dist/components/foundations/SearchField.d.ts +1 -1
  197. package/dist/components/foundations/SearchField.js +1 -1
  198. package/dist/components/foundations/Select.js +7 -2
  199. package/dist/components/foundations/Separator.d.ts +1 -40
  200. package/dist/components/foundations/Stepper.d.ts +1 -1
  201. package/dist/components/foundations/Stepper.js +1 -1
  202. package/dist/components/foundations/Textarea.d.ts +1 -1
  203. package/dist/components/foundations/Toast.d.ts +5 -1
  204. package/dist/components/foundations/Toast.js +1 -1
  205. package/dist/components/foundations/Toggle.d.ts +70 -1
  206. package/dist/components/foundations/ToggleGroup.d.ts +4 -3
  207. package/dist/components/foundations/ToggleGroup.js +1 -1
  208. package/dist/components/foundations/Toolbar.d.ts +1 -151
  209. package/dist/components/foundations/TransitionSurface.d.ts +1 -1
  210. package/dist/components/foundations/icons.js +1 -1
  211. package/dist/components/general-purpose/ActionGuide.d.ts +10 -26
  212. package/dist/components/general-purpose/ActionGuide.js +4 -18
  213. package/dist/components/general-purpose/AppTopBar.d.ts +4 -2
  214. package/dist/components/general-purpose/Commit.d.ts +2 -2
  215. package/dist/components/general-purpose/Commit.js +2 -2
  216. package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
  217. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  218. package/dist/components/general-purpose/FileTree.d.ts +1 -7
  219. package/dist/components/general-purpose/FileTree.js +1 -1
  220. package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
  221. package/dist/components/general-purpose/PricingPlanCard.js +2 -2
  222. package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
  223. package/dist/components/general-purpose/ResizableSidePanel.d.ts +2 -2
  224. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +128 -2
  225. package/dist/components/general-purpose/ResponsiveSidebarShell.js +120 -102
  226. package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
  227. package/dist/components/general-purpose/SettingsFormDialog.js +42 -72
  228. package/dist/components/general-purpose/SetupChecklist.d.ts +1 -0
  229. package/dist/components/general-purpose/SetupChecklist.js +76 -1
  230. package/dist/components/general-purpose/Terminal.d.ts +3 -3
  231. package/dist/components/general-purpose/Terminal.js +11 -6
  232. package/dist/components/general-purpose/TestResults.d.ts +23 -11
  233. package/dist/components/general-purpose/TestResults.js +49 -51
  234. package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
  235. package/dist/components/general-purpose/ThemeModeControl.js +2 -2
  236. package/dist/components/general-purpose/WebPreview.d.ts +29 -4
  237. package/dist/components/general-purpose/WebPreview.js +39 -14
  238. package/dist/components/nanites/AgentConnection.js +2 -2
  239. package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
  240. package/dist/components/nanites/AgentToolDetail.js +21 -42
  241. package/dist/{copy-button-Dk2vRe9j.js → copy-button-CSDuDfdP.js} +1 -1
  242. package/dist/{copy-button-C0JyjClr.d.ts → copy-button-OUwOdgEm.d.ts} +1 -1
  243. package/dist/mcp-server-mAErsxHU.js +27 -0
  244. package/dist/styles/activity.css +1 -96
  245. package/dist/styles/agent-chat.css +75 -102
  246. package/dist/styles/agent-tool-detail.css +0 -16
  247. package/dist/styles/base.css +1 -1
  248. package/dist/styles/browser-run-panel.css +1 -15
  249. package/dist/styles/button.css +7 -1
  250. package/dist/styles/code-block.css +12 -0
  251. package/dist/styles/composition-motion.css +0 -2
  252. package/dist/styles/employee-chrome.css +43 -0
  253. package/dist/styles/file-tree.css +5 -0
  254. package/dist/styles/index.css +4 -2
  255. package/dist/styles/message.css +2 -10
  256. package/dist/styles/queue.css +71 -0
  257. package/dist/styles/subagent-run.css +122 -6
  258. package/dist/styles/test-results.css +2 -5
  259. package/dist/styles/think-chat-activity.css +13 -0
  260. package/dist/styles/think-chat-tool-panels.css +81 -0
  261. package/dist/styles/think-execution-workbench.css +2 -8
  262. package/dist/styles/think-full-app.css +42 -251
  263. package/dist/styles/{think-routine-library.css → think-routine.css} +64 -80
  264. package/dist/styles/web-preview.css +15 -1
  265. package/dist/utils/mcp-server-catalog.d.ts +1112 -2
  266. package/dist/utils/mcp-server-catalog.js +28 -9
  267. package/dist/utils/structured-code.d.ts +1 -1
  268. package/dist/{workspace-assets-GqsCYxqT.js → workspace-assets-Bg7XhPsk.js} +2 -2
  269. package/package.json +7 -3
  270. package/dist/AgentChat-BLmQghkt.d.ts +0 -327
  271. package/dist/AgentChatStartScreen-Bkv7Avni.d.ts +0 -84
  272. package/dist/AgentMessageParts-C7L-Mv9U.d.ts +0 -46
  273. package/dist/AgentToolRunsContext-jtmveaRE.d.ts +0 -57
  274. package/dist/Dialog-B_FhRWaz.d.ts +0 -107
  275. package/dist/McpConnectorForm-CeYNY0MI.d.ts +0 -39
  276. package/dist/McpPluginCatalog-3qWu8oK1.d.ts +0 -92
  277. package/dist/ResponsiveSidebarShell-BTVPxLJK.d.ts +0 -123
  278. package/dist/SessionCompaction-CmTJFpzj.d.ts +0 -89
  279. package/dist/SetupChecklist-DeTU9YpW.js +0 -77
  280. package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
  281. package/dist/ThinkChat-DiI6hhDP.js +0 -332
  282. package/dist/ThinkChatActivity-B3lGVS-6.d.ts +0 -77
  283. package/dist/ThinkChatContext-COIgzkYp.d.ts +0 -28
  284. package/dist/ThinkRecoveryNotice-DGWr94rk.d.ts +0 -19
  285. package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +0 -91
  286. package/dist/Toggle-DLrIf5YH.d.ts +0 -69
  287. package/dist/WorkspaceLive-DfjH1Ypm.d.ts +0 -61
  288. package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +0 -48
  289. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +0 -31
  290. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +0 -34
  291. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +0 -80
  292. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +0 -159
  293. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +0 -200
  294. package/dist/components/agents-sdk/ThinkSidepanel.js +0 -775
  295. package/dist/mcp-server-7NR24ASj.js +0 -69
  296. package/dist/mcp-server-catalog-C_g7C-9o.d.ts +0 -1108
  297. package/dist/styles/think-sidepanel.css +0 -78
  298. package/dist/think-agent-Cip5KAPj.d.ts +0 -7
  299. package/dist/{icons-CeGfXO21.js → icons-cuEtsgj9.js} +1 -1
@@ -0,0 +1,48 @@
1
+ import { J as PromptInputMessage } from "./PromptInput-C4Mofitz.js";
2
+ import * as React from "react";
3
+ import { ChatStatus } from "ai";
4
+
5
+ //#region src/components/agents-sdk/AgentChatQueue.d.ts
6
+ interface AgentChatQueuedPrompt {
7
+ id: string;
8
+ message: PromptInputMessage;
9
+ }
10
+ interface AgentChatQueueProviderProps {
11
+ /** Keep this owner above navigation when the parent conversation remains active. */
12
+ children: React.ReactNode;
13
+ status: ChatStatus;
14
+ onSubmit?: (message: PromptInputMessage) => void | Promise<void>;
15
+ onStop?: () => void | Promise<void>;
16
+ onPromptQueued?: () => void;
17
+ }
18
+ interface AgentChatQueueValue {
19
+ items: readonly AgentChatQueuedPrompt[];
20
+ held: boolean;
21
+ error: string | null;
22
+ submissionVersion: number;
23
+ canStop: boolean;
24
+ canSubmit: boolean;
25
+ hold: () => void;
26
+ submit: (message: PromptInputMessage) => void | Promise<void>;
27
+ /** Capture user intent before asynchronous attachment conversion. */
28
+ captureSubmit: () => AgentChatQueueValue["submit"];
29
+ stop: () => Promise<void>;
30
+ steer: (id: string) => Promise<void>;
31
+ sendNext: (id?: string) => void;
32
+ remove: (id: string) => void;
33
+ }
34
+ declare function useOptionalAgentChatQueue(): AgentChatQueueValue | null;
35
+ /**
36
+ * The queue's single owner, including dispatch reservations and the turn's
37
+ * busy-to-ready edge. Hoist it with the parent connection to preserve queued
38
+ * prompts and cancellation holds while the selected child is visible.
39
+ */
40
+ declare function AgentChatQueueProvider({
41
+ children,
42
+ status,
43
+ onSubmit,
44
+ onStop,
45
+ onPromptQueued
46
+ }: AgentChatQueueProviderProps): React.JSX.Element;
47
+ //#endregion
48
+ export { useOptionalAgentChatQueue as i, AgentChatQueueProviderProps as n, AgentChatQueuedPrompt as r, AgentChatQueueProvider as t };
@@ -0,0 +1,35 @@
1
+ import * as React from "react";
2
+ import { UIMessage } from "ai";
3
+ import { useAgentToolEvents } from "agents/react";
4
+ import { AgentToolRunPart, AgentToolRunState, AgentToolRunStatus } from "agents/agent-tools";
5
+
6
+ //#region src/components/agents-sdk/AgentToolRunsContext.d.ts
7
+ /**
8
+ * Whole native run fields with the SDK's complete lifecycle status. Published
9
+ * Agents 0.21.0 excludes `starting` from AgentToolRunState while its native
10
+ * AgentToolRunStatus includes it and current retained replay emits it. This
11
+ * type-only correction does not translate records or accept another shape.
12
+ */
13
+ type AgentToolRunValue<Part extends AgentToolRunPart = AgentToolRunPart> = Omit<AgentToolRunState<Part>, "status"> & {
14
+ status: AgentToolRunStatus;
15
+ };
16
+ /** Whole event-hook value; run records keep the complete native lifecycle. */
17
+ type AgentToolEventsValue<Part extends AgentToolRunPart = UIMessage["parts"][number]> = Omit<ReturnType<typeof useAgentToolEvents<Part>>, "runsById" | "runsByToolCallId" | "unboundRuns" | "getRunsForToolCall"> & {
18
+ runsById: Record<string, AgentToolRunValue<Part>>;
19
+ runsByToolCallId: Record<string, AgentToolRunValue<Part>[]>;
20
+ unboundRuns: AgentToolRunValue<Part>[];
21
+ getRunsForToolCall(toolCallId: string): AgentToolRunValue<Part>[];
22
+ };
23
+ interface AgentToolRunsProviderProps<Part extends AgentToolRunPart = UIMessage["parts"][number]> {
24
+ /** Pass the whole `useAgentToolEvents({ agent })` result directly. */
25
+ agentTools: AgentToolEventsValue<Part>;
26
+ children: React.ReactNode;
27
+ }
28
+ /** Provides one parent connection's retained Agent Tool event projection. */
29
+ declare function AgentToolRunsProvider<Part extends AgentToolRunPart = UIMessage["parts"][number]>({
30
+ agentTools,
31
+ children
32
+ }: AgentToolRunsProviderProps<Part>): React.JSX.Element;
33
+ declare function useOptionalAgentToolRuns<Part extends AgentToolRunPart = UIMessage["parts"][number]>(): AgentToolEventsValue<Part> | null;
34
+ //#endregion
35
+ export { useOptionalAgentToolRuns as a, AgentToolRunsProviderProps as i, AgentToolRunValue as n, AgentToolRunsProvider as r, AgentToolEventsValue as t };
@@ -0,0 +1,124 @@
1
+ import * as React from "react";
2
+ import { Avatar } from "@base-ui/react/avatar";
3
+
4
+ //#region src/components/foundations/Avatar.d.ts
5
+ /**
6
+ * Props for the Avatar.Root component.
7
+ */
8
+ interface AvatarRootProps extends React.ComponentPropsWithoutRef<typeof Avatar.Root> {
9
+ /** Avatar dimensions; use `md` for standard identity rows. */
10
+ size?: "sm" | "md" | "lg" | "xl";
11
+ /** Circular for people, rounded for app or entity artwork. */
12
+ shape?: "circle" | "rounded";
13
+ }
14
+ /**
15
+ * Props for the Avatar.Image component.
16
+ */
17
+ interface AvatarImageProps extends React.ComponentPropsWithoutRef<typeof Avatar.Image> {
18
+ fit?: "cover" | "contain";
19
+ }
20
+ /**
21
+ * Props for the Avatar.Fallback component.
22
+ */
23
+ interface AvatarFallbackProps extends React.ComponentPropsWithoutRef<typeof Avatar.Fallback> {}
24
+ interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {}
25
+ interface AvatarGroupCountProps extends React.HTMLAttributes<HTMLDivElement> {}
26
+ /**
27
+ * Container for the avatar. Renders a `<span>` element.
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * <Avatar.Root>
32
+ * <Avatar.Image src="/photo.jpg" alt="User" />
33
+ * <Avatar.Fallback>JD</Avatar.Fallback>
34
+ * </Avatar.Root>
35
+ * ```
36
+ *
37
+ * @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
38
+ */
39
+ declare function AvatarRoot({
40
+ className,
41
+ size,
42
+ shape,
43
+ ref,
44
+ ...props
45
+ }: AvatarRootProps & {
46
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLSpanElement>;
47
+ }): React.JSX.Element;
48
+ /**
49
+ * Displays the avatar image. Renders an `<img>` element.
50
+ */
51
+ declare function AvatarImage({
52
+ className,
53
+ fit,
54
+ ref,
55
+ ...props
56
+ }: AvatarImageProps & {
57
+ ref?: React.Ref<HTMLImageElement>;
58
+ }): React.JSX.Element;
59
+ /**
60
+ * Displays when the image fails to load or isn't provided.
61
+ * Typically contains initials or an icon. Renders a `<span>` element.
62
+ */
63
+ declare function AvatarFallback({
64
+ className,
65
+ ref,
66
+ ...props
67
+ }: AvatarFallbackProps & {
68
+ ref?: React.Ref<HTMLSpanElement>;
69
+ }): React.JSX.Element;
70
+ declare function AvatarGroup({
71
+ className,
72
+ ref,
73
+ ...props
74
+ }: AvatarGroupProps & {
75
+ ref?: React.Ref<HTMLDivElement>;
76
+ }): React.JSX.Element;
77
+ declare function AvatarGroupCount({
78
+ className,
79
+ ref,
80
+ ...props
81
+ }: AvatarGroupCountProps & {
82
+ ref?: React.Ref<HTMLDivElement>;
83
+ }): React.JSX.Element;
84
+ /**
85
+ * An avatar component for displaying user profile pictures with fallback support.
86
+ * Shows initials or an icon when the image fails to load or isn't provided.
87
+ *
88
+ * @example
89
+ * ```tsx
90
+ * // With image
91
+ * <Avatar.Root>
92
+ * <Avatar.Image src="/profile.jpg" alt="John Doe" />
93
+ * <Avatar.Fallback>JD</Avatar.Fallback>
94
+ * </Avatar.Root>
95
+ * ```
96
+ *
97
+ * @example
98
+ * ```tsx
99
+ * // Fallback only (no image)
100
+ * <Avatar.Root>
101
+ * <Avatar.Fallback>AB</Avatar.Fallback>
102
+ * </Avatar.Root>
103
+ * ```
104
+ *
105
+ * @example
106
+ * ```tsx
107
+ * // With delayed fallback
108
+ * <Avatar.Root>
109
+ * <Avatar.Image src="/slow-loading.jpg" alt="User" />
110
+ * <Avatar.Fallback delay={500}>?</Avatar.Fallback>
111
+ * </Avatar.Root>
112
+ * ```
113
+ *
114
+ * @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
115
+ */
116
+ declare const Avatar$1: {
117
+ Root: typeof AvatarRoot;
118
+ Image: typeof AvatarImage;
119
+ Fallback: typeof AvatarFallback;
120
+ Group: typeof AvatarGroup;
121
+ GroupCount: typeof AvatarGroupCount;
122
+ };
123
+ //#endregion
124
+ export { AvatarImageProps as a, AvatarGroupProps as i, AvatarFallbackProps as n, AvatarRootProps as o, AvatarGroupCountProps as r, Avatar$1 as t };
@@ -96,7 +96,7 @@ declare function Button$1({
96
96
  ref,
97
97
  ...props
98
98
  }: ButtonProps & {
99
- ref?: React.Ref<HTMLButtonElement>;
99
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLButtonElement>;
100
100
  }): import("react").JSX.Element;
101
101
  //#endregion
102
102
  export { ButtonVariant as a, ButtonSize as i, ButtonColor as n, ButtonVariantsOptions as o, ButtonProps as r, buttonVariants as s, Button$1 as t };
@@ -1,5 +1,5 @@
1
+ import { t as CopyButtonProps } from "./copy-button-OUwOdgEm.js";
1
2
  import { m as SelectProps, t as Select } from "./Select-RrceeEIe.js";
2
- import { t as CopyButtonProps } from "./copy-button-C0JyjClr.js";
3
3
  import * as React from "react";
4
4
  import { BundledLanguage } from "shiki";
5
5
 
@@ -15,6 +15,10 @@ declare const CODE_BLOCK_LANGUAGES: ReadonlyArray<CodeBlockLanguage>;
15
15
  //#endregion
16
16
  //#region src/components/ai-sdk/CodeBlock.d.ts
17
17
  interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
18
+ /** Plain code blends into an owning panel instead of painting another surface. */
19
+ surface?: "subtle" | "plain";
20
+ /** Wrap long lines in constrained transcript panels. */
21
+ wrap?: boolean;
18
22
  /** The source code to display. */
19
23
  code: string;
20
24
  /** The language to highlight as. */
@@ -33,6 +37,8 @@ interface CodeBlockProps extends React.HTMLAttributes<HTMLDivElement> {
33
37
  /**
34
38
  * A syntax-highlighted code block powered by Shiki. Supports line numbers,
35
39
  * inline language switching, and a copy-to-clipboard action.
40
+ * The root supplies context and its outer surface: compose CodeBlockContainer and
41
+ * CodeBlockContent explicitly, alongside any optional header and actions.
36
42
  *
37
43
  * Supports Shiki bundled language names plus the short aliases in
38
44
  * `CODE_BLOCK_LANGUAGES`. The highlighter is loaded lazily on first render and
@@ -60,7 +66,7 @@ declare function CodeBlock({
60
66
  language,
61
67
  ...props
62
68
  }: CodeBlockProps & {
63
- ref?: React.Ref<HTMLDivElement>;
69
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
64
70
  }): React.JSX.Element;
65
71
  interface CodeBlockHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
66
72
  declare function CodeBlockHeader({
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "./class-names-BiMDVpUo.js";
2
+ import { t as CopyButton } from "./copy-button-CSDuDfdP.js";
2
3
  import { Select } from "./components/foundations/Select.js";
3
- import { t as CopyButton } from "./copy-button-Dk2vRe9j.js";
4
4
  import * as React from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { createHighlighter } from "shiki";
@@ -76,12 +76,11 @@ function renderPlainCode(code, showLineNumbers) {
76
76
  children: line || " "
77
77
  }, `${index}-${line}`));
78
78
  }
79
- function hasCustomCodeBlockContent(children) {
80
- return React.Children.toArray(children).some((child) => React.isValidElement(child) && (child.type === CodeBlockContainer || child.type === CodeBlockContent));
81
- }
82
79
  /**
83
80
  * A syntax-highlighted code block powered by Shiki. Supports line numbers,
84
81
  * inline language switching, and a copy-to-clipboard action.
82
+ * The root supplies context and its outer surface: compose CodeBlockContainer and
83
+ * CodeBlockContent explicitly, alongside any optional header and actions.
85
84
  *
86
85
  * Supports Shiki bundled language names plus the short aliases in
87
86
  * `CODE_BLOCK_LANGUAGES`. The highlighter is loaded lazily on first render and
@@ -111,7 +110,7 @@ function CodeBlock({ language, ...props }) {
111
110
  ...props
112
111
  }, language);
113
112
  }
114
- function CodeBlockState({ className, code, language, showLineNumbers = false, isStreaming = false, onLanguageChange, children, ref, ...props }) {
113
+ function CodeBlockState({ surface = "subtle", wrap = false, className, code, language, showLineNumbers = false, isStreaming = false, onLanguageChange, children, ref, ...props }) {
115
114
  const [internalLanguage, setInternalLanguage] = React.useState(language);
116
115
  const setLanguage = React.useCallback((next) => {
117
116
  setInternalLanguage(next);
@@ -130,14 +129,15 @@ function CodeBlockState({ className, code, language, showLineNumbers = false, is
130
129
  showLineNumbers,
131
130
  isStreaming
132
131
  ]);
133
- const hasCustomContent = hasCustomCodeBlockContent(children);
134
132
  return /* @__PURE__ */ jsx(CodeBlockContext.Provider, {
135
133
  value: ctxValue,
136
- children: /* @__PURE__ */ jsxs("div", {
134
+ children: /* @__PURE__ */ jsx("div", {
137
135
  ref,
138
136
  className: cx("code-block", className),
137
+ "data-surface": surface,
138
+ "data-wrap": wrap || void 0,
139
139
  ...props,
140
- children: [children, !hasCustomContent && /* @__PURE__ */ jsx(CodeBlockContainer, { children: /* @__PURE__ */ jsx(CodeBlockContent, {}) })]
140
+ children
141
141
  })
142
142
  });
143
143
  }
@@ -1,12 +1,12 @@
1
1
  import { t as cx } from "./class-names-BiMDVpUo.js";
2
- import { C as FolderIcon, S as FileIcon, p as ChevronRightIcon, w as FolderOpenIcon } from "./icons-CeGfXO21.js";
2
+ import { C as FolderIcon, S as FileIcon, p as ChevronRightIcon, w as FolderOpenIcon } from "./icons-cuEtsgj9.js";
3
3
  import { t as NavigationLink } from "./navigation-link-kqMa81v5.js";
4
4
  import * as React from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/_internal/use-file-tree-nav.ts
7
7
  const FileTreeContext = React.createContext(null);
8
8
  function getVisibleFileTreeNodes(tree) {
9
- return tree ? [...tree.querySelectorAll(".file-tree__node")].filter((node) => !node.closest(".file-tree__group[data-collapsed]")) : [];
9
+ return tree ? [...tree.querySelectorAll(".file-tree__node")].filter((node) => node.closest("[role=\"tree\"]") === tree && !node.closest(".file-tree__group[data-collapsed]")) : [];
10
10
  }
11
11
  function useFileTreeContext() {
12
12
  const ctx = React.useContext(FileTreeContext);
@@ -17,8 +17,8 @@ function useFileTreeContext() {
17
17
  * Builds a FileTreeContextValue that dispatches keyboard navigation per the
18
18
  * WAI-ARIA Tree Pattern.
19
19
  */
20
- function useFileTreeNav({ expanded, initialFocusedPath, selectedPath, onSelect, onExpandedChange }) {
21
- const [focusedPath, setFocusedPath] = React.useState(initialFocusedPath);
20
+ function useFileTreeNav({ expanded, selectedPath, onSelect, onExpandedChange }) {
21
+ const [focusedPath, setFocusedPath] = React.useState(null);
22
22
  const setFolderExpanded = React.useCallback((path, nextExpanded) => {
23
23
  const next = new Set(expanded);
24
24
  if (nextExpanded) next.add(path);
@@ -90,18 +90,7 @@ function useFileTreeNav({ expanded, initialFocusedPath, selectedPath, onSelect,
90
90
  }
91
91
  //#endregion
92
92
  //#region src/components/general-purpose/FileTree.tsx
93
- function getFirstFileTreePath(children) {
94
- let firstPath = null;
95
- React.Children.forEach(children, (child) => {
96
- if (firstPath || !React.isValidElement(child)) return;
97
- if (child.type === FileTreeFolder || child.type === FileTreeFile) {
98
- firstPath = child.props.path;
99
- return;
100
- }
101
- if (child.type === React.Fragment) firstPath = getFirstFileTreePath(child.props.children);
102
- });
103
- return firstPath;
104
- }
93
+ const FileTreeLevelContext = React.createContext(0);
105
94
  /**
106
95
  * A keyboard-accessible hierarchical file browser. Compose with
107
96
  * FileTreeFolder and FileTreeFile children.
@@ -129,19 +118,17 @@ function FileTree({ appearance = "contained", className, "aria-label": ariaLabel
129
118
  if (!isControlled) setInternalExpanded(next);
130
119
  onExpandedChange?.(next);
131
120
  }, [isControlled, onExpandedChange]);
132
- const handleSelect = React.useCallback((path) => {
133
- onSelect?.(path);
134
- }, [onSelect]);
135
121
  const ctx = useFileTreeNav({
136
122
  expanded: currentExpanded,
137
- initialFocusedPath: getFirstFileTreePath(children),
138
123
  selectedPath,
139
- onSelect: handleSelect,
124
+ onSelect: React.useCallback((path) => {
125
+ onSelect?.(path);
126
+ }, [onSelect]),
140
127
  onExpandedChange: handleExpandedChange
141
128
  });
142
129
  const treeRef = React.useRef(null);
143
130
  React.useLayoutEffect(() => {
144
- const nodes = [...treeRef.current?.querySelectorAll(".file-tree__node") ?? []].filter((node) => !node.closest(".file-tree__group[data-collapsed]"));
131
+ const nodes = [...treeRef.current?.querySelectorAll(".file-tree__node") ?? []].filter((node) => node.closest("[role=\"tree\"]") === treeRef.current && !node.closest(".file-tree__group[data-collapsed]"));
145
132
  if (nodes.length === 0) return;
146
133
  if (nodes.some((node) => node.dataset.workspacePath === ctx.focusedPath)) return;
147
134
  const firstPath = nodes[0]?.dataset.workspacePath;
@@ -163,15 +150,14 @@ function FileTree({ appearance = "contained", className, "aria-label": ariaLabel
163
150
  className: "file-tree__list sigvelo-stack-list",
164
151
  role: "tree",
165
152
  "aria-label": ariaLabel,
166
- children
153
+ children: /* @__PURE__ */ jsx(FileTreeLevelContext.Provider, {
154
+ value: 0,
155
+ children
156
+ })
167
157
  })
168
158
  })
169
159
  });
170
160
  }
171
- function renderNestedFileTreeChild(child, level) {
172
- if (React.isValidElement(child) && (child.type === FileTreeFolder || child.type === FileTreeFile)) return React.cloneElement(child, { level: level + 1 });
173
- return child;
174
- }
175
161
  function dataFlag(enabled) {
176
162
  return enabled ? "" : void 0;
177
163
  }
@@ -188,7 +174,8 @@ function FileTreeNodeRow({ actions, children }) {
188
174
  children: [children, /* @__PURE__ */ jsx(FileTreeActions, { children: actions })]
189
175
  });
190
176
  }
191
- function FileTreeFolder({ className, path, name, icon, actions, level = 0, children, ref, ...props }) {
177
+ function FileTreeFolder({ className, path, name, icon, actions, children, ref, ...props }) {
178
+ const level = React.useContext(FileTreeLevelContext);
192
179
  const { expanded, focusedPath, selectedPath, onFocus, onSelect, handleKeyDown, onExpandedChange } = useFileTreeContext();
193
180
  const isExpanded = expanded.has(path);
194
181
  const isFocused = focusedPath === path;
@@ -244,11 +231,15 @@ function FileTreeFolder({ className, path, name, icon, actions, level = 0, child
244
231
  "aria-hidden": !isExpanded,
245
232
  "data-collapsed": dataFlag(!isExpanded),
246
233
  inert: !isExpanded,
247
- children: React.Children.map(children, (child) => renderNestedFileTreeChild(child, level))
234
+ children: /* @__PURE__ */ jsx(FileTreeLevelContext.Provider, {
235
+ value: level + 1,
236
+ children
237
+ })
248
238
  })]
249
239
  });
250
240
  }
251
- function FileTreeFile({ className, path, name, icon, actions, render, level = 0, ref, ...props }) {
241
+ function FileTreeFile({ className, path, name, icon, actions, render, ref, ...props }) {
242
+ const level = React.useContext(FileTreeLevelContext);
252
243
  const { selectedPath, focusedPath, onFocus, onSelect, handleKeyDown } = useFileTreeContext();
253
244
  const isSelected = selectedPath === path;
254
245
  const isFocused = focusedPath === path;
@@ -1,4 +1,4 @@
1
- import { i as ButtonSize, r as ButtonProps } from "./Button-CZt3yywF.js";
1
+ import { i as ButtonSize, r as ButtonProps } from "./Button-DjONW5UW.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/foundations/IconButton.d.ts
@@ -29,7 +29,7 @@ declare function IconButton({
29
29
  ref,
30
30
  ...props
31
31
  }: IconButtonProps & {
32
- ref?: React.Ref<HTMLButtonElement>;
32
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLButtonElement>;
33
33
  }): React.JSX.Element;
34
34
  //#endregion
35
35
  export { IconButtonProps as n, IconButton as t };
@@ -1,4 +1,5 @@
1
- import { n as IconButtonProps } from "./IconButton-BAUFhUk8.js";
1
+ import { n as IconButtonProps } from "./IconButton-ByiyjkYE.js";
2
+ import { t as CopyButtonProps } from "./copy-button-OUwOdgEm.js";
2
3
  import * as React from "react";
3
4
  import { FileUIPart, UIMessage } from "ai";
4
5
  import { StreamdownProps } from "streamdown";
@@ -40,7 +41,7 @@ declare function Message({
40
41
  ref,
41
42
  ...props
42
43
  }: MessageProps & {
43
- ref?: React.Ref<HTMLDivElement>;
44
+ /** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLDivElement>;
44
45
  }): React.JSX.Element;
45
46
  interface MessageContentProps extends React.HTMLAttributes<HTMLDivElement> {}
46
47
  /**
@@ -94,12 +95,16 @@ declare function MessageAttachment({
94
95
  className,
95
96
  ...props
96
97
  }: MessageAttachmentProps): React.JSX.Element;
97
- interface MessageActionsProps extends React.HTMLAttributes<HTMLDivElement> {}
98
+ interface MessageActionsProps extends React.HTMLAttributes<HTMLDivElement> {
99
+ /** Preserve the action row height while its controls are unavailable. */
100
+ reserveSpace?: boolean;
101
+ }
98
102
  /**
99
103
  * Horizontal list of action buttons (copy, retry, thumbs-up, etc.) shown
100
104
  * alongside or beneath a message.
101
105
  */
102
106
  declare function MessageActions({
107
+ reserveSpace,
103
108
  className,
104
109
  children,
105
110
  ref,
@@ -127,6 +132,14 @@ declare function MessageAction({
127
132
  }: MessageActionProps & {
128
133
  ref?: React.Ref<HTMLButtonElement>;
129
134
  }): React.JSX.Element;
135
+ interface MessageCopyActionProps extends CopyButtonProps {}
136
+ /** Copy a message with the shared clipboard feedback and message action treatment. */
137
+ declare function MessageCopyAction({
138
+ className,
139
+ ...props
140
+ }: MessageCopyActionProps & {
141
+ ref?: React.Ref<HTMLButtonElement>;
142
+ }): React.JSX.Element;
130
143
  interface MessageToolbarProps extends React.HTMLAttributes<HTMLDivElement> {}
131
144
  /**
132
145
  * Horizontal container that places children in a row with space between —
@@ -244,4 +257,4 @@ declare function MessageBranchPage({
244
257
  ref?: React.Ref<HTMLSpanElement>;
245
258
  }): React.JSX.Element;
246
259
  //#endregion
247
- export { MessageToolbar as A, MessageMetaProps as C, MessageRole as D, MessageResponseProps as E, MessageTimestamp as O, MessageMeta as S, MessageResponse as T, MessageBranchProps as _, MessageActionsProps as a, MessageContent as b, MessageBranch as c, MessageBranchNext as d, MessageBranchNextProps as f, MessageBranchPreviousProps as g, MessageBranchPrevious as h, MessageActions as i, MessageToolbarProps as j, MessageTimestampProps as k, MessageBranchContent as l, MessageBranchPageProps as m, MessageAction as n, MessageAttachment as o, MessageBranchPage as p, MessageActionProps as r, MessageAttachmentProps as s, Message as t, MessageBranchContentProps as u, MessageBranchSelector as v, MessageProps as w, MessageContentProps as x, MessageBranchSelectorProps as y };
260
+ export { MessageTimestamp as A, MessageCopyActionProps as C, MessageResponse as D, MessageProps as E, MessageToolbar as M, MessageToolbarProps as N, MessageResponseProps as O, MessageCopyAction as S, MessageMetaProps as T, MessageBranchProps as _, MessageActionsProps as a, MessageContent as b, MessageBranch as c, MessageBranchNext as d, MessageBranchNextProps as f, MessageBranchPreviousProps as g, MessageBranchPrevious as h, MessageActions as i, MessageTimestampProps as j, MessageRole as k, MessageBranchContent as l, MessageBranchPageProps as m, MessageAction as n, MessageAttachment as o, MessageBranchPage as p, MessageActionProps as r, MessageAttachmentProps as s, Message as t, MessageBranchContentProps as u, MessageBranchSelector as v, MessageMeta as w, MessageContentProps as x, MessageBranchSelectorProps as y };
@@ -0,0 +1,84 @@
1
+ import { r as ButtonProps } from "./Button-DjONW5UW.js";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/ai-sdk/MessageScrollerVirtual.d.ts
5
+ interface VirtualMessageScrollAnchor {
6
+ key: string | number;
7
+ offset: number;
8
+ followLatest: boolean;
9
+ }
10
+ interface VirtualMessageScrollerProps<Item> extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
11
+ items: readonly Item[];
12
+ /**
13
+ * Stable per-item key. Must survive prepends and stream updates — the
14
+ * virtualizer tracks identity by key to keep scroll anchored. Message ids,
15
+ * never indexes (deliberately not passed here).
16
+ */
17
+ getItemKey: (item: Item) => string | number;
18
+ renderItem: (item: Item, index: number) => React.ReactNode;
19
+ /**
20
+ * Pre-measurement height estimate in px. Rows are measured once rendered;
21
+ * changing this later never re-estimates already-measured rows — only rows
22
+ * measured afterward see the new value.
23
+ */
24
+ estimateSize?: number;
25
+ /** Rows rendered beyond the viewport on each side. */
26
+ overscan?: number;
27
+ /** Rendered inside the viewport when `items` is empty. */
28
+ emptyState?: React.ReactNode;
29
+ /**
30
+ * Props for the inner content element. Defaults to `role="log"` with
31
+ * `aria-live="off"` — windowing re-inserts old rows as they scroll back
32
+ * into view, and a live region would announce them as new; override via
33
+ * these props only with that in mind.
34
+ */
35
+ contentProps?: React.HTMLAttributes<HTMLDivElement>;
36
+ /** Accessible label for the scroll-to-latest button. */
37
+ scrollButtonLabel?: string;
38
+ scrollButtonProps?: Omit<ButtonProps, "onClick" | "aria-label" | "tabIndex">;
39
+ /** Thread-owned reading position retained while the transcript is unmounted. */
40
+ scrollAnchor?: React.RefObject<VirtualMessageScrollAnchor | undefined>;
41
+ }
42
+ /**
43
+ * Windowed chat transcript for unbounded threads (hours-long agent runs):
44
+ * only the visible slice of rows exists in the DOM, end-anchored so streaming
45
+ * growth and appends keep the viewport pinned while reading history doesn't
46
+ * get yanked to the bottom (TanStack Virtual `anchorTo: 'end'`).
47
+ *
48
+ * Windowing means rows unmount when scrolled away, so browser find-in-page
49
+ * only searches the rendered window, and any disclosure state living inside a
50
+ * row is lost unless it is persisted — wrap the transcript in
51
+ * `ExpansionStateProvider` (AgentChat does) and give disclosures a `stateKey`.
52
+ * New turns pin to the bottom.
53
+ *
54
+ * Host-side contract (what the consuming app must do — the scroller cannot
55
+ * compensate for any of these):
56
+ * - Give every item a stable id for `getItemKey`; keys must not change when
57
+ * older history is prepended or the last message grows.
58
+ * - Keep unchanged items referentially stable across updates so memoized row
59
+ * content skips re-rendering. Rebuilding the array element-by-element —
60
+ * e.g. structured-clone over a worker/extension boundary per delta —
61
+ * defeats this; clone once per batch, not per row.
62
+ * - Throttle stream deltas before they reach React state (AI SDK
63
+ * `experimental_throttle: 50` or equivalent); the scroller re-windows per
64
+ * update.
65
+ * - Bound the data itself: windowing caps DOM size, not JS memory. Truncate
66
+ * stored tool output at the buffer (Codex caps at 20k chars) and keep
67
+ * compaction on so a six-hour run doesn't hold every byte it ever streamed.
68
+ */
69
+ declare function VirtualMessageScroller<Item>({
70
+ items,
71
+ getItemKey,
72
+ renderItem,
73
+ estimateSize,
74
+ overscan,
75
+ emptyState,
76
+ contentProps,
77
+ scrollButtonLabel,
78
+ scrollButtonProps,
79
+ className,
80
+ scrollAnchor,
81
+ ...props
82
+ }: VirtualMessageScrollerProps<Item>): React.JSX.Element;
83
+ //#endregion
84
+ export { VirtualMessageScroller as n, VirtualMessageScrollerProps as r, VirtualMessageScrollAnchor as t };