@mcp-b/react-components 0.20.5 → 0.22.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 (234) hide show
  1. package/dist/{AgentActivity-D2SHSGFX.d.ts → AgentActivity-D3OvrC02.d.ts} +14 -1
  2. package/dist/{AgentChat-C-ZyXbJz.d.ts → AgentChat-Bm1qYbOo.d.ts} +24 -1
  3. package/dist/AgentChatStartScreen-DDZ25aax.d.ts +60 -0
  4. package/dist/{Button-yRInko9u.d.ts → Button-SBIz6Lqi.d.ts} +2 -1
  5. package/dist/{CodeBlock-ygtuzqJd.js → CodeBlock-Cp67Njo3.js} +1 -1
  6. package/dist/{CodeBlock-Bbls1CnA.d.ts → CodeBlock-yMpGqScn.d.ts} +1 -1
  7. package/dist/Dialog-BD8NBKaE.d.ts +122 -0
  8. package/dist/{FileTree-CdgfccsM.js → FileTree-DW60q1w7.js} +1 -1
  9. package/dist/IconButton-CFKhu6OR.d.ts +35 -0
  10. package/dist/{Message-DzuteocT.js → Message-_-bEYLAO.js} +9 -16
  11. package/dist/{ModelSelector-pecWyOFI.js → ModelSelector-Brvj9Cab.js} +15 -8
  12. package/dist/{PromptInput-Cq-8RoXD.d.ts → PromptInput-BjoPWaaG.d.ts} +15 -2
  13. package/dist/{ThinkChatActivity-CdbL0aoA.d.ts → ThinkChatActivity-2BobmuvR.d.ts} +8 -7
  14. package/dist/{ThinkChatActivitySummary-D1xOrNrq.d.ts → ThinkChatActivitySummary-kr5fE0wg.d.ts} +14 -5
  15. package/dist/{ToggleGroup-DNd6cDJZ.d.ts → ToggleGroup-BW1jrhAF.d.ts} +10 -0
  16. package/dist/{Workspace-CWtust-2.d.ts → Workspace-CIycQ4xE.d.ts} +1 -1
  17. package/dist/{WorkspaceExplorer-DGigwsgH.d.ts → WorkspaceExplorer-BCipn7Vd.d.ts} +1 -1
  18. package/dist/{WorkspaceFile-D8Un_xge.d.ts → WorkspaceFile-DMtRMwVv.d.ts} +1 -1
  19. package/dist/{WorkspaceFileView-Bxx4wEzJ.js → WorkspaceFileView-rUEN2iox.js} +4 -4
  20. package/dist/assets/think-browser-host.png +0 -0
  21. package/dist/components/ActionGuide.d.ts +85 -0
  22. package/dist/components/ActionGuide.js +94 -0
  23. package/dist/components/Activity.d.ts +33 -17
  24. package/dist/components/Activity.js +40 -28
  25. package/dist/components/AgentActivity.d.ts +1 -1
  26. package/dist/components/AgentActivity.js +3 -11
  27. package/dist/components/AgentActivityPreview.d.ts +1 -1
  28. package/dist/components/AgentActivityPreview.js +17 -16
  29. package/dist/components/AgentAttention.d.ts +1 -1
  30. package/dist/components/AgentChat.d.ts +1 -1
  31. package/dist/components/AgentChat.js +169 -136
  32. package/dist/components/AgentChatStartScreen.d.ts +2 -0
  33. package/dist/components/AgentChatStartScreen.js +88 -0
  34. package/dist/components/AgentConnection.d.ts +1 -1
  35. package/dist/components/AgentConnection.js +2 -2
  36. package/dist/components/AgentMessageParts.js +1 -1
  37. package/dist/components/AgentToolDetail.js +1 -1
  38. package/dist/components/AlertDialog.d.ts +2 -1
  39. package/dist/components/AlertDialog.js +8 -2
  40. package/dist/components/AppIcon.d.ts +58 -0
  41. package/dist/components/AppIcon.js +51 -0
  42. package/dist/components/AppTopBar.js +9 -10
  43. package/dist/components/Approval.js +3 -5
  44. package/dist/components/Artifact.d.ts +3 -7
  45. package/dist/components/Artifact.js +12 -18
  46. package/dist/components/Avatar.d.ts +7 -2
  47. package/dist/components/Avatar.js +4 -2
  48. package/dist/components/BrowserLiveView.js +6 -8
  49. package/dist/components/BrowserReplay.js +9 -9
  50. package/dist/components/BrowserRunPanel.js +2 -2
  51. package/dist/components/Button.d.ts +1 -1
  52. package/dist/components/ChainOfThought.d.ts +1 -1
  53. package/dist/components/ChainOfThought.js +1 -1
  54. package/dist/components/ChatGptSignInScreen.js +2 -2
  55. package/dist/components/Checkbox.js +1 -1
  56. package/dist/components/Checkpoint.js +1 -1
  57. package/dist/components/CodeBlock.d.ts +1 -1
  58. package/dist/components/CodeBlock.js +1 -1
  59. package/dist/components/CodexModelSelector.js +1 -1
  60. package/dist/components/Commit.d.ts +1 -1
  61. package/dist/components/Commit.js +3 -3
  62. package/dist/components/ContextMenu.js +1 -1
  63. package/dist/components/Conversation.d.ts +3 -24
  64. package/dist/components/Conversation.js +6 -34
  65. package/dist/components/Dialog.d.ts +1 -117
  66. package/dist/components/Dialog.js +9 -1
  67. package/dist/components/EmptyState.d.ts +46 -0
  68. package/dist/components/EmptyState.js +50 -0
  69. package/dist/components/EnvironmentVariables.d.ts +1 -1
  70. package/dist/components/EnvironmentVariables.js +2 -2
  71. package/dist/components/FileTree.js +1 -1
  72. package/dist/components/IconButton.d.ts +1 -31
  73. package/dist/components/IconButton.js +2 -1
  74. package/dist/components/Kbd.d.ts +32 -0
  75. package/dist/components/Kbd.js +34 -0
  76. package/dist/components/McpConnectionRequest.d.ts +1 -1
  77. package/dist/components/McpConnectionRequest.js +1 -1
  78. package/dist/components/McpPluginCatalog.d.ts +86 -0
  79. package/dist/components/McpPluginCatalog.js +364 -0
  80. package/dist/components/McpServerPicker.d.ts +2 -2
  81. package/dist/components/McpServerPicker.js +7 -13
  82. package/dist/components/MediaPreviewCard.js +1 -1
  83. package/dist/components/Menubar.js +1 -1
  84. package/dist/components/Message.d.ts +4 -8
  85. package/dist/components/Message.js +1 -1
  86. package/dist/components/MessageScroller.d.ts +1 -1
  87. package/dist/components/MessageScroller.js +1 -1
  88. package/dist/components/ModelSelector.d.ts +12 -6
  89. package/dist/components/ModelSelector.js +2 -2
  90. package/dist/components/Plan.js +1 -1
  91. package/dist/components/PricingBillingToggle.js +1 -0
  92. package/dist/components/PricingPlanCard.d.ts +1 -1
  93. package/dist/components/PricingPlanCard.js +10 -12
  94. package/dist/components/PromptInput.d.ts +2 -2
  95. package/dist/components/PromptInput.js +30 -12
  96. package/dist/components/Queue.d.ts +1 -1
  97. package/dist/components/Queue.js +2 -2
  98. package/dist/components/Reasoning.js +5 -10
  99. package/dist/components/ResponsiveSidebarShell.js +2 -1
  100. package/dist/components/SearchField.js +1 -1
  101. package/dist/components/Select.js +1 -1
  102. package/dist/components/Sources.js +1 -1
  103. package/dist/components/StatusPill.d.ts +43 -0
  104. package/dist/components/StatusPill.js +35 -0
  105. package/dist/components/Stepper.js +1 -1
  106. package/dist/components/SubagentRunIndicator.js +1 -1
  107. package/dist/components/SubagentRunSelector.js +1 -1
  108. package/dist/components/Task.js +1 -1
  109. package/dist/components/Terminal.d.ts +3 -3
  110. package/dist/components/Terminal.js +7 -8
  111. package/dist/components/TestResults.js +1 -1
  112. package/dist/components/ThemeModeControl.js +1 -1
  113. package/dist/components/ThinkChat.d.ts +12 -6
  114. package/dist/components/ThinkChatActivity.d.ts +2 -2
  115. package/dist/components/ThinkChatActivity.js +28 -16
  116. package/dist/components/ThinkChatActivitySummary.d.ts +2 -2
  117. package/dist/components/ThinkChatActivitySummary.js +67 -64
  118. package/dist/components/ThinkChatToolPanels.js +1 -1
  119. package/dist/components/ThinkExecutionDetail.js +5 -5
  120. package/dist/components/ThinkExecutionStatus.js +1 -1
  121. package/dist/components/ThinkExecutionWorkbench.js +19 -25
  122. package/dist/components/ThinkFullApp.d.ts +8 -4
  123. package/dist/components/ThinkFullApp.js +17 -2
  124. package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
  125. package/dist/components/ThinkRoutineBrowser.js +3 -2
  126. package/dist/components/ThinkRoutineForm.js +3 -3
  127. package/dist/components/ThinkRoutineLibrary.js +2 -2
  128. package/dist/components/ThinkRoutineRuns.js +4 -3
  129. package/dist/components/ThinkThreadPicker.js +5 -4
  130. package/dist/components/Toast.d.ts +12 -2
  131. package/dist/components/Toast.js +14 -4
  132. package/dist/components/ToggleGroup.d.ts +1 -1
  133. package/dist/components/ToggleGroup.js +54 -7
  134. package/dist/components/ToolInvocation.js +1 -1
  135. package/dist/components/Tooltip.d.ts +6 -4
  136. package/dist/components/Tooltip.js +11 -4
  137. package/dist/components/WebPreview.d.ts +13 -6
  138. package/dist/components/WebPreview.js +55 -50
  139. package/dist/components/Workspace.d.ts +1 -1
  140. package/dist/components/WorkspaceBrowser.d.ts +1 -1
  141. package/dist/components/WorkspaceBrowser.js +1 -1
  142. package/dist/components/WorkspaceExplorer.d.ts +3 -3
  143. package/dist/components/WorkspaceExplorer.js +1 -1
  144. package/dist/components/WorkspaceFile.d.ts +1 -1
  145. package/dist/components/WorkspaceFileView.d.ts +1 -1
  146. package/dist/components/WorkspaceFileView.js +1 -1
  147. package/dist/components/WorkspaceHeader.js +1 -1
  148. package/dist/components/icons.d.ts +2 -2
  149. package/dist/components/icons.js +2 -2
  150. package/dist/{copy-button-BrvQ7z4W.d.ts → copy-button-EBv_B9F6.d.ts} +2 -2
  151. package/dist/{copy-button-vo1paUSi.js → copy-button-TWq8nZhc.js} +8 -8
  152. package/dist/{icons-DyOM0EJs.js → icons-ua6f_GH3.js} +3 -2
  153. package/dist/{icons-DkRtZmvT.d.ts → icons-wP1yFUXF.d.ts} +6 -1
  154. package/dist/mcp-server-catalog-DycejaJ5.d.ts +1077 -0
  155. package/dist/styles/action-guide.css +128 -0
  156. package/dist/styles/activity-header.css +41 -10
  157. package/dist/styles/activity.css +26 -4
  158. package/dist/styles/agent-activity-preview-overlay.css +51 -12
  159. package/dist/styles/agent-activity-preview.css +23 -53
  160. package/dist/styles/agent-attention.css +2 -2
  161. package/dist/styles/agent-chat.css +291 -57
  162. package/dist/styles/agent-connection.css +8 -8
  163. package/dist/styles/alert-dialog.css +5 -20
  164. package/dist/styles/app-icon.css +122 -0
  165. package/dist/styles/app-top-bar.css +4 -5
  166. package/dist/styles/approval.css +1 -7
  167. package/dist/styles/artifact.css +4 -4
  168. package/dist/styles/avatar.css +13 -0
  169. package/dist/styles/base-ui-motion.css +1 -1
  170. package/dist/styles/base.css +94 -3
  171. package/dist/styles/browser-control-overlay.css +16 -7
  172. package/dist/styles/browser-live-view.css +5 -38
  173. package/dist/styles/browser-replay.css +2 -6
  174. package/dist/styles/browser-run-panel.css +4 -18
  175. package/dist/styles/button.css +17 -1
  176. package/dist/styles/card.css +4 -4
  177. package/dist/styles/chain-of-thought.css +0 -1
  178. package/dist/styles/chatgpt-sign-in-screen.css +7 -5
  179. package/dist/styles/checkbox-group.css +3 -3
  180. package/dist/styles/code-block.css +4 -4
  181. package/dist/styles/context-menu.css +1 -1
  182. package/dist/styles/conversation.css +7 -42
  183. package/dist/styles/description-list.css +4 -4
  184. package/dist/styles/dialog.css +22 -7
  185. package/dist/styles/empty-state.css +48 -0
  186. package/dist/styles/environment-variables.css +4 -4
  187. package/dist/styles/field.css +2 -2
  188. package/dist/styles/index.css +6 -0
  189. package/dist/styles/inline-citation.css +1 -1
  190. package/dist/styles/kbd.css +40 -0
  191. package/dist/styles/mcp-plugin-catalog.css +296 -0
  192. package/dist/styles/mcp-server-picker.css +0 -26
  193. package/dist/styles/media-preview-card.css +5 -3
  194. package/dist/styles/message-scroller.css +4 -4
  195. package/dist/styles/message.css +11 -6
  196. package/dist/styles/model-selector.css +5 -8
  197. package/dist/styles/popover.css +1 -1
  198. package/dist/styles/preview-card.css +1 -1
  199. package/dist/styles/prompt-input.css +44 -54
  200. package/dist/styles/queue.css +2 -2
  201. package/dist/styles/recipes.css +83 -9
  202. package/dist/styles/resizable-side-panel.css +1 -1
  203. package/dist/styles/responsive-sidebar-shell.css +19 -14
  204. package/dist/styles/scrollbars.css +32 -3
  205. package/dist/styles/search-field.css +9 -0
  206. package/dist/styles/sources.css +1 -1
  207. package/dist/styles/status-pill.css +39 -0
  208. package/dist/styles/stepper.css +2 -2
  209. package/dist/styles/streamdown.css +13 -12
  210. package/dist/styles/subagent-run.css +3 -3
  211. package/dist/styles/switch.css +1 -3
  212. package/dist/styles/tabs.css +1 -1
  213. package/dist/styles/task.css +1 -1
  214. package/dist/styles/terminal.css +2 -2
  215. package/dist/styles/test-results.css +1 -2
  216. package/dist/styles/textarea.css +1 -1
  217. package/dist/styles/theme-mode-control.css +1 -1
  218. package/dist/styles/think-execution-status.css +4 -23
  219. package/dist/styles/think-execution-workbench.css +2 -3
  220. package/dist/styles/think-full-app.css +24 -4
  221. package/dist/styles/think-routine-library.css +14 -16
  222. package/dist/styles/think-thread-picker.css +9 -26
  223. package/dist/styles/toast.css +2 -23
  224. package/dist/styles/toggle-group.css +76 -3
  225. package/dist/styles/tooltip.css +1 -2
  226. package/dist/styles/utilities.css +73 -0
  227. package/dist/styles/web-preview.css +5 -0
  228. package/dist/styles/workspace-explorer.css +4 -6
  229. package/dist/utils/favicon.d.ts +10 -0
  230. package/dist/utils/favicon.js +18 -0
  231. package/dist/utils/mcp-server-catalog.d.ts +2 -1078
  232. package/dist/utils/mcp-server-catalog.js +3 -11
  233. package/dist/utils/structured-code.d.ts +1 -1
  234. package/package.json +2 -2
