@mcp-b/react-components 0.20.5 → 0.21.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 (116) hide show
  1. package/dist/{AgentActivity-D2SHSGFX.d.ts → AgentActivity-D3OvrC02.d.ts} +14 -1
  2. package/dist/{AgentChat-C-ZyXbJz.d.ts → AgentChat-Dvkn8lce.d.ts} +23 -0
  3. package/dist/AgentChatStartScreen-CvXJBr4y.d.ts +57 -0
  4. package/dist/{ModelSelector-pecWyOFI.js → ModelSelector-CEd8M9eK.js} +14 -7
  5. package/dist/{ThinkChatActivity-CdbL0aoA.d.ts → ThinkChatActivity-FY1VWXgh.d.ts} +8 -7
  6. package/dist/{ThinkChatActivitySummary-D1xOrNrq.d.ts → ThinkChatActivitySummary-kr5fE0wg.d.ts} +14 -5
  7. package/dist/{ToggleGroup-DNd6cDJZ.d.ts → ToggleGroup-BW1jrhAF.d.ts} +10 -0
  8. package/dist/components/Activity.d.ts +33 -17
  9. package/dist/components/Activity.js +39 -27
  10. package/dist/components/AgentActivity.d.ts +1 -1
  11. package/dist/components/AgentActivityPreview.d.ts +1 -1
  12. package/dist/components/AgentActivityPreview.js +2 -2
  13. package/dist/components/AgentChat.d.ts +1 -1
  14. package/dist/components/AgentChat.js +142 -129
  15. package/dist/components/AgentChatStartScreen.d.ts +2 -0
  16. package/dist/components/AgentChatStartScreen.js +82 -0
  17. package/dist/components/Approval.js +2 -4
  18. package/dist/components/BrowserLiveView.js +5 -7
  19. package/dist/components/BrowserReplay.js +5 -4
  20. package/dist/components/BrowserRunPanel.js +1 -1
  21. package/dist/components/ChatGptSignInScreen.js +1 -1
  22. package/dist/components/Conversation.d.ts +1 -22
  23. package/dist/components/Conversation.js +2 -29
  24. package/dist/components/EmptyState.d.ts +46 -0
  25. package/dist/components/EmptyState.js +50 -0
  26. package/dist/components/Kbd.d.ts +32 -0
  27. package/dist/components/Kbd.js +34 -0
  28. package/dist/components/ModelSelector.d.ts +10 -4
  29. package/dist/components/ModelSelector.js +2 -2
  30. package/dist/components/PricingBillingToggle.js +1 -0
  31. package/dist/components/PromptInput.js +3 -2
  32. package/dist/components/Reasoning.js +1 -1
  33. package/dist/components/StatusPill.d.ts +43 -0
  34. package/dist/components/StatusPill.js +35 -0
  35. package/dist/components/ThinkChat.d.ts +9 -3
  36. package/dist/components/ThinkChatActivity.d.ts +2 -2
  37. package/dist/components/ThinkChatActivity.js +27 -15
  38. package/dist/components/ThinkChatActivitySummary.d.ts +2 -2
  39. package/dist/components/ThinkChatActivitySummary.js +67 -64
  40. package/dist/components/ThinkExecutionDetail.js +4 -4
  41. package/dist/components/ThinkExecutionWorkbench.js +5 -4
  42. package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
  43. package/dist/components/ThinkRoutineBrowser.js +1 -0
  44. package/dist/components/ThinkRoutineRuns.js +3 -2
  45. package/dist/components/ThinkThreadPicker.js +3 -2
  46. package/dist/components/ToggleGroup.d.ts +1 -1
  47. package/dist/components/ToggleGroup.js +54 -7
  48. package/dist/components/ToolInvocation.js +1 -1
  49. package/dist/styles/activity-header.css +41 -10
  50. package/dist/styles/activity.css +26 -4
  51. package/dist/styles/agent-activity-preview-overlay.css +39 -12
  52. package/dist/styles/agent-activity-preview.css +31 -30
  53. package/dist/styles/agent-attention.css +2 -2
  54. package/dist/styles/agent-chat.css +199 -0
  55. package/dist/styles/agent-connection.css +8 -8
  56. package/dist/styles/alert-dialog.css +5 -2
  57. package/dist/styles/app-top-bar.css +4 -4
  58. package/dist/styles/approval.css +1 -7
  59. package/dist/styles/artifact.css +4 -4
  60. package/dist/styles/base-ui-motion.css +1 -1
  61. package/dist/styles/base.css +95 -3
  62. package/dist/styles/browser-control-overlay.css +16 -7
  63. package/dist/styles/browser-live-view.css +5 -38
  64. package/dist/styles/browser-replay.css +2 -6
  65. package/dist/styles/browser-run-panel.css +4 -18
  66. package/dist/styles/button.css +3 -1
  67. package/dist/styles/card.css +4 -4
  68. package/dist/styles/chain-of-thought.css +0 -1
  69. package/dist/styles/chatgpt-sign-in-screen.css +7 -5
  70. package/dist/styles/checkbox-group.css +3 -3
  71. package/dist/styles/code-block.css +4 -4
  72. package/dist/styles/context-menu.css +1 -1
  73. package/dist/styles/conversation.css +7 -42
  74. package/dist/styles/description-list.css +2 -2
  75. package/dist/styles/dialog.css +17 -2
  76. package/dist/styles/empty-state.css +48 -0
  77. package/dist/styles/environment-variables.css +4 -4
  78. package/dist/styles/field.css +2 -2
  79. package/dist/styles/index.css +3 -0
  80. package/dist/styles/inline-citation.css +1 -1
  81. package/dist/styles/kbd.css +40 -0
  82. package/dist/styles/media-preview-card.css +5 -3
  83. package/dist/styles/message-scroller.css +4 -4
  84. package/dist/styles/message.css +4 -6
  85. package/dist/styles/model-selector.css +5 -8
  86. package/dist/styles/popover.css +1 -1
  87. package/dist/styles/preview-card.css +1 -1
  88. package/dist/styles/prompt-input.css +18 -40
  89. package/dist/styles/queue.css +2 -2
  90. package/dist/styles/recipes.css +68 -9
  91. package/dist/styles/resizable-side-panel.css +1 -1
  92. package/dist/styles/responsive-sidebar-shell.css +5 -6
  93. package/dist/styles/scrollbars.css +32 -3
  94. package/dist/styles/sources.css +1 -1
  95. package/dist/styles/status-pill.css +39 -0
  96. package/dist/styles/stepper.css +2 -2
  97. package/dist/styles/streamdown.css +13 -12
  98. package/dist/styles/subagent-run.css +3 -3
  99. package/dist/styles/switch.css +1 -3
  100. package/dist/styles/tabs.css +1 -1
  101. package/dist/styles/task.css +1 -1
  102. package/dist/styles/terminal.css +2 -2
  103. package/dist/styles/test-results.css +1 -2
  104. package/dist/styles/textarea.css +1 -1
  105. package/dist/styles/theme-mode-control.css +1 -1
  106. package/dist/styles/think-execution-status.css +4 -23
  107. package/dist/styles/think-execution-workbench.css +2 -3
  108. package/dist/styles/think-full-app.css +2 -2
  109. package/dist/styles/think-routine-library.css +14 -16
  110. package/dist/styles/think-thread-picker.css +8 -25
  111. package/dist/styles/toast.css +2 -2
  112. package/dist/styles/toggle-group.css +76 -3
  113. package/dist/styles/tooltip.css +1 -2
  114. package/dist/styles/utilities.css +73 -0
  115. package/dist/styles/workspace-explorer.css +4 -6
  116. package/package.json +2 -2
