@actioneer/ads 0.5.4 → 0.5.6

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 (93) hide show
  1. package/components/accordion.js +15 -15
  2. package/components/agent-icon.d.ts +64 -0
  3. package/components/agent-icon.js +251 -0
  4. package/components/ai-elements/agent-trace.d.ts +8 -1
  5. package/components/ai-elements/agent-trace.js +164 -129
  6. package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
  7. package/components/ai-elements/chain-of-thought-icon.js +283 -0
  8. package/components/ai-elements/chain-of-thought.js +7 -7
  9. package/components/ai-elements/chart.js +38 -35
  10. package/components/ai-elements/index.d.ts +1 -0
  11. package/components/ai-elements/inline-citation.js +40 -40
  12. package/components/ai-elements/message.js +5 -5
  13. package/components/ai-elements/queue.js +1 -1
  14. package/components/ai-elements/research-activity.d.ts +2 -0
  15. package/components/ai-elements/research-activity.js +79 -81
  16. package/components/ai-elements/task-progress.js +2 -2
  17. package/components/ai-elements/tool.d.ts +4 -2
  18. package/components/ai-elements/tool.js +74 -54
  19. package/components/ai-elements/transcript.js +1 -1
  20. package/components/alert.js +1 -1
  21. package/components/answer.d.ts +2644 -311
  22. package/components/answer.js +1776 -371
  23. package/components/assistant-ui/answer-tool-ui.js +27 -28
  24. package/components/assistant-ui/chain-of-thought.d.ts +7 -2
  25. package/components/assistant-ui/composer-harness.js +20 -16
  26. package/components/assistant-ui/follow-up-suggestions.d.ts +5 -1
  27. package/components/assistant-ui/follow-up-suggestions.js +47 -19
  28. package/components/assistant-ui/reasoning.js +35 -31
  29. package/components/assistant-ui/tool-fallback.js +125 -122
  30. package/components/assistant-ui/tool-group.d.ts +3 -1
  31. package/components/assistant-ui/tool-group.js +48 -43
  32. package/components/audio-waveform.js +14 -14
  33. package/components/autocomplete.js +52 -48
  34. package/components/avatar.js +58 -44
  35. package/components/badge.js +3 -3
  36. package/components/brand-texture.js +1 -1
  37. package/components/breadcrumbs.d.ts +27 -1
  38. package/components/breadcrumbs.js +94 -42
  39. package/components/button.js +15 -15
  40. package/components/carousel.js +10 -10
  41. package/components/chart.js +77 -77
  42. package/components/chip.js +3 -3
  43. package/components/code-block.d.ts +39 -17
  44. package/components/code-block.js +153 -104
  45. package/components/command-palette.js +27 -25
  46. package/components/connector-card.js +2 -2
  47. package/components/dropdown.js +65 -61
  48. package/components/empty-state.js +15 -15
  49. package/components/field.js +16 -16
  50. package/components/index.d.ts +4 -0
  51. package/components/index.js +525 -478
  52. package/components/infinite-canvas.js +60 -60
  53. package/components/kbd.js +6 -6
  54. package/components/link.js +6 -6
  55. package/components/modal.js +22 -20
  56. package/components/page-header.js +1 -1
  57. package/components/pagination.js +22 -22
  58. package/components/pixel-blast-svg.js +1 -1
  59. package/components/pixel-icon.d.ts +31 -0
  60. package/components/pixel-icon.js +733 -0
  61. package/components/popover.js +46 -42
  62. package/components/ripple.d.ts +29 -0
  63. package/components/ripple.js +17 -0
  64. package/components/segmented.js +24 -23
  65. package/components/select.js +71 -67
  66. package/components/selection-action-bar.js +22 -22
  67. package/components/sidebar.d.ts +11 -3
  68. package/components/sidebar.js +161 -148
  69. package/components/stepper.d.ts +2 -0
  70. package/components/stepper.js +80 -43
  71. package/components/table.d.ts +7 -0
  72. package/components/table.js +223 -155
  73. package/components/tabs.d.ts +3 -1
  74. package/components/tabs.js +165 -144
  75. package/components/textarea.js +10 -8
  76. package/components/toast.js +48 -46
  77. package/components/tooltip.js +61 -59
  78. package/components/tree.js +44 -41
  79. package/components/typography.d.ts +1 -1
  80. package/components/typography.js +25 -25
  81. package/components/viz-charts.js +133 -133
  82. package/fonts/aribau-grotesk-500.otf +0 -0
  83. package/fonts/aribau-grotesk-600.woff2 +0 -0
  84. package/fonts.css +6 -4
  85. package/lib/icons.d.ts +411 -402
  86. package/lib/icons.js +109 -107
  87. package/llms.txt +98 -8
  88. package/manifest.json +1012 -96
  89. package/package.json +5 -5
  90. package/styles.css +206 -81
  91. package/theme.css +200 -77
  92. package/fonts/aribau-grotesk-400.otf +0 -0
  93. package/fonts/aribau-grotesk-700.otf +0 -0
