@actioneer/ads 0.5.9 → 0.7.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/components/ai-elements/agent-trace.d.ts +2 -2
  2. package/components/ai-elements/agent-trace.js +163 -104
  3. package/components/ai-elements/chain-of-thought.d.ts +2 -2
  4. package/components/ai-elements/chain-of-thought.js +1 -1
  5. package/components/ai-elements/index.d.ts +0 -5
  6. package/components/ai-elements/inline-citation.js +1 -1
  7. package/components/alert.d.ts +6 -6
  8. package/components/alert.js +89 -53
  9. package/components/answer-sources.d.ts +2 -6
  10. package/components/answer-sources.js +58 -60
  11. package/components/answer.d.ts +5 -0
  12. package/components/answer.js +311 -271
  13. package/components/assistant-ui/composer-harness.js +11 -14
  14. package/components/assistant-ui/composer.d.ts +3 -1
  15. package/components/assistant-ui/composer.js +148 -144
  16. package/components/assistant-ui/index.d.ts +0 -3
  17. package/components/assistant-ui/thread-context.d.ts +3 -1
  18. package/components/assistant-ui/thread.js +50 -42
  19. package/components/avatar.js +42 -42
  20. package/components/badge.d.ts +5 -6
  21. package/components/badge.js +13 -76
  22. package/components/body-page-header.d.ts +15 -0
  23. package/components/body-page-header.js +24 -0
  24. package/components/brand-loader.d.ts +0 -3
  25. package/components/brand-loader.js +10 -32
  26. package/components/breadcrumbs.d.ts +1 -8
  27. package/components/breadcrumbs.js +65 -78
  28. package/components/button.d.ts +1 -1
  29. package/components/button.js +55 -49
  30. package/components/card.js +19 -18
  31. package/components/chart.js +526 -503
  32. package/components/chip.d.ts +13 -1
  33. package/components/chip.js +93 -80
  34. package/components/collection-header.d.ts +17 -0
  35. package/components/collection-header.js +31 -0
  36. package/components/connector-card.d.ts +6 -6
  37. package/components/connector-card.js +31 -32
  38. package/components/date-range-picker.d.ts +26 -0
  39. package/components/date-range-picker.js +223 -0
  40. package/components/drawer.d.ts +19 -3
  41. package/components/drawer.js +143 -116
  42. package/components/dropdown.d.ts +1 -2
  43. package/components/dropdown.js +88 -89
  44. package/components/field.js +39 -34
  45. package/components/file-dropzone.js +1 -1
  46. package/components/index.d.ts +5 -4
  47. package/components/index.js +501 -546
  48. package/components/infinite-canvas.js +24 -24
  49. package/components/input-field.d.ts +18 -3
  50. package/components/input-field.js +88 -72
  51. package/components/input.js +16 -15
  52. package/components/modal.d.ts +31 -3
  53. package/components/modal.js +243 -169
  54. package/components/number-field.js +45 -42
  55. package/components/page-body.d.ts +12 -0
  56. package/components/page-body.js +18 -0
  57. package/components/pagination.js +36 -36
  58. package/components/panel.js +31 -28
  59. package/components/select.d.ts +21 -0
  60. package/components/select.js +189 -148
  61. package/components/setting-row.d.ts +6 -5
  62. package/components/setting-row.js +33 -32
  63. package/components/sidebar.d.ts +2 -0
  64. package/components/sidebar.js +165 -155
  65. package/components/skeleton.js +8 -7
  66. package/components/slider.js +1 -1
  67. package/components/surface-loader.d.ts +11 -0
  68. package/components/surface-loader.js +35 -0
  69. package/components/table.d.ts +16 -10
  70. package/components/table.js +426 -410
  71. package/components/tabs.d.ts +2 -0
  72. package/components/tabs.js +159 -294
  73. package/components/textarea.js +9 -9
  74. package/components/toast.d.ts +1 -1
  75. package/components/toast.js +181 -118
  76. package/components/tree.d.ts +5 -1
  77. package/components/tree.js +96 -63
  78. package/components/typography.d.ts +4 -4
  79. package/components/typography.js +13 -13
  80. package/components/ui/button.d.ts +1 -1
  81. package/components/ui/dialog.js +33 -33
  82. package/components/viz-charts.js +186 -183
  83. package/demo/components/add-to-artifact.js +8 -10
  84. package/fonts.css +2 -0
  85. package/lib/cn.js +11 -4
  86. package/lib/icons.d.ts +4 -0
  87. package/lib/icons.js +107 -106
  88. package/lib/interactive.d.ts +1 -1
  89. package/llms.txt +115 -152
  90. package/manifest.json +13730 -1084
  91. package/package.json +4 -2
  92. package/styles.css +365 -225
  93. package/theme.css +315 -176
  94. package/components/agent-icon.d.ts +0 -76
  95. package/components/agent-icon.js +0 -265
  96. package/components/ai-elements/queue.d.ts +0 -60
  97. package/components/ai-elements/queue.js +0 -193
  98. package/components/ai-elements/speech-input.d.ts +0 -16
  99. package/components/ai-elements/speech-input.js +0 -151
  100. package/components/ai-elements/task-progress.d.ts +0 -41
  101. package/components/ai-elements/task-progress.js +0 -224
  102. package/components/ai-elements/task.d.ts +0 -39
  103. package/components/ai-elements/task.js +0 -105
  104. package/components/ai-elements/voice.d.ts +0 -90
  105. package/components/ai-elements/voice.js +0 -496
  106. package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
  107. package/components/assistant-ui/follow-up-suggestions.js +0 -72
  108. package/components/assistant-ui/suggestions.d.ts +0 -7
  109. package/components/assistant-ui/suggestions.js +0 -19
  110. package/components/assistant-ui/voice.d.ts +0 -18
  111. package/components/link.d.ts +0 -14
  112. package/components/link.js +0 -72
  113. package/components/navbar.d.ts +0 -15
  114. package/components/navbar.js +0 -68
  115. package/components/pixel-icon.d.ts +0 -37
  116. package/components/pixel-icon.js +0 -859
