@mcp-b/react-components 0.47.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 (274) 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-DMHZiw86.js → CodeBlock-g8sADidM.js} +7 -7
  7. package/dist/Correspondent-7K6uNLUm.d.ts +64 -0
  8. package/dist/{FileTree-BHebfvkK.js → FileTree-H8mMg4rV.js} +20 -29
  9. package/dist/{IconButton-BAUFhUk8.d.ts → IconButton-ByiyjkYE.d.ts} +2 -2
  10. package/dist/{Message-D_vCVEGB.d.ts → Message-DyaTBiV7.d.ts} +17 -4
  11. package/dist/MessageScrollerVirtual-D4afYwVB.d.ts +84 -0
  12. package/dist/{PromptInput-DtJHyp0S.d.ts → PromptInput-C4Mofitz.d.ts} +44 -31
  13. package/dist/PromptInputApproval-D2hpn54U.d.ts +44 -0
  14. package/dist/Separator-CzhtLYE1.d.ts +41 -0
  15. package/dist/Toolbar-CGY004u0.d.ts +155 -0
  16. package/dist/{Workspace-C_zHq9KZ.d.ts → Workspace-HzGrWDX3.d.ts} +14 -3
  17. package/dist/{WorkspaceFile-Dq-GC0_T.d.ts → WorkspaceFile-Bouauobc.d.ts} +1 -1
  18. package/dist/{WorkspaceFileView-ChIJz-fl.js → WorkspaceFileView-DYPtRVpM.js} +4 -3
  19. package/dist/{WorkspaceLink-B1d2GIGl.js → WorkspaceLink-BYZG-V_I.js} +8 -91
  20. package/dist/{WorkspaceMessageResponse-Dg_aNpoj.js → WorkspaceMessageResponse-CUJk9_P5.js} +6 -3
  21. package/dist/components/agents-sdk/AgentChat.d.ts +198 -2
  22. package/dist/components/agents-sdk/AgentChat.js +525 -670
  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 +1 -1
  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 +21 -13
  29. package/dist/components/agents-sdk/BrowserReplay.d.ts +1 -1
  30. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +3 -0
  31. package/dist/components/agents-sdk/BrowserRunPanel.js +31 -30
  32. package/dist/components/agents-sdk/EmployeeChrome.d.ts +212 -0
  33. package/dist/components/agents-sdk/EmployeeChrome.js +555 -0
  34. package/dist/components/agents-sdk/ManagerOffice.d.ts +115 -85
  35. package/dist/components/agents-sdk/ManagerOffice.js +545 -1154
  36. package/dist/components/agents-sdk/McpConnectionRequest.d.ts +4 -4
  37. package/dist/components/agents-sdk/McpConnectionRequest.js +3 -2
  38. package/dist/components/agents-sdk/McpConnectorForm.d.ts +38 -1
  39. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +93 -1
  40. package/dist/components/agents-sdk/McpPluginCatalog.js +3 -2
  41. package/dist/components/agents-sdk/McpServerIcon.d.ts +17 -0
  42. package/dist/components/agents-sdk/McpServerIcon.js +25 -0
  43. package/dist/components/agents-sdk/McpServerPicker.d.ts +4 -3
  44. package/dist/components/agents-sdk/McpServerPicker.js +2 -1
  45. package/dist/components/agents-sdk/ModelSelector.d.ts +4 -4
  46. package/dist/components/agents-sdk/ModelSelector.js +3 -3
  47. package/dist/components/agents-sdk/PromptInputApproval.d.ts +1 -43
  48. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  49. package/dist/components/agents-sdk/PromptInputCommands.js +1 -2
  50. package/dist/components/agents-sdk/SessionCompaction.d.ts +88 -1
  51. package/dist/components/agents-sdk/SessionCompaction.js +2 -2
  52. package/dist/components/agents-sdk/SubagentRunDetails.d.ts +30 -1
  53. package/dist/components/agents-sdk/SubagentRunDetails.js +57 -1
  54. package/dist/components/agents-sdk/SubagentRunIndicator.d.ts +9 -9
  55. package/dist/components/agents-sdk/SubagentRunIndicator.js +18 -23
  56. package/dist/components/agents-sdk/SubagentRunList.d.ts +6 -3
  57. package/dist/components/agents-sdk/SubagentRunList.js +4 -2
  58. package/dist/components/agents-sdk/SubagentRunPanel.d.ts +60 -0
  59. package/dist/components/agents-sdk/SubagentRunPanel.js +255 -0
  60. package/dist/components/agents-sdk/SubagentRunSelector.d.ts +8 -4
  61. package/dist/components/agents-sdk/SubagentRunSelector.js +4 -2
  62. package/dist/components/agents-sdk/ThinkChat.d.ts +102 -2
  63. package/dist/components/agents-sdk/ThinkChat.js +233 -2
  64. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +76 -1
  65. package/dist/components/agents-sdk/ThinkChatActivity.js +17 -9
  66. package/dist/components/agents-sdk/ThinkChatContext.d.ts +27 -1
  67. package/dist/components/agents-sdk/ThinkChatContext.js +1 -1
  68. package/dist/components/agents-sdk/ThinkChatToolPanels.js +23 -18
  69. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  70. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
  71. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +85 -28
  72. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +158 -101
  73. package/dist/components/agents-sdk/ThinkFullApp.d.ts +40 -158
  74. package/dist/components/agents-sdk/ThinkFullApp.js +71 -285
  75. package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +18 -1
  76. package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +51 -0
  77. package/dist/components/agents-sdk/ThinkRoutineActions.js +201 -0
  78. package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +4 -1
  79. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +16 -14
  80. package/dist/components/agents-sdk/ThinkRoutineDetail.js +12 -12
  81. package/dist/components/agents-sdk/ThinkRoutineForm.d.ts +2 -1
  82. package/dist/components/agents-sdk/ThinkRoutineForm.js +11 -11
  83. package/dist/components/agents-sdk/ThinkRoutineRuns.js +6 -6
  84. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +90 -1
  85. package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -2
  86. package/dist/components/agents-sdk/Workspace.d.ts +2 -2
  87. package/dist/components/agents-sdk/Workspace.js +20 -23
  88. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  89. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  90. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +3 -2
  91. package/dist/components/agents-sdk/WorkspaceConcept.js +3 -3
  92. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +15 -10
  93. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +43 -40
  94. package/dist/components/agents-sdk/WorkspaceExecution.d.ts +31 -31
  95. package/dist/components/agents-sdk/WorkspaceExecution.js +115 -192
  96. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +5 -2
  97. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -2
  98. package/dist/components/agents-sdk/WorkspaceFile.d.ts +1 -1
  99. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
  100. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  101. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  102. package/dist/components/agents-sdk/WorkspaceLive.d.ts +60 -1
  103. package/dist/components/agents-sdk/WorkspaceLive.js +33 -5
  104. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +47 -1
  105. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  106. package/dist/components/agents-sdk/WorkspaceMountManager.d.ts +3 -2
  107. package/dist/components/agents-sdk/WorkspaceMountManager.js +5 -8
  108. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.d.ts +38 -0
  109. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +86 -0
  110. package/dist/components/agents-sdk/WorkspaceProject.d.ts +44 -15
  111. package/dist/components/agents-sdk/WorkspaceProject.js +74 -51
  112. package/dist/components/agents-sdk/WorkspaceUserScript.d.ts +1 -1
  113. package/dist/components/agents-sdk/WorkspaceUserScript.js +5 -2
  114. package/dist/components/ai-sdk/Activity.d.ts +1 -1
  115. package/dist/components/ai-sdk/AgentAttention.d.ts +2 -2
  116. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +89 -2
  117. package/dist/components/ai-sdk/AgentChatStartScreen.js +63 -42
  118. package/dist/components/ai-sdk/AgentMessageParts.d.ts +45 -1
  119. package/dist/components/ai-sdk/Approval.d.ts +1 -1
  120. package/dist/components/ai-sdk/Artifact.d.ts +2 -2
  121. package/dist/components/ai-sdk/Artifact.js +2 -2
  122. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  123. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  124. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  125. package/dist/components/ai-sdk/ComposerLink.js +1 -2
  126. package/dist/components/ai-sdk/ConnectedAppCards.d.ts +16 -1
  127. package/dist/components/ai-sdk/ConnectedAppCards.js +69 -94
  128. package/dist/components/ai-sdk/Context.d.ts +7 -3
  129. package/dist/components/ai-sdk/Context.js +7 -17
  130. package/dist/components/ai-sdk/Conversation.d.ts +2 -2
  131. package/dist/components/ai-sdk/Correspondent.d.ts +2 -0
  132. package/dist/components/ai-sdk/Correspondent.js +145 -0
  133. package/dist/components/ai-sdk/Goal.d.ts +3 -3
  134. package/dist/components/ai-sdk/Goal.js +2 -2
  135. package/dist/components/ai-sdk/InlineCitation.d.ts +1 -1
  136. package/dist/components/ai-sdk/InlineCitation.js +1 -1
  137. package/dist/components/ai-sdk/MediaPreviewCard.d.ts +1 -1
  138. package/dist/components/ai-sdk/Message.d.ts +2 -2
  139. package/dist/components/ai-sdk/Message.js +11 -2
  140. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  141. package/dist/components/ai-sdk/MessageScrollerVirtual.d.ts +2 -76
  142. package/dist/components/ai-sdk/MessageScrollerVirtual.js +38 -4
  143. package/dist/components/ai-sdk/Plan.d.ts +1 -1
  144. package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
  145. package/dist/components/ai-sdk/PromptInput.js +170 -226
  146. package/dist/components/ai-sdk/PromptInputComposerEditor.js +32 -9
  147. package/dist/components/ai-sdk/Queue.d.ts +28 -5
  148. package/dist/components/ai-sdk/Queue.js +19 -4
  149. package/dist/components/ai-sdk/Reasoning.d.ts +1 -1
  150. package/dist/components/ai-sdk/Reasoning.js +4 -4
  151. package/dist/components/ai-sdk/Sources.d.ts +1 -1
  152. package/dist/components/ai-sdk/Task.d.ts +1 -1
  153. package/dist/components/extension/ChatGptSignInScreen.d.ts +1 -1
  154. package/dist/components/extension/CodexModelSelector.d.ts +5 -0
  155. package/dist/components/extension/ConversationTabPicker.d.ts +1 -0
  156. package/dist/components/extension/ConversationTabPicker.js +1 -1
  157. package/dist/components/foundations/AlertDialog.d.ts +1 -1
  158. package/dist/components/foundations/AppIcon.d.ts +3 -2
  159. package/dist/components/foundations/Autocomplete.js +6 -1
  160. package/dist/components/foundations/Avatar.d.ts +1 -121
  161. package/dist/components/foundations/Button.d.ts +1 -1
  162. package/dist/components/foundations/Card.d.ts +22 -27
  163. package/dist/components/foundations/Card.js +51 -32
  164. package/dist/components/foundations/CheckboxGroup.d.ts +1 -1
  165. package/dist/components/foundations/Collapsible.d.ts +1 -1
  166. package/dist/components/foundations/Combobox.js +6 -1
  167. package/dist/components/foundations/Dialog.d.ts +106 -1
  168. package/dist/components/foundations/EmptyState.d.ts +1 -1
  169. package/dist/components/foundations/Field.d.ts +2 -1
  170. package/dist/components/foundations/Fieldset.d.ts +1 -1
  171. package/dist/components/foundations/Form.d.ts +4 -4
  172. package/dist/components/foundations/IconButton.d.ts +1 -1
  173. package/dist/components/foundations/Label.d.ts +1 -1
  174. package/dist/components/foundations/LinkButton.d.ts +2 -2
  175. package/dist/components/foundations/Meter.d.ts +1 -1
  176. package/dist/components/foundations/NumberField.d.ts +1 -1
  177. package/dist/components/foundations/ScrollArea.d.ts +1 -1
  178. package/dist/components/foundations/SearchField.d.ts +1 -1
  179. package/dist/components/foundations/Select.js +6 -1
  180. package/dist/components/foundations/Separator.d.ts +1 -40
  181. package/dist/components/foundations/Stepper.d.ts +1 -1
  182. package/dist/components/foundations/Textarea.d.ts +1 -1
  183. package/dist/components/foundations/Toast.d.ts +5 -1
  184. package/dist/components/foundations/Toggle.d.ts +70 -1
  185. package/dist/components/foundations/ToggleGroup.d.ts +3 -2
  186. package/dist/components/foundations/Toolbar.d.ts +1 -151
  187. package/dist/components/foundations/TransitionSurface.d.ts +1 -1
  188. package/dist/components/general-purpose/ActionGuide.d.ts +10 -26
  189. package/dist/components/general-purpose/ActionGuide.js +4 -18
  190. package/dist/components/general-purpose/AppTopBar.d.ts +4 -2
  191. package/dist/components/general-purpose/Commit.d.ts +2 -2
  192. package/dist/components/general-purpose/Commit.js +1 -1
  193. package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
  194. package/dist/components/general-purpose/FileTree.d.ts +1 -7
  195. package/dist/components/general-purpose/FileTree.js +1 -1
  196. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  197. package/dist/components/general-purpose/PricingPlanCard.d.ts +4 -0
  198. package/dist/components/general-purpose/PricingUsageCalculator.js +1 -1
  199. package/dist/components/general-purpose/ResizableSidePanel.d.ts +2 -2
  200. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +128 -2
  201. package/dist/components/general-purpose/ResponsiveSidebarShell.js +119 -101
  202. package/dist/components/general-purpose/SettingsFormDialog.d.ts +14 -27
  203. package/dist/components/general-purpose/SettingsFormDialog.js +40 -70
  204. package/dist/components/general-purpose/SetupChecklist.d.ts +1 -0
  205. package/dist/components/general-purpose/SetupChecklist.js +76 -1
  206. package/dist/components/general-purpose/Terminal.d.ts +3 -3
  207. package/dist/components/general-purpose/Terminal.js +10 -5
  208. package/dist/components/general-purpose/TestResults.d.ts +23 -11
  209. package/dist/components/general-purpose/TestResults.js +48 -50
  210. package/dist/components/general-purpose/ThemeModeControl.d.ts +2 -0
  211. package/dist/components/general-purpose/WebPreview.d.ts +29 -4
  212. package/dist/components/general-purpose/WebPreview.js +37 -12
  213. package/dist/components/nanites/AgentConnection.js +1 -1
  214. package/dist/components/nanites/AgentToolDetail.d.ts +13 -11
  215. package/dist/components/nanites/AgentToolDetail.js +20 -41
  216. package/dist/{copy-button-C0JyjClr.d.ts → copy-button-OUwOdgEm.d.ts} +1 -1
  217. package/dist/mcp-server-mAErsxHU.js +27 -0
  218. package/dist/styles/activity.css +1 -96
  219. package/dist/styles/agent-chat.css +75 -102
  220. package/dist/styles/agent-tool-detail.css +0 -16
  221. package/dist/styles/base.css +3 -3
  222. package/dist/styles/browser-run-panel.css +1 -15
  223. package/dist/styles/button.css +7 -1
  224. package/dist/styles/code-block.css +12 -0
  225. package/dist/styles/composition-motion.css +0 -2
  226. package/dist/styles/correspondent.css +73 -0
  227. package/dist/styles/employee-chrome.css +43 -0
  228. package/dist/styles/file-tree.css +5 -0
  229. package/dist/styles/index.css +5 -2
  230. package/dist/styles/manager-office.css +380 -1086
  231. package/dist/styles/message.css +2 -10
  232. package/dist/styles/queue.css +71 -0
  233. package/dist/styles/subagent-run.css +122 -6
  234. package/dist/styles/test-results.css +2 -5
  235. package/dist/styles/think-chat-activity.css +13 -0
  236. package/dist/styles/think-chat-tool-panels.css +81 -0
  237. package/dist/styles/think-execution-workbench.css +2 -8
  238. package/dist/styles/think-full-app.css +42 -251
  239. package/dist/styles/{think-routine-library.css → think-routine.css} +64 -80
  240. package/dist/styles/web-preview.css +15 -1
  241. package/dist/utils/mcp-server-catalog.d.ts +1112 -2
  242. package/dist/utils/mcp-server-catalog.js +28 -9
  243. package/dist/utils/structured-code.d.ts +1 -1
  244. package/dist/{workspace-assets-CxpEHsac.js → workspace-assets-Bg7XhPsk.js} +16 -2
  245. package/package.json +7 -3
  246. package/dist/AgentChat-BLmQghkt.d.ts +0 -327
  247. package/dist/AgentChatStartScreen-Bkv7Avni.d.ts +0 -84
  248. package/dist/AgentMessageParts-C7L-Mv9U.d.ts +0 -46
  249. package/dist/AgentToolRunsContext-jtmveaRE.d.ts +0 -57
  250. package/dist/Dialog-B_FhRWaz.d.ts +0 -107
  251. package/dist/McpConnectorForm-CeYNY0MI.d.ts +0 -39
  252. package/dist/McpPluginCatalog-3qWu8oK1.d.ts +0 -92
  253. package/dist/ResponsiveSidebarShell-BTVPxLJK.d.ts +0 -123
  254. package/dist/SessionCompaction-CmTJFpzj.d.ts +0 -89
  255. package/dist/SetupChecklist-CwRjIDH4.js +0 -77
  256. package/dist/ThinkChat-CwMdEum8.d.ts +0 -185
  257. package/dist/ThinkChat-DLDta57t.js +0 -332
  258. package/dist/ThinkChatActivity-B3lGVS-6.d.ts +0 -77
  259. package/dist/ThinkChatContext-COIgzkYp.d.ts +0 -28
  260. package/dist/ThinkRecoveryNotice-DGWr94rk.d.ts +0 -19
  261. package/dist/ThinkThreadPicker-yFz4vvIf.d.ts +0 -91
  262. package/dist/Toggle-DLrIf5YH.d.ts +0 -69
  263. package/dist/WorkspaceLive-DLGhtIly.d.ts +0 -49
  264. package/dist/WorkspaceMessageResponse-kJYU8Onj.d.ts +0 -48
  265. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +0 -31
  266. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +0 -34
  267. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +0 -80
  268. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +0 -159
  269. package/dist/components/agents-sdk/ThinkSidepanel.d.ts +0 -200
  270. package/dist/components/agents-sdk/ThinkSidepanel.js +0 -775
  271. package/dist/mcp-server-7NR24ASj.js +0 -69
  272. package/dist/mcp-server-catalog-C_g7C-9o.d.ts +0 -1108
  273. package/dist/styles/think-sidepanel.css +0 -78
  274. package/dist/think-agent-Cip5KAPj.d.ts +0 -7
