@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.
- package/components/ai-elements/agent-trace.d.ts +87 -0
- package/components/ai-elements/agent-trace.js +180 -0
- package/components/ai-elements/chain-of-thought.d.ts +25 -5
- package/components/ai-elements/chain-of-thought.js +227 -183
- package/components/ai-elements/index.d.ts +1 -0
- package/components/ai-elements/research-activity.d.ts +17 -0
- package/components/ai-elements/research-activity.js +125 -107
- package/components/ai-elements/task.d.ts +7 -3
- package/components/ai-elements/task.js +84 -52
- package/components/ai-elements/tool.js +19 -19
- package/components/ai-elements/voice.d.ts +28 -12
- package/components/ai-elements/voice.js +270 -649
- package/components/alert.js +28 -16
- package/components/assistant-ui/composer-harness.js +5 -4
- package/components/code-block.d.ts +11 -5
- package/components/code-block.js +161 -62
- package/components/index.js +259 -257
- package/components/scroll-area.js +10 -10
- package/components/sidebar.js +1 -1
- package/components/stepper.d.ts +17 -9
- package/components/stepper.js +85 -96
- package/lib/icons.js +2 -2
- package/lib/motion.d.ts +2 -0
- package/lib/motion.js +21 -20
- package/llms.txt +7 -1
- package/manifest.json +69 -6
- package/package.json +1 -1
- package/styles.css +110 -4
- package/theme.css +12 -4
- package/components/agents-ui/agent-audio-visualizer-aura.d.ts +0 -11
- package/components/agents-ui/agent-audio-visualizer-aura.js +0 -277
- package/components/agents-ui/agent-audio-visualizer-wave.d.ts +0 -12
- package/components/agents-ui/agent-audio-visualizer-wave.js +0 -203
- package/components/agents-ui/react-shader-toy.d.ts +0 -87
- 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
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Collapsible as
|
|
5
|
-
import { ChevronRight as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { memo as
|
|
8
|
-
|
|
9
|
-
|
|
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:
|
|
14
|
-
className:
|
|
21
|
+
role: o,
|
|
22
|
+
className: n(
|
|
15
23
|
"w-full",
|
|
16
|
-
"[
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
...
|
|
30
|
+
...e,
|
|
31
|
+
children: /* @__PURE__ */ t(E.Provider, { value: r, children: a })
|
|
21
32
|
}
|
|
22
33
|
)
|
|
23
|
-
),
|
|
34
|
+
), F = l(
|
|
24
35
|
({
|
|
25
|
-
className:
|
|
26
|
-
defaultOpen:
|
|
27
|
-
open:
|
|
28
|
-
onOpenChange:
|
|
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
|
-
|
|
43
|
+
children: m,
|
|
44
|
+
...d
|
|
33
45
|
}) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
),
|
|
37
|
-
return
|
|
38
|
-
const x =
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
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:
|
|
57
|
+
open: v,
|
|
46
58
|
onOpenChange: (x) => {
|
|
47
|
-
|
|
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:
|
|
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
|
-
|
|
84
|
+
i
|
|
63
85
|
),
|
|
64
|
-
...
|
|
86
|
+
...d,
|
|
87
|
+
children: /* @__PURE__ */ t(k.Provider, { value: v, children: m })
|
|
65
88
|
}
|
|
66
89
|
);
|
|
67
90
|
}
|
|
68
|
-
),
|
|
91
|
+
), U = l(
|
|
69
92
|
({
|
|
70
|
-
className:
|
|
71
|
-
children:
|
|
72
|
-
leftIcon:
|
|
73
|
-
endContent:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
119
|
+
children: r ? /* @__PURE__ */ c(R, { children: [
|
|
94
120
|
/* @__PURE__ */ t(
|
|
95
121
|
"span",
|
|
96
122
|
{
|
|
97
|
-
className:
|
|
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:
|
|
127
|
+
children: r
|
|
102
128
|
}
|
|
103
129
|
),
|
|
104
|
-
e && /* @__PURE__ */ t(
|
|
105
|
-
|
|
130
|
+
!e && s && /* @__PURE__ */ t(
|
|
131
|
+
M,
|
|
106
132
|
{
|
|
107
|
-
className:
|
|
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:
|
|
118
|
-
|
|
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
|
-
),
|
|
123
|
-
({ className:
|
|
124
|
-
|
|
125
|
-
{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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:
|
|
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
|
-
|
|
188
|
+
i
|
|
145
189
|
),
|
|
146
|
-
...
|
|
190
|
+
...o
|
|
147
191
|
}
|
|
148
192
|
)
|
|
149
|
-
),
|
|
150
|
-
({ className:
|
|
193
|
+
), q = l(
|
|
194
|
+
({ className: i, ...o }) => /* @__PURE__ */ t(
|
|
151
195
|
"div",
|
|
152
196
|
{
|
|
153
|
-
className:
|
|
154
|
-
...
|
|
197
|
+
className: n("flex flex-wrap items-center gap-2", i),
|
|
198
|
+
...o
|
|
155
199
|
}
|
|
156
200
|
)
|
|
157
|
-
),
|
|
158
|
-
({ className:
|
|
159
|
-
|
|
201
|
+
), G = l(
|
|
202
|
+
({ className: i, children: o, ...r }) => /* @__PURE__ */ t(
|
|
203
|
+
y,
|
|
160
204
|
{
|
|
161
|
-
className:
|
|
205
|
+
className: n("gap-1 font-normal", i),
|
|
162
206
|
color: "default",
|
|
163
207
|
variant: "soft",
|
|
164
|
-
...
|
|
165
|
-
children:
|
|
208
|
+
...r,
|
|
209
|
+
children: o
|
|
166
210
|
}
|
|
167
211
|
)
|
|
168
|
-
),
|
|
212
|
+
), J = l(
|
|
169
213
|
({
|
|
170
|
-
className:
|
|
171
|
-
title:
|
|
172
|
-
tag:
|
|
173
|
-
meta:
|
|
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:
|
|
179
|
-
...
|
|
180
|
-
}) => /* @__PURE__ */
|
|
181
|
-
|
|
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:
|
|
187
|
-
...
|
|
230
|
+
className: n("w-full", i),
|
|
231
|
+
...p,
|
|
188
232
|
children: [
|
|
189
|
-
/* @__PURE__ */ t(
|
|
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:
|
|
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:
|
|
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(
|
|
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:
|
|
212
|
-
|
|
213
|
-
|
|
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:
|
|
262
|
+
children: r
|
|
219
263
|
}
|
|
220
264
|
),
|
|
221
|
-
|
|
265
|
+
a != null && /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: a }),
|
|
222
266
|
/* @__PURE__ */ t(
|
|
223
|
-
|
|
267
|
+
w,
|
|
224
268
|
{
|
|
225
269
|
"aria-hidden": !0,
|
|
226
|
-
className:
|
|
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
|
-
|
|
280
|
+
T,
|
|
237
281
|
{
|
|
238
282
|
"data-slot": "chain-of-thought-evidence-content",
|
|
239
|
-
className:
|
|
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__ */
|
|
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
|
-
|
|
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
|
-
),
|
|
297
|
+
), K = l(
|
|
254
298
|
({
|
|
255
|
-
className:
|
|
256
|
-
columns:
|
|
257
|
-
rows:
|
|
258
|
-
totalRows:
|
|
299
|
+
className: i,
|
|
300
|
+
columns: o,
|
|
301
|
+
rows: r,
|
|
302
|
+
totalRows: a,
|
|
259
303
|
flag: e,
|
|
260
304
|
...s
|
|
261
305
|
}) => {
|
|
262
|
-
const h =
|
|
263
|
-
return /* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
271
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { className: "text-tertiary", children:
|
|
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:
|
|
318
|
+
className: n(
|
|
275
319
|
"sticky top-0 bg-surface px-2.5 py-1.5 font-medium whitespace-nowrap",
|
|
276
|
-
|
|
320
|
+
d.align === "end" ? "text-right" : "text-left"
|
|
277
321
|
),
|
|
278
|
-
children:
|
|
322
|
+
children: d.label
|
|
279
323
|
},
|
|
280
|
-
|
|
324
|
+
d.key
|
|
281
325
|
)) }) }),
|
|
282
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
283
|
-
const u = e != null && String(
|
|
284
|
-
return /* @__PURE__ */ t("tr", { className:
|
|
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:
|
|
331
|
+
className: n(
|
|
288
332
|
"px-2.5 py-1 whitespace-nowrap",
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
u &&
|
|
292
|
-
u &&
|
|
293
|
-
u &&
|
|
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:
|
|
339
|
+
children: d[g.key]
|
|
296
340
|
},
|
|
297
|
-
|
|
298
|
-
)) },
|
|
341
|
+
g.key
|
|
342
|
+
)) }, p);
|
|
299
343
|
}) })
|
|
300
344
|
] }) }),
|
|
301
|
-
h && /* @__PURE__ */
|
|
302
|
-
|
|
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
|
-
|
|
348
|
+
a,
|
|
305
349
|
" rows"
|
|
306
350
|
] })
|
|
307
351
|
]
|
|
308
352
|
}
|
|
309
353
|
);
|
|
310
354
|
}
|
|
311
|
-
),
|
|
312
|
-
({ className:
|
|
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:
|
|
317
|
-
className:
|
|
318
|
-
...
|
|
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
|
-
),
|
|
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
|
-
},
|
|
371
|
+
}, Y = l(
|
|
328
372
|
({
|
|
329
|
-
className:
|
|
330
|
-
label:
|
|
331
|
-
value:
|
|
332
|
-
sub:
|
|
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__ */
|
|
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:
|
|
386
|
+
className: n("min-w-0", i),
|
|
343
387
|
...h,
|
|
344
388
|
children: [
|
|
345
|
-
/* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children:
|
|
389
|
+
/* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: o }),
|
|
346
390
|
/* @__PURE__ */ t(
|
|
347
391
|
"div",
|
|
348
392
|
{
|
|
349
|
-
className:
|
|
393
|
+
className: n(
|
|
350
394
|
"text-base font-semibold tabular-nums",
|
|
351
|
-
|
|
395
|
+
V[e]
|
|
352
396
|
),
|
|
353
|
-
children:
|
|
397
|
+
children: r
|
|
354
398
|
}
|
|
355
399
|
),
|
|
356
|
-
|
|
400
|
+
a != null && /* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: a })
|
|
357
401
|
]
|
|
358
402
|
}
|
|
359
403
|
)
|
|
360
|
-
),
|
|
361
|
-
({ className:
|
|
362
|
-
/* @__PURE__ */ t("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children:
|
|
363
|
-
|
|
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
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
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
|
};
|
|
@@ -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. */
|