@@ -1,11 +1,13 @@
1
1
  import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
2
- import { $ as WrenchIcon, C as FolderIcon, J as StopIcon, K as SpinnerIcon, L as PaperclipIcon, M as MicrophoneIcon, P as MonitorIcon, Q as WarningIcon, S as FileIcon, V as PlusIcon, a as ArrowUpIcon, d as ChevronDownIcon, et as XIcon, q as SquareIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
3
2
  import { Button } from "./Button.js";
3
+ import { $ as WarningIcon, C as FileIcon, F as MonitorIcon, H as PlusIcon, J as SquareIcon, N as MicrophoneIcon, R as PaperclipIcon, Y as StopIcon, a as ArrowUpIcon, d as CheckIcon, et as WrenchIcon, f as ChevronDownIcon, q as SpinnerIcon, tt as XIcon, w as FolderIcon } from "../icons-ua6f_GH3.js";
4
4
  import { Tooltip } from "./Tooltip.js";
5
+ import { IconButton } from "./IconButton.js";
5
6
  import { t as AttachmentPreview } from "../attachment-preview-DIs50Q0h.js";
6
7
  import { n as clamp, r as formatClock } from "../format-S6uWyoSb.js";
7
- import { Menu } from "./Menu.js";
8
8
  import { Combobox } from "./Combobox.js";
9
+ import { Kbd } from "./Kbd.js";
10
+ import { Menu } from "./Menu.js";
9
11
  import { Select } from "./Select.js";
10
12
  import { Tabs } from "./Tabs.js";
11
13
  import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
@@ -312,10 +314,12 @@ function PromptInputAttachment({ file, className, ref, ...props }) {
312
314
  children: [isImage ? /* @__PURE__ */ jsx(AttachmentPreview, {
313
315
  url: file.url,
314
316
  filename: file.filename,
315
- children: /* @__PURE__ */ jsx("button", {
316
- type: "button",
317
+ children: /* @__PURE__ */ jsx(Button, {
317
318
  className: "prompt-input__attachment-zoom",
318
319
  "aria-label": `Preview ${name}`,
320
+ color: "neutral",
321
+ size: "sm",
322
+ variant: "ghost",
319
323
  children: /* @__PURE__ */ jsx("img", {
320
324
  className: "prompt-input__attachment-thumb",
321
325
  src: file.url,
@@ -325,12 +329,14 @@ function PromptInputAttachment({ file, className, ref, ...props }) {
325
329
  }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FileIcon, { className: "prompt-input__attachment-icon" }), /* @__PURE__ */ jsx("span", {
326
330
  className: "prompt-input__attachment-name sigvelo-truncate",
327
331
  children: name
328
- })] }), /* @__PURE__ */ jsx("button", {
329
- type: "button",
332
+ })] }), /* @__PURE__ */ jsx(IconButton, {
330
333
  className: "prompt-input__attachment-remove",
331
- "aria-label": `Remove ${name}`,
334
+ color: "neutral",
335
+ label: `Remove ${name}`,
336
+ size: "xs",
337
+ variant: "ghost",
332
338
  onClick: () => attachments.remove(file.id),
333
- children: /* @__PURE__ */ jsx(XIcon, { size: 12 })
339
+ children: /* @__PURE__ */ jsx(XIcon, {})
334
340
  })]
335
341
  });
336
342
  }
