@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
@@ -1,168 +1,50 @@
1
- import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
- import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-jtmveaRE.js";
3
- import { n as ResponsiveSidebarShell, t as AppBarSlots } from "../../ResponsiveSidebarShell-BTVPxLJK.js";
4
- import { n as McpPluginCatalogProps } from "../../McpPluginCatalog-3qWu8oK1.js";
5
- import { i as ThinkChatMessagesProps } from "../../ThinkChat-CwMdEum8.js";
6
- import { o as ThinkThreadStatusSummary } from "../../ThinkThreadPicker-yFz4vvIf.js";
7
- import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-Dq-GC0_T.js";
8
- import { y as WorkspaceSource } from "../../Workspace-LIoU30n7.js";
9
- import { r as WorkspaceChangeSource } from "../../WorkspaceLive-DfjH1Ypm.js";
10
- import { t as ThinkAgent } from "../../think-agent-Cip5KAPj.js";
1
+ import { ResizableSidePanelHandleProps } from "../general-purpose/ResizableSidePanel.js";
11
2
  import * as React from "react";
12
- import { UIMessage } from "ai";
13
- import { useAgentChat } from "@cloudflare/think/react";
14
- import { useAgent } from "agents/react";
3
+ import { useRender } from "@base-ui/react/use-render";
15
4
 
16
5
  //#region src/components/agents-sdk/ThinkFullApp.d.ts