@@ -1,51 +1,52 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as t, Fragment as U } from "react/jsx-runtime";
3
- import { memo as I, useState as B, useRef as k, useEffect as M } from "react";
4
- import { cn as K } from "../../lib/cn.js";
5
- import { Clock as W } from "../../lib/icons.js";
6
- import { Alert as q, AlertTitle as J, AlertDescription as P } from "../alert.js";
7
- import { Button as Q } from "../button.js";
8
- import { Text as V } from "../typography.js";
9
- import { ChainOfThoughtStep as X, ChainOfThoughtTrigger as Y, ChainOfThoughtContent as Z, ChainOfThoughtItem as ee, ChainOfThoughtSearchResults as te, ChainOfThoughtSearchResult as ne, ChainOfThought as re } from "./chain-of-thought.js";
10
- import { ResearchActivity as E } from "./research-activity.js";
11
- import { Task as oe, TaskTrigger as se, TaskContent as le } from "./task.js";
12
- import { Tool as ae, ToolHeader as ie, ToolContent as ce, ToolInput as de, ToolOutput as ue } from "./tool.js";
13
- const he = "Main Agent", me = 60;
14
- function S(e) {
15
- const o = Math.floor(e);
16
- return `${Math.floor(o / 60)}:${String(o % 60).padStart(2, "0")}`;
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";
11
+ 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) {
16
+ const r = Math.floor(e);
17
+ return `${Math.floor(r / 60)}:${String(r % 60).padStart(2, "0")}`;
17
18
  }