@@ -1,32 +1,38 @@
1
1
  import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
2
+ import { AppTopBar } from "../general-purpose/AppTopBar.js";
2
3
  import * as React from "react";
4
+ import { useRender } from "@base-ui/react/use-render";
3
5
  import { DataTag, UnusedSkipTokenOptions } from "@tanstack/react-query";
4
6
  import { Think, ThinkSubmissionInspection } from "@cloudflare/think";
5
7
  import { AgentStub } from "agents/client";
6
8
  import { WorkflowPage } from "agents/workflows";
7
9
 
10
+ //#region src/components/_internal/navigation-link.d.ts
11
+ interface NavigationLinkProps extends Omit<useRender.ComponentProps<"a">, "render"> {
12
+ /** App-authored TanStack Router Link with its destination already type-checked. */
13
+ render: React.ReactElement;
14
+ }
15
+ /**
16
+ * Merges design-system anchor props into an application-owned router Link.
17
+ *
18
+ * Keeping the Link element at the call site lets the consuming application's
19
+ * registered route tree infer `to`, `params`, and `search` without routing
20
+ * generics leaking through every design-system component.
21
+ */
22
+ declare function NavigationLink({
23
+ render,
24
+ ref,
25
+ ...props
26
+ }: NavigationLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
27
+ //#endregion
8
28
  //#region src/components/agents-sdk/ThinkExecutionWorkbench.d.ts
9
- interface ThinkExecutionWorkbenchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
10
- /** Agents SDK client stub for a Think agent; this UI calls native submission/workflow methods. */
29
+ interface ThinkExecutionWorkbenchRootProps extends useRender.ComponentProps<"div"> {
30
+ /** Whole Agents SDK client stub; native submission/workflow methods remain unchanged. */
11
31
  source: AgentStub<Think>;
12
- /**
13
- * Stable, serializable identity for the remote Think agent. It must change
14
- * when `source` points at a different agent and must not contain credentials.
15
- */
32
+ /** Stable, non-secret remote agent identity; change with the backing source. */
16
33
  sourceKey: string;
17
- title?: React.ReactNode;
18
- backButton?: React.ReactNode;
34
+ /** Maximum submissions and workflows requested per page. */
19
35
  pageSize?: number;
20
- /** Whole native execution selected by the application route. */
21
- selectedRun: ThinkExecutionRun | null;
22
- /** Returns an application-authored TanStack Router Link for the run. */
23
- renderRunLink: (run: ThinkExecutionRun) => React.ReactElement;
24
- /**
25
- * Returns an application-authored TanStack Router Link back to the run
26
- * list. A selected run replaces the list — the workspace drill-in pattern —
27
- * so this link is the way back out.
28
- */
29
- renderRunsLink: () => React.ReactElement;
30
36
  }
31
37
  interface ThinkExecutionRunsData {
32
38
  submissions: readonly ThinkSubmissionInspection[];
@@ -48,20 +54,71 @@ declare function thinkExecutionRunsQueryOptions(source: AgentStub<Think>, source
48
54
  * not normalize execution records or own workflow authoring. Its first
49
55
  * uncached list read suspends to the consuming route's Suspense boundary.
50
56
  */
51
- declare function ThinkExecutionWorkbench({
52
- backButton,
53
- className,
57
+ declare function ThinkExecutionWorkbenchRoot({
54
58
  pageSize,
59
+ render,
55
60
  ref,
56
- renderRunLink,
57
- renderRunsLink,
58
- selectedRun,
59
61
  source,
60
62
  sourceKey,
61
- title,
62
63
  ...props
63
- }: ThinkExecutionWorkbenchProps & {
64
- ref?: React.Ref<HTMLDivElement>;
64
+ }: ThinkExecutionWorkbenchRootProps): React.JSX.Element;
65
+ /** Caller-authored toolbar; no title, navigation, or action is injected. */
66
+ declare function ThinkExecutionWorkbenchHeader({
67
+ className,
68
+ "aria-label": label,
69
+ ...props
70
+ }: Omit<React.ComponentProps<typeof AppTopBar.Root>, "aria-label"> & {
71
+ "aria-label"?: string;
65
72
  }): React.JSX.Element;
73
+ declare function ThinkExecutionWorkbenchContent({
74
+ render,
75
+ ref,
76
+ ...props
77
+ }: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
78
+ /** Refresh control retaining the complete AppTopBar button render/ref/event contract. */
79
+ declare function ThinkExecutionWorkbenchRefresh({
80
+ label,
81
+ ...props
82
+ }: Omit<React.ComponentProps<typeof AppTopBar.Button>, "label"> & {
83
+ label?: string;
84
+ }): React.JSX.Element;
85
+ declare function ThinkExecutionWorkbenchError({
86
+ className,
87
+ ...props
88
+ }: React.ComponentPropsWithRef<"div">): React.JSX.Element | null;
89
+ /** Controls for one whole native run; mount in a list row or a selected-run toolbar. */
90
+ declare function ThinkExecutionWorkbenchRunActions({
91
+ run
92
+ }: {
93
+ run: ThinkExecutionRun;
94
+ }): React.JSX.Element;
95
+ interface ThinkExecutionWorkbenchListProps extends Omit<React.ComponentPropsWithRef<"section">, "children"> {
96
+ /** Explicit row content; native execution identity and order come from the query. */
97
+ children: (run: ThinkExecutionRun) => React.ReactNode;
98
+ }
99
+ declare function ThinkExecutionWorkbenchList({
100
+ children,
101
+ className,
102
+ ...props
103
+ }: ThinkExecutionWorkbenchListProps): React.JSX.Element;
104
+ interface ThinkExecutionWorkbenchRunLinkProps extends Omit<React.ComponentProps<typeof NavigationLink>, "children"> {
105
+ run: ThinkExecutionRun;
106
+ }
107
+ declare function ThinkExecutionWorkbenchRunLink({
108
+ run,
109
+ className,
110
+ ...props
111
+ }: ThinkExecutionWorkbenchRunLinkProps): React.JSX.Element;
112
+ /** Native execution runtime with independently placed controls, rows, and route content. */
113
+ declare const ThinkExecutionWorkbench: {
114
+ Root: typeof ThinkExecutionWorkbenchRoot;
115
+ Header: typeof ThinkExecutionWorkbenchHeader;
116
+ Content: typeof ThinkExecutionWorkbenchContent;
117
+ Refresh: typeof ThinkExecutionWorkbenchRefresh;
118
+ Error: typeof ThinkExecutionWorkbenchError;
119
+ List: typeof ThinkExecutionWorkbenchList;
120
+ RunLink: typeof ThinkExecutionWorkbenchRunLink;
121
+ RunActions: typeof ThinkExecutionWorkbenchRunActions;
122
+ };
66
123
  //#endregion
67
- export { ThinkExecutionRunsData, ThinkExecutionRunsQueryKey, ThinkExecutionRunsQueryOptions, ThinkExecutionWorkbench, ThinkExecutionWorkbenchProps, thinkExecutionRunsQueryOptions };
124
+ export { ThinkExecutionRunsData, ThinkExecutionRunsQueryKey, ThinkExecutionRunsQueryOptions, ThinkExecutionWorkbench, ThinkExecutionWorkbenchListProps, ThinkExecutionWorkbenchRootProps, ThinkExecutionWorkbenchRunLinkProps, thinkExecutionRunsQueryOptions };
@@ -1,20 +1,25 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { H as RefreshIcon, et as WarningIcon, r as ArrowLeftIcon, y as EllipsisIcon } from "../../icons-cuEtsgj9.js";
2
+ import { H as RefreshIcon, et as WarningIcon, y as EllipsisIcon } from "../../icons-cuEtsgj9.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { a as formatErrorMessage } from "../../format-COCyV98Z.js";
6
- import { EmptyState } from "../foundations/EmptyState.js";
7
6
  import { Menu } from "../foundations/Menu.js";
7
+ import { EmptyState } from "../foundations/EmptyState.js";
8
8
  import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
9
9
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
10
10
  import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
11
11
  import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
12
- import { ThinkExecutionDetail } from "./ThinkExecutionDetail.js";
13
12
  import * as React from "react";
14
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
+ import { useRender } from "@base-ui/react/use-render";
15
+ import { mergeProps } from "@base-ui/react/merge-props";
15
16
  import { queryOptions, useMutation, useSuspenseQuery } from "@tanstack/react-query";
16
17
  //#region src/components/agents-sdk/ThinkExecutionWorkbench.tsx
17
18
  const executionPanelPageSize = 20;
19
+ const workbenchDefaults = {
20
+ className: "think-execution-workbench",
21
+ "data-recipe": "fill-host"
22
+ };
18
23
  function isSubmissionCancelable(status) {
19
24
  return status === "pending" || status === "running";
20
25
  }
@@ -117,11 +122,8 @@ function thinkExecutionRunsQueryOptions(source, sourceKey, pageSize = executionP
117
122
  * not normalize execution records or own workflow authoring. Its first
118
123
  * uncached list read suspends to the consuming route's Suspense boundary.
119
124
  */
120
- function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPanelPageSize, ref, renderRunLink, renderRunsLink, selectedRun, source, sourceKey, title = "Execution", ...props }) {
121
- const runsId = React.useId();
122
- const runsOptions = thinkExecutionRunsQueryOptions(source, sourceKey, pageSize);
123
- const runsQueryKey = thinkExecutionRunsScopeQueryKey(sourceKey);
124
- const runsQuery = useSuspenseQuery(runsOptions);
125
+ function ThinkExecutionWorkbenchRoot({ pageSize = executionPanelPageSize, render, ref, source, sourceKey, ...props }) {
126
+ const runsQuery = useSuspenseQuery(thinkExecutionRunsQueryOptions(source, sourceKey, pageSize));
125
127
  const actionMutation = useMutation({
126
128
  mutationFn: ({ action }) => action(),
127
129
  onSuccess: (_result, action, _onMutateResult, context) => context.client.invalidateQueries({ queryKey: action.runsQueryKey })
@@ -131,103 +133,158 @@ function ThinkExecutionWorkbench({ backButton, className, pageSize = executionPa
131
133
  const busyAction = actionIsPending ? currentAction.key : runsQuery.isFetching ? "refresh" : null;
132
134
  const error = currentAction && actionMutation.isError ? actionMutation.error : runsQuery.error;
133
135
  const runs = React.useMemo(() => [...runsQuery.data.submissions, ...runsQuery.data.workflows.workflows].sort((first, second) => Number(second.createdAt) - Number(first.createdAt)), [runsQuery.data]);
134
- const runAction = (key, action) => {
135
- actionMutation.mutate({
136
- action,
137
- key,
138
- runsQueryKey,
139
- source
140
- });
141
- };
142
- return /* @__PURE__ */ jsxs("div", {
136
+ const { mutate, reset } = actionMutation;
137
+ const { refetch } = runsQuery;
138
+ const busy = busyAction !== null;
139
+ const value = React.useMemo(() => ({
140
+ runs,
141
+ source,
142
+ actionIsPending,
143
+ busy,
144
+ error,
145
+ runAction: (key, action) => {
146
+ mutate({
147
+ action,
148
+ key,
149
+ runsQueryKey: thinkExecutionRunsScopeQueryKey(sourceKey),
150
+ source
151
+ });
152
+ },
153
+ refresh: () => {
154
+ reset();
155
+ refetch();
156
+ }
157
+ }), [
158
+ runs,
159
+ source,
160
+ sourceKey,
161
+ actionIsPending,
162
+ busy,
163
+ error,
164
+ mutate,
165
+ reset,
166
+ refetch
167
+ ]);
168
+ const element = useRender({
169
+ defaultTagName: "div",
170
+ render,
143
171
  ref,
144
- className: cx("think-execution-workbench", className),
145
- "data-recipe": "fill-host",
172
+ props: mergeProps(workbenchDefaults, props)
173
+ });
174
+ return /* @__PURE__ */ jsx(WorkbenchContext.Provider, {
175
+ value,
176
+ children: element
177
+ });
178
+ }
179
+ const WorkbenchContext = React.createContext(null);
180
+ function useWorkbench() {
181
+ const value = React.useContext(WorkbenchContext);
182
+ if (!value) throw new Error("ThinkExecutionWorkbench parts require ThinkExecutionWorkbench.Root.");
183
+ return value;
184
+ }
185
+ /** Caller-authored toolbar; no title, navigation, or action is injected. */
186
+ function ThinkExecutionWorkbenchHeader({ className, "aria-label": label = "Run controls", ...props }) {
187
+ return /* @__PURE__ */ jsx(AppTopBar.Root, {
188
+ titleAlign: "start",
189
+ "aria-label": label,
146
190
  ...props,
147
- children: [
148
- /* @__PURE__ */ jsxs(AppTopBar.Root, {
149
- className: "think-execution-workbench__header",
150
- titleAlign: "start",
151
- "aria-label": "Run controls",
152
- children: [
153
- /* @__PURE__ */ jsx(AppTopBar.Leading, { children: selectedRun ? /* @__PURE__ */ jsx(AppTopBar.Link, {
154
- label: "Back to runs",
155
- render: renderRunsLink(),
156
- children: /* @__PURE__ */ jsx(ArrowLeftIcon, { "aria-hidden": "true" })
157
- }) : backButton }),
158
- /* @__PURE__ */ jsx(AppTopBar.Title, { children: /* @__PURE__ */ jsx("h2", {
159
- className: "think-execution-workbench__title",
160
- children: title
161
- }) }),
162
- /* @__PURE__ */ jsxs(AppTopBar.Trailing, { children: [selectedRun ? /* @__PURE__ */ jsx(RunActions, {
163
- busy: actionIsPending,
164
- run: selectedRun,
165
- source,
166
- onAction: runAction
167
- }) : null, /* @__PURE__ */ jsx(AppTopBar.Button, {
168
- label: "Refresh runs",
169
- disabled: busyAction !== null,
170
- onClick: () => {
171
- actionMutation.reset();
172
- runsQuery.refetch();
173
- },
174
- children: /* @__PURE__ */ jsx(RefreshIcon, {})
175
- })] })
176
- ]
177
- }),
178
- error ? /* @__PURE__ */ jsxs("div", {
179
- className: "think-execution-workbench__error",
180
- role: "alert",
181
- children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: formatErrorMessage(error) })]
182
- }) : null,
183
- /* @__PURE__ */ jsx("div", {
184
- className: "think-execution-workbench__content",
185
- "aria-busy": busyAction !== null,
186
- children: selectedRun ? /* @__PURE__ */ jsx("section", {
187
- className: "think-execution-workbench__detail",
188
- "aria-label": "Run detail",
189
- children: /* @__PURE__ */ jsx(ThinkExecutionDetail, { run: selectedRun })
190
- }) : /* @__PURE__ */ jsxs("section", {
191
- className: "think-execution-workbench__run-list",
192
- "aria-labelledby": runsId,
193
- children: [/* @__PURE__ */ jsx("div", {
194
- className: "think-execution-workbench__list-header",
195
- children: /* @__PURE__ */ jsx("h3", {
196
- id: runsId,
197
- children: "Runs"
198
- })
199
- }), runs.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
200
- className: "think-execution-workbench__empty",
201
- description: "No runs yet."
202
- }) : /* @__PURE__ */ jsx("ul", {
203
- className: "think-execution-workbench__list",
204
- role: "list",
205
- children: runs.map((run) => {
206
- const id = getThinkExecutionRunId(run);
207
- const kind = isThinkSubmissionRun(run) ? "submission" : "workflow";
208
- return /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsx(NavigationLink, {
209
- render: renderRunLink(run),
210
- "data-slot": "button",
211
- className: buttonVariants({
212
- variant: "ghost",
213
- color: "neutral",
214
- size: "sm",
215
- className: "think-execution-workbench__run"
216
- }),
217
- "aria-label": getThinkExecutionRunAccessibleName(run),
218
- children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
219
- }), /* @__PURE__ */ jsx(RunActions, {
220
- busy: actionIsPending,
221
- run,
222
- source,
223
- onAction: runAction
224
- })] }, `${kind}:${id}`);
225
- })
226
- })]
227
- })
191
+ className: cx("think-execution-workbench__header", className)
192
+ });
193
+ }
194
+ function ThinkExecutionWorkbenchContent({ render, ref, ...props }) {
195
+ const { busy } = useWorkbench();
196
+ return useRender({
197
+ defaultTagName: "div",
198
+ render,
199
+ ref,
200
+ props: mergeProps({
201
+ className: "think-execution-workbench__content",
202
+ "aria-busy": busy
203
+ }, props)
204
+ });
205
+ }
206
+ /** Refresh control retaining the complete AppTopBar button render/ref/event contract. */
207
+ function ThinkExecutionWorkbenchRefresh({ label = "Refresh runs", ...props }) {
208
+ const { busy, refresh } = useWorkbench();
209
+ return /* @__PURE__ */ jsx(AppTopBar.Button, {
210
+ ...mergeProps({
211
+ label,
212
+ disabled: busy,
213
+ onClick: refresh,
214
+ children: /* @__PURE__ */ jsx(RefreshIcon, {})
215
+ }, {
216
+ ...props,
217
+ label
218
+ }),
219
+ disabled: busy || props.disabled
220
+ });
221
+ }
222
+ function ThinkExecutionWorkbenchError({ className, ...props }) {
223
+ const { error } = useWorkbench();
224
+ return error ? /* @__PURE__ */ jsxs("div", {
225
+ role: "alert",
226
+ ...props,
227
+ className: cx("think-execution-workbench__error", className),
228
+ children: [/* @__PURE__ */ jsx(WarningIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", { children: formatErrorMessage(error) })]
229
+ }) : null;
230
+ }
231
+ /** Controls for one whole native run; mount in a list row or a selected-run toolbar. */
232
+ function ThinkExecutionWorkbenchRunActions({ run }) {
233
+ const { source, actionIsPending, runAction } = useWorkbench();
234
+ return /* @__PURE__ */ jsx(RunActions, {
235
+ run,
236
+ source,
237
+ busy: actionIsPending,
238
+ onAction: runAction
239
+ });
240
+ }
241
+ function ThinkExecutionWorkbenchList({ children, className, ...props }) {
242
+ const { runs } = useWorkbench();
243
+ const runsId = React.useId();
244
+ return /* @__PURE__ */ jsxs("section", {
245
+ "aria-labelledby": runsId,
246
+ ...props,
247
+ className: cx("think-execution-workbench__run-list", className),
248
+ children: [/* @__PURE__ */ jsx("div", {
249
+ className: "think-execution-workbench__list-header",
250
+ children: /* @__PURE__ */ jsx("h3", {
251
+ id: runsId,
252
+ children: "Runs"
228
253
  })
229
- ]
254
+ }), runs.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
255
+ className: "think-execution-workbench__empty",
256
+ description: "No runs yet."
257
+ }) : /* @__PURE__ */ jsx("ul", {
258
+ className: "think-execution-workbench__list",
259
+ role: "list",
260
+ children: runs.map((run) => /* @__PURE__ */ jsx("li", { children: children(run) }, `${isThinkSubmissionRun(run) ? "submission" : "workflow"}:${getThinkExecutionRunId(run)}`))
261
+ })]
262
+ });
263
+ }
264
+ function ThinkExecutionWorkbenchRunLink({ run, className, ...props }) {
265
+ return /* @__PURE__ */ jsx(NavigationLink, {
266
+ "data-slot": "button",
267
+ "aria-label": getThinkExecutionRunAccessibleName(run),
268
+ ...props,
269
+ className: buttonVariants({
270
+ variant: "ghost",
271
+ color: "neutral",
272
+ size: "sm",
273
+ className: cx("think-execution-workbench__run", className)
274
+ }),
275
+ children: /* @__PURE__ */ jsx(ThinkExecutionRunSummary, { run })
230
276
  });
231
277
  }
278
+ /** Native execution runtime with independently placed controls, rows, and route content. */
279
+ const ThinkExecutionWorkbench = {
280
+ Root: ThinkExecutionWorkbenchRoot,
281
+ Header: ThinkExecutionWorkbenchHeader,
282
+ Content: ThinkExecutionWorkbenchContent,
283
+ Refresh: ThinkExecutionWorkbenchRefresh,
284
+ Error: ThinkExecutionWorkbenchError,
285
+ List: ThinkExecutionWorkbenchList,
286
+ RunLink: ThinkExecutionWorkbenchRunLink,
287
+ RunActions: ThinkExecutionWorkbenchRunActions
288
+ };
232
289
  //#endregion
233
290
  export { ThinkExecutionWorkbench, thinkExecutionRunsQueryOptions };
@@ -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-C_zHq9KZ.js";
9
- import { r as WorkspaceChangeSource } from "../../WorkspaceLive-DLGhtIly.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 { useAgent } from "agents/react";
14
- import { useAgentChat } from "@cloudflare/think/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 };