@@ -4,7 +4,7 @@ import { ToolState } from './tool';
4
4
  /**
5
5
  * AgentTrace — the ENTIRE agent reasoning trace as one component, so any
6
6
  * consumer gets the complete, correct experience instead of hand-wiring it
7
- * from ChainOfThought / Task / Tool primitives and getting a subset (a
7
+ * from ChainOfThought / Tool primitives and getting a subset (a
8
8
  * misaligned connector, no live line, no slow-call handoff).
9
9
  *
10
10
  * It is live-only and fully controlled: pass the current agent state, update
@@ -13,7 +13,7 @@ import { ToolState } from './tool';
13
13
  * wants a counting clock, ticks `elapsed`).
14
14
  *
15
15
  * What it renders, always:
16
- * 1. Phases — steps grouped by `group`, each a `Task` disclosure; finished
16
+ * 1. Phases — steps grouped by `group`, each a private disclosure; finished
17
17
  * phases fold away while another is active.
18
18
  * 2. Steps — a tree-connected `ChainOfThought` per phase; settled steps
19
19
  * hang off the phase on a measured tree connector.
@@ -1,52 +1,111 @@
1
1
  "use client";
2
2
  import { jsxs as i, jsx as t, Fragment as q } from "react/jsx-runtime";
3
- import { memo as _, useState as J, useRef as z, useEffect as D } from "react";
4
- import { cn as P } from "../../lib/cn.js";
5
- import { Clock as Q } from "../../lib/icons.js";
6
- import { Alert as V, AlertTitle as X, AlertDescription as Y } from "../alert.js";
7
- import { Button as Z } from "../button.js";
8
- import { Text as ee } from "../typography.js";
9
- import { ChainOfThoughtStep as te, ChainOfThoughtTrigger as ne, ChainOfThoughtContent as oe, ChainOfThoughtItem as re, ChainOfThoughtSearchResults as ae, ChainOfThoughtSearchResult as se, ChainOfThought as le } from "./chain-of-thought.js";
10
- import { TraceStateIcon as N } from "./chain-of-thought-icon.js";
3
+ import { createContext as J, memo as P, useState as Q, useRef as j, useEffect as R, useContext as V } from "react";
4
+ import { motion as X } from "motion/react";
5
+ import { cn as Y } from "../../lib/cn.js";
6
+ import { Clock as Z, ChevronDown as ee } from "../../lib/icons.js";
7
+ import { springDisclosure as te } from "../../lib/motion.js";
8
+ import { Alert as ne, AlertTitle as oe, AlertDescription as re } from "../alert.js";
9
+ import { Button as ae } from "../button.js";
10
+ import { Collapsible as se, CollapsibleTrigger as ie, CollapsibleContent as le } from "../collapsible.js";
11
+ import { Text as ce } from "../typography.js";
12
+ import { ChainOfThoughtStep as de, ChainOfThoughtTrigger as ue, ChainOfThoughtContent as he, ChainOfThoughtItem as me, ChainOfThoughtSearchResults as pe, ChainOfThoughtSearchResult as fe, ChainOfThought as ge } from "./chain-of-thought.js";
13
+ import { TraceStateIcon as C } from "./chain-of-thought-icon.js";
11
14
  import { ResearchActivity as L } from "./research-activity.js";
12
- import { Task as ie, TaskTrigger as ce, TaskContent as de } from "./task.js";
13
- import { Tool as ue, ToolHeader as he, ToolContent as me, ToolInput as fe, ToolOutput as pe } from "./tool.js";
14
- const ge = "Main Agent", Te = 60;
15
- function C(e) {
15
+ import { Tool as ve, ToolHeader as be, ToolContent as xe, ToolInput as Ne, ToolOutput as Ce } from "./tool.js";
16
+ const Te = "Main Agent", we = 60, _ = J(!0);
17
+ function ye({
18
+ title: e,
19
+ icon: r,
20
+ summary: a,
21
+ open: l,
22
+ onOpenChange: s,
23
+ children: d
24
+ }) {
25
+ return /* @__PURE__ */ t(se, { open: l, onOpenChange: s, children: /* @__PURE__ */ i(_.Provider, { value: l, children: [
26
+ /* @__PURE__ */ t(ie, { asChild: !0, className: "group", children: /* @__PURE__ */ i(
27
+ "button",
28
+ {
29
+ type: "button",
30
+ className: "flex w-full cursor-pointer items-center gap-2 rounded-sm text-base text-secondary outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
31
+ children: [
32
+ /* @__PURE__ */ t(
33
+ "span",
34
+ {
35
+ className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
36
+ "aria-hidden": !0,
37
+ children: r
38
+ }
39
+ ),
40
+ /* @__PURE__ */ t("span", { className: "text-base", children: e }),
41
+ /* @__PURE__ */ i("span", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
42
+ a != null && /* @__PURE__ */ t("span", { className: "text-xs text-tertiary tabular-nums", children: a }),
43
+ /* @__PURE__ */ t(
44
+ ee,
45
+ {
46
+ className: "size-4 shrink-0 transition-transform duration-150 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
47
+ "aria-hidden": !0
48
+ }
49
+ )
50
+ ] })
51
+ ]
52
+ }
53
+ ) }),
54
+ /* @__PURE__ */ t(Se, { children: d })
55
+ ] }) });
56
+ }
57
+ function Se({ children: e }) {
58
+ const r = V(_);
59
+ return /* @__PURE__ */ t(le, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ t(
60
+ X.div,
61
+ {
62
+ initial: !1,
63
+ animate: r ? "open" : "closed",
64
+ variants: {
65
+ open: { height: "auto", opacity: 1 },
66
+ closed: { height: 0, opacity: 0 }
67
+ },
68
+ transition: te,
69
+ className: "overflow-hidden text-secondary outline-none data-[state=closed]:pointer-events-none",
70
+ children: /* @__PURE__ */ t("div", { className: "mt-2 ml-2 [--tree-rail-lead:9px]", children: e })
71
+ }
72
+ ) });
73
+ }
74
+ function T(e) {
16
75
  const r = Math.floor(e);
17
76
  return `${Math.floor(r / 60)}:${String(r % 60).padStart(2, "0")}`;
18
77
  }