@@ -365,6 +371,16 @@ function PromptInputFooter({ className, children, ref, ...props }) {
365
371
  children
366
372
  });
367
373
  }
374
+ /** Supporting controls or queued work tucked behind a PromptInput edge. */
375
+ function PromptInputTray({ side, className, ref, ...props }) {
376
+ return /* @__PURE__ */ jsx("div", {
377
+ ref,
378
+ "data-slot": "prompt-input-tray",
379
+ "data-side": side,
380
+ className: cx("prompt-input__tray", className),
381
+ ...props
382
+ });
383
+ }
368
384
  function PromptInputTools({ className, children, ref, ...props }) {
369
385
  return /* @__PURE__ */ jsx("div", {
370
386
  ref,
@@ -481,7 +497,7 @@ function PromptInputButton({ className, tooltip, variant = "ghost", color = "neu
481
497
  children: /* @__PURE__ */ jsxs(Tooltip.Popup, { children: [/* @__PURE__ */ jsx("span", {
482
498
  className: "prompt-input__tooltip-content",
483
499
  children: tooltipConfig.content
484
- }), tooltipConfig.shortcut ? /* @__PURE__ */ jsx("kbd", {
500
+ }), tooltipConfig.shortcut ? /* @__PURE__ */ jsx(Kbd, {
485
501
  className: "prompt-input__tooltip-shortcut",
486
502
  children: tooltipConfig.shortcut
487
503
  }) : null] })
@@ -1238,7 +1254,7 @@ function PromptInputContextSelector({ items, value, onValueChange, categoryLabel
1238
1254
  }
1239
1255
  function defaultSubmitIcon(status) {
1240
1256
  switch (status) {
1241
- case "submitted": return /* @__PURE__ */ jsx(SpinnerIcon, { className: "prompt-input__submit-spinner" });
1257
+ case "submitted": return /* @__PURE__ */ jsx(SpinnerIcon, {});
1242
1258
  case "streaming": return /* @__PURE__ */ jsx(SquareIcon, {});
1243
1259
  case "error": return /* @__PURE__ */ jsx(WarningIcon, {});
1244
1260
  default: return /* @__PURE__ */ jsx(ArrowUpIcon, {});
@@ -1275,7 +1291,9 @@ async function resolveSubmittedFile(file) {
1275
1291
  }
1276
1292
  async function blobUrlToDataUrl(url) {
1277
1293
  try {
1278
- const blob = await (await fetch(url)).blob();
1294
+ const response = await fetch(url);
1295
+ if (!response.ok) return null;
1296
+ const blob = await response.blob();
1279
1297
  return await new Promise((resolve) => {
1280
1298
  const reader = new FileReader();
1281
1299
  reader.onloadend = () => resolve(typeof reader.result === "string" ? reader.result : null);
@@ -1327,4 +1345,4 @@ function createId() {
1327
1345
  return globalThis.crypto?.randomUUID?.() ?? `prompt-input-${Date.now()}-${Math.random()}`;
1328
1346
  }
1329
1347
  //#endregion
1330
- export { PromptInput, PromptInputActionAddAttachments, PromptInputActionAddScreenshot, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputApproval, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandComposer, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandGroupLabel, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputContextSelector, PromptInputDictation, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputPermissionSelector, PromptInputProvider, PromptInputReferences, PromptInputSelect, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
1348
+ export { PromptInput, PromptInputActionAddAttachments, PromptInputActionAddScreenshot, PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuItem, PromptInputActionMenuTrigger, PromptInputApproval, PromptInputAttachment, PromptInputAttachments, PromptInputBody, PromptInputButton, PromptInputCommand, PromptInputCommandComposer, PromptInputCommandEmpty, PromptInputCommandGroup, PromptInputCommandGroupLabel, PromptInputCommandInput, PromptInputCommandItem, PromptInputCommandList, PromptInputCommandSeparator, PromptInputContextSelector, PromptInputDictation, PromptInputFooter, PromptInputHeader, PromptInputHoverCard, PromptInputHoverCardContent, PromptInputHoverCardTrigger, PromptInputPermissionSelector, PromptInputProvider, PromptInputReferences, PromptInputSelect, PromptInputSubmit, PromptInputTab, PromptInputTabBody, PromptInputTabItem, PromptInputTabLabel, PromptInputTabsList, PromptInputTextarea, PromptInputTools, PromptInputTray, getApprovalRequestId, getApprovalStateKey, getPendingToolApprovals, usePromptInputAttachments, usePromptInputController, useProviderAttachments };
@@ -1,5 +1,5 @@
1
+ import { r as ButtonProps } from "../Button-SBIz6Lqi.js";
1
2
  import { t as Collapsible } from "../Collapsible-N64ASIQr.js";
2
- import { r as ButtonProps } from "../Button-yRInko9u.js";
3
3
  import { ScrollArea } from "./ScrollArea.js";
4
4
  import * as React from "react";
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
- import { Collapsible } from "./Collapsible.js";
3
- import { S as FileIcon, _ as DotIcon, p as ChevronRightIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
4
2
  import { Button } from "./Button.js";
3
+ import { Collapsible } from "./Collapsible.js";
4
+ import { C as FileIcon, d as CheckIcon, m as ChevronRightIcon, v as DotIcon } from "../icons-ua6f_GH3.js";
5
5
  import { Badge } from "./Badge.js";
6
6
  import { ScrollArea } from "./ScrollArea.js";
7
7
  import "react";
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "./Collapsible.js";
3
- import { K as SpinnerIcon } from "../icons-DyOM0EJs.js";
3
+ import { q as SpinnerIcon } from "../icons-ua6f_GH3.js";
4
4
  import { ActivityContent, ActivityText, ActivityTrigger } from "./Activity.js";
5
- import { f as MessageResponse } from "../Message-DzuteocT.js";
5
+ import { f as MessageResponse } from "../Message-_-bEYLAO.js";
6
6
  import * as React from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/components/Reasoning.tsx
@@ -36,11 +36,10 @@ function Reasoning({ className, isStreaming = false, duration, open, defaultOpen
36
36
  const previousStreamingRef = React.useRef(isStreaming);
37
37
  const startTimeRef = React.useRef(isStreaming ? Date.now() : null);
38
38
  const hasEverStreamedRef = React.useRef(isStreaming);
39
- const [hasAutoClosed, setHasAutoClosed] = React.useState(false);
40
39
  const isControlled = open !== void 0;
41
40
  const currentOpen = isControlled ? open : internalOpen;
42
41
  const preventAutoOpen = defaultOpen === false;
43
- const resolvedDuration = duration ?? internalDuration;
42
+ const resolvedDuration = duration ?? (isStreaming || startTimeRef.current !== null ? void 0 : internalDuration);
44
43
  const setOpenState = React.useCallback((next) => {
45
44
  if (next === currentOpen) return;
46
45
  if (!isControlled) setInternalOpen(next);
@@ -53,8 +52,6 @@ function Reasoning({ className, isStreaming = false, duration, open, defaultOpen
53
52
  React.useEffect(() => {
54
53
  if (isStreaming) {
55
54
  hasEverStreamedRef.current = true;
56
- setHasAutoClosed(false);
57
- if (duration === void 0) setInternalDuration(void 0);
58
55
  if (startTimeRef.current === null) startTimeRef.current = Date.now();
59
56
  return;
60
57
  }
@@ -66,10 +63,9 @@ function Reasoning({ className, isStreaming = false, duration, open, defaultOpen
66
63
  React.useEffect(() => {
67
64
  const wasStreaming = previousStreamingRef.current;
68
65
  if (isStreaming && !currentOpen && !preventAutoOpen) setOpenState(true);
69
- if (!isStreaming && wasStreaming && hasEverStreamedRef.current && currentOpen && !hasAutoClosed) {
66
+ if (!isStreaming && wasStreaming && hasEverStreamedRef.current && currentOpen) {
70
67
  const closeTimer = window.setTimeout(() => {
71
68
  setOpenState(false);
72
- setHasAutoClosed(true);
73
69
  }, AUTO_CLOSE_DELAY_MS);
74
70
  previousStreamingRef.current = isStreaming;
75
71
  return () => window.clearTimeout(closeTimer);
@@ -77,7 +73,6 @@ function Reasoning({ className, isStreaming = false, duration, open, defaultOpen
77
73
  previousStreamingRef.current = isStreaming;
78
74
  }, [
79
75
  currentOpen,
80
- hasAutoClosed,
81
76
  isStreaming,
82
77
  preventAutoOpen,
83
78
  setOpenState
@@ -128,7 +123,7 @@ function ReasoningTrigger({ className, children, getThinkingMessage = defaultGet
128
123
  className: cx("reasoning__trigger", className),
129
124
  "data-streaming": isStreaming ? "" : void 0,
130
125
  icon: children == null && isStreaming ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : void 0,
131
- label: children ?? getThinkingMessage(isStreaming, duration),
126
+ action: children ?? getThinkingMessage(isStreaming, duration),
132
127
  ...props
133
128
  });
134
129
  }
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
- import { G as SidebarIcon } from "../icons-DyOM0EJs.js";
3
2
  import { Button } from "./Button.js";
3
+ import { K as SidebarIcon } from "../icons-ua6f_GH3.js";
4
4
  import { t as capitalize } from "../format-S6uWyoSb.js";
5
5
  import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
6
6
  import { AppTopBar } from "./AppTopBar.js";
@@ -118,6 +118,7 @@ function ResponsiveSidebarShell({ sidebar, topBar, sidebarLabel, sidebarOpen, de
118
118
  /* @__PURE__ */ jsx("div", {
119
119
  ref: mainRef,
120
120
  className: "responsive-sidebar-shell__main",
121
+ "data-recipe": "application-plane",
121
122
  tabIndex: -1,
122
123
  children
123
124
  }),
@@ -1,5 +1,5 @@
1
1
  import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
2
- import { W as SearchIcon } from "../icons-DyOM0EJs.js";
2
+ import { G as SearchIcon } from "../icons-ua6f_GH3.js";
3
3
  import { Field } from "./Field.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/SearchField.tsx
@@ -1,5 +1,5 @@
1
1
  import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
2
- import { a as ArrowUpIcon, n as ArrowDownIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
2
+ import { a as ArrowUpIcon, d as CheckIcon, n as ArrowDownIcon } from "../icons-ua6f_GH3.js";
3
3
  import "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Select as Select$1 } from "@base-ui/react/select";
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "./Collapsible.js";
3
- import { O as LinkIcon, p as ChevronRightIcon } from "../icons-DyOM0EJs.js";
3
+ import { k as LinkIcon, m as ChevronRightIcon } from "../icons-ua6f_GH3.js";
4
4
  import "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Sources.tsx
@@ -0,0 +1,43 @@
1
+ import { BadgeProps } from "./Badge.js";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/StatusPill.d.ts
5
+ interface StatusPillProps extends BadgeProps {
6
+ /**
7
+ * Whether the state this reports is still ongoing. A live state pulses; a
8
+ * settled one holds still, so "Live" and "Ended" are told apart without
9
+ * reading either word.
10
+ */
11
+ busy?: boolean;
12
+ /**
13
+ * Replaces the dot for states that have a picture — a spinner while a run
14
+ * starts, a check once it lands.
15
+ */
16
+ icon?: React.ReactNode;
17
+ }
18
+ /**
19
+ * A short state report: an indicator, then the state itself.
20
+ *
21
+ * This is a `Badge` with an indicator in front, not a second kind of chip, so
22
+ * `variant`, `color`, and `size` mean here exactly what they mean there. What
23
+ * it adds is the dot and its pulse, which several surfaces had been writing
24
+ * out by hand.
25
+ *
26
+ * It reports; it does not ask. A state that needs the user to do something is
27
+ * `AgentAttention`.
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * <StatusPill busy color="destructive" size="sm">Live</StatusPill>
32
+ * <StatusPill color="success" icon={<CheckIcon />}>Passed</StatusPill>
33
+ * ```
34
+ */
35
+ declare function StatusPill({
36
+ busy,
37
+ className,
38
+ icon,
39
+ children,
40
+ ...props
41
+ }: StatusPillProps): React.JSX.Element;
42
+ //#endregion
43
+ export { StatusPill, StatusPillProps };
@@ -0,0 +1,35 @@
1
+ import { t as cx } from "../class-names-BiMDVpUo.js";
2
+ import { Badge } from "./Badge.js";
3
+ import "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/components/StatusPill.tsx
6
+ /**
7
+ * A short state report: an indicator, then the state itself.
8
+ *
9
+ * This is a `Badge` with an indicator in front, not a second kind of chip, so
10
+ * `variant`, `color`, and `size` mean here exactly what they mean there. What
11
+ * it adds is the dot and its pulse, which several surfaces had been writing
12
+ * out by hand.
13
+ *
14
+ * It reports; it does not ask. A state that needs the user to do something is
15
+ * `AgentAttention`.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <StatusPill busy color="destructive" size="sm">Live</StatusPill>
20
+ * <StatusPill color="success" icon={<CheckIcon />}>Passed</StatusPill>
21
+ * ```
22
+ */
23
+ function StatusPill({ busy = false, className, icon, children, ...props }) {
24
+ return /* @__PURE__ */ jsxs(Badge, {
25
+ className: cx("status-pill", className),
26
+ "data-busy": busy || void 0,
27
+ ...props,
28
+ children: [icon ?? /* @__PURE__ */ jsx("span", {
29
+ "aria-hidden": "true",
30
+ className: "status-pill__dot"
31
+ }), children]
32
+ });
33
+ }
34
+ //#endregion
35
+ export { StatusPill };
@@ -1,5 +1,5 @@
1
1
  import { n as mergeBaseClassName, t as cx } from "../class-names-BiMDVpUo.js";
2
- import { K as SpinnerIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
2
+ import { d as CheckIcon, q as SpinnerIcon } from "../icons-ua6f_GH3.js";
3
3
  import { Tabs } from "./Tabs.js";
4
4
  import * as React from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
- import { J as StopIcon, K as SpinnerIcon, Q as WarningIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
2
+ import { $ as WarningIcon, Y as StopIcon, d as CheckIcon, q as SpinnerIcon } from "../icons-ua6f_GH3.js";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/SubagentRunIndicator.tsx
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
- import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
3
2
  import { buttonVariants } from "./Button.js";
3
+ import { t as NavigationLink } from "../navigation-link-Cob7KBlM.js";
4
4
  import { Tooltip } from "./Tooltip.js";
5
5
  import { NaniteMark } from "./NaniteScene.js";
6
6
  import { SubagentRunIndicator, getSubagentRunName, getSubagentRunTooltip } from "./SubagentRunIndicator.js";
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "./Collapsible.js";
3
- import { S as FileIcon, W as SearchIcon, p as ChevronRightIcon } from "../icons-DyOM0EJs.js";
3
+ import { C as FileIcon, G as SearchIcon, m as ChevronRightIcon } from "../icons-ua6f_GH3.js";
4
4
  import "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/components/Task.tsx
@@ -1,5 +1,5 @@
1
- import { r as ButtonProps } from "../Button-yRInko9u.js";
2
- import { t as CopyButtonProps } from "../copy-button-BrvQ7z4W.js";
1
+ import { n as IconButtonProps } from "../IconButton-CFKhu6OR.js";
2
+ import { t as CopyButtonProps } from "../copy-button-EBv_B9F6.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/Terminal.d.ts
@@ -103,7 +103,7 @@ declare function TerminalCopyButton({
103
103
  onClick,
104
104
  ...props
105
105
  }: TerminalCopyButtonProps): React.JSX.Element;
106
- interface TerminalClearButtonProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color" | "onClick"> {
106
+ interface TerminalClearButtonProps extends Omit<IconButtonProps, "children" | "label" | "tooltip" | "variant" | "size" | "color" | "onClick"> {
107
107
  label?: string;
108
108
  onClick?: React.MouseEventHandler<HTMLButtonElement>;
109
109
  }
@@ -1,8 +1,7 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
- import { X as TerminalIcon, et as XIcon } from "../icons-DyOM0EJs.js";
3
- import { Button } from "./Button.js";
4
- import { Tooltip } from "./Tooltip.js";
5
- import { t as CopyButton } from "../copy-button-vo1paUSi.js";
2
+ import { Z as TerminalIcon, tt as XIcon } from "../icons-ua6f_GH3.js";
3
+ import { IconButton } from "./IconButton.js";
4
+ import { t as CopyButton } from "../copy-button-TWq8nZhc.js";
6
5
  import { Badge } from "./Badge.js";
7
6
  import { ScrollArea } from "./ScrollArea.js";
8
7
  import * as React from "react";
@@ -217,16 +216,16 @@ function TerminalClearButton({ className, label = "Clear terminal", onClick, ...
217
216
  onClear?.();
218
217
  onClick?.(e);
219
218
  }, [onClear, onClick]);
220
- return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
219
+ return /* @__PURE__ */ jsx(IconButton, {
220
+ label,
221
221
  variant: "ghost",
222
+ color: "neutral",
222
223
  size: "sm",
223
- iconOnly: true,
224
- "aria-label": label,
225
224
  className: cx("terminal__clear", className),
226
225
  ...props,
227
226
  onClick: handleClick,
228
227
  children: /* @__PURE__ */ jsx(XIcon, {})
229
- }) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: label }) }) })] });
228
+ });
230
229
  }
231
230
  const ANSI_REGEX = /\u001b\[[0-9;?]*[a-zA-Z]/g;
232
231
  function stripAnsi(input) {
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../class-names-BiMDVpUo.js";
2
2
  import { Collapsible } from "./Collapsible.js";
3
- import { K as SpinnerIcon, et as XIcon, p as ChevronRightIcon, u as CheckIcon } from "../icons-DyOM0EJs.js";
3
+ import { d as CheckIcon, m as ChevronRightIcon, q as SpinnerIcon, tt as XIcon } from "../icons-ua6f_GH3.js";
4
4
  import { Progress } from "./Progress.js";
5
5
  import { Badge } from "./Badge.js";
6
6
  import * as React from "react";
@@ -1,4 +1,4 @@
1
- import { F as MoonIcon, P as MonitorIcon, Y as SunIcon } from "../icons-DyOM0EJs.js";
1
+ import { F as MonitorIcon, I as MoonIcon, X as SunIcon } from "../icons-ua6f_GH3.js";
2
2
  import { Radio, RadioGroup } from "./RadioGroup.js";
3
3
  import { useTheme } from "./ThemeProvider.js";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,16 +1,16 @@
1
1
  import { i as AgentMessageRenderPartContext } from "../AgentMessageParts-CyD2UB3V.js";
2
- import { r as AgentChatProps } from "../AgentChat-C-ZyXbJz.js";
2
+ import { r as AgentChatProps } from "../AgentChat-Bm1qYbOo.js";
3
3
  import { i as useOptionalAgentToolRuns, n as AgentToolRunsProvider, r as AgentToolRunsProviderProps, t as AgentToolEventsValue } from "../AgentToolRunsContext-BVe4stgw.js";
4
4
  import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
5
- import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-D1xOrNrq.js";
6
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-CdbL0aoA.js";
5
+ import { u as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-kr5fE0wg.js";
6
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-2BobmuvR.js";
7
7
  import { n as ThinkChatValue } from "../ThinkChatContext-DrsZqdaO.js";
8
8
  import { n as ThinkRecoveryNoticeProps, t as ThinkRecoveryNotice } from "../ThinkRecoveryNotice-DFIcG9UX.js";
9
9
  import { n as BrowserLiveViewProps, t as BrowserLiveView } from "../BrowserLiveView-BV5qgFgI.js";
10
10
  import { n as BrowserReplayProps, t as BrowserReplay } from "../BrowserReplay-xWvRjRAC.js";
11
- import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../WorkspaceFile-D8Un_xge.js";
12
- import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceFileStatQueryOptions, f as workspaceInfoQueryOptions, i as WorkspaceQueryKey, l as workspaceDirectoryQueryOptions, m as workspaceTextFileQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceQueryKey, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceFileAssetQueryOptions } from "../Workspace-CWtust-2.js";
13
- import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../WorkspaceExplorer-DGigwsgH.js";
11
+ import { d as inferWorkspaceLanguage, i as WorkspaceFileState } from "../WorkspaceFile-DMtRMwVv.js";
12
+ import { a as WorkspaceSource, c as workspaceBinaryFileQueryOptions, d as workspaceFileStatQueryOptions, f as workspaceInfoQueryOptions, i as WorkspaceQueryKey, l as workspaceDirectoryQueryOptions, m as workspaceTextFileQueryOptions, n as WorkspaceFileReadTarget, o as WorkspaceState, p as workspaceQueryKey, r as WorkspaceInfo, s as useWorkspace, t as UseWorkspaceOptions, u as workspaceFileAssetQueryOptions } from "../Workspace-CIycQ4xE.js";
13
+ import { n as WorkspaceExplorerProps, t as WorkspaceExplorer } from "../WorkspaceExplorer-BCipn7Vd.js";
14
14
  import * as React from "react";
15
15
  import { UIMessage } from "ai";
16
16
  import { UseAgentOptions } from "agents/react";
@@ -53,6 +53,8 @@ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends
53
53
  showComposer?: AgentChatProps<MessageT>["showComposer"];
54
54
  /** Shown in place of the list while there are no messages. */
55
55
  emptyState?: React.ReactNode;
56
+ /** Welcoming first-turn layout with the live composer centered above starter actions. */
57
+ startScreen?: AgentChatProps<MessageT>["startScreen"];
56
58
  /** Extra controls rendered inside the composer, next to the send button. */
57
59
  composerTools?: React.ReactNode;
58
60
  /** Host-owned slash-command catalog and selection policy. */
@@ -75,6 +77,10 @@ interface ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> extends
75
77
  placeholder?: string;
76
78
  /** Rendered after each message (e.g. per-message actions). */
77
79
  renderMessageAfter?: AgentChatProps<MessageT>["renderMessageAfter"];
80
+ /** Per-message policy for AgentChat's built-in assistant copy/retry toolbar. */
81
+ showAssistantActions?: AgentChatProps<MessageT>["showAssistantActions"];
82
+ /** Overrides which rows anchor at the top when added; user messages are the default. */
83
+ isMessageScrollAnchor?: AgentChatProps<MessageT>["isMessageScrollAnchor"];
78
84
  /**
79
85
  * Durable backend edit/resend operation. Think does not synchronize
80
86
  * `setMessages`, so wire this to an agent callable that creates the branch.
@@ -1,4 +1,4 @@
1
1
  import { S as isThinkChatActivityPart } from "../ThinkChatToolParts-CSzVwMXf.js";
2
- import { l as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-D1xOrNrq.js";
3
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-CdbL0aoA.js";
2
+ import { u as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-kr5fE0wg.js";
3
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../ThinkChatActivity-2BobmuvR.js";
4
4
  export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, describeThinkChatActivityPart, isThinkChatActivityPart, renderThinkChatActivityPart };
@@ -1,6 +1,6 @@
1
1
  import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "./Activity.js";
2
2
  import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
3
- import { f as MessageResponse } from "../Message-DzuteocT.js";
3
+ import { f as MessageResponse } from "../Message-_-bEYLAO.js";
4
4
  import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
5
5
  import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
6
6
  import { SubagentRunList } from "./SubagentRunList.js";
@@ -17,18 +17,18 @@ function activityPartIcon(part) {
17
17
  }
18
18
  /**
19
19
  * One run of agent work as a collapsed Activity block: while streaming the
20
- * label shimmers with the live step; settled, it becomes a short summary
20
+ * action shimmers with the live step; settled, it becomes a short summary
21
21
  * ("Thought, read 2 files and ran a command") over an expandable step log
22
22
  * with per-tool panels. Normally reached through `ThinkChat.Messages`;
23
23
  * exported for apps that lay out messages themselves.
24
24
  */
25
25
  function ThinkChatActivity({ parts, defaultOpen, isStreaming, toolRenderers }) {
26
26
  const steps = parts.flatMap((part, index) => {
27
- const text = describeThinkChatActivityPart(part, toolRenderers);
28
- if (!text) return [];
27
+ const description = describeThinkChatActivityPart(part, toolRenderers);
28
+ if (!description) return [];
29
29
  return [{
30
30
  key: isToolUIPart(part) ? part.toolCallId : `${part.type}-${index}`,
31
- text,
31
+ description,
32
32
  part
33
33
  }];
34
34
  });
@@ -44,65 +44,77 @@ function ThinkChatActivity({ parts, defaultOpen, isStreaming, toolRenderers }) {
44
44
  defaultOpen,
45
45
  children: [/* @__PURE__ */ jsx(ActivityTrigger, {
46
46
  icon: header.url ? /* @__PURE__ */ jsx(AgentActivityFavicon, { url: header.url }) : /* @__PURE__ */ jsx(AgentActivityIcon, { kind: header.iconKind }),
47
- label: header.label
47
+ action: header.action,
48
+ detail: header.detail
48
49
  }), /* @__PURE__ */ jsx(ActivityContent, { children: steps.map((step) => /* @__PURE__ */ jsx(ThinkChatActivityStep, {
49
- text: step.text,
50
+ description: step.description,
50
51
  part: step.part,
51
52
  toolRenderers
52
53
  }, step.key)) })]
53
54
  });
54
55
  }
55
- function ThinkChatActivityStep({ text, part, toolRenderers }) {
56
+ function ThinkChatActivityStep({ description, part, toolRenderers }) {
56
57
  const icon = activityPartIcon(part);
58
+ const { action: text, detail } = description;
57
59
  if (isToolUIPart(part)) {
58
60
  const customPanel = toolRenderers?.[getToolName(part)]?.panel?.(part);
59
61
  if (customPanel === null) return /* @__PURE__ */ jsx(ActivityItem, {
60
62
  icon,
63
+ detail,
61
64
  children: text
62
65
  });
63
66
  if (customPanel !== void 0) return /* @__PURE__ */ jsx(ActivityItemGroup, {
64
- label: text,
67
+ action: text,
68
+ detail,
65
69
  icon,
66
70
  children: customPanel
67
71
  });
68
72
  }
69
73
  if (isReasoningUIPart(part) && part.text.trim()) return /* @__PURE__ */ jsx(ActivityItemGroup, {
70
- label: text,
74
+ action: text,
75
+ detail,
71
76
  icon,
72
77
  children: /* @__PURE__ */ jsx(ActivityText, { children: /* @__PURE__ */ jsx(MessageResponse, { children: part.text }) })
73
78
  });
74
79
  if (isWorkspaceToolPart(part) && part.type !== "tool-delete") return /* @__PURE__ */ jsx(ActivityItemGroup, {
75
- label: text,
80
+ action: text,
81
+ detail,
76
82
  icon,
77
83
  children: /* @__PURE__ */ jsx(ThinkChatWorkspacePanel, { part })
78
84
  });
79
85
  if (isSkillToolPart(part)) return /* @__PURE__ */ jsx(ActivityItemGroup, {
80
- label: text,
86
+ action: text,
87
+ detail,
81
88
  icon,
82
89
  children: /* @__PURE__ */ jsx(ThinkChatSkillPanel, { part })
83
90
  });
84
91
  if (isSessionContextToolPart(part)) return /* @__PURE__ */ jsx(ActivityItemGroup, {
85
- label: text,
92
+ action: text,
93
+ detail,
86
94
  icon,
87
95
  children: /* @__PURE__ */ jsx(ThinkChatSessionContextPanel, { part })
88
96
  });
89
97
  if (isFetchToolPart(part)) return /* @__PURE__ */ jsx(ActivityItemGroup, {
90
- label: text,
98
+ action: text,
99
+ detail,
91
100
  icon,
92
101
  children: /* @__PURE__ */ jsx(ThinkChatFetchPanel, { part })
93
102
  });
94
103
  if (isBrowserToolPart(part)) return /* @__PURE__ */ jsx(ActivityItemGroup, {
95
- label: text,
104
+ action: text,
105
+ detail,
96
106
  icon,
97
107
  children: /* @__PURE__ */ jsx(ThinkChatBrowserPanel, { part })
98
108
  });
99
109
  if (isExecuteToolPart(part)) return /* @__PURE__ */ jsx(ActivityItemGroup, {
100
- label: text,
110
+ action: text,
111
+ detail,
101
112
  icon,
102
113
  children: /* @__PURE__ */ jsx(ThinkChatExecutePanel, { part })
103
114
  });
104
115
  return /* @__PURE__ */ jsx(ActivityItem, {
105
116
  icon,
117
+ detail,
106
118
  children: text
107
119
  });
108
120
  }
@@ -1,2 +1,2 @@
1
- import { a as activityPartIconKind, c as deriveThinkChatToolLifecycleHeader, i as ThinkChatToolLifecycleSnapshot, l as describeThinkChatActivityPart, n as ThinkChatToolDescriber, o as activityPartUrl, r as ThinkChatToolDescribers, s as deriveThinkChatActivityHeader, t as ThinkChatActivityHeader, u as summarizeActivitySteps } from "../ThinkChatActivitySummary-D1xOrNrq.js";
2
- export { ThinkChatActivityHeader, ThinkChatToolDescriber, ThinkChatToolDescribers, ThinkChatToolLifecycleSnapshot, activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, deriveThinkChatToolLifecycleHeader, describeThinkChatActivityPart, summarizeActivitySteps };
1
+ import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "../ThinkChatActivitySummary-kr5fE0wg.js";
2
+ export { ThinkChatActivityDescription, ThinkChatActivityHeader, ThinkChatToolDescriber, ThinkChatToolDescribers, ThinkChatToolLifecycleSnapshot, activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, deriveThinkChatToolLifecycleHeader, describeThinkChatActivityPart, summarizeActivitySteps };