@@ -7,7 +7,20 @@ type AgentActivityIconKind = "thought" | "read" | "edit" | "search" | "web" | "c
7
7
  /** Safe, serializable presentation state suitable for an Agents SDK state object. */
8
8
  interface AgentActivitySummary<CustomIcon extends string = never> {
9
9
  mode: AgentActivityMode;
10
- label: string;
10
+ /**
11
+ * The action phrase, already in the tense the part's state calls for:
12
+ * "Reading" while the tool runs, "Read" once it settles. Not a whole line —
13
+ * the thing being acted on belongs in `detail`, so a renderer can set the two
14
+ * apart. Joining them here is what makes an activity line read as one
15
+ * undifferentiated string.
16
+ */
17
+ action: string;
18
+ /**
19
+ * What the action is being applied to: a path, a command, a query. Optional
20
+ * because aggregate summaries ("Read 2 files and searched code") are a whole
21
+ * sentence with no target to separate out.
22
+ */
23
+ detail?: string;
11
24
  iconKind: AgentActivityIconKind | CustomIcon;
12
25
  /** Optional presentation hint. Consumers decide whether exposing or fetching it is safe. */
13
26
  url?: string;
@@ -1,4 +1,5 @@
1
1
  import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-CyD2UB3V.js";
2
+ import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-CvXJBr4y.js";
2
3
  import { $ as PromptInputDictationProps, A as PromptInputCommandDefinition, X as PromptInputContextSelectorProps, gt as PromptInputReference, n as PermissionMode, ut as PromptInputMessage } from "./PromptInput-Cq-8RoXD.js";
3
4
  import * as React from "react";
4
5
  import { ChatAddToolApproveResponseFunction, ChatStatus, UIMessage } from "ai";
@@ -79,6 +80,13 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
79
80
  disabled?: boolean;
80
81
  /** Rendered in place of the transcript while `messages` is empty. */
81
82
  emptyState?: React.ReactNode;
83
+ /**
84
+ * First-turn composition that places the live composer between a welcoming
85
+ * heading and app-authored starter actions. It is the default when messages
86
+ * are empty and no legacy `emptyState` is supplied. Pass `false` to retain
87
+ * the transcript-style empty row.
88
+ */
89
+ startScreen?: Omit<AgentChatStartScreenProps, "composer" | "className" | "aria-labelledby"> | false;
82
90
  /** Extra controls rendered in the composer toolbar. */
83
91
  composerTools?: React.ReactNode;
84
92
  /** Controlled slash-command catalog and host-owned selection policy. */
@@ -176,6 +184,18 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
176
184
  renderPart?: (context: AgentMessageRenderPartContext<MessageT>) => React.ReactNode | undefined;
177
185
  /** Rendered after each message's parts — for actions, citations, and the like. */
178
186
  renderMessageAfter?: (context: AgentChatRenderMessageContext<MessageT>) => React.ReactNode;
187
+ /**
188
+ * Per-message policy for the built-in assistant copy/retry toolbar. Use this
189
+ * for deterministic interactive data messages whose visible UI already owns
190
+ * its actions, while preserving a hidden model-visible text companion.
191
+ */
192
+ showAssistantActions?: (context: AgentChatRenderMessageContext<MessageT>) => boolean;
193
+ /**
194
+ * Selects transcript rows that should anchor at the top when they appear.
195
+ * Defaults to user messages; large deterministic assistant guides can opt in
196
+ * so their introduction is visible instead of their final action.
197
+ */
198
+ isMessageScrollAnchor?: (context: AgentChatRenderMessageContext<MessageT>) => boolean;
179
199
  }
