@actioneer/ads 0.5.3 → 0.5.5
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.
- package/components/accordion.js +15 -15
- package/components/agent-icon.d.ts +64 -0
- package/components/agent-icon.js +251 -0
- package/components/ai-elements/agent-trace.d.ts +8 -1
- package/components/ai-elements/agent-trace.js +164 -129
- package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
- package/components/ai-elements/chain-of-thought-icon.js +283 -0
- package/components/ai-elements/chain-of-thought.js +7 -7
- package/components/ai-elements/chart.js +38 -35
- package/components/ai-elements/index.d.ts +1 -0
- package/components/ai-elements/inline-citation.js +40 -40
- package/components/ai-elements/message.js +5 -5
- package/components/ai-elements/queue.js +1 -1
- package/components/ai-elements/research-activity.d.ts +2 -0
- package/components/ai-elements/research-activity.js +79 -81
- package/components/ai-elements/task-progress.js +2 -2
- package/components/ai-elements/tool.d.ts +4 -2
- package/components/ai-elements/tool.js +74 -54
- package/components/ai-elements/transcript.js +1 -1
- package/components/alert.js +1 -1
- package/components/answer.d.ts +2643 -311
- package/components/answer.js +1836 -425
- package/components/assistant-ui/answer-tool-ui.js +23 -28
- package/components/assistant-ui/chain-of-thought.d.ts +7 -2
- package/components/assistant-ui/composer-harness.js +20 -16
- package/components/assistant-ui/reasoning.js +35 -31
- package/components/assistant-ui/tool-fallback.js +125 -122
- package/components/assistant-ui/tool-group.d.ts +3 -1
- package/components/assistant-ui/tool-group.js +48 -43
- package/components/audio-waveform.js +14 -14
- package/components/autocomplete.js +52 -48
- package/components/avatar.js +58 -44
- package/components/badge.js +3 -3
- package/components/brand-texture.js +1 -1
- package/components/breadcrumbs.d.ts +27 -1
- package/components/breadcrumbs.js +94 -42
- package/components/button.js +15 -15
- package/components/carousel.js +10 -10
- package/components/chart.d.ts +14 -0
- package/components/chart.js +747 -614
- package/components/chip.js +3 -3
- package/components/code-block.d.ts +39 -17
- package/components/code-block.js +153 -104
- package/components/command-palette.js +27 -25
- package/components/connector-card.js +2 -2
- package/components/dropdown.js +65 -61
- package/components/empty-state.js +15 -15
- package/components/field.js +23 -23
- package/components/index.d.ts +5 -0
- package/components/index.js +523 -470
- package/components/infinite-canvas.js +60 -60
- package/components/kbd.js +6 -6
- package/components/link.js +6 -6
- package/components/modal.js +22 -20
- package/components/page-header.js +1 -1
- package/components/pagination.js +22 -22
- package/components/pixel-blast-svg.js +1 -1
- package/components/pixel-icon.d.ts +31 -0
- package/components/pixel-icon.js +733 -0
- package/components/popover.js +46 -42
- package/components/ripple.d.ts +29 -0
- package/components/ripple.js +17 -0
- package/components/segmented.js +24 -23
- package/components/select.js +71 -67
- package/components/selection-action-bar.js +22 -22
- package/components/sidebar.d.ts +11 -3
- package/components/sidebar.js +161 -148
- package/components/stepper.d.ts +2 -0
- package/components/stepper.js +80 -43
- package/components/table.d.ts +7 -0
- package/components/table.js +223 -155
- package/components/tabs.d.ts +3 -1
- package/components/tabs.js +165 -144
- package/components/textarea.js +10 -8
- package/components/toast.js +48 -46
- package/components/tooltip.js +61 -59
- package/components/tree.js +44 -41
- package/components/typography.d.ts +1 -1
- package/components/typography.js +25 -25
- package/components/viz-charts.d.ts +62 -0
- package/components/viz-charts.js +408 -0
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
- package/fonts.css +6 -4
- package/lib/icons.d.ts +411 -402
- package/lib/icons.js +109 -107
- package/lib/viz-format.d.ts +25 -0
- package/lib/viz-format.js +40 -0
- package/llms.txt +111 -8
- package/manifest.json +1096 -58
- package/package.json +5 -5
- package/styles.css +226 -96
- package/theme.css +220 -92
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
|
@@ -1,51 +1,52 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Clock as
|
|
6
|
-
import { Alert as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Text as
|
|
9
|
-
import { ChainOfThoughtStep as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
19
|
+
function k(e) {
|
|
19
20
|
if (e.elapsed != null) return e.elapsed;
|
|
20
|
-
if (e.seconds != null) return
|
|
21
|
+
if (e.seconds != null) return C(e.seconds);
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
for (const
|
|
25
|
-
return
|
|
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
|
|
28
|
-
const
|
|
29
|
-
return
|
|
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
|
|
32
|
-
var l,
|
|
33
|
-
const
|
|
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:
|
|
36
|
-
detail: /* @__PURE__ */
|
|
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
|
-
|
|
39
|
+
c,
|
|
39
40
|
" Send for review to the Actioneer team to help with future runs."
|
|
40
41
|
] })
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
-
/* @__PURE__ */ t(
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
e.input !== void 0 && /* @__PURE__ */ t(
|
|
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
|
-
|
|
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
|
-
|
|
57
|
-
const
|
|
57
|
+
F.displayName = "AgentTrace.ToolCard";
|
|
58
|
+
const G = _(
|
|
58
59
|
({
|
|
59
60
|
step: e,
|
|
60
|
-
mainAgent:
|
|
61
|
-
renderCall:
|
|
61
|
+
mainAgent: r,
|
|
62
|
+
renderCall: a
|
|
62
63
|
}) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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 !==
|
|
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(
|
|
70
|
-
e.detail != null && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(
|
|
71
|
-
e.sources && e.sources.length > 0 && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(
|
|
72
|
-
(e.calls ?? []).map((
|
|
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:
|
|
86
|
+
children: a ? a(m) : /* @__PURE__ */ t(F, { call: m })
|
|
78
87
|
},
|
|
79
|
-
|
|
88
|
+
S
|
|
80
89
|
))
|
|
81
90
|
] }) })
|
|
82
91
|
] });
|
|
83
92
|
}
|
|
84
93
|
);
|
|
85
|
-
|
|
86
|
-
const
|
|
94
|
+
G.displayName = "AgentTrace.StepRow";
|
|
95
|
+
const we = ({
|
|
87
96
|
steps: e,
|
|
88
|
-
mainAgent:
|
|
89
|
-
slowSeconds:
|
|
90
|
-
reviewedStepIds:
|
|
97
|
+
mainAgent: r = ge,
|
|
98
|
+
slowSeconds: a = Te,
|
|
99
|
+
reviewedStepIds: c,
|
|
91
100
|
onSendForReview: l,
|
|
92
|
-
slowMessage:
|
|
93
|
-
renderCall:
|
|
94
|
-
className:
|
|
95
|
-
...
|
|
101
|
+
slowMessage: d = be,
|
|
102
|
+
renderCall: h,
|
|
103
|
+
className: m,
|
|
104
|
+
...S
|
|
96
105
|
}) => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
n == null
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
M(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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:
|
|
110
|
-
icon: (
|
|
111
|
-
|
|
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
|
-
}),
|
|
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:
|
|
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__ */
|
|
124
|
-
|
|
148
|
+
children: /* @__PURE__ */ i(
|
|
149
|
+
ie,
|
|
125
150
|
{
|
|
126
|
-
open: !
|
|
127
|
-
onOpenChange: (
|
|
128
|
-
const
|
|
129
|
-
return
|
|
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(
|
|
133
|
-
/* @__PURE__ */ t(
|
|
134
|
-
|
|
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:
|
|
137
|
-
mainAgent:
|
|
138
|
-
renderCall:
|
|
161
|
+
step: p,
|
|
162
|
+
mainAgent: r,
|
|
163
|
+
renderCall: h
|
|
139
164
|
},
|
|
140
|
-
|
|
165
|
+
p.id
|
|
141
166
|
)) }) })
|
|
142
167
|
]
|
|
143
168
|
}
|
|
144
169
|
)
|
|
145
170
|
},
|
|
146
|
-
|
|
171
|
+
o
|
|
147
172
|
)) })
|
|
148
173
|
);
|
|
149
|
-
return /* @__PURE__ */
|
|
150
|
-
|
|
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
|
-
|
|
179
|
+
L,
|
|
155
180
|
{
|
|
156
181
|
status: "complete",
|
|
157
|
-
elapsed:
|
|
158
|
-
sourceCount:
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
) :
|
|
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
|
-
|
|
195
|
+
L,
|
|
170
196
|
{
|
|
171
197
|
status: "active",
|
|
172
|
-
elapsed:
|
|
173
|
-
sourceCount:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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:
|
|
179
|
-
children:
|
|
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
|
-
|
|
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
|
-
|
|
242
|
+
we.displayName = "AgentTrace";
|
|
208
243
|
export {
|
|
209
|
-
|
|
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>>;
|