@mcp-b/react-components 0.40.0 → 0.42.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 (228) hide show
  1. package/dist/{AgentChat-CVO7xyLC.d.ts → AgentChat-DVr2giwD.d.ts} +1 -1
  2. package/dist/{AgentToolRunsContext-BCVqCtJ1.d.ts → AgentToolRunsContext-daY67hFM.d.ts} +12 -0
  3. package/dist/{CodeBlock-CWk1FVtm.js → CodeBlock-BjELA-_s.js} +1 -1
  4. package/dist/{FileTree-xqHYBw4g.js → FileTree-DMYRdT6R.js} +1 -1
  5. package/dist/McpConnectorForm-MRm1r59e.d.ts +39 -0
  6. package/dist/{Message-DBsHHhcM.d.ts → Message-D_vCVEGB.d.ts} +20 -1
  7. package/dist/{ThinkChatActivity-D6-_5Phw.d.ts → ThinkChatActivity-CsDql-ER.d.ts} +4 -1
  8. package/dist/{ThinkExecutionRun-lYYgyeE1.d.ts → ThinkExecutionRun-k8bpyXqt.d.ts} +3 -3
  9. package/dist/{WorkspaceFileView-Lab3om3F.js → WorkspaceFileView-DwdXiKku.js} +17 -22
  10. package/dist/{WorkspaceMessageResponse-Cy28WGSz.d.ts → WorkspaceMessageResponse-D66ty4FO.d.ts} +1 -1
  11. package/dist/components/agents-sdk/AgentActivity.js +4 -3
  12. package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
  13. package/dist/components/agents-sdk/AgentChat.js +42 -18
  14. package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +1 -1
  15. package/dist/components/agents-sdk/AgentToolRunsContext.js +12 -0
  16. package/dist/components/agents-sdk/BrowserLiveScreen.d.ts +135 -0
  17. package/dist/components/agents-sdk/BrowserLiveScreen.js +637 -0
  18. package/dist/components/agents-sdk/BrowserLiveView.d.ts +2 -2
  19. package/dist/components/agents-sdk/BrowserLiveView.js +6 -9
  20. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  21. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +1 -1
  22. package/dist/components/agents-sdk/BrowserRunPanel.js +8 -13
  23. package/dist/components/agents-sdk/ManagerOffice.d.ts +168 -0
  24. package/dist/components/agents-sdk/ManagerOffice.js +698 -0
  25. package/dist/components/agents-sdk/McpConnectionRequest.js +3 -3
  26. package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -38
  27. package/dist/components/agents-sdk/McpPluginCatalog.d.ts +8 -2
  28. package/dist/components/agents-sdk/McpPluginCatalog.js +82 -62
  29. package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
  30. package/dist/components/agents-sdk/McpServerPicker.js +2 -2
  31. package/dist/components/agents-sdk/ModelSelector.js +1 -1
  32. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  33. package/dist/components/agents-sdk/SubagentRunDetails.d.ts +1 -9
  34. package/dist/components/agents-sdk/SubagentRunDetails.js +1 -9
  35. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  36. package/dist/components/agents-sdk/SubagentRunSelector.d.ts +4 -2
  37. package/dist/components/agents-sdk/SubagentRunSelector.js +7 -6
  38. package/dist/components/agents-sdk/ThinkChat.d.ts +4 -4
  39. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  40. package/dist/components/agents-sdk/ThinkChatActivity.js +18 -4
  41. package/dist/components/agents-sdk/ThinkChatToolPanels.js +7 -3
  42. package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +1 -1
  43. package/dist/components/agents-sdk/ThinkExecutionDetail.js +45 -43
  44. package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
  45. package/dist/components/agents-sdk/ThinkExecutionRun.js +5 -6
  46. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
  47. package/dist/components/agents-sdk/ThinkExecutionStatus.js +8 -12
  48. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -1
  49. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +43 -37
  50. package/dist/components/agents-sdk/ThinkFullApp.d.ts +42 -78
  51. package/dist/components/agents-sdk/ThinkFullApp.js +121 -202
  52. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
  53. package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -1
  54. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
  55. package/dist/components/agents-sdk/ThinkRoutineDetail.js +4 -15
  56. package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
  57. package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +7 -6
  58. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +112 -140
  59. package/dist/components/agents-sdk/ThinkRoutineRuns.d.ts +1 -1
  60. package/dist/components/agents-sdk/ThinkRoutineRuns.js +3 -10
  61. package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -1
  62. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  63. package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -1
  64. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  65. package/dist/components/agents-sdk/WorkspaceHeader.js +2 -1
  66. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
  67. package/dist/components/agents-sdk/WorkspaceMountManager.js +11 -11
  68. package/dist/components/ai-sdk/Activity.js +1 -1
  69. package/dist/components/ai-sdk/AgentAttention.d.ts +1 -1
  70. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  71. package/dist/components/ai-sdk/Approval.js +1 -1
  72. package/dist/components/ai-sdk/Artifact.js +1 -1
  73. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  74. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  75. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  76. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  77. package/dist/components/ai-sdk/Conversation.js +1 -1
  78. package/dist/components/ai-sdk/Goal.js +1 -1
  79. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  80. package/dist/components/ai-sdk/Message.d.ts +2 -2
  81. package/dist/components/ai-sdk/Message.js +25 -3
  82. package/dist/components/ai-sdk/MessageScroller.js +3 -2
  83. package/dist/components/ai-sdk/MessageScrollerVirtual.js +2 -1
  84. package/dist/components/ai-sdk/Plan.js +1 -1
  85. package/dist/components/ai-sdk/PromptInput.js +21 -15
  86. package/dist/components/ai-sdk/Queue.d.ts +4 -4
  87. package/dist/components/ai-sdk/Queue.js +6 -15
  88. package/dist/components/ai-sdk/Reasoning.js +1 -1
  89. package/dist/components/ai-sdk/Sources.js +1 -1
  90. package/dist/components/ai-sdk/Task.d.ts +2 -2
  91. package/dist/components/ai-sdk/Task.js +2 -2
  92. package/dist/components/extension/ChatGptSignInScreen.js +2 -1
  93. package/dist/components/extension/CodexModelSelector.js +1 -1
  94. package/dist/components/extension/ConversationTabPicker.js +1 -1
  95. package/dist/components/foundations/Avatar.d.ts +1 -10
  96. package/dist/components/foundations/Avatar.js +1 -10
  97. package/dist/components/foundations/Checkbox.js +1 -1
  98. package/dist/components/foundations/CheckboxGroup.js +1 -0
  99. package/dist/components/foundations/ContextMenu.js +1 -1
  100. package/dist/components/foundations/LinkButton.d.ts +12 -10
  101. package/dist/components/foundations/LinkButton.js +15 -11
  102. package/dist/components/foundations/Menubar.js +1 -1
  103. package/dist/components/foundations/SearchField.js +1 -1
  104. package/dist/components/foundations/Select.js +1 -1
  105. package/dist/components/foundations/Stepper.js +1 -1
  106. package/dist/components/foundations/Toast.js +1 -1
  107. package/dist/components/foundations/ToggleGroup.d.ts +79 -1
  108. package/dist/components/foundations/icons.d.ts +2 -2
  109. package/dist/components/foundations/icons.js +2 -2
  110. package/dist/components/general-purpose/AppFrame.js +1 -0
  111. package/dist/components/general-purpose/AppTopBar.d.ts +6 -0
  112. package/dist/components/general-purpose/AppTopBar.js +2 -1
  113. package/dist/components/general-purpose/Commit.d.ts +2 -2
  114. package/dist/components/general-purpose/Commit.js +5 -13
  115. package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
  116. package/dist/components/general-purpose/EnvironmentVariables.js +4 -7
  117. package/dist/components/general-purpose/FileTree.js +1 -1
  118. package/dist/components/general-purpose/PricingBillingToggle.js +4 -9
  119. package/dist/components/general-purpose/PricingPlanCard.js +15 -14
  120. package/dist/components/general-purpose/ResizableSidePanel.d.ts +8 -0
  121. package/dist/components/general-purpose/ResizableSidePanel.js +3 -2
  122. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +105 -2
  123. package/dist/components/general-purpose/ResponsiveSidebarShell.js +112 -56
  124. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  125. package/dist/components/general-purpose/Terminal.d.ts +1 -1
  126. package/dist/components/general-purpose/Terminal.js +4 -12
  127. package/dist/components/general-purpose/TestResults.d.ts +1 -1
  128. package/dist/components/general-purpose/TestResults.js +8 -21
  129. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  130. package/dist/components/general-purpose/WebPreview.d.ts +4 -1
  131. package/dist/components/general-purpose/WebPreview.js +6 -14
  132. package/dist/components/nanites/AgentConnection.js +2 -2
  133. package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
  134. package/dist/components/nanites/AgentToolDetail.js +6 -5
  135. package/dist/components/nanites/NaniteScene.js +11 -11
  136. package/dist/{copy-button-Bc7jsYv_.js → copy-button-lys9N_aI.js} +1 -1
  137. package/dist/{icons-DwgNir1Q.d.ts → icons-0corjfxR.d.ts} +1 -16
  138. package/dist/{icons-MmIXciMO.js → icons-CVFSeTJn.js} +2 -5
  139. package/dist/styles/accordion.css +1 -0
  140. package/dist/styles/action-guide.css +8 -7
  141. package/dist/styles/activity-header.css +13 -39
  142. package/dist/styles/activity.css +40 -55
  143. package/dist/styles/agent-attention.css +19 -19
  144. package/dist/styles/agent-chat.css +94 -42
  145. package/dist/styles/agent-connection.css +10 -4
  146. package/dist/styles/agent-tool-detail.css +5 -15
  147. package/dist/styles/alert-dialog.css +4 -4
  148. package/dist/styles/app-frame.css +1 -3
  149. package/dist/styles/app-icon.css +12 -18
  150. package/dist/styles/app-top-bar.css +31 -9
  151. package/dist/styles/approval.css +1 -0
  152. package/dist/styles/artifact.css +6 -6
  153. package/dist/styles/attachment-preview.css +5 -4
  154. package/dist/styles/avatar.css +6 -22
  155. package/dist/styles/base.css +2 -8
  156. package/dist/styles/browser-live-screen.css +38 -0
  157. package/dist/styles/browser-live-view.css +12 -4
  158. package/dist/styles/browser-replay.css +6 -6
  159. package/dist/styles/browser-run-panel.css +21 -18
  160. package/dist/styles/button.css +15 -6
  161. package/dist/styles/card.css +5 -5
  162. package/dist/styles/chatgpt-sign-in-screen.css +6 -6
  163. package/dist/styles/code-block.css +14 -13
  164. package/dist/styles/codex-model-selector.css +2 -0
  165. package/dist/styles/collapsible.css +1 -0
  166. package/dist/styles/commit.css +30 -7
  167. package/dist/styles/context.css +9 -9
  168. package/dist/styles/conversation-tab-picker.css +1 -1
  169. package/dist/styles/conversation.css +6 -8
  170. package/dist/styles/dialog.css +4 -4
  171. package/dist/styles/empty-state.css +3 -3
  172. package/dist/styles/environment-variables.css +12 -9
  173. package/dist/styles/field.css +2 -1
  174. package/dist/styles/fieldset.css +2 -2
  175. package/dist/styles/index.css +8 -7
  176. package/dist/styles/manager-office.css +480 -0
  177. package/dist/styles/mcp-plugin-catalog.css +44 -39
  178. package/dist/styles/mcp-server-picker.css +4 -4
  179. package/dist/styles/message-scroller.css +9 -11
  180. package/dist/styles/message.css +74 -28
  181. package/dist/styles/nanite-scene.css +9 -9
  182. package/dist/styles/navigation-menu.css +1 -0
  183. package/dist/styles/plan.css +13 -12
  184. package/dist/styles/pricing-page.css +37 -30
  185. package/dist/styles/prompt-input.css +26 -18
  186. package/dist/styles/queue.css +1 -0
  187. package/dist/styles/reasoning.css +1 -9
  188. package/dist/styles/recipes.css +29 -58
  189. package/dist/styles/responsive-sidebar-shell.css +107 -29
  190. package/dist/styles/separator.css +5 -5
  191. package/dist/styles/sources.css +4 -4
  192. package/dist/styles/stepper.css +1 -0
  193. package/dist/styles/streamdown.css +31 -21
  194. package/dist/styles/subagent-run.css +20 -3
  195. package/dist/styles/tabs.css +1 -0
  196. package/dist/styles/task.css +5 -17
  197. package/dist/styles/terminal.css +29 -10
  198. package/dist/styles/test-results.css +16 -7
  199. package/dist/styles/think-execution-status.css +10 -26
  200. package/dist/styles/think-execution-workbench.css +98 -108
  201. package/dist/styles/think-full-app.css +75 -225
  202. package/dist/styles/think-routine-library.css +26 -95
  203. package/dist/styles/think-thread-picker.css +17 -12
  204. package/dist/styles/transition-surface.css +7 -8
  205. package/dist/styles/utilities.css +75 -0
  206. package/dist/styles/web-preview.css +46 -22
  207. package/dist/styles/workspace-explorer.css +22 -44
  208. package/dist/styles/workspace-mount-manager.css +24 -2
  209. package/dist/utils/favicon.d.ts +6 -1
  210. package/dist/utils/favicon.js +18 -1
  211. package/package.json +37 -35
  212. package/dist/ResponsiveSidebarShell-DWjULskY.d.ts +0 -68
  213. package/dist/ToggleGroup-_pQMyHGM.d.ts +0 -80
  214. package/dist/components/agents-sdk/AgentActivityPreview.d.ts +0 -46
  215. package/dist/components/agents-sdk/AgentActivityPreview.js +0 -93
  216. package/dist/components/agents-sdk/ThinkThreadShell.d.ts +0 -38
  217. package/dist/components/agents-sdk/ThinkThreadShell.js +0 -27
  218. package/dist/components/foundations/Badge.d.ts +0 -62
  219. package/dist/components/foundations/Badge.js +0 -55
  220. package/dist/components/foundations/StatusPill.d.ts +0 -43
  221. package/dist/components/foundations/StatusPill.js +0 -35
  222. package/dist/components/general-purpose/Shell.d.ts +0 -149
  223. package/dist/components/general-purpose/Shell.js +0 -116
  224. package/dist/styles/agent-activity-preview-overlay.css +0 -169
  225. package/dist/styles/agent-activity-preview.css +0 -209
  226. package/dist/styles/badge.css +0 -120
  227. package/dist/styles/shell.css +0 -122
  228. package/dist/styles/status-pill.css +0 -39
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { M as McpIcon, Y as SpinnerIcon, d as CheckIcon, nt as WarningIcon } from "../../icons-MmIXciMO.js";
2
+ import { $ as WarningIcon, K as SpinnerIcon, d as CheckIcon, k as McpIcon } from "../../icons-CVFSeTJn.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { AgentAttention, AgentAttentionActions, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
5
5
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
@@ -78,7 +78,7 @@ function McpConnectionRequestContent({ part, server, reason, mcp: _mcp, serverId
78
78
  className: cx("mcp-connection-request", "mcp-connection-request--settled", className),
79
79
  "data-state": failed ? "failed" : declined ? "declined" : "connected",
80
80
  role: failed ? "alert" : "status",
81
- tone: failed ? "warning" : "neutral",
81
+ tone: failed ? "attention" : "neutral",
82
82
  children: [/* @__PURE__ */ jsx(AgentAttentionHeader, {
83
83
  icon: failed ? /* @__PURE__ */ jsx(WarningIcon, {}) : outcome === "connected" ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(McpIcon, {}),
84
84
  title: failed ? `Couldn’t connect ${server.name}` : declined ? `Skipped connecting ${server.name}` : outcome === "connected" ? `Connected to ${server.name}` : `Connection request completed for ${server.name}`
@@ -99,7 +99,7 @@ function McpConnectionRequestContent({ part, server, reason, mcp: _mcp, serverId
99
99
  className: cx("mcp-connection-request", className),
100
100
  "data-state": authorizationFailed ? "failed" : serverState ?? (preparing ? "preparing" : authorizing ? "authenticating" : "idle"),
101
101
  role: authorizationFailed ? "alert" : "status",
102
- tone: connectionError ? "warning" : "neutral",
102
+ tone: connectionError ? "attention" : "neutral",
103
103
  children: [
104
104
  /* @__PURE__ */ jsx(AgentAttentionHeader, {
105
105
  description,
@@ -1,39 +1,2 @@
1
- import { d as McpServerSetupAuthFieldName, l as McpServerSetupAuth } from "../../mcp-server-catalog-CCj2ItkV.js";
2
- import * as React from "react";
3
-
4
- //#region src/components/agents-sdk/McpConnectorForm.d.ts
5
- type CredentialFieldName = Exclude<McpServerSetupAuthFieldName, "redirectUrl">;
6
- type McpConnectorFormValues = Readonly<Partial<Record<CredentialFieldName, string>> & {
7
- readonly name: string;
8
- readonly url: string;
9
- }>;
10
- type McpConnectorFormProps = Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit" | "status"> & {
11
- /** Authentication metadata that decides which credential fields render. */readonly auth?: McpServerSetupAuth; /** Initial connector values. Publisher client credentials remain app-owned. */
12
- readonly defaults?: Partial<McpConnectorFormValues>; /** Optional pattern used to validate the MCP name field. */
13
- readonly namePattern?: string; /** Keep a catalog-owned MCP name and URL visible but immutable. */
14
- readonly readOnlyServer?: boolean; /** Read-only redirect URL shown for manual OAuth client setup. */
15
- readonly redirectUrl?: string; /** Inline connection status announced politely to assistive tech. */
16
- readonly status?: React.ReactNode; /** Label for the submit button. */
17
- readonly submitLabel?: string; /** Label shown while submit is pending. */
18
- readonly submittingLabel?: string; /** Called with normalized connector values after native form validation passes. */
19
- readonly onSubmit: (values: McpConnectorFormValues) => void | Promise<void>;
20
- };
21
- /** Collects MCP connector settings and optional credentials with native form validation. */
22
- declare function McpConnectorForm({
23
- auth,
24
- className,
25
- defaults,
26
- namePattern,
27
- readOnlyServer,
28
- redirectUrl,
29
- status,
30
- submitLabel,
31
- submittingLabel,
32
- onSubmit,
33
- ref,
34
- ...props
35
- }: McpConnectorFormProps & {
36
- ref?: React.Ref<HTMLFormElement>;
37
- }): React.JSX.Element;
38
- //#endregion
1
+ import { n as McpConnectorFormProps, r as McpConnectorFormValues, t as McpConnectorForm } from "../../McpConnectorForm-MRm1r59e.js";
39
2
  export { McpConnectorForm, McpConnectorFormProps, McpConnectorFormValues };
@@ -1,4 +1,5 @@
1
1
  import { o as McpServerCard } from "../../mcp-server-catalog-CCj2ItkV.js";
2
+ import { r as McpConnectorFormValues } from "../../McpConnectorForm-MRm1r59e.js";
2
3
  import { l as DialogProps } from "../../Dialog-B_FhRWaz.js";
3
4
  import * as React from "react";
4
5
  import { MCPServersState } from "agents";
@@ -31,8 +32,13 @@ interface McpPluginCatalogProps extends Omit<React.HTMLAttributes<HTMLElement>,
31
32
  onConnect?: (server: McpServerCard) => void | Promise<void>;
32
33
  /** Removes the exact upstream MCP entry. */
33
34
  onDisconnect?: (serverId: string) => void | Promise<void>;
35
+ /**
36
+ * Connects a user-supplied MCP server. Providing it puts the "Custom
37
+ * plugin" action in the bar, opening the shared connector setup dialog.
38
+ */
39
+ onAddCustom?: (values: McpConnectorFormValues) => void | Promise<void>;
40
+ /** Accessible name only — the hosting tab or icon is the visible title. */
34
41
  heading?: React.ReactNode;
35
- description?: React.ReactNode;
36
42
  searchLabel?: string;
37
43
  emptyMessage?: React.ReactNode;
38
44
  }
@@ -63,8 +69,8 @@ declare function McpPluginCatalog({
63
69
  disclosure,
64
70
  onConnect,
65
71
  onDisconnect,
72
+ onAddCustom,
66
73
  heading,
67
- description,
68
74
  searchLabel,
69
75
  emptyMessage,
70
76
  className,
@@ -1,5 +1,6 @@
1
+ import { CUSTOM_MCP_SERVER_CARD } from "../../utils/mcp-server-catalog.js";
1
2
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { U as PlusIcon, Y as SpinnerIcon, b as EllipsisIcon, it as XIcon, nt as WarningIcon, o as ArrowUpRightIcon } from "../../icons-MmIXciMO.js";
3
+ import { $ as WarningIcon, B as PlusIcon, K as SpinnerIcon, o as ArrowUpRightIcon, tt as XIcon, y as EllipsisIcon } from "../../icons-CVFSeTJn.js";
3
4
  import { Button } from "../foundations/Button.js";
4
5
  import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
5
6
  import { IconButton } from "../foundations/IconButton.js";
@@ -9,6 +10,7 @@ import { Separator } from "../foundations/Separator.js";
9
10
  import { AppIcon } from "../foundations/AppIcon.js";
10
11
  import { SearchField } from "../foundations/SearchField.js";
11
12
  import { n as getMcpServerProjection, t as McpServerIcon } from "../../mcp-server-SD_S-IpB.js";
13
+ import { McpServerSetupDialog } from "./McpServerPicker.js";
12
14
  import * as React from "react";
13
15
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
16
  //#region src/components/agents-sdk/McpPluginCatalog.tsx
@@ -17,8 +19,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
19
  * state as {@link McpServerPicker}. Selecting a row opens the shared details
18
20
  * dialog; connecting still delegates to the host's existing MCP/OAuth path.
19
21
  */
20
- function McpPluginCatalog({ servers, mcp, detailsByServerId, featuredServerIds = [], brandName, brandLogo, disclosure, onConnect, onDisconnect, heading = "Plugins", description = "Work with your AI across your favorite tools.", searchLabel = "Search plugins", emptyMessage = "No plugins found.", className, ...props }) {
22
+ function McpPluginCatalog({ servers, mcp, detailsByServerId, featuredServerIds = [], brandName, brandLogo, disclosure, onConnect, onDisconnect, onAddCustom, heading = "Plugins", searchLabel = "Search plugins", emptyMessage = "No plugins found.", className, ...props }) {
21
23
  const [query, setQuery] = React.useState("");
24
+ const [customSetupOpen, setCustomSetupOpen] = React.useState(false);
22
25
  const [selectedServer, setSelectedServer] = React.useState(null);
23
26
  const headingIdPrefix = React.useId();
24
27
  const sections = groupServers(filterServers(servers, detailsByServerId, query), featuredServerIds, query);
@@ -27,72 +30,79 @@ function McpPluginCatalog({ servers, mcp, detailsByServerId, featuredServerIds =
27
30
  className: cx("mcp-plugin-catalog", className),
28
31
  ...props,
29
32
  children: [
30
- /* @__PURE__ */ jsxs("div", {
33
+ /* @__PURE__ */ jsxs("header", {
31
34
  className: "mcp-plugin-catalog__header",
32
- children: [/* @__PURE__ */ jsxs("div", {
33
- className: "mcp-plugin-catalog__heading-copy",
34
- children: [/* @__PURE__ */ jsx("h1", {
35
- className: "mcp-plugin-catalog__heading",
36
- children: heading
37
- }), description ? /* @__PURE__ */ jsx("p", {
38
- className: "mcp-plugin-catalog__description",
39
- children: description
40
- }) : null]
41
- }), /* @__PURE__ */ jsxs(SearchField.Root, {
42
- className: "mcp-plugin-catalog__search",
43
- children: [/* @__PURE__ */ jsx(SearchField.Label, {
35
+ children: [
36
+ /* @__PURE__ */ jsx("h1", {
44
37
  className: "sigvelo-visually-hidden",
45
- children: searchLabel
46
- }), /* @__PURE__ */ jsx(SearchField.Control, {
47
- "aria-label": searchLabel,
48
- placeholder: searchLabel,
49
- value: query,
50
- onChange: (event) => setQuery(event.target.value)
51
- })]
52
- })]
53
- }),
54
- installedServers.length ? /* @__PURE__ */ jsxs("section", {
55
- "aria-labelledby": `${headingIdPrefix}-installed-heading`,
56
- className: "mcp-plugin-catalog__installed",
57
- children: [/* @__PURE__ */ jsx("h2", {
58
- id: `${headingIdPrefix}-installed-heading`,
59
- className: "mcp-plugin-catalog__section-heading",
60
- children: "Installed"
61
- }), /* @__PURE__ */ jsx("ul", {
62
- className: "mcp-plugin-catalog__installed-list",
63
- children: installedServers.map((server) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(IconButton, {
38
+ children: heading
39
+ }),
40
+ /* @__PURE__ */ jsxs(SearchField.Root, {
41
+ className: "mcp-plugin-catalog__search",
42
+ children: [/* @__PURE__ */ jsx(SearchField.Label, {
43
+ className: "sigvelo-visually-hidden",
44
+ children: searchLabel
45
+ }), /* @__PURE__ */ jsx(SearchField.Control, {
46
+ "aria-label": searchLabel,
47
+ placeholder: searchLabel,
48
+ value: query,
49
+ onChange: (event) => setQuery(event.target.value)
50
+ })]
51
+ }),
52
+ onAddCustom ? /* @__PURE__ */ jsxs(Button, {
53
+ className: "mcp-plugin-catalog__add-custom",
64
54
  color: "neutral",
65
- label: `Open installed ${server.name}`,
66
- size: "xl",
67
- tooltipSide: "bottom",
55
+ size: "sm",
68
56
  variant: "ghost",
69
- onClick: () => setSelectedServer(server),
70
- children: /* @__PURE__ */ jsx(McpServerIcon, { server })
71
- }) }, `${server.id}:${server.url}`))
72
- })]
73
- }) : null,
74
- sections.length === 0 ? /* @__PURE__ */ jsx("p", {
75
- className: "mcp-plugin-catalog__empty",
76
- children: emptyMessage
77
- }) : /* @__PURE__ */ jsx("div", {
78
- className: "mcp-plugin-catalog__sections",
79
- children: sections.map((section) => /* @__PURE__ */ jsxs("section", {
80
- "aria-labelledby": `${headingIdPrefix}-${section.id}-heading`,
81
- className: "mcp-plugin-catalog__section",
57
+ onClick: () => setCustomSetupOpen(true),
58
+ children: [/* @__PURE__ */ jsx(PlusIcon, {}), "Custom plugin"]
59
+ }) : null
60
+ ]
61
+ }),
62
+ /* @__PURE__ */ jsxs("div", {
63
+ className: "mcp-plugin-catalog__body",
64
+ children: [installedServers.length ? /* @__PURE__ */ jsxs("section", {
65
+ "aria-labelledby": `${headingIdPrefix}-installed-heading`,
66
+ className: "mcp-plugin-catalog__installed",
82
67
  children: [/* @__PURE__ */ jsx("h2", {
83
- id: `${headingIdPrefix}-${section.id}-heading`,
68
+ id: `${headingIdPrefix}-installed-heading`,
84
69
  className: "mcp-plugin-catalog__section-heading",
85
- children: section.label
70
+ children: "Installed"
86
71
  }), /* @__PURE__ */ jsx("ul", {
87
- className: "mcp-plugin-catalog__list",
88
- children: section.servers.map((server) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(McpPluginCard, {
89
- server,
90
- details: detailsByServerId?.[server.id],
91
- mcp,
92
- onSelect: () => setSelectedServer(server)
72
+ className: "mcp-plugin-catalog__installed-list",
73
+ children: installedServers.map((server) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(IconButton, {
74
+ color: "neutral",
75
+ label: `Open installed ${server.name}`,
76
+ size: "xl",
77
+ tooltipSide: "bottom",
78
+ variant: "ghost",
79
+ onClick: () => setSelectedServer(server),
80
+ children: /* @__PURE__ */ jsx(McpServerIcon, { server })
93
81
  }) }, `${server.id}:${server.url}`))
94
82
  })]
95
- }, section.id))
83
+ }) : null, sections.length === 0 ? /* @__PURE__ */ jsx("p", {
84
+ className: "mcp-plugin-catalog__empty",
85
+ children: emptyMessage
86
+ }) : /* @__PURE__ */ jsx("div", {
87
+ className: "mcp-plugin-catalog__sections",
88
+ children: sections.map((section) => /* @__PURE__ */ jsxs("section", {
89
+ "aria-labelledby": `${headingIdPrefix}-${section.id}-heading`,
90
+ className: "mcp-plugin-catalog__section",
91
+ children: [/* @__PURE__ */ jsx("h2", {
92
+ id: `${headingIdPrefix}-${section.id}-heading`,
93
+ className: "mcp-plugin-catalog__section-heading",
94
+ children: section.label
95
+ }), /* @__PURE__ */ jsx("ul", {
96
+ className: "mcp-plugin-catalog__list",
97
+ children: section.servers.map((server) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(McpPluginCard, {
98
+ server,
99
+ details: detailsByServerId?.[server.id],
100
+ mcp,
101
+ onSelect: () => setSelectedServer(server)
102
+ }) }, `${server.id}:${server.url}`))
103
+ })]
104
+ }, section.id))
105
+ })]
96
106
  }),
97
107
  /* @__PURE__ */ jsx(McpPluginDetailsDialog, {
98
108
  details: selectedServer ? detailsByServerId?.[selectedServer.id] : void 0,
@@ -104,14 +114,24 @@ function McpPluginCatalog({ servers, mcp, detailsByServerId, featuredServerIds =
104
114
  onConnect,
105
115
  onDisconnect,
106
116
  onOpenChange: (open) => !open && setSelectedServer(null)
107
- })
117
+ }),
118
+ onAddCustom ? /* @__PURE__ */ jsx(McpServerSetupDialog, {
119
+ server: customSetupOpen ? CUSTOM_MCP_SERVER_CARD : null,
120
+ onOpenChange: setCustomSetupOpen,
121
+ onSubmit: async (values) => {
122
+ await onAddCustom(values);
123
+ setCustomSetupOpen(false);
124
+ }
125
+ }) : null
108
126
  ]
109
127
  });
110
128
  }
111
129
  /** Reference-derived plugin detail surface without a parallel install state. */
112
130
  function McpPluginDetailsDialog({ server, details, mcp, brandName = "your AI", brandLogo = /* @__PURE__ */ jsx("img", {
113
131
  alt: "",
114
- src: new URL("../../assets/think-browser-host.png", import.meta.url).href
132
+ src: new URL("../../assets/think-browser-host.png", import.meta.url).href,
133
+ width: 128,
134
+ height: 128
115
135
  }), disclosure = /* @__PURE__ */ jsxs(Fragment, { children: [
116
136
  /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: "You're in control." }), " This plugin is limited to the account and permissions you approve, and you can disconnect it at any time."] }),
117
137
  /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: "Plugins may introduce elevated risk." }), " Only connect tools you trust. A compromised plugin could use its access to read or change data in the connected service."] }),
@@ -250,7 +270,7 @@ function McpPluginDialogActions({ projection, server, onConnect, onDisconnect })
250
270
  }
251
271
  return /* @__PURE__ */ jsxs(Fragment, { children: [action.error ? /* @__PURE__ */ jsxs(AgentAttention, {
252
272
  role: "alert",
253
- tone: "warning",
273
+ tone: "attention",
254
274
  children: [/* @__PURE__ */ jsx(AgentAttentionHeader, {
255
275
  icon: /* @__PURE__ */ jsx(WarningIcon, {}),
256
276
  title: disconnect ? "Disconnect failed" : "Connection failed"
@@ -1,6 +1,6 @@
1
1
  import { s as MenuItemProps, t as Menu } from "../../Menu-yb6QXWA3.js";
2
2
  import { o as McpServerCard } from "../../mcp-server-catalog-CCj2ItkV.js";
3
- import { McpConnectorFormProps } from "./McpConnectorForm.js";
3
+ import { n as McpConnectorFormProps } from "../../McpConnectorForm-MRm1r59e.js";
4
4
  import { l as DialogProps } from "../../Dialog-B_FhRWaz.js";
5
5
  import * as React from "react";
6
6
  import { MCPServersState } from "agents";
@@ -1,5 +1,5 @@
1
1
  import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
2
- import { F as MinusIcon, Y as SpinnerIcon, d as CheckIcon, nt as WarningIcon } from "../../icons-MmIXciMO.js";
2
+ import { $ as WarningIcon, K as SpinnerIcon, M as MinusIcon, d as CheckIcon } from "../../icons-CVFSeTJn.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
4
  import { Menu } from "../foundations/Menu.js";
5
5
  import { Dialog } from "../foundations/Dialog.js";
@@ -29,7 +29,7 @@ function McpServerSetupDialog({ server, defaults, onOpenChange, onSubmit, redire
29
29
  open: server !== null,
30
30
  onOpenChange,
31
31
  children: /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {}), /* @__PURE__ */ jsx(Dialog.Viewport, { children: /* @__PURE__ */ jsxs(Dialog.Popup, { children: [
32
- /* @__PURE__ */ jsxs(Dialog.Header, { children: [/* @__PURE__ */ jsx(Dialog.Title, { children: server ? `${server.name} MCP` : "MCP connectors" }), /* @__PURE__ */ jsx(Dialog.Description, { children: server?.manualSetup?.description ?? "Connect a remote MCP server the model can call." })] }),
32
+ /* @__PURE__ */ jsxs(Dialog.Header, { children: [/* @__PURE__ */ jsx(Dialog.Title, { children: server ? server.name.endsWith("MCP") ? server.name : `${server.name} MCP` : "MCP connectors" }), /* @__PURE__ */ jsx(Dialog.Description, { children: server?.manualSetup?.description ?? "Connect a remote MCP server the model can call." })] }),
33
33
  server?.manualSetup?.links.length ? /* @__PURE__ */ jsx("div", {
34
34
  className: "mcp-server-setup-dialog__links",
35
35
  children: server.manualSetup.links.map((link) => /* @__PURE__ */ jsx("a", {
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { K as SearchIcon, f as ChevronDownIcon } from "../../icons-MmIXciMO.js";
2
+ import { U as SearchIcon, f as ChevronDownIcon } from "../../icons-CVFSeTJn.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { Autocomplete } from "../foundations/Autocomplete.js";
5
5
  import { Dialog } from "../foundations/Dialog.js";
@@ -1,4 +1,4 @@
1
- import { M as McpIcon, c as BoxIcon } from "../../icons-MmIXciMO.js";
1
+ import { c as BoxIcon, k as McpIcon } from "../../icons-CVFSeTJn.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/agents-sdk/PromptInputCommands.tsx
4
4
  /** Project whole upstream Agents MCP state into composer mention commands. */
@@ -16,14 +16,6 @@ declare function SubagentRunProgress({
16
16
  }: SubagentRunProgressProps & {
17
17
  ref?: React.Ref<HTMLDivElement>;
18
18
  }): React.JSX.Element;
19
- interface SubagentRunActionsProps extends React.HTMLAttributes<HTMLDivElement> {}
20
- declare function SubagentRunActions({
21
- className,
22
- ref,
23
- ...props
24
- }: SubagentRunActionsProps & {
25
- ref?: React.Ref<HTMLDivElement>;
26
- }): React.JSX.Element;
27
19
  interface SubagentRunMilestonesProps extends React.OlHTMLAttributes<HTMLOListElement> {}
28
20
  declare function SubagentRunMilestones({
29
21
  className,
@@ -41,4 +33,4 @@ declare function SubagentRunMilestone({
41
33
  ref?: React.Ref<HTMLLIElement>;
42
34
  }): React.JSX.Element;
43
35
  //#endregion
44
- export { SubagentRunActions, SubagentRunActionsProps, SubagentRunMilestone, SubagentRunMilestoneProps, SubagentRunMilestones, SubagentRunMilestonesProps, SubagentRunProgress, SubagentRunProgressProps };
36
+ export { SubagentRunMilestone, SubagentRunMilestoneProps, SubagentRunMilestones, SubagentRunMilestonesProps, SubagentRunProgress, SubagentRunProgressProps };
@@ -22,14 +22,6 @@ function SubagentRunProgress({ className, label, value, ref, ...props }) {
22
22
  })]
23
23
  });
24
24
  }
25
- function SubagentRunActions({ className, ref, ...props }) {
26
- return /* @__PURE__ */ jsx("div", {
27
- ref,
28
- "data-slot": "subagent-run-actions",
29
- className: cx("subagent-run__actions", className),
30
- ...props
31
- });
32
- }
33
25
  function SubagentRunMilestones({ className, ref, ...props }) {
34
26
  return /* @__PURE__ */ jsx("ol", {
35
27
  ref,
@@ -47,4 +39,4 @@ function SubagentRunMilestone({ className, ref, ...props }) {
47
39
  });
48
40
  }
49
41
  //#endregion
50
- export { SubagentRunActions, SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress };
42
+ export { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress };
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { Y as SpinnerIcon, Z as StopIcon, d as CheckIcon, nt as WarningIcon } from "../../icons-MmIXciMO.js";
2
+ import { $ as WarningIcon, J as StopIcon, K as SpinnerIcon, d as CheckIcon } from "../../icons-CVFSeTJn.js";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/agents-sdk/SubagentRunIndicator.tsx
@@ -16,8 +16,10 @@ interface SubagentRunSelectorProps<Part extends AgentToolRunPart = UIMessage["pa
16
16
  *
17
17
  * The component consumes `AgentToolRunState` whole and derives its label and
18
18
  * status from upstream fields. The application-authored Link routes
19
- * `run.subAgent` into an adjacent detail surface; this component never invents
20
- * a second transcript or expands child content inline.
19
+ * `run.subAgent` to a run surface that replaces the conversation — the
20
+ * workspace drill-in pattern with the top bar's back link as the way out;
21
+ * this component never invents a second transcript or expands child content
22
+ * inline.
21
23
  */
22
24
  declare function SubagentRunSelector<Part extends AgentToolRunPart = UIMessage["parts"][number]>({
23
25
  className,
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { l as BrainIcon } from "../../icons-MmIXciMO.js";
3
2
  import { buttonVariants } from "../foundations/Button.js";
4
3
  import { Tooltip } from "../foundations/Tooltip.js";
5
4
  import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
5
+ import { NaniteMark } from "../nanites/NaniteScene.js";
6
6
  import { SubagentRunIndicator, getSubagentRunName, getSubagentRunTooltip } from "./SubagentRunIndicator.js";
7
7
  import "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -12,8 +12,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
12
12
  *
13
13
  * The component consumes `AgentToolRunState` whole and derives its label and
14
14
  * status from upstream fields. The application-authored Link routes
15
- * `run.subAgent` into an adjacent detail surface; this component never invents
16
- * a second transcript or expands child content inline.
15
+ * `run.subAgent` to a run surface that replaces the conversation — the
16
+ * workspace drill-in pattern with the top bar's back link as the way out;
17
+ * this component never invents a second transcript or expands child content
18
+ * inline.
17
19
  */
18
20
  function SubagentRunSelector({ className, render, run, tooltip, ref, "aria-label": ariaLabel, ...props }) {
19
21
  const name = getSubagentRunName(run);
@@ -21,16 +23,15 @@ function SubagentRunSelector({ className, render, run, tooltip, ref, "aria-label
21
23
  ref,
22
24
  render,
23
25
  "data-slot": "subagent-run-selector",
24
- "data-run-status": run.status,
25
26
  className: cx(buttonVariants({
26
- variant: "outline",
27
+ variant: "ghost",
27
28
  color: "neutral",
28
29
  size: "sm"
29
30
  }), "subagent-run__selector", className),
30
31
  "aria-label": ariaLabel ?? `Open ${name}, ${run.status}`,
31
32
  ...props,
32
33
  children: [
33
- /* @__PURE__ */ jsx(BrainIcon, { "aria-hidden": "true" }),
34
+ /* @__PURE__ */ jsx(NaniteMark, { index: run.order }),
34
35
  /* @__PURE__ */ jsx("span", {
35
36
  className: "subagent-run__title sigvelo-truncate",
36
37
  children: name
@@ -1,12 +1,12 @@
1
1
  import { i as AgentMessageRenderPartContext } from "../../AgentMessageParts-C7L-Mv9U.js";
2
2
  import { K as PromptInputMessage } from "../../PromptInput-BRX7FhjH.js";
3
- import { r as AgentChatProps } from "../../AgentChat-CVO7xyLC.js";
4
- import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-BCVqCtJ1.js";
3
+ import { r as AgentChatProps } from "../../AgentChat-DVr2giwD.js";
4
+ import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-daY67hFM.js";
5
5
  import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
6
- import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-D6-_5Phw.js";
6
+ import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-CsDql-ER.js";
7
7
  import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
8
8
  import { t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
9
- import { n as WorkspaceHtmlArtifactRenderer } from "../../WorkspaceMessageResponse-Cy28WGSz.js";
9
+ import { n as WorkspaceHtmlArtifactRenderer } from "../../WorkspaceMessageResponse-D66ty4FO.js";
10
10
  import * as React from "react";
11
11
  import { UIMessage } from "ai";
12
12
  import { UseAgentOptions } from "agents/react";
@@ -1,2 +1,2 @@
1
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-D6-_5Phw.js";
1
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-CsDql-ER.js";
2
2
  export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, renderThinkChatActivityPart };
@@ -32,7 +32,7 @@ function activityPartIcon(part) {
32
32
  * thousands-of-tools run expandable.
33
33
  */
34
34
  const VISIBLE_STEP_LIMIT = 100;
35
- function ThinkChatActivity({ parts, defaultOpen, isStreaming, toolRenderers, stateKey }) {
35
+ function ThinkChatActivity({ parts, defaultOpen, isStreaming, toolRenderers, settledAction, stateKey }) {
36
36
  const steps = parts.flatMap((part, index) => {
37
37
  const description = describeThinkChatActivityPart(part, toolRenderers);
38
38
  if (!description) return [];
@@ -59,8 +59,8 @@ function ThinkChatActivity({ parts, defaultOpen, isStreaming, toolRenderers, sta
59
59
  stateKey: scope,
60
60
  children: [/* @__PURE__ */ jsx(ActivityTrigger, {
61
61
  icon: header.url ? /* @__PURE__ */ jsx(AgentActivityFavicon, { url: header.url }) : /* @__PURE__ */ jsx(AgentActivityIcon, { kind: header.iconKind }),
62
- action: header.action,
63
- detail: header.detail
62
+ action: !streaming && settledAction ? settledAction : header.action,
63
+ detail: !streaming && settledAction ? void 0 : header.detail
64
64
  }), /* @__PURE__ */ jsxs(ActivityContent, { children: [hiddenStepCount > 0 ? /* @__PURE__ */ jsxs(Button, {
65
65
  size: "sm",
66
66
  variant: "ghost",
@@ -153,7 +153,18 @@ function ThinkChatActivityStep({ description, part, stateKey, toolRenderers }) {
153
153
  children: text
154
154
  });
155
155
  }
156
- function ThinkChatActivityGroup({ message, parts, renderAgentToolRunLink, isTrailing, toolRenderers, stateKey }) {
156
+ function terminalActivityAction(message) {
157
+ const metadata = message.metadata;
158
+ if (typeof metadata !== "object" || metadata === null || !("durationMs" in metadata) || typeof metadata.durationMs !== "number" || !Number.isFinite(metadata.durationMs) || metadata.durationMs < 0) return;
159
+ const totalSeconds = Math.max(1, Math.round(metadata.durationMs / 1e3));
160
+ const minutes = Math.floor(totalSeconds / 60);
161
+ const seconds = totalSeconds % 60;
162
+ const duration = minutes ? seconds ? `${minutes}m ${seconds}s` : `${minutes}m` : `${totalSeconds}s`;
163
+ const status = "status" in metadata ? metadata.status : void 0;
164
+ if (status === "completed") return `Worked for ${duration}`;
165
+ if (status === "aborted") return `You stopped after ${duration}`;
166
+ }
167
+ function ThinkChatActivityGroup({ message, parts, renderAgentToolRunLink, isTrailing, settledAction, toolRenderers, stateKey }) {
157
168
  const live = useOptionalThinkChatLive();
158
169
  const streaming = isTrailing && (live ? live.isStreaming && live.lastMessageId === message.id : parts.some(isPartWorking));
159
170
  const agentTools = useOptionalAgentToolRuns();
@@ -168,6 +179,7 @@ function ThinkChatActivityGroup({ message, parts, renderAgentToolRunLink, isTrai
168
179
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ThinkChatActivity, {
169
180
  parts,
170
181
  isStreaming: streaming,
182
+ settledAction,
171
183
  toolRenderers,
172
184
  stateKey
173
185
  }), runs.length && renderAgentToolRunLink ? /* @__PURE__ */ jsx(SubagentRunList, {
@@ -212,11 +224,13 @@ function createThinkChatActivityRenderer({ excludeTools, renderAgentToolRunLink,
212
224
  if (partIndex !== start) return null;
213
225
  let end = partIndex;
214
226
  while (end + 1 < message.parts.length && runStarts[end + 1] === start) end++;
227
+ const isLastActivityRun = runStarts.findLast((runStart) => runStart !== -1) === start;
215
228
  return /* @__PURE__ */ jsx(ThinkChatActivityGroup, {
216
229
  message,
217
230
  parts: message.parts.slice(start, end + 1),
218
231
  stateKey: `${message.id}:${start}`,
219
232
  isTrailing: end === message.parts.length - 1,
233
+ settledAction: isLastActivityRun ? terminalActivityAction(message) : void 0,
220
234
  toolRenderers,
221
235
  renderAgentToolRunLink
222
236
  });
@@ -1,7 +1,7 @@
1
1
  import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
2
2
  import { Tabs } from "../foundations/Tabs.js";
3
3
  import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
4
- import { t as CodeBlock } from "../../CodeBlock-CWk1FVtm.js";
4
+ import { t as CodeBlock } from "../../CodeBlock-BjELA-_s.js";
5
5
  import { BrowserLiveView } from "./BrowserLiveView.js";
6
6
  import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
7
7
  import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
@@ -386,12 +386,16 @@ function ThinkChatBrowserPanel({ part }) {
386
386
  receivedAt: seenAt,
387
387
  fallback: media.screenshot ? /* @__PURE__ */ jsx("img", {
388
388
  src: media.screenshot,
389
- alt: "Last browser state"
389
+ alt: "Last browser state",
390
+ width: 16,
391
+ height: 10
390
392
  }) : void 0
391
393
  }) : media.screenshot ? /* @__PURE__ */ jsx("img", {
392
394
  className: "activity__browser-screenshot",
393
395
  src: media.screenshot,
394
- alt: "Browser screenshot"
396
+ alt: "Browser screenshot",
397
+ width: 16,
398
+ height: 10
395
399
  }) : null;
396
400
  const codeView = /* @__PURE__ */ jsx(ExecuteCodeView, {
397
401
  code,
@@ -1,4 +1,4 @@
1
- import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-lYYgyeE1.js";
1
+ import { t as ThinkExecutionRun } from "../../ThinkExecutionRun-k8bpyXqt.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/agents-sdk/ThinkExecutionDetail.d.ts