18
- function A(e) {
19
+ function k(e) {
19
20
  if (e.elapsed != null) return e.elapsed;
20
- if (e.seconds != null) return S(e.seconds);
21
+ if (e.seconds != null) return C(e.seconds);
21
22
  }
22
- function T(e) {
23
- const o = [];
24
- for (const s of e) o.includes(s.group) || o.push(s.group);
25
- return o;
23
+ function w(e) {
24
+ const r = [];
25
+ for (const a of e) r.includes(a.group) || r.push(a.group);
26
+ return r;
26
27
  }
27
- function fe(e) {
28
- const o = new Set(e.flatMap((l) => l.sources ?? [])).size, s = e.reduce((l, c) => l + (c.seconds ?? 0), 0), i = [];
29
- return o && i.push(`${o} ${o === 1 ? "source" : "sources"}`), s && e.length > 1 && i.push(S(s)), i.join(" · ") || void 0;
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;
30
31
  }
31
- function pe(e) {
32
- var l, c, p;
33
- const o = (c = (l = e.calls) == null ? void 0 : l[0]) == null ? void 0 : c.name, s = (((p = e.calls) == null ? void 0 : p.length) ?? 0) - 1, i = s > 0 ? ` ${s} other call${s === 1 ? "" : "s"} in this step ${s === 1 ? "is" : "are"} waiting behind it.` : "";
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.` : "";
34
35
  return {
35
- title: o ? `The ${o} call has not returned` : "This step has not finished",
36
- detail: /* @__PURE__ */ a(U, { children: [
36
+ title: r ? `The ${r} call has not returned` : "This step has not finished",
37
+ detail: /* @__PURE__ */ i(q, { children: [
37
38
  e.detail,
38
- i,
39
+ c,
39
40
  " Send for review to the Actioneer team to help with future runs."
40
41
  ] })
41
42
  };
42
43
  }
43
- const R = I(({ call: e }) => /* @__PURE__ */ a(ae, { children: [
44
- /* @__PURE__ */ t(ie, { title: e.name, type: `tool-${e.name}`, state: e.state }),
45
- /* @__PURE__ */ a(ce, { children: [
46
- e.input !== void 0 && /* @__PURE__ */ t(de, { input: e.input }),
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 }),
47
48
  /* @__PURE__ */ t(
48
- ue,
49
+ pe,
49
50
  {
50
51
  output: e.state === "output-available" ? e.output : void 0,
51
52
  errorText: e.state === "output-error" ? e.error : void 0
@@ -53,158 +54,192 @@ const R = I(({ call: e }) => /* @__PURE__ */ a(ae, { children: [
53
54
  )
54
55
  ] })
55
56
  ] }));
56
- R.displayName = "AgentTrace.ToolCard";
57
- const j = I(
57
+ F.displayName = "AgentTrace.ToolCard";
58
+ const G = _(
58
59
  ({
59
60
  step: e,
60
- mainAgent: o,
61
- renderCall: s
61
+ mainAgent: r,
62
+ renderCall: a
62
63
  }) => {
63
- const i = A(e);
64
- return /* @__PURE__ */ a(X, { status: e.status === "error" ? "error" : "complete", children: [
65
- /* @__PURE__ */ a(Y, { leftIcon: e.icon, endContent: i, children: [
64
+ var d, h;
65
+ const c = k(e), l = e.icon ?? (e.state && e.status !== "pending" ? /* @__PURE__ */ t(
66
+ N,
67
+ {
68
+ stage: e.state,
69
+ toolName: (h = (d = e.calls) == null ? void 0 : d[0]) == null ? void 0 : h.name,
70
+ status: e.status
71
+ }
72
+ ) : void 0);
73
+ return /* @__PURE__ */ i(te, { status: e.status === "error" ? "error" : "complete", children: [
74
+ /* @__PURE__ */ i(ne, { leftIcon: l, endContent: c, children: [
66
75
  /* @__PURE__ */ t("span", { children: e.label }),
67
- e.agent && e.agent !== o && /* @__PURE__ */ t("span", { className: "ml-2 text-xs font-normal text-tertiary", children: e.agent })
76
+ e.agent && e.agent !== r && /* @__PURE__ */ t("span", { className: "ml-2 text-xs font-normal text-tertiary", children: e.agent })
68
77
  ] }),
69
- /* @__PURE__ */ t(Z, { rail: !1, children: /* @__PURE__ */ a("div", { className: "-ml-5", style: { "--tree-rail-lead": "18px" }, children: [
70
- e.detail != null && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(ee, { children: e.detail }) }),
71
- e.sources && e.sources.length > 0 && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(te, { children: e.sources.map((l) => /* @__PURE__ */ t(ne, { children: l }, l)) }) }),
72
- (e.calls ?? []).map((l, c) => /* @__PURE__ */ t(
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(
73
82
  "div",
74
83
  {
75
84
  className: "ads-tree-branch pb-2 last:pb-0",
76
85
  style: { "--tree-elbow": "23px" },
77
- children: s ? s(l) : /* @__PURE__ */ t(R, { call: l })
86
+ children: a ? a(m) : /* @__PURE__ */ t(F, { call: m })
78
87
  },
79
- c
88
+ S
80
89
  ))
81
90
  ] }) })
82
91
  ] });
83
92
  }
84
93
  );
85
- j.displayName = "AgentTrace.StepRow";
86
- const ge = ({
94
+ G.displayName = "AgentTrace.StepRow";
95
+ const we = ({
87
96
  steps: e,
88
- mainAgent: o = he,
89
- slowSeconds: s = me,
90
- reviewedStepIds: i,
97
+ mainAgent: r = ge,
98
+ slowSeconds: a = Te,
99
+ reviewedStepIds: c,
91
100
  onSendForReview: l,
92
- slowMessage: c = pe,
93
- renderCall: p,
94
- className: z,
95
- ...D
101
+ slowMessage: d = be,
102
+ renderCall: h,
103
+ className: m,
104
+ ...S
96
105
  }) => {
97
- const r = e.find((n) => n.status === "active") ?? null, d = e.filter((n) => n.status === "complete" || n.status === "error"), w = new Set(i ?? []), m = e.length > 0 && e.every((n) => n.status === "complete" || n.status === "error"), [L, C] = B(() => new Set(T(e))), v = k(null);
98
- M(() => {
99
- const n = (r == null ? void 0 : r.group) ?? null;
100
- n == null || n === v.current || (v.current = n, C(new Set(T(e).filter((u) => u !== n))));
101
- }, [r == null ? void 0 : r.group, e]);
102
- const $ = k(m);
103
- M(() => {
104
- m && !$.current && (C(new Set(T(e))), v.current = null), $.current = m;
105
- }, [m, e]);
106
- const f = T(d).map((n) => {
107
- var u;
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(() => {
109
+ 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))));
111
+ }, [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;
115
+ }, [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];
108
119
  return {
109
- group: n,
110
- icon: (u = d.find((h) => h.group === n)) == null ? void 0 : u.groupIcon,
111
- steps: d.filter((h) => h.group === n)
120
+ group: o,
121
+ icon: (s == null ? void 0 : s.groupIcon) ?? /* @__PURE__ */ t(
122
+ N,
123
+ {
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,
126
+ status: "complete"
127
+ }
128
+ ),
129
+ steps: u
112
130
  };
113
- }), _ = (r == null ? void 0 : r.seconds) ?? 0, F = r != null && _ >= s, N = r ? c(r) : null, b = d.reduce((n, u) => n + (u.seconds ?? 0), 0), O = new Set(d.flatMap((n) => n.sources ?? [])).size, G = `Completed ${d.length} research ${d.length === 1 ? "step" : "steps"}${b ? ` · ${S(b)}` : ""}`, y = (
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,
133
+ {
134
+ stage: n.state,
135
+ toolName: (j = (R = n.calls) == null ? void 0 : R[0]) == null ? void 0 : j.name,
136
+ status: "active"
137
+ }
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 = (
114
139
  /* Each PHASE is a branch row hanging off the summary/live line — the same
115
140
  tree language the steps use one level down. The wrapper (not the
116
141
  container) carries the rail + elbow per principle 14; inter-phase
117
142
  spacing is padding INSIDE the wrapper so the rail spans it unbroken.
118
143
  --tree-elbow lands on the TaskTrigger icon's centre (measured). */
119
- /* @__PURE__ */ t("div", { className: "flex flex-col", children: f.map(({ group: n, icon: u, steps: h }) => /* @__PURE__ */ t(
144
+ /* @__PURE__ */ t("div", { className: "flex flex-col", children: T.map(({ group: o, icon: u, steps: s }) => /* @__PURE__ */ t(
120
145
  "div",
121
146
  {
122
147
  className: "ads-tree-branch pb-3 last:pb-0 [--tree-elbow:11px]",
123
- children: /* @__PURE__ */ a(
124
- oe,
148
+ children: /* @__PURE__ */ i(
149
+ ie,
125
150
  {
126
- open: !L.has(n),
127
- onOpenChange: (g) => C((H) => {
128
- const x = new Set(H);
129
- return g ? x.delete(n) : x.add(n), x;
151
+ 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;
130
155
  }),
131
156
  children: [
132
- /* @__PURE__ */ t(se, { title: n, icon: u, endContent: fe(h) }),
133
- /* @__PURE__ */ t(le, { children: /* @__PURE__ */ t(re, { children: h.map((g) => /* @__PURE__ */ t(
134
- j,
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,
135
160
  {
136
- step: g,
137
- mainAgent: o,
138
- renderCall: p
161
+ step: p,
162
+ mainAgent: r,
163
+ renderCall: h
139
164
  },
140
- g.id
165
+ p.id
141
166
  )) }) })
142
167
  ]
143
168
  }
144
169
  )
145
170
  },
146
- n
171
+ o
147
172
  )) })
148
173
  );
149
- return /* @__PURE__ */ a("div", { "data-slot": "agent-trace", className: K("w-full", z), ...D, children: [
150
- m && f.length > 0 ? (
174
+ return /* @__PURE__ */ i("div", { "data-slot": "agent-trace", className: P("w-full", m), ...S, children: [
175
+ g && T.length > 0 ? (
151
176
  /* Settled trace = one summary line; the phase tree waits one click
152
177
  away instead of stacking above the answer. */
153
178
  /* @__PURE__ */ t(
154
- E,
179
+ L,
155
180
  {
156
181
  status: "complete",
157
- elapsed: S(b),
158
- sourceCount: O,
159
- summary: G,
160
- children: y
182
+ elapsed: C(O),
183
+ sourceCount: E,
184
+ icon: /* @__PURE__ */ t(N, { outcome: "completed" }),
185
+ summary: W,
186
+ children: I
161
187
  }
162
188
  )
163
- ) : r ? (
189
+ ) : n ? (
164
190
  /* Running trace = the live line IS the one summary line (reason
165
191
  first: the in-flight step is narrated here, not placed in the
166
192
  tree). The settled phases rest behind it, hidden until the reader
167
193
  expands — never stacked open above the answer while work runs. */
168
194
  /* @__PURE__ */ t(
169
- E,
195
+ L,
170
196
  {
171
197
  status: "active",
172
- elapsed: A(r) ?? "0:00",
173
- sourceCount: O,
174
- activity: r.label,
175
- activityKey: r.id,
176
- stepIndex: d.length + 1,
198
+ elapsed: k(n) ?? "0:00",
199
+ sourceCount: E,
200
+ icon: K,
201
+ activity: n.label,
202
+ activityKey: n.id,
203
+ stepIndex: f.length + 1,
177
204
  stepCount: e.length,
178
- collapsible: f.length > 0,
179
- children: f.length > 0 ? y : /* @__PURE__ */ t("span", {})
180
- }
181
- )
182
- ) : y,
183
- r && F && N && /* @__PURE__ */ t(q, { variant: "warning", icon: /* @__PURE__ */ t(W, {}), className: "mt-3", children: /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
184
- /* @__PURE__ */ a("div", { className: "min-w-0", children: [
185
- /* @__PURE__ */ a(J, { children: [
186
- N.title,
187
- " —",
188
- " ",
189
- /* @__PURE__ */ t("span", { className: "tabular-nums text-tertiary", children: A(r) })
190
- ] }),
191
- /* @__PURE__ */ t(P, { children: N.detail })
192
- ] }),
193
- l && /* @__PURE__ */ t(
194
- Q,
195
- {
196
- size: "sm",
197
- variant: w.has(r.id) ? "ghost" : "solid",
198
- disabled: w.has(r.id),
199
- onClick: () => l(r),
200
- children: w.has(r.id) ? "Sent" : "Skip and send"
205
+ collapsible: T.length > 0,
206
+ children: T.length > 0 ? I : /* @__PURE__ */ t("span", {})
201
207
  }
202
208
  )
203
- ] }) }),
204
- f.length === 0 && !r && /* @__PURE__ */ t(V, { size: "sm", className: "text-tertiary", children: "No steps yet." })
209
+ ) : I,
210
+ n && B && $ && /* @__PURE__ */ t(
211
+ V,
212
+ {
213
+ variant: "warning",
214
+ icon: /* @__PURE__ */ t(Q, {}),
215
+ className: "mt-3 border border-border bg-card",
216
+ children: /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
217
+ /* @__PURE__ */ i("div", { className: "min-w-0", children: [
218
+ /* @__PURE__ */ i(X, { children: [
219
+ $.title,
220
+ " —",
221
+ " ",
222
+ /* @__PURE__ */ t("span", { className: "tabular-nums text-tertiary", children: k(n) })
223
+ ] }),
224
+ /* @__PURE__ */ t(Y, { className: "text-base leading-6", children: $.detail })
225
+ ] }),
226
+ l && /* @__PURE__ */ t(
227
+ Z,
228
+ {
229
+ 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"
234
+ }
235
+ )
236
+ ] })
237
+ }
238
+ ),
239
+ T.length === 0 && !n && /* @__PURE__ */ t(ee, { size: "sm", className: "text-tertiary", children: "No steps yet." })
205
240
  ] });
206
241
  };
207
- ge.displayName = "AgentTrace";
242
+ we.displayName = "AgentTrace";
208
243
  export {
209
- ge as AgentTrace
244
+ we as AgentTrace
210
245
  };
@@ -0,0 +1,42 @@
1
+ import * as React from "react";
2
+ export declare const CHAIN_OF_THOUGHT_STATES: readonly ["thinking", "planning", "exploring-schema", "searching-knowledge", "inspecting-files", "querying-data", "analyzing-results", "processing-attachments", "delegating", "awaiting-input", "saving-knowledge", "composing-response", "completed", "paused", "incomplete"];
3
+ /** One agent-trace stage or lifecycle status — see `CHAIN_OF_THOUGHT_STATES`. */
4
+ export type ChainOfThoughtState = (typeof CHAIN_OF_THOUGHT_STATES)[number];
5
+ export type ActiveChainOfThoughtState = Exclude<ChainOfThoughtState, "completed" | "paused" | "incomplete">;
6
+ /** Resolve known, prefixed, and dynamically suffixed tool names to one trace stage. */
7
+ export declare function resolveTraceState(toolName?: string, fallback?: ActiveChainOfThoughtState): ActiveChainOfThoughtState;
8
+ /** Human-readable description per state — e.g. for a tooltip or a settings list. */
9
+ export declare const CHAIN_OF_THOUGHT_DESCRIPTIONS: Record<"paused" | "completed" | "thinking" | "planning" | "exploring-schema" | "searching-knowledge" | "inspecting-files" | "querying-data" | "analyzing-results" | "processing-attachments" | "delegating" | "awaiting-input" | "saving-knowledge" | "composing-response" | "incomplete", string>;
10
+ export interface ChainOfThoughtIconProps extends Omit<React.SVGAttributes<SVGSVGElement>, "children" | "dangerouslySetInnerHTML"> {
11
+ /** Which trace stage or lifecycle status to render. */
12
+ state: ChainOfThoughtState;
13
+ /** Defaults to the grid's native 16 px size. */
14
+ size?: number | string;
15
+ /** Active steps animate; complete, pending, and error steps pass `false`. */
16
+ animated?: boolean;
17
+ /** Accessible name. Omit to keep the icon decorative — pair with `aria-hidden` at the call site, the convention every other ADS icon follows. */
18
+ label?: string;
19
+ }
20
+ /**
21
+ * One animated (or, for the three lifecycle states, static) squircle-grid
22
+ * icon. `currentColor`-based like every ADS icon — set its color with a
23
+ * `text-*` class on an ancestor, not a prop. `prefers-reduced-motion` is
24
+ * already handled inside the source markup.
25
+ */
26
+ export declare const ChainOfThoughtIcon: React.ForwardRefExoticComponent<ChainOfThoughtIconProps & React.RefAttributes<SVGSVGElement>>;
27
+ export interface TraceStateIconProps extends Omit<ChainOfThoughtIconProps, "state"> {
28
+ /** Explicit chain-of-thought stage, when known. */
29
+ stage?: ActiveChainOfThoughtState;
30
+ /** Tool name executed by this step — used to infer a stage when `stage` is absent. */
31
+ toolName?: string;
32
+ /** ADS 2 step status changes motion/emphasis while preserving the stage icon. */
33
+ status?: "active" | "complete" | "pending" | "error";
34
+ /** Whole-chain outcome. Do not use this for an individual completed step. */
35
+ outcome?: "completed" | "paused" | "incomplete";
36
+ }
37
+ /**
38
+ * Resolves a semantic stage from an explicit state or tool name. Step status
39
+ * controls motion only: active animates; complete, pending, and error freeze
40
+ * the same glyph. `outcome` is reserved for the whole-chain summary.
41
+ */
42
+ export declare const TraceStateIcon: React.ForwardRefExoticComponent<TraceStateIconProps & React.RefAttributes<SVGSVGElement>>;