180
200
  interface AgentChatComposerDraft {
181
201
  value: string;
@@ -204,6 +224,7 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
204
224
  placeholder,
205
225
  disabled,
206
226
  emptyState,
227
+ startScreen,
207
228
  composerHeader,
208
229
  composerTools,
209
230
  slashCommands,
@@ -225,6 +246,8 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
225
246
  contextWindow,
226
247
  renderPart,
227
248
  renderMessageAfter,
249
+ showAssistantActions,
250
+ isMessageScrollAnchor,
228
251
  ref
229
252
  }: AgentChatProps<MessageT> & {
230
253
  ref?: React.Ref<HTMLDivElement>;
@@ -0,0 +1,57 @@
1
+ import { r as ButtonProps } from "./Button-yRInko9u.js";
2
+ import * as React from "react";
3
+
4
+ //#region src/components/AgentChatStartScreen.d.ts
5
+ interface AgentChatStartScreenProps extends Omit<React.ComponentPropsWithoutRef<"section">, "children" | "title"> {
6
+ /** The prompt that orients the user before their first message. */
7
+ heading?: React.ReactNode;
8
+ /** The one composer owned by `AgentChat`, placed between the heading and starters. */
9
+ composer: React.ReactNode;
10
+ /** App-authored starter actions rendered below the composer. */
11
+ children?: React.ReactNode;
12
+ }
13
+ /**
14
+ * Welcoming first-turn layout for `AgentChat` and `ThinkChat`.
15
+ *
16
+ * `AgentChat` normally creates this component through its `startScreen` prop so
17
+ * the same live composer moves from the center of the empty view to the pinned
18
+ * transcript position after the first message.
19
+ */
20
+ declare function AgentChatStartScreen({
21
+ heading,
22
+ composer,
23
+ children,
24
+ className,
25
+ "aria-label": ariaLabel,
26
+ "aria-labelledby": ariaLabelledBy,
27
+ ...props
28
+ }: AgentChatStartScreenProps): React.JSX.Element;
29
+ interface AgentChatStarterListProps extends React.ComponentPropsWithoutRef<"ul"> {}
30
+ /** Semantic list for first-turn prompts below an `AgentChatStartScreen`. */
31
+ declare function AgentChatStarterList({
32
+ className,
33
+ ...props
34
+ }: AgentChatStarterListProps): React.JSX.Element;
35
+ interface AgentChatStarterProps extends Omit<ButtonProps, "color" | "iconOnly" | "size" | "variant"> {
36
+ /** Decorative icon shown before the prompt label. */
37
+ icon?: React.ReactNode;
38
+ /** Render the prompt with quieter onboarding emphasis. */
39
+ muted?: boolean;
40
+ /** Optional independent action for removing a suggested prompt. */
41
+ onDismiss?: React.MouseEventHandler<HTMLButtonElement>;
42
+ /** Accessible name for the dismiss action. */
43
+ dismissLabel?: string;
44
+ }
45
+ /** One full-width, keyboard-native starter prompt. */
46
+ declare function AgentChatStarter({
47
+ icon,
48
+ muted,
49
+ onDismiss,
50
+ dismissLabel,
51
+ children,
52
+ className,
53
+ type,
54
+ ...props
55
+ }: AgentChatStarterProps): React.JSX.Element;
56
+ //#endregion
57
+ export { AgentChatStarterListProps as a, AgentChatStarterList as i, AgentChatStartScreenProps as n, AgentChatStarterProps as o, AgentChatStarter as r, AgentChatStartScreen as t };
@@ -4,6 +4,7 @@ import { Button } from "./components/Button.js";
4
4
  import { Dialog } from "./components/Dialog.js";
5
5
  import { i as titleCase } from "./format-S6uWyoSb.js";
6
6
  import { Separator } from "./components/Separator.js";
7
+ import { EmptyState } from "./components/EmptyState.js";
7
8
  import { Input } from "./components/Input.js";
8
9
  import * as React from "react";
9
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -321,7 +322,7 @@ function CloudflareModelSelector({ models, selectedModelId = null, onSelectModel
321
322
  children: [
322
323
  /* @__PURE__ */ jsx(ModelSelectorLogo, { provider: getCloudflareModelProvider(typedModelId) }),
323
324
  /* @__PURE__ */ jsx(ModelSelectorName, { children: typedModelId }),
324
- /* @__PURE__ */ jsx(ModelSelectorShortcut, { children: "Use" })
325
+ /* @__PURE__ */ jsx(ModelSelectorSource, { children: "Use" })
325
326
  ]
326
327
  })
327
328
  }) : null,