19
78
  function k(e) {
20
79
  if (e.elapsed != null) return e.elapsed;
21
- if (e.seconds != null) return C(e.seconds);
80
+ if (e.seconds != null) return T(e.seconds);
22
81
  }
23
- function w(e) {
82
+ function N(e) {
24
83
  const r = [];
25
84
  for (const a of e) r.includes(a.group) || r.push(a.group);
26
85
  return r;
27
86
  }
28
- function ve(e) {
29
- const r = new Set(e.flatMap((l) => l.sources ?? [])).size, a = e.reduce((l, d) => l + (d.seconds ?? 0), 0), c = [];
30
- return r && c.push(`${r} ${r === 1 ? "source" : "sources"}`), a && e.length > 1 && c.push(C(a)), c.join(" · ") || void 0;
87
+ function Ae(e) {
88
+ const r = new Set(e.flatMap((s) => s.sources ?? [])).size, a = e.reduce((s, d) => s + (d.seconds ?? 0), 0), l = [];
89
+ return r && l.push(`${r} ${r === 1 ? "source" : "sources"}`), a && e.length > 1 && l.push(T(a)), l.join(" · ") || void 0;
31
90
  }
32
- function be(e) {
33
- var l, d, h;
34
- const r = (d = (l = e.calls) == null ? void 0 : l[0]) == null ? void 0 : d.name, a = (((h = e.calls) == null ? void 0 : h.length) ?? 0) - 1, c = a > 0 ? ` ${a} other call${a === 1 ? "" : "s"} in this step ${a === 1 ? "is" : "are"} waiting behind it.` : "";
91
+ function Oe(e) {
92
+ var s, d, h;
93
+ const r = (d = (s = e.calls) == null ? void 0 : s[0]) == null ? void 0 : d.name, a = (((h = e.calls) == null ? void 0 : h.length) ?? 0) - 1, l = a > 0 ? ` ${a} other call${a === 1 ? "" : "s"} in this step ${a === 1 ? "is" : "are"} waiting behind it.` : "";
35
94
  return {
36
95
  title: r ? `The ${r} call has not returned` : "This step has not finished",
37
96
  detail: /* @__PURE__ */ i(q, { children: [
38
97
  e.detail,
39
- c,
98
+ l,
40
99
  " Send for review to the Actioneer team to help with future runs."
41
100
  ] })
42
101
  };
43
102
  }
44
- const F = _(({ call: e }) => /* @__PURE__ */ i(ue, { children: [
45
- /* @__PURE__ */ t(he, { title: e.name, type: `tool-${e.name}`, state: e.state }),
46
- /* @__PURE__ */ i(me, { children: [
47
- e.input !== void 0 && /* @__PURE__ */ t(fe, { input: e.input }),
103
+ const F = P(({ call: e }) => /* @__PURE__ */ i(ve, { children: [
104
+ /* @__PURE__ */ t(be, { title: e.name, type: `tool-${e.name}`, state: e.state }),
105
+ /* @__PURE__ */ i(xe, { children: [
106
+ e.input !== void 0 && /* @__PURE__ */ t(Ne, { input: e.input }),
48
107
  /* @__PURE__ */ t(
49
- pe,
108
+ Ce,
50
109
  {
51
110
  output: e.state === "output-available" ? e.output : void 0,
52
111
  errorText: e.state === "output-error" ? e.error : void 0
@@ -55,133 +114,133 @@ const F = _(({ call: e }) => /* @__PURE__ */ i(ue, { children: [
55
114
  ] })
56
115
  ] }));
57
116
  F.displayName = "AgentTrace.ToolCard";
58
- const G = _(
117
+ const G = P(
59
118
  ({
60
119
  step: e,
61
120
  mainAgent: r,
62
121
  renderCall: a
63
122
  }) => {
64
123
  var d, h;
65
- const c = k(e), l = e.icon ?? (e.state && e.status !== "pending" ? /* @__PURE__ */ t(
66
- N,
124
+ const l = k(e), s = e.icon ?? (e.state && e.status !== "pending" ? /* @__PURE__ */ t(
125
+ C,
67
126
  {
68
127
  stage: e.state,
69
128
  toolName: (h = (d = e.calls) == null ? void 0 : d[0]) == null ? void 0 : h.name,
70
129
  status: e.status
71
130
  }
72
131
  ) : void 0);
73
- return /* @__PURE__ */ i(te, { status: e.status === "error" ? "error" : "complete", children: [
74
- /* @__PURE__ */ i(ne, { leftIcon: l, endContent: c, children: [
132
+ return /* @__PURE__ */ i(de, { status: e.status === "error" ? "error" : "complete", children: [
133
+ /* @__PURE__ */ i(ue, { leftIcon: s, endContent: l, children: [
75
134
  /* @__PURE__ */ t("span", { children: e.label }),
76
135
  e.agent && e.agent !== r && /* @__PURE__ */ t("span", { className: "ml-2 text-xs font-normal text-tertiary", children: e.agent })
77
136
  ] }),
78
- /* @__PURE__ */ t(oe, { rail: !1, children: /* @__PURE__ */ i("div", { className: "-ml-5", style: { "--tree-rail-lead": "18px" }, children: [
79
- e.detail != null && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(re, { children: e.detail }) }),
80
- e.sources && e.sources.length > 0 && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(ae, { children: e.sources.map((m) => /* @__PURE__ */ t(se, { children: m }, m)) }) }),
81
- (e.calls ?? []).map((m, S) => /* @__PURE__ */ t(
137
+ /* @__PURE__ */ t(he, { rail: !1, children: /* @__PURE__ */ i("div", { className: "-ml-5", style: { "--tree-rail-lead": "18px" }, children: [
138
+ e.detail != null && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(me, { children: e.detail }) }),
139
+ e.sources && e.sources.length > 0 && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(pe, { children: e.sources.map((m) => /* @__PURE__ */ t(fe, { children: m }, m)) }) }),
140
+ (e.calls ?? []).map((m, w) => /* @__PURE__ */ t(
82
141
  "div",
83
142
  {
84
143
  className: "ads-tree-branch pb-2 last:pb-0",
85
144
  style: { "--tree-elbow": "23px" },
86
145
  children: a ? a(m) : /* @__PURE__ */ t(F, { call: m })
87
146
  },
88
- S
147
+ w
89
148
  ))
90
149
  ] }) })
91
150
  ] });
92
151
  }
93
152
  );
94
153
  G.displayName = "AgentTrace.StepRow";
95
- const we = ({
154
+ const $e = ({
96
155
  steps: e,
97
- mainAgent: r = ge,
98
- slowSeconds: a = Te,
99
- reviewedStepIds: c,
100
- onSendForReview: l,
101
- slowMessage: d = be,
156
+ mainAgent: r = Te,
157
+ slowSeconds: a = we,
158
+ reviewedStepIds: l,
159
+ onSendForReview: s,
160
+ slowMessage: d = Oe,
102
161
  renderCall: h,
103
162
  className: m,
104
- ...S
163
+ ...w
105
164
  }) => {
106
- var R, j;
107
- const n = e.find((o) => o.status === "active") ?? null, f = e.filter((o) => o.status === "complete" || o.status === "error"), x = new Set(c ?? []), g = e.length > 0 && e.every((o) => o.status === "complete" || o.status === "error"), [H, y] = J(() => new Set(w(e))), A = z(null);
108
- D(() => {
165
+ var D, E;
166
+ const n = e.find((o) => o.status === "active") ?? null, p = e.filter((o) => o.status === "complete" || o.status === "error"), y = new Set(l ?? []), g = e.length > 0 && e.every((o) => o.status === "complete" || o.status === "error"), [H, S] = Q(() => new Set(N(e))), A = j(null);
167
+ R(() => {
109
168
  const o = (n == null ? void 0 : n.group) ?? null;
110
- o == null || o === A.current || (A.current = o, y(new Set(w(e).filter((u) => u !== o))));
169
+ o == null || o === A.current || (A.current = o, S(new Set(N(e).filter((u) => u !== o))));
111
170
  }, [n == null ? void 0 : n.group, e]);
112
- const M = z(g);
113
- D(() => {
114
- g && !M.current && (y(new Set(w(e))), A.current = null), M.current = g;
171
+ const M = j(g);
172
+ R(() => {
173
+ g && !M.current && (S(new Set(N(e))), A.current = null), M.current = g;
115
174
  }, [g, e]);
116
- const T = w(f).map((o) => {
117
- var p, b;
118
- const u = f.filter((v) => v.group === o), s = u[0];
175
+ const v = N(p).map((o) => {
176
+ var f, x;
177
+ const u = p.filter((b) => b.group === o), c = u[0];
119
178
  return {
120
179
  group: o,
121
- icon: (s == null ? void 0 : s.groupIcon) ?? /* @__PURE__ */ t(
122
- N,
180
+ icon: (c == null ? void 0 : c.groupIcon) ?? /* @__PURE__ */ t(
181
+ C,
123
182
  {
124
- stage: s == null ? void 0 : s.state,
125
- toolName: (b = (p = s == null ? void 0 : s.calls) == null ? void 0 : p[0]) == null ? void 0 : b.name,
183
+ stage: c == null ? void 0 : c.state,
184
+ toolName: (x = (f = c == null ? void 0 : c.calls) == null ? void 0 : f[0]) == null ? void 0 : x.name,
126
185
  status: "complete"
127
186
  }
128
187
  ),
129
188
  steps: u
130
189
  };
131
- }), U = (n == null ? void 0 : n.seconds) ?? 0, B = n != null && U >= a, $ = n ? d(n) : null, K = n ? n.icon ?? /* @__PURE__ */ t(
132
- N,
190
+ }), U = (n == null ? void 0 : n.seconds) ?? 0, B = n != null && U >= a, O = n ? d(n) : null, K = n ? n.icon ?? /* @__PURE__ */ t(
191
+ C,
133
192
  {
134
193
  stage: n.state,
135
- toolName: (j = (R = n.calls) == null ? void 0 : R[0]) == null ? void 0 : j.name,
194
+ toolName: (E = (D = n.calls) == null ? void 0 : D[0]) == null ? void 0 : E.name,
136
195
  status: "active"
137
196
  }
138
- ) : void 0, O = f.reduce((o, u) => o + (u.seconds ?? 0), 0), E = new Set(f.flatMap((o) => o.sources ?? [])).size, W = `Completed ${f.length} research ${f.length === 1 ? "step" : "steps"}${O ? ` · ${C(O)}` : ""}`, I = (
197
+ ) : void 0, $ = p.reduce((o, u) => o + (u.seconds ?? 0), 0), z = new Set(p.flatMap((o) => o.sources ?? [])).size, W = `Completed ${p.length} research ${p.length === 1 ? "step" : "steps"}${$ ? ` · ${T($)}` : ""}`, I = (
139
198
  /* Each PHASE is a branch row hanging off the summary/live line — the same
140
199
  tree language the steps use one level down. The wrapper (not the
141
200
  container) carries the rail + elbow per principle 14; inter-phase
142
201
  spacing is padding INSIDE the wrapper so the rail spans it unbroken.
143
- --tree-elbow lands on the TaskTrigger icon's centre (measured). */
144
- /* @__PURE__ */ t("div", { className: "flex flex-col", children: T.map(({ group: o, icon: u, steps: s }) => /* @__PURE__ */ t(
202
+ --tree-elbow lands on the phase trigger icon's centre (measured). */
203
+ /* @__PURE__ */ t("div", { className: "flex flex-col", children: v.map(({ group: o, icon: u, steps: c }) => /* @__PURE__ */ t(
145
204
  "div",
146
205
  {
147
206
  className: "ads-tree-branch pb-3 last:pb-0 [--tree-elbow:11px]",
148
- children: /* @__PURE__ */ i(
149
- ie,
207
+ children: /* @__PURE__ */ t(
208
+ ye,
150
209
  {
210
+ title: o,
211
+ icon: u,
212
+ summary: Ae(c),
151
213
  open: !H.has(o),
152
- onOpenChange: (p) => y((b) => {
153
- const v = new Set(b);
154
- return p ? v.delete(o) : v.add(o), v;
214
+ onOpenChange: (f) => S((x) => {
215
+ const b = new Set(x);
216
+ return f ? b.delete(o) : b.add(o), b;
155
217
  }),
156
- children: [
157
- /* @__PURE__ */ t(ce, { title: o, icon: u, endContent: ve(s) }),
158
- /* @__PURE__ */ t(de, { children: /* @__PURE__ */ t(le, { children: s.map((p) => /* @__PURE__ */ t(
159
- G,
160
- {
161
- step: p,
162
- mainAgent: r,
163
- renderCall: h
164
- },
165
- p.id
166
- )) }) })
167
- ]
218
+ children: /* @__PURE__ */ t(ge, { children: c.map((f) => /* @__PURE__ */ t(
219
+ G,
220
+ {
221
+ step: f,
222
+ mainAgent: r,
223
+ renderCall: h
224
+ },
225
+ f.id
226
+ )) })
168
227
  }
169
228
  )
170
229
  },
171
230
  o
172
231
  )) })
173
232
  );
174
- return /* @__PURE__ */ i("div", { "data-slot": "agent-trace", className: P("w-full", m), ...S, children: [
175
- g && T.length > 0 ? (
233
+ return /* @__PURE__ */ i("div", { "data-slot": "agent-trace", className: Y("w-full", m), ...w, children: [
234
+ g && v.length > 0 ? (
176
235
  /* Settled trace = one summary line; the phase tree waits one click
177
236
  away instead of stacking above the answer. */
178
237
  /* @__PURE__ */ t(
179
238
  L,
180
239
  {
181
240
  status: "complete",
182
- elapsed: C(O),
183
- sourceCount: E,
184
- icon: /* @__PURE__ */ t(N, { outcome: "completed" }),
241
+ elapsed: T($),
242
+ sourceCount: z,
243
+ icon: /* @__PURE__ */ t(C, { outcome: "completed" }),
185
244
  summary: W,
186
245
  children: I
187
246
  }
@@ -196,50 +255,50 @@ const we = ({
196
255
  {
197
256
  status: "active",
198
257
  elapsed: k(n) ?? "0:00",
199
- sourceCount: E,
258
+ sourceCount: z,
200
259
  icon: K,
201
260
  activity: n.label,
202
261
  activityKey: n.id,
203
- stepIndex: f.length + 1,
262
+ stepIndex: p.length + 1,
204
263
  stepCount: e.length,
205
- collapsible: T.length > 0,
206
- children: T.length > 0 ? I : /* @__PURE__ */ t("span", {})
264
+ collapsible: v.length > 0,
265
+ children: v.length > 0 ? I : /* @__PURE__ */ t("span", {})
207
266
  }
208
267
  )
209
268
  ) : I,
210
- n && B && $ && /* @__PURE__ */ t(
211
- V,
269
+ n && B && O && /* @__PURE__ */ t(
270
+ ne,
212
271
  {
213
272
  variant: "warning",
214
- icon: /* @__PURE__ */ t(Q, {}),
273
+ icon: /* @__PURE__ */ t(Z, {}),
215
274
  className: "mt-3 border border-border bg-card",
216
275
  children: /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
217
276
  /* @__PURE__ */ i("div", { className: "min-w-0", children: [
218
- /* @__PURE__ */ i(X, { children: [
219
- $.title,
277
+ /* @__PURE__ */ i(oe, { children: [
278
+ O.title,
220
279
  " —",
221
280
  " ",
222
281
  /* @__PURE__ */ t("span", { className: "tabular-nums text-tertiary", children: k(n) })
223
282
  ] }),
224
- /* @__PURE__ */ t(Y, { className: "text-base leading-6", children: $.detail })
283
+ /* @__PURE__ */ t(re, { className: "text-base leading-6", children: O.detail })
225
284
  ] }),
226
- l && /* @__PURE__ */ t(
227
- Z,
285
+ s && /* @__PURE__ */ t(
286
+ ae,
228
287
  {
229
288
  size: "sm",
230
- variant: x.has(n.id) ? "ghost" : "solid",
231
- disabled: x.has(n.id),
232
- onClick: () => l(n),
233
- children: x.has(n.id) ? "Sent" : "Skip and send"
289
+ variant: y.has(n.id) ? "ghost" : "solid",
290
+ disabled: y.has(n.id),
291
+ onClick: () => s(n),
292
+ children: y.has(n.id) ? "Sent" : "Skip and send"
234
293
  }
235
294
  )
236
295
  ] })
237
296
  }
238
297
  ),
239
- T.length === 0 && !n && /* @__PURE__ */ t(ee, { size: "sm", className: "text-tertiary", children: "No steps yet." })
298
+ v.length === 0 && !n && /* @__PURE__ */ t(ce, { size: "sm", className: "text-tertiary", children: "No steps yet." })
240
299
  ] });
241
300
  };
242
- we.displayName = "AgentTrace";
301
+ $e.displayName = "AgentTrace";
243
302
  export {
244
- we as AgentTrace
303
+ $e as AgentTrace
245
304
  };
@@ -38,8 +38,8 @@ export type ChainOfThoughtTriggerProps = Omit<ComponentProps<typeof CollapsibleT
38
38
  endContent?: ReactNode;
39
39
  /**
40
40
  * Show the disclosure caret at the row's trailing edge, next to
41
- * `endContent` — the same anatomy as `TaskTrigger`, so a nested trace reads
42
- * consistently at both levels. With the caret on, the leading icon keeps its
41
+ * `endContent`, so a nested trace reads consistently at both levels. With
42
+ * the caret on, the leading icon keeps its
43
43
  * meaning instead of being swapped for an affordance.
44
44
  */
45
45
  caret?: boolean;
@@ -71,7 +71,7 @@ const k = O(!1), S = O("tree"), I = c(
71
71
  // reaching EVERY step — the same branch language as Tree/TreeItem.
72
72
  // The last step drops the rail; its elbow draws the final segment.
73
73
  // The rail sits at the container's left edge; the PARENT indents
74
- // the group so that edge lands on its icon's centre (TaskContent
74
+ // the group so that edge lands on its icon's centre (AgentTrace
75
75
  // and ResearchActivity both use ml-2 for a size-4 icon), and sets
76
76
  // --tree-rail-lead so the FIRST row's rail climbs the gap to hang
77
77
  // from that icon instead of floating below it.
@@ -4,12 +4,7 @@ export * from './chain-of-thought-icon';
4
4
  export * from './chart';
5
5
  export * from './inline-citation';
6
6
  export * from './message';
7
- export * from './queue';
8
7
  export * from './research-activity';
9
8
  export * from './shimmer';
10
- export * from './speech-input';
11
- export * from './task';
12
- export * from './task-progress';
13
9
  export * from './tool';
14
10
  export * from './transcript';
15
- export * from './voice';
@@ -289,7 +289,7 @@ const G = ({
289
289
  "blockquote",
290
290
  {
291
291
  className: c(
292
- "border-l-2 border-border pl-3 text-base italic text-tertiary",
292
+ "border-l border-border pl-3 text-base italic text-tertiary",
293
293
  t
294
294
  ),
295
295
  ...s,
@@ -1,18 +1,18 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  /**
4
- * Alert — persistent inline messaging, ported from HeroUI v3's anatomy onto
5
- * ADS tokens: a NEUTRAL surface (no colored wash) where only the indicator
6
- * icon and the title carry the variant color; the description stays muted.
7
- * Flat per the elevation rule (an alert isn't clickable); generous 2xl
8
- * radius per the source. The `--alert-accent` var carries the variant color
9
- * down to AlertTitle without prop-drilling.
4
+ * Alert — inline status messaging on a raised white surface. Status color is
5
+ * confined to the indicator, title, and optional timeout progress bar; the
6
+ * description stays muted. Timed alerts enter from the right and leave to the
7
+ * left once their progress completes.
10
8
  */
11
9
  declare const alertVariants: (props?: ({
12
10
  variant?: "success" | "warning" | "danger" | "info" | "default" | null | undefined;
13
11
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
14
12
  export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
15
13
  icon?: React.ReactNode;
14
+ /** Auto-dismiss after this many milliseconds. Omit or use 0 for a persistent alert. */
15
+ duration?: number;
16
16
  onClose?: () => void;
17
17
  }
18
18
  export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;