@actioneer/ads 0.3.0 → 0.4.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 (35) hide show
  1. package/components/ai-elements/agent-trace.d.ts +87 -0
  2. package/components/ai-elements/agent-trace.js +180 -0
  3. package/components/ai-elements/chain-of-thought.d.ts +25 -5
  4. package/components/ai-elements/chain-of-thought.js +227 -183
  5. package/components/ai-elements/index.d.ts +1 -0
  6. package/components/ai-elements/research-activity.d.ts +17 -0
  7. package/components/ai-elements/research-activity.js +125 -107
  8. package/components/ai-elements/task.d.ts +7 -3
  9. package/components/ai-elements/task.js +84 -52
  10. package/components/ai-elements/tool.js +19 -19
  11. package/components/ai-elements/voice.d.ts +28 -12
  12. package/components/ai-elements/voice.js +270 -649
  13. package/components/alert.js +28 -16
  14. package/components/assistant-ui/composer-harness.js +5 -4
  15. package/components/code-block.d.ts +11 -5
  16. package/components/code-block.js +161 -62
  17. package/components/index.js +259 -257
  18. package/components/scroll-area.js +10 -10
  19. package/components/sidebar.js +1 -1
  20. package/components/stepper.d.ts +17 -9
  21. package/components/stepper.js +85 -96
  22. package/lib/icons.js +2 -2
  23. package/lib/motion.d.ts +2 -0
  24. package/lib/motion.js +21 -20
  25. package/llms.txt +7 -1
  26. package/manifest.json +69 -6
  27. package/package.json +1 -1
  28. package/styles.css +110 -4
  29. package/theme.css +12 -4
  30. package/components/agents-ui/agent-audio-visualizer-aura.d.ts +0 -11
  31. package/components/agents-ui/agent-audio-visualizer-aura.js +0 -277
  32. package/components/agents-ui/agent-audio-visualizer-wave.d.ts +0 -12
  33. package/components/agents-ui/agent-audio-visualizer-wave.js +0 -203
  34. package/components/agents-ui/react-shader-toy.d.ts +0 -87
  35. package/components/agents-ui/react-shader-toy.js +0 -531