@@ -335,7 +336,7 @@ function CloudflareModelSelector({ models, selectedModelId = null, onSelectModel
335
336
  children: [
336
337
  /* @__PURE__ */ jsx(ModelSelectorLogo, { provider: option.provider }),
337
338
  /* @__PURE__ */ jsx(ModelSelectorName, { children: option.id }),
338
- /* @__PURE__ */ jsx(ModelSelectorShortcut, { children: option.source === "workers-ai" ? "Workers AI" : "Gateway" })
339
+ /* @__PURE__ */ jsx(ModelSelectorSource, { children: option.source === "workers-ai" ? "Workers AI" : "Gateway" })
339
340
  ]
340
341
  }, option.id))
341
342
  }, group.providerLabel)),
@@ -444,7 +445,7 @@ function ModelSelectorItem({ className, value, keywords, selected, onSelect, chi
444
445
  }) });
445
446
  }
446
447
  function ModelSelectorEmpty({ className, children = "No models found", ref, ...props }) {
447
- return /* @__PURE__ */ jsx("div", {
448
+ return /* @__PURE__ */ jsx(EmptyState, {
448
449
  ref,
449
450
  className: cx("model-selector__empty", className),
450
451
  ...props,
@@ -483,13 +484,19 @@ function ModelSelectorName({ className, children, ref, ...props }) {
483
484
  children
484
485
  });
485
486
  }
486
- function ModelSelectorShortcut({ className, children, ref, ...props }) {
487
- return /* @__PURE__ */ jsx("kbd", {
487
+ /**
488
+ * Where a model comes from — "Workers AI", "Gateway" — shown at the end of its
489
+ * row. This was a `<kbd>` named `ModelSelectorSource`, which announced
490
+ * "Workers AI" to a screen reader as keyboard input and offered a shortcut
491
+ * that does not exist.
492
+ */
493
+ function ModelSelectorSource({ className, children, ref, ...props }) {
494
+ return /* @__PURE__ */ jsx("span", {
488
495
  ref,
489
- className: cx("model-selector__shortcut", className),
496
+ className: cx("model-selector__source", className),
490
497
  ...props,
491
498
  children
492
499
  });
493
500
  }
494
501
  //#endregion
495
- export { getCloudflareModelProvider as _, ModelSelectorEmpty as a, normalizeCloudflareModelSelectorModels as b, ModelSelectorItem as c, ModelSelectorLogoGroup as d, ModelSelectorName as f, formatCloudflareModelProvider as g, ModelSelectorTrigger as h, ModelSelectorDialog as i, ModelSelectorList as l, ModelSelectorShortcut as m, ModelSelector as n, ModelSelectorGroup as o, ModelSelectorSeparator as p, ModelSelectorContent as r, ModelSelectorInput as s, CloudflareModelSelector as t, ModelSelectorLogo as u, isCloudflareRunnableModelId as v, readCloudflareModelId as x, listCloudflareModelSelectorOptions as y };
502
+ export { getCloudflareModelProvider as _, ModelSelectorEmpty as a, normalizeCloudflareModelSelectorModels as b, ModelSelectorItem as c, ModelSelectorLogoGroup as d, ModelSelectorName as f, formatCloudflareModelProvider as g, ModelSelectorTrigger as h, ModelSelectorDialog as i, ModelSelectorList as l, ModelSelectorSource as m, ModelSelector as n, ModelSelectorGroup as o, ModelSelectorSeparator as p, ModelSelectorContent as r, ModelSelectorInput as s, CloudflareModelSelector as t, ModelSelectorLogo as u, isCloudflareRunnableModelId as v, readCloudflareModelId as x, listCloudflareModelSelectorOptions as y };
@@ -1,6 +1,7 @@
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-Dvkn8lce.js";
3
3
  import { l as ThinkChatPart } from "./ThinkChatToolParts-CSzVwMXf.js";
4
+ import { t as ThinkChatActivityDescription } from "./ThinkChatActivitySummary-kr5fE0wg.js";
4
5
  import * as React from "react";
5
6
  import { DynamicToolUIPart, ToolUIPart, UIMessage } from "ai";
6
7
  import { AgentToolRunState } from "agents/agent-tools";
@@ -9,11 +10,11 @@ import { AgentToolRunState } from "agents/agent-tools";
9
10
  /**
10
11
  * Bespoke rendering for one tool inside the activity log. Both hooks fall
11
12
  * through to the built-in families when they return `undefined`, so an
12
- * override can adjust just the label or just the panel.
13
+ * override can adjust just the action or just the panel.
13
14
  */
14
15
  interface ThinkChatToolRenderer {
15
- /** One-line step label. `null` hides the step from the log. */
16
- describe?: (part: ToolUIPart | DynamicToolUIPart) => string | null | undefined;
16
+ /** One-line step action. `null` hides the step from the log. */
17
+ describe?: (part: ToolUIPart | DynamicToolUIPart) => ThinkChatActivityDescription | null | undefined;
17
18
  /** Expanded detail under the step. `null` keeps the step a plain row. */
18
19
  panel?: (part: ToolUIPart | DynamicToolUIPart) => React.ReactNode;
19
20
  }
@@ -26,7 +27,7 @@ interface ThinkChatActivityRendererOptions<MessageT extends UIMessage = UIMessag
26
27
  * with custom UI, use `toolRenderers` instead.
27
28
  */
28
29
  excludeTools?: readonly string[];
29
- /** Per-tool label/panel overrides inside the activity log, keyed by tool name. */
30
+ /** Per-tool action/panel overrides inside the activity log, keyed by tool name. */
30
31
  toolRenderers?: ThinkChatToolRenderers;
31
32
  /** App-authored TanStack Router Link for each retained child destination. */
32
33
  renderAgentToolRunLink?: (run: AgentToolRunState<MessageT["parts"][number]>) => React.ReactElement;
@@ -37,12 +38,12 @@ interface ThinkChatActivityProps {
37
38
  parts: readonly ThinkChatPart[];
38
39
  /** Defaults to deriving from part states (reasoning streaming, tool awaiting output). */
39
40
  isStreaming?: boolean;
40
- /** Per-tool label/panel overrides, keyed by tool name. */
41
+ /** Per-tool action/panel overrides, keyed by tool name. */
41
42
  toolRenderers?: ThinkChatToolRenderers;
42
43
  }
43
44
  /**
44
45
  * One run of agent work as a collapsed Activity block: while streaming the
45
- * label shimmers with the live step; settled, it becomes a short summary
46
+ * action shimmers with the live step; settled, it becomes a short summary
46
47
  * ("Thought, read 2 files and ran a command") over an expandable step log
47
48
  * with per-tool panels. Normally reached through `ThinkChat.Messages`;
48
49
  * exported for apps that lay out messages themselves.
@@ -1,22 +1,31 @@
1
- import { i as AgentActivityIconKind, s as AgentActivitySummary } from "./AgentActivity-D2SHSGFX.js";
1
+ import { i as AgentActivityIconKind, s as AgentActivitySummary } from "./AgentActivity-D3OvrC02.js";
2
2
  import { l as ThinkChatPart } from "./ThinkChatToolParts-CSzVwMXf.js";
3
3
  import { DynamicToolUIPart, ToolUIPart } from "ai";
4
4
 
5
5
  //#region src/components/ThinkChatActivitySummary.d.ts
6
6
  interface ThinkChatToolDescriber {
7
- describe?: (part: ToolUIPart | DynamicToolUIPart) => string | null | undefined;
7
+ describe?: (part: ToolUIPart | DynamicToolUIPart) => ThinkChatActivityDescription | null | undefined;
8
8
  }
9
9
  type ThinkChatToolDescribers = Record<string, ThinkChatToolDescriber>;
10
10
  type ThinkChatActivityHeader = Omit<AgentActivitySummary, "mode">;
11
+ /**
12
+ * A described step, kept in two pieces so the renderer can set the action apart
13
+ * from what it acted on. Describers that produce a whole sentence — aggregate
14
+ * summaries, failures — leave `detail` off and put everything in `action`.
15
+ */
16
+ interface ThinkChatActivityDescription {
17
+ action: string;
18
+ detail?: string;
19
+ }
11
20
  declare function activityPartUrl(part: ThinkChatPart): string | null;
12
21
  declare function activityPartIconKind(part: ThinkChatPart): AgentActivityIconKind;
13
22
  /**
14
- * One-line natural-language label for an activity part ("Ran vp test",
23
+ * One-line natural-language action for an activity part ("Ran vp test",
15
24
  * "Fetched developers.cloudflare.com/agents/"); `null` for boundaries that
16
25
  * aren't steps (step-start). Exported so a custom `renderPart` can reuse the
17
26
  * built-in labels for tools it doesn't override.
18
27
  */
19
- declare function describeThinkChatActivityPart(part: ThinkChatPart, toolRenderers?: ThinkChatToolDescribers): string | null;
28
+ declare function describeThinkChatActivityPart(part: ThinkChatPart, toolRenderers?: ThinkChatToolDescribers): ThinkChatActivityDescription | null;
20
29
  declare function summarizeActivitySteps(parts: readonly ThinkChatPart[]): string;
21
30
  interface ThinkChatToolLifecycleSnapshot {
22
31
  toolName: string;
@@ -36,4 +45,4 @@ declare function deriveThinkChatActivityHeader(parts: readonly ThinkChatPart[],
36
45
  */
37
46
  declare function deriveThinkChatToolLifecycleHeader(snapshot: ThinkChatToolLifecycleSnapshot): ThinkChatActivityHeader;
38
47
  //#endregion
39
- export { activityPartIconKind as a, deriveThinkChatToolLifecycleHeader as c, ThinkChatToolLifecycleSnapshot as i, describeThinkChatActivityPart as l, ThinkChatToolDescriber as n, activityPartUrl as o, ThinkChatToolDescribers as r, deriveThinkChatActivityHeader as s, ThinkChatActivityHeader as t, summarizeActivitySteps as u };
48
+ export { ThinkChatToolLifecycleSnapshot as a, deriveThinkChatActivityHeader as c, summarizeActivitySteps as d, ThinkChatToolDescribers as i, deriveThinkChatToolLifecycleHeader as l, ThinkChatActivityHeader as n, activityPartIconKind as o, ThinkChatToolDescriber as r, activityPartUrl as s, ThinkChatActivityDescription as t, describeThinkChatActivityPart as u };
@@ -13,6 +13,15 @@ interface ToggleGroupProps extends React.ComponentPropsWithRef<typeof ToggleGrou
13
13
  */
14
14
  size?: ToggleGroupSize;
15
15
  spacing?: number;
16
+ /**
17
+ * Draws one shared thumb that slides between segments rather than lighting up
18
+ * each item's own background. This is the permission-mode / view-switch
19
+ * control; it is a presentation of this group, not a separate component.
20
+ *
21
+ * Only meaningful for single selection — a sliding thumb cannot be in two
22
+ * places, so a `multiple` group ignores it.
23
+ */
24
+ segmented?: boolean;
16
25
  }
17
26
  interface ToggleGroupItemProps extends React.ComponentPropsWithRef<typeof Toggle>, Omit<ToggleVariantsOptions, "className"> {}
18
27
  /**
@@ -43,6 +52,7 @@ interface ToggleGroupItemProps extends React.ComponentPropsWithRef<typeof Toggle
43
52
  declare function ToggleGroupRoot({
44
53
  size,
45
54
  spacing,
55
+ segmented,
46
56
  variant,
47
57
  className,
48
58
  children,
@@ -3,22 +3,22 @@ import * as React from "react";
3
3
 
4
4
  //#region src/components/Activity.d.ts
5
5
  interface ActivityProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {
6
- /** While true, the trigger label shimmers. */
6
+ /** While true, the trigger action shimmers. */
7
7
  isStreaming?: boolean;
8
8
  }
9
9
  /**
10
10
  * A collapsible activity line that aggregates agent activity (tool calls,
11
11
  * file edits, searches) instead of rendering every call as its own block.
12
12
  * Borderless, Claude/Codex style: the collapsed state is a single plain text
13
- * line whose label shimmers while streaming — pass the latest action as the
14
- * label while streaming, and a short summary once settled. Expanding reveals
13
+ * line whose action shimmers while streaming — pass the latest action while
14
+ * streaming, and a short summary once settled. Expanding reveals
15
15
  * the full log. Compose with ActivityTrigger, ActivityContent, and
16
16
  * ActivityItem.
17
17
  *
18
18
  * @example
19
19
  * ```tsx
20
20
  * <Activity isStreaming={running}>
21
- * <ActivityTrigger label={running ? "Searching code" : "Read 2 files and searched code"} />
21
+ * <ActivityTrigger action={running ? "Searching code" : "Read 2 files and searched code"} />
22
22
  * <ActivityContent>
23
23
  * <ActivityItem>Searched code</ActivityItem>
24
24
  * <ActivityItem>Edited a file</ActivityItem>
@@ -35,20 +35,29 @@ declare function Activity({
35
35
  }: ActivityProps & {
36
36
  ref?: React.Ref<HTMLDivElement>;
37
37
  }): React.JSX.Element;
38
- interface ActivityTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled"> {
39
- /** Header text. Defaults to "Working…". */
40
- label?: React.ReactNode;
38
+ interface ActivityTriggerProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "unstyled" | "children"> {
39
+ /** The action being taken. Defaults to "Working…". */
40
+ action?: React.ReactNode;
41
+ /** What the action is being applied to, rendered quieter. See ActivityHeader. */
42
+ detail?: React.ReactNode;
41
43
  /** Optional leading icon for the header. */
42
44
  icon?: React.ReactNode;
43
45
  }
44
46
  interface ActivityHeaderProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
45
- /** Current one-line activity label. */
46
- label?: React.ReactNode;
47
+ /** The action being taken, e.g. "Reading" or "Ran". */
48
+ action?: React.ReactNode;
49
+ /**
50
+ * What the action applies to: a path, a command, a query. Rendered in the
51
+ * muted role beside the action, which is what lets a reader find the verb at
52
+ * a glance in a column of activity lines. It also truncates first, so a long
53
+ * command loses its tail rather than pushing the action out of view.
54
+ */
55
+ detail?: React.ReactNode;
47
56
  /** Optional leading activity icon. */
48
57
  icon?: React.ReactNode;
49
58
  /** Optional trailing affordance supplied by the interactive owner. */
50
59
  trailing?: React.ReactNode;
51
- /** While true, the label uses the shared streaming treatment. */
60
+ /** While true, the action uses the shared streaming treatment. */
52
61
  isStreaming?: boolean;
53
62
  }
54
63
  /**
@@ -58,9 +67,10 @@ interface ActivityHeaderProps extends Omit<React.HTMLAttributes<HTMLSpanElement>
58
67
  */
59
68
  declare function ActivityHeader({
60
69
  className,
70
+ detail,
61
71
  icon,
62
72
  isStreaming,
63
- label,
73
+ action,
64
74
  trailing,
65
75
  ref,
66
76
  ...props
@@ -68,14 +78,14 @@ declare function ActivityHeader({
68
78
  ref?: React.Ref<HTMLSpanElement>;
69
79
  }): React.JSX.Element;
70
80
  /**
71
- * Clickable header line that toggles the activity log. The label shimmers
81
+ * Clickable header line that toggles the activity log. The action shimmers
72
82
  * while the parent Activity is streaming.
73
83
  */
74
84
  declare function ActivityTrigger({
75
85
  className,
76
- label,
86
+ action,
87
+ detail,
77
88
  icon,
78
- children,
79
89
  ref,
80
90
  ...props
81
91
  }: ActivityTriggerProps & {
@@ -92,8 +102,10 @@ declare function ActivityContent({
92
102
  ref?: React.Ref<HTMLDivElement>;
93
103
  }): React.JSX.Element;
94
104
  interface ActivityItemGroupProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "unstyled"> {
95
- /** The row text, e.g. "Ran bash · vp test". */
96
- label: React.ReactNode;
105
+ /** The action the row reports, e.g. "Ran" or "Edited". */
106
+ action: React.ReactNode;
107
+ /** What the action applied to — a path, a command. Rendered muted. */
108
+ detail?: React.ReactNode;
97
109
  /** Optional leading icon for the row. */
98
110
  icon?: React.ReactNode;
99
111
  }
@@ -104,7 +116,8 @@ interface ActivityItemGroupProps extends Omit<React.ComponentProps<typeof Collap
104
116
  */
105
117
  declare function ActivityItemGroup({
106
118
  className,
107
- label,
119
+ action,
120
+ detail,
108
121
  icon,
109
122
  children,
110
123
  ref,
@@ -125,6 +138,8 @@ declare function ActivityText({
125
138
  interface ActivityItemProps extends React.HTMLAttributes<HTMLDivElement> {
126
139
  /** Optional leading icon for the row. */
127
140
  icon?: React.ReactNode;
141
+ /** What the row's action applied to — a path, a command. Rendered muted. */
142
+ detail?: React.ReactNode;
128
143
  }
129
144
  /**
130
145
  * A single activity row — "Searched code", "Edited a file", etc. Free-form
@@ -133,6 +148,7 @@ interface ActivityItemProps extends React.HTMLAttributes<HTMLDivElement> {
133
148
  declare function ActivityItem({
134
149
  className,
135
150
  icon,
151
+ detail,
136
152
  children,
137
153
  ref,
138
154
  ...props
@@ -8,15 +8,15 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  * A collapsible activity line that aggregates agent activity (tool calls,
9
9
  * file edits, searches) instead of rendering every call as its own block.
10
10
  * Borderless, Claude/Codex style: the collapsed state is a single plain text
11
- * line whose label shimmers while streaming — pass the latest action as the
12
- * label while streaming, and a short summary once settled. Expanding reveals
11
+ * line whose action shimmers while streaming — pass the latest action while
12
+ * streaming, and a short summary once settled. Expanding reveals
13
13
  * the full log. Compose with ActivityTrigger, ActivityContent, and
14
14
  * ActivityItem.
15
15
  *
16
16
  * @example
17
17
  * ```tsx
18
18
  * <Activity isStreaming={running}>
19
- * <ActivityTrigger label={running ? "Searching code" : "Read 2 files and searched code"} />
19
+ * <ActivityTrigger action={running ? "Searching code" : "Read 2 files and searched code"} />
20
20
  * <ActivityContent>
21
21
  * <ActivityItem>Searched code</ActivityItem>
22
22
  * <ActivityItem>Edited a file</ActivityItem>
@@ -39,7 +39,7 @@ function Activity({ className, isStreaming = false, defaultOpen = false, ref, ..
39
39
  * disclosure behavior so a transcript, app shell, or injected preview can
40
40
  * provide the correct interaction semantics around the same visual.
41
41
  */
42
- function ActivityHeader({ className, icon, isStreaming = false, label = "Working…", trailing, ref, ...props }) {
42
+ function ActivityHeader({ className, detail, icon, isStreaming = false, action = "Working…", trailing, ref, ...props }) {
43
43
  return /* @__PURE__ */ jsxs("span", {
44
44
  ref,
45
45
  className: cx("activity__header", className),
@@ -52,25 +52,23 @@ function ActivityHeader({ className, icon, isStreaming = false, label = "Working
52
52
  children: icon
53
53
  }) : null,
54
54
  /* @__PURE__ */ jsx("span", {
55
- className: "activity__header-label sigvelo-truncate",
56
- children: label
55
+ className: "activity__header-action",
56
+ children: action
57
57
  }),
58
+ detail ? " " : null,
59
+ detail ? /* @__PURE__ */ jsx("span", {
60
+ className: "activity__header-detail",
61
+ children: detail
62
+ }) : null,
58
63
  trailing
59
64
  ]
60
65
  });
61
66
  }
62
67
  /**
63
- * Clickable header line that toggles the activity log. The label shimmers
68
+ * Clickable header line that toggles the activity log. The action shimmers
64
69
  * while the parent Activity is streaming.
65
70
  */
66
- function ActivityTrigger({ className, label = "Working…", icon, children, ref, ...props }) {
67
- if (children !== void 0 && children !== null) return /* @__PURE__ */ jsx(Collapsible.Trigger, {
68
- ref,
69
- className: cx("activity__trigger", className),
70
- ...props,
71
- unstyled: true,
72
- children
73
- });
71
+ function ActivityTrigger({ className, action = "Working…", detail, icon, ref, ...props }) {
74
72
  return /* @__PURE__ */ jsx(Collapsible.Trigger, {
75
73
  ref,
76
74
  className: cx("activity__trigger", className),
@@ -78,7 +76,8 @@ function ActivityTrigger({ className, label = "Working…", icon, children, ref,
78
76
  unstyled: true,
79
77
  children: /* @__PURE__ */ jsx(ActivityHeader, {
80
78
  icon,
81
- label,
79
+ action,
80
+ detail,
82
81
  trailing: /* @__PURE__ */ jsx("span", {
83
82
  className: "activity__trigger-icon",
84
83
  "aria-hidden": "true",
@@ -105,7 +104,7 @@ function ActivityContent({ className, children, ref, ...props }) {
105
104
  * like a plain ActivityItem; expanding reveals chrome-free detail (a Terminal,
106
105
  * a thought trace) flush inside the outer Activity log.
107
106
  */
108
- function ActivityItemGroup({ className, label, icon, children, ref, ...props }) {
107
+ function ActivityItemGroup({ className, action, detail, icon, children, ref, ...props }) {
109
108
  return /* @__PURE__ */ jsxs(Collapsible.Root, {
110
109
  ref,
111
110
  className: cx("activity__group", className),
@@ -122,8 +121,13 @@ function ActivityItemGroup({ className, label, icon, children, ref, ...props })
122
121
  }) : null,
123
122
  /* @__PURE__ */ jsx("span", {
124
123
  className: "activity__item-text",
125
- children: label
124
+ children: action
126
125
  }),
126
+ detail ? " " : null,
127
+ detail ? /* @__PURE__ */ jsx("span", {
128
+ className: "activity__item-detail",
129
+ children: detail
130
+ }) : null,
127
131
  /* @__PURE__ */ jsx("span", {
128
132
  className: "activity__group-icon",
129
133
  "aria-hidden": "true",
@@ -154,19 +158,27 @@ function ActivityText({ className, children, ref, ...props }) {
154
158
  * A single activity row — "Searched code", "Edited a file", etc. Free-form
155
159
  * content; keep it to one line so the streaming peek reads well.
156
160
  */
157
- function ActivityItem({ className, icon, children, ref, ...props }) {
161
+ function ActivityItem({ className, icon, detail, children, ref, ...props }) {
158
162
  return /* @__PURE__ */ jsxs("div", {
159
163
  ref,
160
164
  className: cx("activity__item", className),
161
165
  ...props,
162
- children: [icon ? /* @__PURE__ */ jsx("span", {
163
- className: "activity__item-icon",
164
- "aria-hidden": "true",
165
- children: icon
166
- }) : null, /* @__PURE__ */ jsx("span", {
167
- className: "activity__item-text",
168
- children
169
- })]
166
+ children: [
167
+ icon ? /* @__PURE__ */ jsx("span", {
168
+ className: "activity__item-icon",
169
+ "aria-hidden": "true",
170
+ children: icon
171
+ }) : null,
172
+ /* @__PURE__ */ jsx("span", {
173
+ className: "activity__item-text",
174
+ children
175
+ }),
176
+ detail ? " " : null,
177
+ detail ? /* @__PURE__ */ jsx("span", {
178
+ className: "activity__item-detail",
179
+ children: detail
180
+ }) : null
181
+ ]
170
182
  });
171
183
  }
172
184
  /** Scrollable monospaced output inside an ActivityPanel. */
@@ -1,2 +1,2 @@
1
- import { a as AgentActivityIconProps, i as AgentActivityIconKind, n as AgentActivityFaviconProps, o as AgentActivityMode, r as AgentActivityIcon, s as AgentActivitySummary, t as AgentActivityFavicon } from "../AgentActivity-D2SHSGFX.js";
1
+ import { a as AgentActivityIconProps, i as AgentActivityIconKind, n as AgentActivityFaviconProps, o as AgentActivityMode, r as AgentActivityIcon, s as AgentActivitySummary, t as AgentActivityFavicon } from "../AgentActivity-D3OvrC02.js";
2
2
  export { AgentActivityFavicon, AgentActivityFaviconProps, AgentActivityIcon, AgentActivityIconKind, AgentActivityIconProps, AgentActivityMode, AgentActivitySummary };
@@ -1,5 +1,5 @@
1
1
  import { n as WorkspaceDestination } from "../WorkspaceLink-O-EBKUJ8.js";
2
- import { s as AgentActivitySummary } from "../AgentActivity-D2SHSGFX.js";
2
+ import { s as AgentActivitySummary } from "../AgentActivity-D3OvrC02.js";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/components/AgentActivityPreview.d.ts
@@ -36,7 +36,7 @@ function AgentActivityPreview({ "aria-label": ariaLabel = "Agent activity", bran
36
36
  children: [/* @__PURE__ */ jsx(NavigationLink, {
37
37
  render: renderAgentLink(item),
38
38
  className: "agent-activity-preview__row",
39
- "aria-label": `${item.label}. ${statusLabel(item.status)}. Open agent.`,
39
+ "aria-label": `${item.action}. ${statusLabel(item.status)}. Open agent.`,
40
40
  "data-status": item.status,
41
41
  children: /* @__PURE__ */ jsx(ActivityHeader, {
42
42
  icon: item.url ? /* @__PURE__ */ jsx(AgentActivityFavicon, {
@@ -44,7 +44,7 @@ function AgentActivityPreview({ "aria-label": ariaLabel = "Agent activity", bran
44
44
  fallbackKind: item.iconKind
45
45
  }) : /* @__PURE__ */ jsx(AgentActivityIcon, { kind: item.iconKind }),
46
46
  isStreaming: item.status === "running",
47
- label: item.label,
47
+ action: item.action,
48
48
  trailing: /* @__PURE__ */ jsxs("span", {
49
49
  className: "agent-activity-preview__trailing",
50
50
  "aria-hidden": "true",
@@ -1,2 +1,2 @@
1
- import { a as PermissionModeControl, i as AgentChatRenderMessageContext, n as AgentChatComposerDraft, r as AgentChatProps, t as AgentChat } from "../AgentChat-C-ZyXbJz.js";
1
+ import { a as PermissionModeControl, i as AgentChatRenderMessageContext, n as AgentChatComposerDraft, r as AgentChatProps, t as AgentChat } from "../AgentChat-Dvkn8lce.js";
2
2
  export { AgentChat, AgentChatComposerDraft, AgentChatProps, AgentChatRenderMessageContext, PermissionModeControl };