17
- type ThinkFullAppAgent<State = unknown> = ThinkAgent<State>;
18
- type ThinkFullAppWorkbenchView = "files" | "plugins" | (string & {});
19
- /**
20
- * ThinkFullApp bar: the shared shell slots plus the workbench view switch.
21
- * `views` omitted uses the built-in Files/Plugins switch. Pass `null` when
22
- * the host already offers those destinations (an overflow menu). `primary`
23
- * is always last.
24
- */
25
- interface ThinkFullAppBarSlots extends AppBarSlots {
26
- /**
27
- * View-switch slot. Omit for the built-in switch. `null` omits it so the
28
- * host can own Files/Plugins in `actions` instead of showing a second set
29
- * of icons.
30
- */
31
- views?: React.ReactNode | null;
6
+ interface ThinkFullAppRootProps extends React.ComponentPropsWithRef<"div"> {
7
+ /** Whether the host-selected workbench is visible. Route identity remains with the host. */
8
+ workbenchOpen: boolean;
32
9
  }
33
10
  /**
34
- * The one view axis: the conversation alone, or the conversation with a named
35
- * workbench panel raised beside it (leading at narrow widths). Apps that make
36
- * views durable derive this from validated route search state and pass
37
- * `onViewChange` back into their router.
11
+ * Conversation/workbench layout, independent of routing and SDK connections.
12
+ * Compose navigation outside the root. The conversation remains mounted while
13
+ * compact layouts show the workbench; ResizableSidePanel owns desktop resizing.
38
14
  */
39
- type ThinkFullAppView = "chat" | ThinkFullAppWorkbenchView;
40
- interface ThinkFullAppWorkspaceConfig {
41
- source: WorkspaceSource;
42
- /**
43
- * Stable, non-secret identity for this workspace backend. It is independent
44
- * of the app's agent `sourceKey` when files come from a parent/shared source.
45
- */
46
- sourceKey: string;
47
- root?: string;
48
- navigation: WorkspaceNavigationAdapter;
49
- resolveFileAsset?: WorkspaceFileAssetResolver;
50
- maxInlineAssetBytes?: number;
51
- /** Optional native change stream; the design system owns Query invalidation. */
52
- changes?: WorkspaceChangeSource;
53
- /**
54
- * Disposable freshness tick for hosts without native observation, such as a
55
- * serialization of settled-turn state. Each change invalidates the concept
56
- * queries under `sourceKey`; it never enters query identity.
57
- */
58
- revision?: string;
59
- /** Leading workspace control, such as a host-owned Back to chat button. */
60
- leading?: React.ReactNode;
61
- actions?: React.ReactNode;
62
- }
63
- interface ThinkFullAppPanel {
64
- /** Unique panel id used by `view`; custom panels should not reuse built-in ids. */
65
- id: ThinkFullAppWorkbenchView;
66
- label: string;
67
- icon: React.ReactNode;
68
- /** Panels are app-authored, so anything one needs is already in its scope. */
69
- render: () => React.ReactNode;
70
- }
71
- /** The live conversation the chat lane and approvals belong to. */
72
- interface ThinkFullAppConversation<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage> {
73
- /** The `useAgent` value from `agents/react`; its stub drives approvals and execution records. */
74
- agent: ReturnType<typeof useAgent<AgentT, State>>;
75
- /** The `useAgentChat` value from `@cloudflare/think/react` used by the chat surface. */
76
- chat: ReturnType<typeof useAgentChat<State, MessageT>>;
77
- /**
78
- * The `useSourceScopedAgentToolEvents(agent)` value for this connection.
79
- * The app owns the subscription — mounted beside the `useAgent` call, since
80
- * the server replays retained runs once per socket connect — so a run-detail
81
- * route can read the same projection. ThinkFullApp never subscribes itself.
82
- *
83
- * Omit it for a connection that spawns no runs — a delegated run's own
84
- * socket carries none — rather than passing an empty stand-in projection.
85
- */
86
- agentTools?: AgentToolEventsValue<MessageT["parts"][number]>;
87
- }
88
- interface ThinkFullAppProps<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage> extends React.HTMLAttributes<HTMLDivElement> {
89
- /**
90
- * Omit it and supply `messages.draft` for the first turn of a conversation
91
- * that does not exist yet. The approvals and background-agent surfaces wait
92
- * for a conversation to belong to; everything else is unchanged.
93
- */
94
- conversation?: ThinkFullAppConversation<AgentT, State, MessageT>;
95
- /** Atomic workspace source, navigation, media, and header configuration. */
96
- workspace?: ThinkFullAppWorkspaceConfig;
97
- /** Plugin directory backed by the host's live Agents MCP state and connection callbacks. */
98
- plugins?: McpPluginCatalogProps;
99
- /** Application bar slots: back, leading, title, actions, views, primary. */
100
- bar?: ThinkFullAppBarSlots;
101
- /** Aggregate thread activity rendered beside the compact thread-title disclosure. */
102
- threadStatusSummary?: ThinkThreadStatusSummary;
103
- /**
104
- * Stable, non-secret identity for the remote Think agent used by approvals.
105
- * Include endpoint, account or tenant scope, and
106
- * agent path so two sources cannot share cached data. The optional workspace
107
- * has its own source identity.
108
- */
109
- sourceKey: string;
110
- /** Message rendering labels and approval overrides for ThinkChat. */
111
- messages?: ThinkChatMessagesProps<MessageT>;
112
- /** Extra workbench panels appended after the enabled built-in panels. */
113
- workbenchPanels?: readonly ThinkFullAppPanel[];
114
- /** Returns an application-authored TanStack Router Link and enables retained Agent Tool runs. */
115
- renderAgentToolRunLink?: NonNullable<ThinkChatMessagesProps<MessageT>["renderAgentToolRunLink"]>;
116
- /**
117
- * Optional parent-owned thread picker/sidebar rendered beside the selected child app.
118
- * Use the render form to close the compact drawer after selecting a thread.
119
- */
120
- threadSidebar?: React.ComponentProps<typeof ResponsiveSidebarShell>["sidebar"];
121
- /**
122
- * Place the wide-layout thread toggle. The thread rail owns it by default;
123
- * hosts that compose their own rail header may keep the shell fallback in
124
- * the main bar and render `closeSidebar` themselves.
125
- */
126
- sidebarTogglePlacement?: React.ComponentProps<typeof ResponsiveSidebarShell>["sidebarTogglePlacement"];
127
- /**
128
- * Visible surface. Omit for internal state. A controlled `view` naming a
129
- * panel that does not exist renders the conversation alone — it is never
130
- * silently substituted with another panel.
131
- */
132
- view?: ThinkFullAppView;
133
- /**
134
- * Uncontrolled starting view. Ignored when `view` is set. Omit it to open
135
- * Files beside the conversation on a wide app when a workspace exists, and
136
- * to stay on chat at compact (extension) widths.
137
- */
138
- defaultView?: ThinkFullAppView;
139
- /** Called when the built-in switch (or a collapse) asks for another view. */
140
- onViewChange?: (view: ThinkFullAppView) => void;
141
- }
142
- /** Combines ThinkChat with a resizable workbench. Wide apps with a workspace
143
- * open Files beside the conversation; compact (extension) widths stay on chat
144
- * until a view is selected. */
145
- declare function ThinkFullApp<AgentT extends ThinkFullAppAgent<State>, State = unknown, MessageT extends UIMessage = UIMessage>({
146
- bar,
15
+ declare function ThinkFullAppRoot({
16
+ workbenchOpen,
17
+ children,
18
+ className,
19
+ ...props
20
+ }: ThinkFullAppRootProps): React.JSX.Element;
21
+ interface ThinkFullAppConversationProps extends useRender.ComponentProps<"section"> {}
22
+ /** Persistent conversation lane. Its contents and SDK providers belong to the caller. */
23
+ declare function ThinkFullAppConversation({
24
+ render,
25
+ className,
26
+ ref,
27
+ ...props
28
+ }: ThinkFullAppConversationProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
29
+ interface ThinkFullAppWorkbenchProps extends useRender.ComponentProps<"aside"> {}
30
+ /** The single raised output plane. Unmounts its content when the host closes it. */
31
+ declare function ThinkFullAppWorkbench({
32
+ render,
147
33
  className,
148
- conversation,
149
- defaultView: defaultViewProp,
150
- messages,
151
- onViewChange,
152
- plugins,
153
34
  ref,
154
- renderAgentToolRunLink,
155
- sourceKey,
156
- sidebarTogglePlacement,
157
- style,
158
- threadSidebar,
159
- threadStatusSummary,
160
- view,
161
- workbenchPanels,
162
- workspace,
163
35
  ...props
164
- }: ThinkFullAppProps<AgentT, State, MessageT> & {
165
- ref?: React.Ref<HTMLDivElement>;
166
- }): React.JSX.Element;
36
+ }: ThinkFullAppWorkbenchProps): React.JSX.Element | null;
37
+ interface ThinkFullAppResizeHandleProps extends ResizableSidePanelHandleProps {}
38
+ /** Keyboard and pointer resize control; absent while the workbench is closed. */
39
+ declare function ThinkFullAppResizeHandle({
40
+ className,
41
+ ...props
42
+ }: ThinkFullAppResizeHandleProps): React.JSX.Element | null;
43
+ declare const ThinkFullApp: {
44
+ Root: typeof ThinkFullAppRoot;
45
+ Conversation: typeof ThinkFullAppConversation;
46
+ Workbench: typeof ThinkFullAppWorkbench;
47
+ ResizeHandle: typeof ThinkFullAppResizeHandle;
48
+ };
167
49
  //#endregion
168
- export { ThinkFullApp, ThinkFullAppAgent, ThinkFullAppBarSlots, ThinkFullAppConversation, ThinkFullAppPanel, ThinkFullAppProps, ThinkFullAppView, ThinkFullAppWorkbenchView, ThinkFullAppWorkspaceConfig };
50
+ export { ThinkFullApp, ThinkFullAppConversationProps, ThinkFullAppResizeHandleProps, ThinkFullAppRootProps, ThinkFullAppWorkbenchProps };
@@ -1,306 +1,87 @@
1
- import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { S as FileIcon, c as BoxIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-CeGfXO21.js";
3
- import { IconButton } from "../foundations/IconButton.js";
4
- import { Menu } from "../foundations/Menu.js";
5
- import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
1
+ import { n as mergeBaseClassName, t as cx } from "../../class-names-BiMDVpUo.js";
6
2
  import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
7
- import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
8
- import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-B1d2GIGl.js";
9
- import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DiI6hhDP.js";
10
- import { McpPluginCatalog } from "./McpPluginCatalog.js";
11
- import { ThinkFullAppViewSwitch } from "./ThinkFullAppViewSwitch.js";
12
- import { ThinkThreadStatusIndicators } from "./ThinkThreadPicker.js";
13
- import { useWorkspace } from "./Workspace.js";
14
- import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
15
- import { useWorkspaceLiveQueries } from "./WorkspaceLive.js";
16
3
  import * as React from "react";
17
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { useRender } from "@base-ui/react/use-render";
6
+ import { mergeProps } from "@base-ui/react/merge-props";
18
7
  //#region src/components/agents-sdk/ThinkFullApp.tsx
19
- /** Matches --sigvelo-layout-conversation (24.5rem). */
20
- const conversationDefaultWidth = 392;
21
- const conversationMinWidth = 320;
22
- const conversationMaxWidth = 640;
23
- const conversationKeyboardStep = 24;
24
- /** Keep in lockstep with --sigvelo-layout-break-compact / the 56rem @container. */
25
- function compactBreakPx(el) {
26
- const raw = getComputedStyle(el).getPropertyValue("--sigvelo-layout-break-compact").trim();
27
- if (raw.endsWith("rem")) return Number.parseFloat(raw) * Number.parseFloat(getComputedStyle(document.documentElement).fontSize);
28
- const px = Number.parseFloat(raw);
29
- return Number.isFinite(px) ? px : 896;
30
- }
31
- function isCompactApp(el) {
32
- return el.getBoundingClientRect().width <= compactBreakPx(el);
33
- }
34
- function ThinkFullAppCompactViewMenu({ activeView, onViewChange, views }) {
35
- return /* @__PURE__ */ jsx("div", {
36
- className: "think-full-app__compact-view-menu",
37
- children: /* @__PURE__ */ jsxs(Menu.Root, { children: [/* @__PURE__ */ jsx(IconButton, {
38
- label: "More views",
39
- tooltip: "More views",
40
- render: /* @__PURE__ */ jsx(Menu.Trigger, { unstyled: true }),
41
- variant: "ghost",
42
- color: "neutral",
43
- size: "sm",
44
- children: /* @__PURE__ */ jsx(EllipsisIcon, {})
45
- }), /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
46
- side: "bottom",
47
- align: "end",
48
- sideOffset: 4,
49
- children: /* @__PURE__ */ jsx(Menu.Popup, { children: views.map((view) => /* @__PURE__ */ jsxs(Menu.Item, {
50
- "aria-current": activeView === view.id ? "page" : void 0,
51
- onClick: () => onViewChange(view.id),
52
- children: [view.icon, view.label]
53
- }, view.id)) })
54
- }) })] })
55
- });
56
- }
57
- function WorkspacePanel({ config }) {
58
- const selectedPath = config.navigation.current.destination.kind === "file" ? config.navigation.current.destination.path : null;
59
- return /* @__PURE__ */ jsx(WorkspaceExplorer, {
60
- className: "think-full-app__workbench",
61
- workspace: useWorkspace({
62
- source: config.source,
63
- sourceKey: config.sourceKey,
64
- root: config.root,
65
- selectedPath,
66
- resolveFileAsset: config.resolveFileAsset,
67
- maxInlineAssetBytes: config.maxInlineAssetBytes
68
- }),
69
- navigation: config.navigation,
70
- leading: config.leading,
71
- actions: config.actions
72
- });
8
+ const WorkbenchOpenContext = React.createContext(null);
9
+ function useWorkbenchOpen() {
10
+ const open = React.useContext(WorkbenchOpenContext);
11
+ if (open === null) throw new Error("ThinkFullApp parts must be inside ThinkFullApp.Root.");
12
+ return open;
73
13
  }
74
14
  /**
75
- * Approval discovery and background-agent events need a live connection, so they
76
- * live here rather than in the shell, which also renders before there is one.
15
+ * Conversation/workbench layout, independent of routing and SDK connections.
16
+ * Compose navigation outside the root. The conversation remains mounted while
17
+ * compact layouts show the workbench; ResizableSidePanel owns desktop resizing.
77
18
  */
78
- function ThinkFullAppThreadChat({ agent, agentTools, chat, messages, renderAgentToolRunLink, sourceKey }) {
79
- const approvals = useThinkPendingExecutionApprovals(agent.stub, sourceKey, `${chat.messages.length}:${chat.status}`, messages?.approvalsEnabled !== false);
80
- const resolvedMessages = React.useMemo(() => {
81
- const approvalProps = resolveThinkApprovalProps({
82
- thinkStub: messages?.thinkStub,
83
- pendingApprovals: messages?.pendingApprovals,
84
- onExecutionSettled: messages?.onExecutionSettled
85
- }, {
86
- thinkStub: agent.stub,
87
- pendingApprovals: approvals.pendingApprovals,
88
- onExecutionSettled: approvals.refreshPendingApprovals
89
- });
90
- return {
91
- ...messages,
92
- ...approvalProps
93
- };
94
- }, [
95
- agent.stub,
96
- approvals.pendingApprovals,
97
- approvals.refreshPendingApprovals,
98
- messages
99
- ]);
100
- return /* @__PURE__ */ jsx(ThinkChat.Provider, {
101
- chat,
102
- agentTools,
103
- children: /* @__PURE__ */ jsx(ThinkChat.Messages, {
104
- ...resolvedMessages,
105
- renderAgentToolRunLink
19
+ function ThinkFullAppRoot({ workbenchOpen, children, className, ...props }) {
20
+ return /* @__PURE__ */ jsx(WorkbenchOpenContext.Provider, {
21
+ value: workbenchOpen,
22
+ children: /* @__PURE__ */ jsx(ResizableSidePanel.Root, {
23
+ label: "conversation",
24
+ side: "start",
25
+ sizeVariable: "--think-full-app-conversation-size",
26
+ defaultSize: 392,
27
+ minSize: 320,
28
+ maxSize: 640,
29
+ keyboardStep: 24,
30
+ ...props,
31
+ className: cx("think-full-app", className),
32
+ "data-has-workbench": workbenchOpen ? "true" : "false",
33
+ "data-mobile-view": workbenchOpen ? "workbench" : "chat",
34
+ "data-recipe": "fill-host",
35
+ children: /* @__PURE__ */ jsx("div", {
36
+ className: "think-full-app__view-scope",
37
+ children
38
+ })
106
39
  })
107
40
  });
108
41
  }
109
- /** Combines ThinkChat with a resizable workbench. Wide apps with a workspace
110
- * open Files beside the conversation; compact (extension) widths stay on chat
111
- * until a view is selected. */
112
- function ThinkFullApp({ bar, className, conversation, defaultView: defaultViewProp, messages, onViewChange, plugins, ref, renderAgentToolRunLink, sourceKey, sidebarTogglePlacement = "sidebar", style, threadSidebar, threadStatusSummary, view, workbenchPanels, workspace, ...props }) {
113
- const selectedWorkspacePath = workspace?.navigation.current.destination.kind === "file" ? workspace.navigation.current.destination.path : null;
114
- useWorkspaceLiveQueries({
115
- changes: workspace?.changes,
116
- maxInlineAssetBytes: workspace?.maxInlineAssetBytes,
117
- resolveFileAsset: workspace?.resolveFileAsset,
118
- selectedPath: selectedWorkspacePath,
119
- source: workspace?.source,
120
- sourceKey: workspace?.sourceKey,
121
- root: workspace?.root ?? "/",
122
- revision: workspace?.revision
123
- });
124
- const appRef = React.useRef(null);
125
- const workbenchPanelRef = React.useRef(null);
126
- const pendingPanelFocusRef = React.useRef(null);
127
- const [innerView, setInnerView] = React.useState(defaultViewProp ?? "chat");
128
- const userChoseView = React.useRef(defaultViewProp !== void 0 || view !== void 0);
129
- const requestedView = view ?? innerView;
130
- const setView = React.useCallback((next) => {
131
- userChoseView.current = true;
132
- if (view === void 0) setInnerView(next);
133
- onViewChange?.(next);
134
- }, [onViewChange, view]);
135
- React.useLayoutEffect(() => {
136
- if (view !== void 0 || defaultViewProp !== void 0 || userChoseView.current) return;
137
- if (workspace === void 0) return;
138
- const el = appRef.current;
139
- if (!el) return;
140
- const syncViewToWidth = () => {
141
- if (userChoseView.current) return;
142
- const next = isCompactApp(el) ? "chat" : "files";
143
- setInnerView((current) => current === next ? current : next);
144
- };
145
- syncViewToWidth();
146
- const observer = new ResizeObserver(syncViewToWidth);
147
- observer.observe(el);
148
- return () => observer.disconnect();
149
- }, [
150
- defaultViewProp,
151
- view,
152
- workspace
153
- ]);
154
- const availableWorkbenchPanels = [];
155
- if (workspace !== void 0) availableWorkbenchPanels.push({
156
- id: "files",
157
- label: "Files",
158
- icon: /* @__PURE__ */ jsx(FileIcon, {}),
159
- render: () => /* @__PURE__ */ jsx(WorkspacePanel, { config: workspace })
42
+ /** Persistent conversation lane. Its contents and SDK providers belong to the caller. */
43
+ function ThinkFullAppConversation({ render, className, ref, ...props }) {
44
+ useWorkbenchOpen();
45
+ return useRender({
46
+ defaultTagName: "section",
47
+ render,
48
+ ref,
49
+ props: mergeProps({
50
+ "aria-label": "Conversation",
51
+ className: mergeBaseClassName("think-full-app__chat-surface", className)
52
+ }, props)
160
53
  });
161
- if (plugins) availableWorkbenchPanels.push({
162
- id: "plugins",
163
- label: "Plugins",
164
- icon: /* @__PURE__ */ jsx(BoxIcon, {}),
165
- render: () => /* @__PURE__ */ jsx(McpPluginCatalog, { ...plugins })
54
+ }
55
+ /** The single raised output plane. Unmounts its content when the host closes it. */
56
+ function ThinkFullAppWorkbench({ render, className, ref, ...props }) {
57
+ const open = useWorkbenchOpen();
58
+ const element = useRender({
59
+ defaultTagName: "aside",
60
+ render,
61
+ ref,
62
+ props: mergeProps({
63
+ "aria-label": "Workbench",
64
+ tabIndex: -1,
65
+ className: mergeBaseClassName("think-full-app__aside", className)
66
+ }, props)
166
67
  });
167
- if (workbenchPanels) availableWorkbenchPanels.push(...workbenchPanels);
168
- const activePanel = requestedView === "chat" ? void 0 : availableWorkbenchPanels.find((panel) => panel.id === requestedView);
169
- const hasWorkbench = activePanel !== void 0;
170
- const activeMobileView = hasWorkbench ? "workbench" : "chat";
171
- const hasAppBarRow = Boolean(bar?.back || bar?.leading || bar?.compactLeading || bar?.title || bar?.actions || bar?.primary || bar?.views || threadSidebar) || availableWorkbenchPanels.length > 0;
172
- React.useLayoutEffect(() => {
173
- const pendingFocus = pendingPanelFocusRef.current;
174
- if (!pendingFocus || pendingFocus.id !== activePanel?.id) return;
175
- pendingPanelFocusRef.current = null;
176
- Array.from(workbenchPanelRef.current?.querySelectorAll("button") ?? []).find((button) => button.getAttribute("aria-label") === pendingFocus.label)?.focus({ preventScroll: true });
177
- }, [activePanel?.id]);
178
- const updateView = (next) => {
179
- const activeElement = document.activeElement;
180
- const restorePanelSwitchFocus = activeElement instanceof HTMLElement && workbenchPanelRef.current?.contains(activeElement);
181
- const nextLabel = availableWorkbenchPanels.find((panel) => panel.id === next)?.label;
182
- pendingPanelFocusRef.current = restorePanelSwitchFocus && nextLabel ? {
183
- id: next,
184
- label: nextLabel
185
- } : null;
186
- React.startTransition(() => setView(next));
187
- };
188
- const viewSwitch = bar?.views === void 0 && availableWorkbenchPanels.length ? /* @__PURE__ */ jsx(ThinkFullAppViewSwitch, {
189
- views: availableWorkbenchPanels,
190
- value: activePanel?.id,
191
- allowEmpty: true,
192
- "aria-label": "App views",
193
- onValueChange: (next) => updateView(next ?? "chat")
194
- }) : bar?.views ?? null;
195
- const compactViewMenu = bar?.views === void 0 && availableWorkbenchPanels.length ? /* @__PURE__ */ jsx(ThinkFullAppCompactViewMenu, {
196
- activeView: activePanel?.id,
197
- views: availableWorkbenchPanels,
198
- onViewChange: updateView
68
+ return open ? /* @__PURE__ */ jsx(React.ViewTransition, {
69
+ default: "sigvelo-layout-transition",
70
+ children: element
199
71
  }) : null;
200
- const appBarActions = bar?.actions || compactViewMenu || viewSwitch ? /* @__PURE__ */ jsxs(Fragment, { children: [
201
- bar?.actions,
202
- compactViewMenu,
203
- viewSwitch
204
- ] }) : void 0;
205
- const compactLeading = bar?.compactLeading !== void 0 ? bar.compactLeading : activePanel ? /* @__PURE__ */ jsx(IconButton, {
206
- type: "button",
207
- label: "Back to chat",
208
- tooltip: "Back to chat",
209
- variant: "ghost",
210
- color: "neutral",
211
- size: "sm",
212
- onClick: () => updateView("chat"),
213
- children: /* @__PURE__ */ jsx(ArrowLeftIcon, {})
214
- }) : void 0;
215
- const appContent = /* @__PURE__ */ jsxs(ResizableSidePanel.Root, {
216
- ref: mergeRefs(appRef, ref),
217
- className: cx("think-full-app", className),
218
- label: "workbench",
219
- side: "start",
220
- sizeVariable: "--think-full-app-conversation-size",
221
- defaultSize: conversationDefaultWidth,
222
- minSize: conversationMinWidth,
223
- maxSize: conversationMaxWidth,
224
- keyboardStep: conversationKeyboardStep,
225
- "data-has-workbench": hasWorkbench ? "true" : "false",
226
- "data-mobile-view": activeMobileView,
227
- style,
72
+ }
73
+ /** Keyboard and pointer resize control; absent while the workbench is closed. */
74
+ function ThinkFullAppResizeHandle({ className, ...props }) {
75
+ return useWorkbenchOpen() ? /* @__PURE__ */ jsx(ResizableSidePanel.Handle, {
228
76
  ...props,
229
- "data-recipe": "fill-host",
230
- children: [/* @__PURE__ */ jsxs("div", {
231
- className: "think-full-app__view-scope",
232
- "data-mobile-view": activeMobileView,
233
- children: [/* @__PURE__ */ jsx("section", {
234
- className: "think-full-app__chat-surface",
235
- "data-workspace-restoration-scope": "chat",
236
- "aria-label": "Chat",
237
- children: /* @__PURE__ */ jsx("div", {
238
- className: "think-full-app__chat",
239
- children: /* @__PURE__ */ jsx("div", {
240
- className: "think-full-app__chat-inner",
241
- children: conversation ? /* @__PURE__ */ jsx(ThinkFullAppThreadChat, {
242
- ...conversation,
243
- messages,
244
- renderAgentToolRunLink,
245
- sourceKey
246
- }) : /* @__PURE__ */ jsx(ThinkChat.Messages, {
247
- ...messages,
248
- renderAgentToolRunLink
249
- })
250
- })
251
- })
252
- }), activePanel ? /* @__PURE__ */ jsx("aside", {
253
- className: "think-full-app__aside",
254
- "aria-label": "Workbench",
255
- children: /* @__PURE__ */ jsx("div", {
256
- className: "think-full-app__workbench-slot",
257
- children: /* @__PURE__ */ jsx(React.ViewTransition, {
258
- default: "sigvelo-layout-transition",
259
- children: /* @__PURE__ */ jsx("div", {
260
- ref: workbenchPanelRef,
261
- className: "think-full-app__workbench-panel",
262
- tabIndex: -1,
263
- children: activePanel.render()
264
- })
265
- })
266
- })
267
- }) : null]
268
- }), activePanel ? /* @__PURE__ */ jsx(ResizableSidePanel.Handle, { className: "think-full-app__resizer" }) : null]
269
- });
270
- const app = workspace ? /* @__PURE__ */ jsx(WorkspaceNavigationProvider, {
271
- root: workspace.root ?? "/",
272
- base: {
273
- kind: "directory",
274
- path: workspace.root ?? "/"
275
- },
276
- navigation: workspace.navigation,
277
- children: /* @__PURE__ */ jsxs(WorkspaceNavigationRestorationBoundary, { children: [/* @__PURE__ */ jsx(WorkspaceNavigationFocusRestorer, {
278
- entryKey: workspace.navigation.current.key,
279
- rootRef: appRef,
280
- scope: "chat"
281
- }), appContent] })
282
- }) : appContent;
283
- return /* @__PURE__ */ jsx(ResponsiveSidebarShell, {
284
- className: "think-full-app-shell",
285
- sidebar: threadSidebar,
286
- sidebarLabel: "threads",
287
- sidebarTogglePlacement,
288
- showMainLabel: "Show selected thread",
289
- bar: {
290
- ...bar,
291
- actions: appBarActions,
292
- compactLeading,
293
- primary: bar?.primary,
294
- className: "think-full-app__app-bar",
295
- label: "Workbench controls",
296
- hidden: !hasAppBarRow,
297
- compactTitleTrigger: threadSidebar ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
298
- className: "sigvelo-truncate",
299
- children: bar?.title ?? "Threads"
300
- }), threadStatusSummary ? /* @__PURE__ */ jsx(ThinkThreadStatusIndicators, { summary: threadStatusSummary }) : null] }) : void 0
301
- },
302
- children: app
303
- });
77
+ className: mergeBaseClassName("think-full-app__resizer", className)
78
+ }) : null;
304
79
  }
80
+ const ThinkFullApp = {
81
+ Root: ThinkFullAppRoot,
82
+ Conversation: ThinkFullAppConversation,
83
+ Workbench: ThinkFullAppWorkbench,
84
+ ResizeHandle: ThinkFullAppResizeHandle
85
+ };
305
86
  //#endregion
306
87
  export { ThinkFullApp };
@@ -1,2 +1,19 @@
1
- import { n as ThinkRecoveryNoticeProps, t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
1
+ import { ThinkChatValue } from "./ThinkChatContext.js";
2
+ import { UIMessage } from "ai";
3
+
4
+ //#region src/components/agents-sdk/ThinkRecoveryNotice.d.ts
5
+ interface ThinkRecoveryNoticeProps<State = unknown, MessageT extends UIMessage = UIMessage> {
6
+ /** The complete `useAgentChat` value from `@cloudflare/think/react`. */
7
+ chat: ThinkChatValue<State, MessageT>;
8
+ }
9
+ /**
10
+ * Native Think recovery, connection, and turn-error content for AgentChat's
11
+ * persistent polite notice region. Think exposes no recovery phase, progress,
12
+ * checkpoint, attempt count, or timeline to the browser, so this adapter does
13
+ * not claim those details.
14
+ */
15
+ declare function ThinkRecoveryNotice<State = unknown, MessageT extends UIMessage = UIMessage>({
16
+ chat
17
+ }: ThinkRecoveryNoticeProps<State, MessageT>): import("react").JSX.Element | null;
18
+ //#endregion
2
19
  export { ThinkRecoveryNotice, ThinkRecoveryNoticeProps };
@@ -1,5 +1,5 @@
1
- import { AgentChatTurnError } from "../ai-sdk/AgentChatTurnError.js";
2
1
  import { TransitionSurface } from "../foundations/TransitionSurface.js";
2
+ import { AgentChatTurnError } from "../ai-sdk/AgentChatTurnError.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/agents-sdk/ThinkRecoveryNotice.tsx
5
5
  function connectionReason(error) {