@@ -1,88 +1,114 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as d, Fragment as C } from "react/jsx-runtime";
3
- import { Badge as b } from "../badge.js";
4
- import { Collapsible as v, CollapsibleTrigger as y, CollapsibleContent as N } from "../collapsible.js";
5
- import { ChevronRight as w, WarningCircle as O, Database as k, ChevronDown as S } from "../../lib/icons.js";
6
- import { cn as r } from "../../lib/cn.js";
7
- import { memo as c, useState as z, useRef as E, useEffect as R } from "react";
8
- const j = c(
9
- ({ className: o, role: i = "list", ...a }) => /* @__PURE__ */ t(
2
+ import { jsx as t, jsxs as c, Fragment as R } from "react/jsx-runtime";
3
+ import { Badge as y } from "../badge.js";
4
+ import { Collapsible as N, CollapsibleTrigger as C, CollapsibleContent as T } from "../collapsible.js";
5
+ import { ChevronRight as M, ChevronDown as w, WarningCircle as j, Database as _ } from "../../lib/icons.js";
6
+ import { cn as n } from "../../lib/cn.js";
7
+ import { createContext as O, memo as l, useContext as S, useState as D, useRef as A, useEffect as I } from "react";
8
+ import { motion as L } from "motion/react";
9
+ import { EASE_DISCLOSURE as P } from "../../lib/motion.js";
10
+ const k = O(!1), E = O("rail"), B = l(
11
+ ({
12
+ className: i,
13
+ role: o = "list",
14
+ connector: r = "rail",
15
+ children: a,
16
+ ...e
17
+ }) => /* @__PURE__ */ t(
10
18
  "div",
11
19
  {
12
20
  "data-slot": "chain-of-thought",
13
- role: i,
14
- className: r(
21
+ role: o,
22
+ className: n(
15
23
  "w-full",
16
- "[&>[data-slot=chain-of-thought-step]:not(:has(~_[data-slot=chain-of-thought-step]))]:pb-0",
17
- "[&>[data-slot=chain-of-thought-step]:not(:has(~_[data-slot=chain-of-thought-step]))]:before:hidden",
18
- o
24
+ r === "rail" && [
25
+ "[&>[data-slot=chain-of-thought-step]:not(:has(~_[data-slot=chain-of-thought-step]))]:pb-0",
26
+ "[&>[data-slot=chain-of-thought-step]:not(:has(~_[data-slot=chain-of-thought-step]))]:before:hidden"
27
+ ],
28
+ i
19
29
  ),
20
- ...a
30
+ ...e,
31
+ children: /* @__PURE__ */ t(E.Provider, { value: r, children: a })
21
32
  }
22
33
  )
23
- ), M = c(
34
+ ), F = l(
24
35
  ({
25
- className: o,
26
- defaultOpen: i,
27
- open: a,
28
- onOpenChange: n,
36
+ className: i,
37
+ defaultOpen: o,
38
+ open: r,
39
+ onOpenChange: a,
29
40
  status: e = "complete",
30
41
  role: s = "listitem",
31
42
  "aria-busy": h,
32
- ...m
43
+ children: m,
44
+ ...d
33
45
  }) => {
34
- const l = a !== void 0, [g, u] = z(
35
- i ?? e === "active"
36
- ), f = E(e), p = f.current !== "active" && e === "active", T = l ? a : p || g;
37
- return R(() => {
38
- const x = f.current;
39
- f.current = e, !(x === "active" || e !== "active") && (l || u(!0), n == null || n(!0));
40
- }, [l, n, e]), /* @__PURE__ */ t(
41
- v,
46
+ const p = S(E), u = r !== void 0, [g, f] = D(
47
+ o ?? e === "active"
48
+ ), b = A(e), z = b.current !== "active" && e === "active", v = u ? r : z || g;
49
+ return I(() => {
50
+ const x = b.current;
51
+ b.current = e, !(x === "active" || e !== "active") && (u || f(!0), a == null || a(!0));
52
+ }, [u, a, e]), /* @__PURE__ */ t(
53
+ N,
42
54
  {
43
55
  "data-slot": "chain-of-thought-step",
44
56
  "data-status": e,
45
- open: T,
57
+ open: v,
46
58
  onOpenChange: (x) => {
47
- l || u(x), n == null || n(x);
59
+ u || f(x), a == null || a(x);
48
60
  },
49
61
  role: s,
50
62
  "aria-current": e === "active" ? "step" : void 0,
51
63
  "aria-busy": h ?? (e === "active" || void 0),
52
- className: r(
64
+ className: n(
53
65
  "group/cot-step relative pb-2",
54
66
  // Connector rail: a 16px segment centred in the 28px gap between a
55
67
  // collapsed step's icon and the next one (top-8 = 32px from the step
56
68
  // top, ending 4px past its box). It stretches with an open step.
57
- "before:absolute before:top-8 before:-bottom-1 before:left-2 before:w-px before:bg-border before:content-['']",
69
+ p === "rail" && "before:absolute before:top-8 before:-bottom-1 before:left-2 before:w-px before:bg-border-strong before:content-['']",
70
+ // Tree connector: a continuous rail down the group with an elbow
71
+ // reaching EVERY step — the same branch language as Tree/TreeItem.
72
+ // The last step drops the rail; its elbow draws the final segment.
73
+ p === "tree" && [
74
+ "ps-5",
75
+ "before:absolute before:inset-y-0 before:left-0 before:border-l before:border-border-strong before:content-['']",
76
+ "last:before:hidden",
77
+ // top-0.5 + h-4 lands the elbow at 18px — the step icon's centre.
78
+ "after:absolute after:left-0 after:top-0.5 after:h-4 after:w-4 after:rounded-bl-[9px] after:border-b after:border-l after:border-border-strong after:content-['']"
79
+ ],
58
80
  e === "complete" && "text-secondary",
59
81
  e === "active" && "text-primary",
60
82
  e === "pending" && "text-tertiary/60",
61
83
  e === "error" && "text-danger",
62
- o
84
+ i
63
85
  ),
64
- ...m
86
+ ...d,
87
+ children: /* @__PURE__ */ t(k.Provider, { value: v, children: m })
65
88
  }
66
89
  );
67
90
  }
68
- ), _ = c(
91
+ ), U = l(
69
92
  ({
70
- className: o,
71
- children: i,
72
- leftIcon: a,
73
- endContent: n,
74
- swapIconOnHover: e = !0,
75
- ...s
76
- }) => /* @__PURE__ */ t(y, { asChild: !0, ...s, children: /* @__PURE__ */ d(
93
+ className: i,
94
+ children: o,
95
+ leftIcon: r,
96
+ endContent: a,
97
+ caret: e = !0,
98
+ swapIconOnHover: s = !0,
99
+ ...h
100
+ }) => /* @__PURE__ */ t(C, { asChild: !0, ...h, children: /* @__PURE__ */ c(
77
101
  "button",
78
102
  {
79
103
  type: "button",
80
104
  "data-slot": "chain-of-thought-trigger",
81
- className: r(
105
+ className: n(
82
106
  "group/cot-trigger flex min-h-9 w-full cursor-pointer items-center gap-3 rounded-sm text-left text-base text-current outline-none",
107
+ // Rows carry no hover fill: the caret is the affordance, and a filled
108
+ // band on every row makes a dense trace read as a list of buttons.
83
109
  "transition-colors duration-(--duration-fast) ease-out hover:text-primary",
84
110
  "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none",
85
- o
111
+ i
86
112
  ),
87
113
  children: [
88
114
  /* @__PURE__ */ t(
@@ -90,21 +116,21 @@ const j = c(
90
116
  {
91
117
  "aria-hidden": !0,
92
118
  className: "relative z-10 block size-4 shrink-0",
93
- children: a ? /* @__PURE__ */ d(C, { children: [
119
+ children: r ? /* @__PURE__ */ c(R, { children: [
94
120
  /* @__PURE__ */ t(
95
121
  "span",
96
122
  {
97
- className: r(
123
+ className: n(
98
124
  "absolute inset-0 flex items-center justify-center transition-opacity duration-(--duration-fast) ease-out [&>svg]:size-4 motion-reduce:transition-none",
99
- e && "group-hover/cot-trigger:opacity-0 group-data-[state=open]/cot-trigger:opacity-0"
125
+ !e && s && "group-hover/cot-trigger:opacity-0 group-data-[state=open]/cot-trigger:opacity-0"
100
126
  ),
101
- children: a
127
+ children: r
102
128
  }
103
129
  ),
104
- e && /* @__PURE__ */ t(
105
- w,
130
+ !e && s && /* @__PURE__ */ t(
131
+ M,
106
132
  {
107
- className: r(
133
+ className: n(
108
134
  "absolute inset-0 size-4 opacity-0 transition-[opacity,transform] duration-(--duration-fast) ease-out motion-reduce:transition-none",
109
135
  "group-hover/cot-trigger:opacity-100 group-data-[state=open]/cot-trigger:opacity-100",
110
136
  "group-data-[state=open]/cot-trigger:rotate-90"
@@ -114,84 +140,102 @@ const j = c(
114
140
  ] }) : /* @__PURE__ */ t("span", { className: "absolute top-1/2 left-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-dot bg-current" })
115
141
  }
116
142
  ),
117
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1", children: i }),
118
- n != null && /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: n })
143
+ /* @__PURE__ */ t("span", { className: "min-w-0 flex-1", children: o }),
144
+ /* @__PURE__ */ c("span", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
145
+ a != null && /* @__PURE__ */ t("span", { className: "text-xs text-tertiary tabular-nums", children: a }),
146
+ e && /* @__PURE__ */ t(
147
+ w,
148
+ {
149
+ className: "size-4 shrink-0 text-tertiary transition-transform duration-(--duration-fast) ease-out group-data-[state=open]/cot-trigger:rotate-180 motion-reduce:transition-none",
150
+ "aria-hidden": !0
151
+ }
152
+ )
153
+ ] })
119
154
  ]
120
155
  }
121
156
  ) })
122
- ), D = c(
123
- ({ className: o, children: i, ...a }) => /* @__PURE__ */ t(
124
- N,
125
- {
126
- "data-slot": "chain-of-thought-content",
127
- className: r(
128
- "overflow-hidden pl-7 pt-2 pb-1 text-foreground outline-none",
129
- "data-[state=closed]:pointer-events-none data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none",
130
- o
131
- ),
132
- ...a,
133
- children: i
134
- }
135
- )
136
- ), A = c(
137
- ({ className: o, ...i }) => /* @__PURE__ */ t(
157
+ ), W = l(
158
+ ({ className: i, children: o, ...r }) => {
159
+ const a = S(k);
160
+ return /* @__PURE__ */ t(T, { forceMount: !0, asChild: !0, ...r, children: /* @__PURE__ */ t(
161
+ L.div,
162
+ {
163
+ "data-slot": "chain-of-thought-content",
164
+ initial: !1,
165
+ animate: a ? "open" : "closed",
166
+ variants: {
167
+ open: { height: "auto", opacity: 1 },
168
+ closed: { height: 0, opacity: 0 }
169
+ },
170
+ transition: { duration: a ? 0.28 : 0.2, ease: P },
171
+ className: n(
172
+ "overflow-hidden text-foreground outline-none",
173
+ "data-[state=closed]:pointer-events-none",
174
+ i
175
+ ),
176
+ children: /* @__PURE__ */ t("div", { className: "pt-2 pb-1 pl-7", children: o })
177
+ }
178
+ ) });
179
+ }
180
+ ), X = l(
181
+ ({ className: i, ...o }) => /* @__PURE__ */ t(
138
182
  "div",
139
183
  {
140
184
  "data-slot": "chain-of-thought-item",
141
- className: r(
185
+ className: n(
142
186
  "relative pl-4 text-base text-secondary",
143
187
  "before:absolute before:top-2 before:left-0 before:size-1.5 before:rounded-dot before:bg-current before:content-['']",
144
- o
188
+ i
145
189
  ),
146
- ...i
190
+ ...o
147
191
  }
148
192
  )
149
- ), B = c(
150
- ({ className: o, ...i }) => /* @__PURE__ */ t(
193
+ ), q = l(
194
+ ({ className: i, ...o }) => /* @__PURE__ */ t(
151
195
  "div",
152
196
  {
153
- className: r("flex flex-wrap items-center gap-2", o),
154
- ...i
197
+ className: n("flex flex-wrap items-center gap-2", i),
198
+ ...o
155
199
  }
156
200
  )
157
- ), F = c(
158
- ({ className: o, children: i, ...a }) => /* @__PURE__ */ t(
159
- b,
201
+ ), G = l(
202
+ ({ className: i, children: o, ...r }) => /* @__PURE__ */ t(
203
+ y,
160
204
  {
161
- className: r("gap-1 font-normal", o),
205
+ className: n("gap-1 font-normal", i),
162
206
  color: "default",
163
207
  variant: "soft",
164
- ...a,
165
- children: i
208
+ ...r,
209
+ children: o
166
210
  }
167
211
  )
168
- ), I = c(
212
+ ), J = l(
169
213
  ({
170
- className: o,
171
- title: i,
172
- tag: a,
173
- meta: n,
214
+ className: i,
215
+ title: o,
216
+ tag: r,
217
+ meta: a,
174
218
  source: e,
175
219
  error: s,
176
220
  icon: h,
177
221
  defaultOpen: m = !1,
178
- children: l,
179
- ...g
180
- }) => /* @__PURE__ */ d(
181
- v,
222
+ children: d,
223
+ ...p
224
+ }) => /* @__PURE__ */ c(
225
+ N,
182
226
  {
183
227
  "data-slot": "chain-of-thought-evidence",
184
228
  "data-error": s != null || void 0,
185
229
  defaultOpen: m,
186
- className: r("w-full", o),
187
- ...g,
230
+ className: n("w-full", i),
231
+ ...p,
188
232
  children: [
189
- /* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ d(
233
+ /* @__PURE__ */ t(C, { asChild: !0, children: /* @__PURE__ */ c(
190
234
  "button",
191
235
  {
192
236
  type: "button",
193
237
  "data-slot": "chain-of-thought-evidence-trigger",
194
- className: r(
238
+ className: n(
195
239
  "group/cot-evidence flex min-h-8 w-full cursor-pointer items-center gap-2 rounded-md text-left outline-none",
196
240
  "transition-colors duration-(--duration-fast) ease-out hover:text-primary",
197
241
  "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none"
@@ -201,29 +245,29 @@ const j = c(
201
245
  "span",
202
246
  {
203
247
  "aria-hidden": !0,
204
- className: r(
248
+ className: n(
205
249
  "shrink-0 [&>svg]:size-3.5",
206
250
  s != null ? "text-danger" : "text-tertiary"
207
251
  ),
208
- children: h ?? (s != null ? /* @__PURE__ */ t(O, {}) : /* @__PURE__ */ t(k, {}))
252
+ children: h ?? (s != null ? /* @__PURE__ */ t(j, {}) : /* @__PURE__ */ t(_, {}))
209
253
  }
210
254
  ),
211
- /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-secondary", children: i }),
212
- a != null && /* @__PURE__ */ t(
213
- b,
255
+ /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-sm font-medium text-secondary", children: o }),
256
+ r != null && /* @__PURE__ */ t(
257
+ y,
214
258
  {
215
259
  color: "default",
216
260
  variant: "soft",
217
261
  className: "shrink-0 font-normal tabular-nums",
218
- children: a
262
+ children: r
219
263
  }
220
264
  ),
221
- n != null && /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: n }),
265
+ a != null && /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: a }),
222
266
  /* @__PURE__ */ t(
223
- S,
267
+ w,
224
268
  {
225
269
  "aria-hidden": !0,
226
- className: r(
270
+ className: n(
227
271
  "size-3.5 shrink-0 text-tertiary transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
228
272
  "group-data-[state=open]/cot-evidence:rotate-180"
229
273
  )
@@ -233,16 +277,16 @@ const j = c(
233
277
  }
234
278
  ) }),
235
279
  /* @__PURE__ */ t(
236
- N,
280
+ T,
237
281
  {
238
282
  "data-slot": "chain-of-thought-evidence-content",
239
- className: r(
283
+ className: n(
240
284
  "overflow-hidden outline-none",
241
285
  "data-[state=closed]:pointer-events-none data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none"
242
286
  ),
243
- children: /* @__PURE__ */ d("div", { className: "flex flex-col gap-1.5 pt-1.5", children: [
287
+ children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-1.5 pt-1.5", children: [
244
288
  s != null && /* @__PURE__ */ t("p", { className: "text-xs text-danger", children: s }),
245
- l,
289
+ d,
246
290
  e != null && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: e })
247
291
  ] })
248
292
  }
@@ -250,142 +294,142 @@ const j = c(
250
294
  ]
251
295
  }
252
296
  )
253
- ), L = c(
297
+ ), K = l(
254
298
  ({
255
- className: o,
256
- columns: i,
257
- rows: a,
258
- totalRows: n,
299
+ className: i,
300
+ columns: o,
301
+ rows: r,
302
+ totalRows: a,
259
303
  flag: e,
260
304
  ...s
261
305
  }) => {
262
- const h = n != null && n > a.length, m = (e == null ? void 0 : e.color) ?? "default";
263
- return /* @__PURE__ */ d(
306
+ const h = a != null && a > r.length, m = (e == null ? void 0 : e.color) ?? "default";
307
+ return /* @__PURE__ */ c(
264
308
  "div",
265
309
  {
266
310
  "data-slot": "chain-of-thought-evidence-table",
267
- className: r("overflow-hidden rounded-lg bg-surface", o),
311
+ className: n("overflow-hidden rounded-lg bg-surface", i),
268
312
  ...s,
269
313
  children: [
270
- /* @__PURE__ */ t("div", { className: "max-h-56 overflow-auto", children: /* @__PURE__ */ d("table", { className: "w-full border-collapse text-xs tabular-nums", children: [
271
- /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { className: "text-tertiary", children: i.map((l) => /* @__PURE__ */ t(
314
+ /* @__PURE__ */ t("div", { className: "max-h-56 overflow-auto", children: /* @__PURE__ */ c("table", { className: "w-full border-collapse text-xs tabular-nums", children: [
315
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { className: "text-tertiary", children: o.map((d) => /* @__PURE__ */ t(
272
316
  "th",
273
317
  {
274
- className: r(
318
+ className: n(
275
319
  "sticky top-0 bg-surface px-2.5 py-1.5 font-medium whitespace-nowrap",
276
- l.align === "end" ? "text-right" : "text-left"
320
+ d.align === "end" ? "text-right" : "text-left"
277
321
  ),
278
- children: l.label
322
+ children: d.label
279
323
  },
280
- l.key
324
+ d.key
281
325
  )) }) }),
282
- /* @__PURE__ */ t("tbody", { children: a.map((l, g) => {
283
- const u = e != null && String(l[e.key]) === String(e.value);
284
- return /* @__PURE__ */ t("tr", { className: r(u && "bg-muted"), children: i.map((f, p) => /* @__PURE__ */ t(
326
+ /* @__PURE__ */ t("tbody", { children: r.map((d, p) => {
327
+ const u = e != null && String(d[e.key]) === String(e.value);
328
+ return /* @__PURE__ */ t("tr", { className: n(u && "bg-muted"), children: o.map((g, f) => /* @__PURE__ */ t(
285
329
  "td",
286
330
  {
287
- className: r(
331
+ className: n(
288
332
  "px-2.5 py-1 whitespace-nowrap",
289
- f.align === "end" ? "text-right" : "text-left",
290
- p === 0 ? "text-foreground" : "text-secondary",
291
- u && p === 0 && "font-semibold",
292
- u && p === 0 && m === "danger" && "text-danger",
293
- u && p === 0 && m === "warning" && "text-warning"
333
+ g.align === "end" ? "text-right" : "text-left",
334
+ f === 0 ? "text-foreground" : "text-secondary",
335
+ u && f === 0 && "font-semibold",
336
+ u && f === 0 && m === "danger" && "text-danger",
337
+ u && f === 0 && m === "warning" && "text-warning"
294
338
  ),
295
- children: l[f.key]
339
+ children: d[g.key]
296
340
  },
297
- f.key
298
- )) }, g);
341
+ g.key
342
+ )) }, p);
299
343
  }) })
300
344
  ] }) }),
301
- h && /* @__PURE__ */ d("p", { className: "px-2.5 py-1.5 text-xs text-tertiary tabular-nums", children: [
302
- a.length,
345
+ h && /* @__PURE__ */ c("p", { className: "px-2.5 py-1.5 text-xs text-tertiary tabular-nums", children: [
346
+ r.length,
303
347
  " of ",
304
- n,
348
+ a,
305
349
  " rows"
306
350
  ] })
307
351
  ]
308
352
  }
309
353
  );
310
354
  }
311
- ), W = c(
312
- ({ className: o, role: i = "list", ...a }) => /* @__PURE__ */ t(
355
+ ), Q = l(
356
+ ({ className: i, role: o = "list", ...r }) => /* @__PURE__ */ t(
313
357
  "div",
314
358
  {
315
359
  "data-slot": "chain-of-thought-metrics",
316
- role: i,
317
- className: r("flex flex-wrap items-stretch gap-x-6 gap-y-2", o),
318
- ...a
360
+ role: o,
361
+ className: n("flex flex-wrap items-stretch gap-x-6 gap-y-2", i),
362
+ ...r
319
363
  }
320
364
  )
321
- ), X = {
365
+ ), V = {
322
366
  default: "text-foreground",
323
367
  danger: "text-danger",
324
368
  warning: "text-warning",
325
369
  success: "text-success",
326
370
  info: "text-info"
327
- }, q = c(
371
+ }, Y = l(
328
372
  ({
329
- className: o,
330
- label: i,
331
- value: a,
332
- sub: n,
373
+ className: i,
374
+ label: o,
375
+ value: r,
376
+ sub: a,
333
377
  color: e = "default",
334
378
  role: s = "listitem",
335
379
  ...h
336
- }) => /* @__PURE__ */ d(
380
+ }) => /* @__PURE__ */ c(
337
381
  "div",
338
382
  {
339
383
  "data-slot": "chain-of-thought-metric",
340
384
  "data-color": e,
341
385
  role: s,
342
- className: r("min-w-0", o),
386
+ className: n("min-w-0", i),
343
387
  ...h,
344
388
  children: [
345
- /* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: i }),
389
+ /* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: o }),
346
390
  /* @__PURE__ */ t(
347
391
  "div",
348
392
  {
349
- className: r(
393
+ className: n(
350
394
  "text-base font-semibold tabular-nums",
351
- X[e]
395
+ V[e]
352
396
  ),
353
- children: a
397
+ children: r
354
398
  }
355
399
  ),
356
- n != null && /* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: n })
400
+ a != null && /* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: a })
357
401
  ]
358
402
  }
359
403
  )
360
- ), G = c(
361
- ({ className: o, children: i, caption: a, ...n }) => /* @__PURE__ */ d("div", { className: r("space-y-2", o), ...n, children: [
362
- /* @__PURE__ */ t("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: i }),
363
- a && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: a })
404
+ ), Z = l(
405
+ ({ className: i, children: o, caption: r, ...a }) => /* @__PURE__ */ c("div", { className: n("space-y-2", i), ...a, children: [
406
+ /* @__PURE__ */ t("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: o }),
407
+ r && /* @__PURE__ */ t("p", { className: "text-xs text-tertiary", children: r })
364
408
  ] })
365
409
  );
366
- j.displayName = "ChainOfThought";
367
- M.displayName = "ChainOfThoughtStep";
368
- _.displayName = "ChainOfThoughtTrigger";
369
- D.displayName = "ChainOfThoughtContent";
370
- A.displayName = "ChainOfThoughtItem";
371
- B.displayName = "ChainOfThoughtSearchResults";
372
- F.displayName = "ChainOfThoughtSearchResult";
373
- I.displayName = "ChainOfThoughtEvidence";
374
- L.displayName = "ChainOfThoughtEvidenceTable";
375
- W.displayName = "ChainOfThoughtMetrics";
376
- q.displayName = "ChainOfThoughtMetric";
377
- G.displayName = "ChainOfThoughtImage";
410
+ B.displayName = "ChainOfThought";
411
+ F.displayName = "ChainOfThoughtStep";
412
+ U.displayName = "ChainOfThoughtTrigger";
413
+ W.displayName = "ChainOfThoughtContent";
414
+ X.displayName = "ChainOfThoughtItem";
415
+ q.displayName = "ChainOfThoughtSearchResults";
416
+ G.displayName = "ChainOfThoughtSearchResult";
417
+ J.displayName = "ChainOfThoughtEvidence";
418
+ K.displayName = "ChainOfThoughtEvidenceTable";
419
+ Q.displayName = "ChainOfThoughtMetrics";
420
+ Y.displayName = "ChainOfThoughtMetric";
421
+ Z.displayName = "ChainOfThoughtImage";
378
422
  export {
379
- j as ChainOfThought,
380
- D as ChainOfThoughtContent,
381
- I as ChainOfThoughtEvidence,
382
- L as ChainOfThoughtEvidenceTable,
383
- G as ChainOfThoughtImage,
384
- A as ChainOfThoughtItem,
385
- q as ChainOfThoughtMetric,
386
- W as ChainOfThoughtMetrics,
387
- F as ChainOfThoughtSearchResult,
388
- B as ChainOfThoughtSearchResults,
389
- M as ChainOfThoughtStep,
390
- _ as ChainOfThoughtTrigger
423
+ B as ChainOfThought,
424
+ W as ChainOfThoughtContent,
425
+ J as ChainOfThoughtEvidence,
426
+ K as ChainOfThoughtEvidenceTable,
427
+ Z as ChainOfThoughtImage,
428
+ X as ChainOfThoughtItem,
429
+ Y as ChainOfThoughtMetric,
430
+ Q as ChainOfThoughtMetrics,
431
+ G as ChainOfThoughtSearchResult,
432
+ q as ChainOfThoughtSearchResults,
433
+ F as ChainOfThoughtStep,
434
+ U as ChainOfThoughtTrigger
391
435
  };
@@ -1,3 +1,4 @@
1
+ export * from './agent-trace';
1
2
  export * from './chain-of-thought';
2
3
  export * from './chart';
3
4
  export * from './inline-citation';
@@ -28,6 +28,23 @@ export interface ResearchActivityProps extends Omit<React.HTMLAttributes<HTMLDiv
28
28
  * otherwise scroll away exactly when the run is still moving.
29
29
  */
30
30
  sticky?: boolean;
31
+ /**
32
+ * Show the disclosure chevron. Turn it off when the consumer controls `open`
33
+ * and the line is a status readout rather than a toggle — a chevron that
34
+ * does nothing is a false affordance.
35
+ */
36
+ collapsible?: boolean;
37
+ /**
38
+ * Where the summary/live line sits when the trace is open. `"bottom"` puts
39
+ * it directly beneath the steps — while running that is where the next step
40
+ * appears, and on completion it stays put rather than jumping back over the
41
+ * trace it just narrated. A CLOSED trace always shows its line at the top:
42
+ * it is then standing in for the whole trace, so it has to sit where the
43
+ * trace would be.
44
+ *
45
+ * Visual order only — the trigger stays before its content in the DOM.
46
+ */
47
+ activityPlacement?: "top" | "bottom";
31
48
  /** Controlled disclosure of the trace. */
32
49
  open?: boolean;
33
50
  /** Initial disclosure state. */