@actioneer/ads 0.6.0 → 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.
- package/components/ai-elements/agent-trace.d.ts +2 -2
- package/components/ai-elements/agent-trace.js +163 -104
- package/components/ai-elements/chain-of-thought.d.ts +2 -2
- package/components/ai-elements/chain-of-thought.js +1 -1
- package/components/ai-elements/index.d.ts +0 -5
- package/components/ai-elements/inline-citation.js +1 -1
- package/components/alert.d.ts +6 -6
- package/components/alert.js +89 -53
- package/components/answer-sources.d.ts +2 -6
- package/components/answer-sources.js +58 -60
- package/components/answer.d.ts +5 -0
- package/components/answer.js +311 -271
- package/components/assistant-ui/composer-harness.js +15 -20
- package/components/assistant-ui/composer.d.ts +3 -1
- package/components/assistant-ui/composer.js +148 -144
- package/components/assistant-ui/index.d.ts +0 -3
- package/components/assistant-ui/thread-context.d.ts +3 -1
- package/components/assistant-ui/thread.js +50 -42
- package/components/avatar.js +42 -42
- package/components/badge.d.ts +5 -6
- package/components/badge.js +13 -76
- package/components/body-page-header.d.ts +15 -0
- package/components/body-page-header.js +24 -0
- package/components/brand-loader.d.ts +0 -3
- package/components/brand-loader.js +10 -32
- package/components/breadcrumbs.d.ts +0 -7
- package/components/breadcrumbs.js +54 -71
- package/components/button.d.ts +1 -1
- package/components/button.js +55 -49
- package/components/chart.js +298 -296
- package/components/chip.d.ts +13 -1
- package/components/chip.js +93 -80
- package/components/collection-header.d.ts +17 -0
- package/components/collection-header.js +31 -0
- package/components/connector-card.d.ts +6 -6
- package/components/connector-card.js +31 -32
- package/components/date-range-picker.d.ts +2 -1
- package/components/date-range-picker.js +158 -122
- package/components/drawer.d.ts +19 -3
- package/components/drawer.js +109 -100
- package/components/dropdown.d.ts +1 -2
- package/components/dropdown.js +88 -89
- package/components/field.js +39 -34
- package/components/file-dropzone.js +1 -1
- package/components/index.d.ts +4 -4
- package/components/index.js +499 -546
- package/components/infinite-canvas.js +24 -24
- package/components/input-field.d.ts +18 -3
- package/components/input-field.js +88 -72
- package/components/input.js +16 -15
- package/components/modal.d.ts +31 -3
- package/components/modal.js +243 -169
- package/components/number-field.js +45 -42
- package/components/page-body.d.ts +12 -0
- package/components/page-body.js +18 -0
- package/components/pagination.js +36 -36
- package/components/select.d.ts +21 -0
- package/components/select.js +189 -148
- package/components/setting-row.d.ts +6 -5
- package/components/setting-row.js +33 -32
- package/components/sidebar.d.ts +2 -0
- package/components/sidebar.js +165 -155
- package/components/skeleton.js +8 -7
- package/components/slider.js +1 -1
- package/components/surface-loader.d.ts +11 -0
- package/components/surface-loader.js +35 -0
- package/components/table.d.ts +16 -10
- package/components/table.js +426 -410
- package/components/tabs.d.ts +2 -0
- package/components/tabs.js +159 -294
- package/components/textarea.js +9 -9
- package/components/toast.d.ts +1 -1
- package/components/toast.js +181 -118
- package/components/tree.d.ts +5 -1
- package/components/tree.js +54 -49
- package/components/typography.d.ts +4 -4
- package/components/typography.js +13 -13
- package/components/ui/button.d.ts +1 -1
- package/components/ui/dialog.js +33 -33
- package/demo/components/add-to-artifact.js +6 -10
- package/lib/cn.js +11 -4
- package/lib/icons.d.ts +4 -0
- package/lib/icons.js +107 -106
- package/lib/interactive.d.ts +1 -1
- package/llms.txt +95 -152
- package/manifest.json +1628 -2729
- package/package.json +1 -2
- package/styles.css +347 -223
- package/theme.css +303 -177
- package/components/agent-icon.d.ts +0 -76
- package/components/agent-icon.js +0 -265
- package/components/ai-elements/queue.d.ts +0 -60
- package/components/ai-elements/queue.js +0 -193
- package/components/ai-elements/speech-input.d.ts +0 -16
- package/components/ai-elements/speech-input.js +0 -151
- package/components/ai-elements/task-progress.d.ts +0 -41
- package/components/ai-elements/task-progress.js +0 -224
- package/components/ai-elements/task.d.ts +0 -39
- package/components/ai-elements/task.js +0 -105
- package/components/ai-elements/voice.d.ts +0 -90
- package/components/ai-elements/voice.js +0 -496
- package/components/assistant-ui/follow-up-suggestions.d.ts +0 -11
- package/components/assistant-ui/follow-up-suggestions.js +0 -72
- package/components/assistant-ui/suggestions.d.ts +0 -7
- package/components/assistant-ui/suggestions.js +0 -19
- package/components/assistant-ui/voice.d.ts +0 -18
- package/components/link.d.ts +0 -14
- package/components/link.js +0 -72
- package/components/navbar.d.ts +0 -15
- package/components/navbar.js +0 -68
- package/components/pixel-icon.d.ts +0 -37
- 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 /
|
|
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
|
|
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
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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 {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
80
|
+
if (e.seconds != null) return T(e.seconds);
|
|
22
81
|
}
|
|
23
|
-
function
|
|
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
|
|
29
|
-
const r = new Set(e.flatMap((
|
|
30
|
-
return r &&
|
|
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
|
|
33
|
-
var
|
|
34
|
-
const r = (d = (
|
|
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
|
-
|
|
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 =
|
|
45
|
-
/* @__PURE__ */ t(
|
|
46
|
-
/* @__PURE__ */ i(
|
|
47
|
-
e.input !== void 0 && /* @__PURE__ */ t(
|
|
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
|
-
|
|
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
|
|
66
|
-
|
|
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(
|
|
74
|
-
/* @__PURE__ */ i(
|
|
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(
|
|
79
|
-
e.detail != null && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(
|
|
80
|
-
e.sources && e.sources.length > 0 && /* @__PURE__ */ t("div", { className: "ads-tree-rail pb-3", children: /* @__PURE__ */ t(
|
|
81
|
-
(e.calls ?? []).map((m,
|
|
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
|
-
|
|
147
|
+
w
|
|
89
148
|
))
|
|
90
149
|
] }) })
|
|
91
150
|
] });
|
|
92
151
|
}
|
|
93
152
|
);
|
|
94
153
|
G.displayName = "AgentTrace.StepRow";
|
|
95
|
-
const
|
|
154
|
+
const $e = ({
|
|
96
155
|
steps: e,
|
|
97
|
-
mainAgent: r =
|
|
98
|
-
slowSeconds: a =
|
|
99
|
-
reviewedStepIds:
|
|
100
|
-
onSendForReview:
|
|
101
|
-
slowMessage: d =
|
|
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
|
-
...
|
|
163
|
+
...w
|
|
105
164
|
}) => {
|
|
106
|
-
var
|
|
107
|
-
const n = e.find((o) => o.status === "active") ?? null,
|
|
108
|
-
|
|
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,
|
|
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 =
|
|
113
|
-
|
|
114
|
-
g && !M.current && (
|
|
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
|
|
117
|
-
var
|
|
118
|
-
const u =
|
|
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: (
|
|
122
|
-
|
|
180
|
+
icon: (c == null ? void 0 : c.groupIcon) ?? /* @__PURE__ */ t(
|
|
181
|
+
C,
|
|
123
182
|
{
|
|
124
|
-
stage:
|
|
125
|
-
toolName: (
|
|
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,
|
|
132
|
-
|
|
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: (
|
|
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,
|
|
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
|
|
144
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col", children:
|
|
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__ */
|
|
149
|
-
|
|
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: (
|
|
153
|
-
const
|
|
154
|
-
return
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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:
|
|
175
|
-
g &&
|
|
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:
|
|
183
|
-
sourceCount:
|
|
184
|
-
icon: /* @__PURE__ */ t(
|
|
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:
|
|
258
|
+
sourceCount: z,
|
|
200
259
|
icon: K,
|
|
201
260
|
activity: n.label,
|
|
202
261
|
activityKey: n.id,
|
|
203
|
-
stepIndex:
|
|
262
|
+
stepIndex: p.length + 1,
|
|
204
263
|
stepCount: e.length,
|
|
205
|
-
collapsible:
|
|
206
|
-
children:
|
|
264
|
+
collapsible: v.length > 0,
|
|
265
|
+
children: v.length > 0 ? I : /* @__PURE__ */ t("span", {})
|
|
207
266
|
}
|
|
208
267
|
)
|
|
209
268
|
) : I,
|
|
210
|
-
n && B &&
|
|
211
|
-
|
|
269
|
+
n && B && O && /* @__PURE__ */ t(
|
|
270
|
+
ne,
|
|
212
271
|
{
|
|
213
272
|
variant: "warning",
|
|
214
|
-
icon: /* @__PURE__ */ t(
|
|
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(
|
|
219
|
-
|
|
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(
|
|
283
|
+
/* @__PURE__ */ t(re, { className: "text-base leading-6", children: O.detail })
|
|
225
284
|
] }),
|
|
226
|
-
|
|
227
|
-
|
|
285
|
+
s && /* @__PURE__ */ t(
|
|
286
|
+
ae,
|
|
228
287
|
{
|
|
229
288
|
size: "sm",
|
|
230
|
-
variant:
|
|
231
|
-
disabled:
|
|
232
|
-
onClick: () =>
|
|
233
|
-
children:
|
|
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
|
-
|
|
298
|
+
v.length === 0 && !n && /* @__PURE__ */ t(ce, { size: "sm", className: "text-tertiary", children: "No steps yet." })
|
|
240
299
|
] });
|
|
241
300
|
};
|
|
242
|
-
|
|
301
|
+
$e.displayName = "AgentTrace";
|
|
243
302
|
export {
|
|
244
|
-
|
|
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
|
|
42
|
-
*
|
|
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 (
|
|
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';
|
package/components/alert.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
/**
|
|
4
|
-
* Alert —
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
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>>;
|