@actioneer/ads 0.5.2 → 0.5.3
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 +6 -1
- package/components/ai-elements/agent-trace.js +150 -120
- package/components/ai-elements/chain-of-thought.d.ts +21 -5
- package/components/ai-elements/chain-of-thought.js +190 -140
- package/components/ai-elements/research-activity.js +100 -95
- package/components/ai-elements/task.js +11 -11
- package/components/ai-elements/tool.js +29 -29
- package/components/alert.js +7 -7
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/styles.css +26 -13
- package/theme.css +15 -10
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as e, jsxs as l, Fragment as z } from "react/jsx-runtime";
|
|
3
3
|
import { Badge as y } from "../badge.js";
|
|
4
4
|
import { Collapsible as N, CollapsibleTrigger as C, CollapsibleContent as T } from "../collapsible.js";
|
|
5
|
-
import { ChevronRight as
|
|
5
|
+
import { ChevronRight as R, ChevronDown as w, WarningCircle as j, Database as M } from "../../lib/icons.js";
|
|
6
6
|
import { cn as n } from "../../lib/cn.js";
|
|
7
|
-
import { createContext as O, memo as
|
|
7
|
+
import { createContext as O, memo as d, useContext as _, useState as D, useRef as A, useEffect as I } from "react";
|
|
8
8
|
import { motion as L } from "motion/react";
|
|
9
9
|
import { EASE_DISCLOSURE as P } from "../../lib/motion.js";
|
|
10
|
-
const
|
|
10
|
+
const S = O(!1), k = O("tree"), B = d(
|
|
11
11
|
({
|
|
12
12
|
className: i,
|
|
13
|
-
role:
|
|
14
|
-
connector:
|
|
15
|
-
children:
|
|
16
|
-
...
|
|
17
|
-
}) => /* @__PURE__ */
|
|
13
|
+
role: r = "list",
|
|
14
|
+
connector: a = "tree",
|
|
15
|
+
children: o,
|
|
16
|
+
...t
|
|
17
|
+
}) => /* @__PURE__ */ e(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
"data-slot": "chain-of-thought",
|
|
21
|
-
role:
|
|
21
|
+
role: r,
|
|
22
22
|
className: n(
|
|
23
23
|
"w-full",
|
|
24
|
-
|
|
24
|
+
a === "rail" && [
|
|
25
25
|
"[&>[data-slot=chain-of-thought-step]:not(:has(~_[data-slot=chain-of-thought-step]))]:pb-0",
|
|
26
26
|
"[&>[data-slot=chain-of-thought-step]:not(:has(~_[data-slot=chain-of-thought-step]))]:before:hidden"
|
|
27
27
|
],
|
|
28
28
|
i
|
|
29
29
|
),
|
|
30
|
-
...
|
|
31
|
-
children: /* @__PURE__ */
|
|
30
|
+
...t,
|
|
31
|
+
children: /* @__PURE__ */ e(k.Provider, { value: a, children: o })
|
|
32
32
|
}
|
|
33
33
|
)
|
|
34
|
-
), F =
|
|
34
|
+
), F = d(
|
|
35
35
|
({
|
|
36
36
|
className: i,
|
|
37
|
-
defaultOpen:
|
|
38
|
-
open:
|
|
39
|
-
onOpenChange:
|
|
40
|
-
status:
|
|
37
|
+
defaultOpen: r,
|
|
38
|
+
open: a,
|
|
39
|
+
onOpenChange: o,
|
|
40
|
+
status: t = "complete",
|
|
41
41
|
role: s = "listitem",
|
|
42
42
|
"aria-busy": h,
|
|
43
43
|
children: m,
|
|
44
|
-
...
|
|
44
|
+
...c
|
|
45
45
|
}) => {
|
|
46
|
-
const p =
|
|
47
|
-
|
|
48
|
-
),
|
|
46
|
+
const p = _(k), u = a !== void 0, [g, f] = D(
|
|
47
|
+
r ?? t === "active"
|
|
48
|
+
), x = A(t), E = x.current !== "active" && t === "active", v = u ? a : E || g;
|
|
49
49
|
return I(() => {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
}, [u,
|
|
50
|
+
const b = x.current;
|
|
51
|
+
x.current = t, !(b === "active" || t !== "active") && (u || f(!0), o == null || o(!0));
|
|
52
|
+
}, [u, o, t]), /* @__PURE__ */ e(
|
|
53
53
|
N,
|
|
54
54
|
{
|
|
55
55
|
"data-slot": "chain-of-thought-step",
|
|
56
|
-
"data-status":
|
|
56
|
+
"data-status": t,
|
|
57
57
|
open: v,
|
|
58
|
-
onOpenChange: (
|
|
59
|
-
u || f(
|
|
58
|
+
onOpenChange: (b) => {
|
|
59
|
+
u || f(b), o == null || o(b);
|
|
60
60
|
},
|
|
61
61
|
role: s,
|
|
62
|
-
"aria-current":
|
|
63
|
-
"aria-busy": h ?? (
|
|
62
|
+
"aria-current": t === "active" ? "step" : void 0,
|
|
63
|
+
"aria-busy": h ?? (t === "active" || void 0),
|
|
64
64
|
className: n(
|
|
65
65
|
"group/cot-step relative pb-2",
|
|
66
66
|
// Connector rail: a 16px segment centred in the 28px gap between a
|
|
@@ -70,34 +70,45 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
70
70
|
// Tree connector: a continuous rail down the group with an elbow
|
|
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
|
+
// The rail sits at the container's left edge; the PARENT indents
|
|
74
|
+
// the group so that edge lands on its icon's centre (TaskContent
|
|
75
|
+
// and ResearchActivity both use ml-2 for a size-4 icon), and sets
|
|
76
|
+
// --tree-rail-lead so the FIRST row's rail climbs the gap to hang
|
|
77
|
+
// from that icon instead of floating below it.
|
|
73
78
|
p === "tree" && [
|
|
74
79
|
"ps-5",
|
|
75
|
-
"before:absolute before:
|
|
76
|
-
"
|
|
80
|
+
"before:absolute before:top-0 before:bottom-0 before:left-0 before:border-l before:border-border-strong before:content-['']",
|
|
81
|
+
"first:before:top-[calc(-1*var(--tree-rail-lead,0px))]",
|
|
82
|
+
// The LAST row's rail stops exactly where its elbow begins (2px
|
|
83
|
+
// in) instead of disappearing — hiding it left a 2px notch above
|
|
84
|
+
// every final elbow, and erased the climb entirely on a
|
|
85
|
+
// single-step trace (first AND last). bottom is 100%-anchored so
|
|
86
|
+
// it composes with the first-row climb.
|
|
87
|
+
"last:before:bottom-[calc(100%-0.125rem)]",
|
|
77
88
|
// top-0.5 + h-4 lands the elbow at 18px — the step icon's centre.
|
|
78
89
|
"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
90
|
],
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
91
|
+
t === "complete" && "text-secondary",
|
|
92
|
+
t === "active" && "text-secondary",
|
|
93
|
+
t === "pending" && "text-tertiary/60",
|
|
94
|
+
t === "error" && "text-danger",
|
|
84
95
|
i
|
|
85
96
|
),
|
|
86
|
-
...
|
|
87
|
-
children: /* @__PURE__ */
|
|
97
|
+
...c,
|
|
98
|
+
children: /* @__PURE__ */ e(S.Provider, { value: v, children: m })
|
|
88
99
|
}
|
|
89
100
|
);
|
|
90
101
|
}
|
|
91
|
-
), U =
|
|
102
|
+
), U = d(
|
|
92
103
|
({
|
|
93
104
|
className: i,
|
|
94
|
-
children:
|
|
95
|
-
leftIcon:
|
|
96
|
-
endContent:
|
|
97
|
-
caret:
|
|
105
|
+
children: r,
|
|
106
|
+
leftIcon: a,
|
|
107
|
+
endContent: o,
|
|
108
|
+
caret: t = !0,
|
|
98
109
|
swapIconOnHover: s = !0,
|
|
99
110
|
...h
|
|
100
|
-
}) => /* @__PURE__ */
|
|
111
|
+
}) => /* @__PURE__ */ e(C, { asChild: !0, ...h, children: /* @__PURE__ */ l(
|
|
101
112
|
"button",
|
|
102
113
|
{
|
|
103
114
|
type: "button",
|
|
@@ -111,24 +122,24 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
111
122
|
i
|
|
112
123
|
),
|
|
113
124
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ e(
|
|
115
126
|
"span",
|
|
116
127
|
{
|
|
117
128
|
"aria-hidden": !0,
|
|
118
129
|
className: "relative z-10 block size-4 shrink-0",
|
|
119
|
-
children:
|
|
120
|
-
/* @__PURE__ */
|
|
130
|
+
children: a ? /* @__PURE__ */ l(z, { children: [
|
|
131
|
+
/* @__PURE__ */ e(
|
|
121
132
|
"span",
|
|
122
133
|
{
|
|
123
134
|
className: n(
|
|
124
135
|
"absolute inset-0 flex items-center justify-center transition-opacity duration-(--duration-fast) ease-out [&>svg]:size-4 motion-reduce:transition-none",
|
|
125
|
-
!
|
|
136
|
+
!t && s && "group-hover/cot-trigger:opacity-0 group-data-[state=open]/cot-trigger:opacity-0"
|
|
126
137
|
),
|
|
127
|
-
children:
|
|
138
|
+
children: a
|
|
128
139
|
}
|
|
129
140
|
),
|
|
130
|
-
!
|
|
131
|
-
|
|
141
|
+
!t && s && /* @__PURE__ */ e(
|
|
142
|
+
R,
|
|
132
143
|
{
|
|
133
144
|
className: n(
|
|
134
145
|
"absolute inset-0 size-4 opacity-0 transition-[opacity,transform] duration-(--duration-fast) ease-out motion-reduce:transition-none",
|
|
@@ -137,13 +148,13 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
137
148
|
)
|
|
138
149
|
}
|
|
139
150
|
)
|
|
140
|
-
] }) : /* @__PURE__ */
|
|
151
|
+
] }) : /* @__PURE__ */ e("span", { className: "absolute top-1/2 left-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-dot bg-current" })
|
|
141
152
|
}
|
|
142
153
|
),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
|
|
146
|
-
|
|
154
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1", children: r }),
|
|
155
|
+
/* @__PURE__ */ l("span", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
156
|
+
o != null && /* @__PURE__ */ e("span", { className: "text-xs text-tertiary tabular-nums", children: o }),
|
|
157
|
+
t && /* @__PURE__ */ e(
|
|
147
158
|
w,
|
|
148
159
|
{
|
|
149
160
|
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",
|
|
@@ -154,31 +165,48 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
154
165
|
]
|
|
155
166
|
}
|
|
156
167
|
) })
|
|
157
|
-
), W =
|
|
158
|
-
({ className: i, children:
|
|
159
|
-
const
|
|
160
|
-
return /* @__PURE__ */
|
|
168
|
+
), W = d(
|
|
169
|
+
({ className: i, children: r, rail: a = !0, ...o }) => {
|
|
170
|
+
const t = _(S);
|
|
171
|
+
return /* @__PURE__ */ e(T, { forceMount: !0, asChild: !0, ...o, children: /* @__PURE__ */ e(
|
|
161
172
|
L.div,
|
|
162
173
|
{
|
|
163
174
|
"data-slot": "chain-of-thought-content",
|
|
164
175
|
initial: !1,
|
|
165
|
-
animate:
|
|
176
|
+
animate: t ? "open" : "closed",
|
|
166
177
|
variants: {
|
|
167
178
|
open: { height: "auto", opacity: 1 },
|
|
168
179
|
closed: { height: 0, opacity: 0 }
|
|
169
180
|
},
|
|
170
|
-
transition: { duration:
|
|
181
|
+
transition: { duration: t ? 0.28 : 0.2, ease: P },
|
|
171
182
|
className: n(
|
|
172
|
-
"overflow-hidden text-
|
|
183
|
+
"overflow-hidden text-secondary outline-none",
|
|
173
184
|
"data-[state=closed]:pointer-events-none",
|
|
174
185
|
i
|
|
175
186
|
),
|
|
176
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ e(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
"data-rail": a || void 0,
|
|
191
|
+
className: n(
|
|
192
|
+
"relative pt-2 pb-1 pl-7",
|
|
193
|
+
a && [
|
|
194
|
+
"has-[[data-slot=chain-of-thought-evidence]]:before:absolute has-[[data-slot=chain-of-thought-evidence]]:before:left-2 has-[[data-slot=chain-of-thought-evidence]]:before:top-0 has-[[data-slot=chain-of-thought-evidence]]:before:bottom-1 has-[[data-slot=chain-of-thought-evidence]]:before:border-l has-[[data-slot=chain-of-thought-evidence]]:before:border-border-strong has-[[data-slot=chain-of-thought-evidence]]:before:content-['']",
|
|
195
|
+
// The rail ends ON the last branch: when the trailing element
|
|
196
|
+
// is a collapsed evidence row (min-h-8 = 32px + the pb-1),
|
|
197
|
+
// stop at its top and let its elbow draw the final curve —
|
|
198
|
+
// a rail running past the last elbow is a line to nowhere.
|
|
199
|
+
"has-[[data-slot=chain-of-thought-evidence][data-state=closed]:last-child]:before:bottom-9"
|
|
200
|
+
]
|
|
201
|
+
),
|
|
202
|
+
children: r
|
|
203
|
+
}
|
|
204
|
+
)
|
|
177
205
|
}
|
|
178
206
|
) });
|
|
179
207
|
}
|
|
180
|
-
), X =
|
|
181
|
-
({ className: i, ...
|
|
208
|
+
), X = d(
|
|
209
|
+
({ className: i, ...r }) => /* @__PURE__ */ e(
|
|
182
210
|
"div",
|
|
183
211
|
{
|
|
184
212
|
"data-slot": "chain-of-thought-item",
|
|
@@ -187,50 +215,60 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
187
215
|
"before:absolute before:top-2 before:left-0 before:size-1.5 before:rounded-dot before:bg-current before:content-['']",
|
|
188
216
|
i
|
|
189
217
|
),
|
|
190
|
-
...
|
|
218
|
+
...r
|
|
191
219
|
}
|
|
192
220
|
)
|
|
193
|
-
), q =
|
|
194
|
-
({ className: i, ...
|
|
221
|
+
), q = d(
|
|
222
|
+
({ className: i, ...r }) => /* @__PURE__ */ e(
|
|
195
223
|
"div",
|
|
196
224
|
{
|
|
197
225
|
className: n("flex flex-wrap items-center gap-2", i),
|
|
198
|
-
...
|
|
226
|
+
...r
|
|
199
227
|
}
|
|
200
228
|
)
|
|
201
|
-
), G =
|
|
202
|
-
({ className: i, children:
|
|
229
|
+
), G = d(
|
|
230
|
+
({ className: i, children: r, ...a }) => /* @__PURE__ */ e(
|
|
203
231
|
y,
|
|
204
232
|
{
|
|
205
233
|
className: n("gap-1 font-normal", i),
|
|
206
234
|
color: "default",
|
|
207
235
|
variant: "soft",
|
|
208
|
-
...
|
|
209
|
-
children:
|
|
236
|
+
...a,
|
|
237
|
+
children: r
|
|
210
238
|
}
|
|
211
239
|
)
|
|
212
|
-
), J =
|
|
240
|
+
), J = d(
|
|
213
241
|
({
|
|
214
242
|
className: i,
|
|
215
|
-
title:
|
|
216
|
-
tag:
|
|
217
|
-
meta:
|
|
218
|
-
source:
|
|
243
|
+
title: r,
|
|
244
|
+
tag: a,
|
|
245
|
+
meta: o,
|
|
246
|
+
source: t,
|
|
219
247
|
error: s,
|
|
220
248
|
icon: h,
|
|
221
249
|
defaultOpen: m = !1,
|
|
222
|
-
children:
|
|
250
|
+
children: c,
|
|
223
251
|
...p
|
|
224
|
-
}) => /* @__PURE__ */
|
|
252
|
+
}) => /* @__PURE__ */ l(
|
|
225
253
|
N,
|
|
226
254
|
{
|
|
227
255
|
"data-slot": "chain-of-thought-evidence",
|
|
228
256
|
"data-error": s != null || void 0,
|
|
229
257
|
defaultOpen: m,
|
|
230
|
-
className: n(
|
|
258
|
+
className: n(
|
|
259
|
+
"w-full",
|
|
260
|
+
// Inside rail-enabled step content, an evidence row is a real CHILD
|
|
261
|
+
// of the step: it hangs off the descending rail with its own elbow,
|
|
262
|
+
// terminating at the trigger icon's centre (min-h-8 row, size-3.5
|
|
263
|
+
// icon → 16px = h-4). The elbow spans from the rail (20px left of
|
|
264
|
+
// the row) to 4px short of the icon, same as every other branch.
|
|
265
|
+
"[[data-rail]_&]:relative",
|
|
266
|
+
"[[data-rail]_&]:before:absolute [[data-rail]_&]:before:content-[''] [[data-rail]_&]:before:-left-5 [[data-rail]_&]:before:top-0 [[data-rail]_&]:before:h-4 [[data-rail]_&]:before:w-4 [[data-rail]_&]:before:rounded-bl-[9px] [[data-rail]_&]:before:border-b [[data-rail]_&]:before:border-l [[data-rail]_&]:before:border-border-strong",
|
|
267
|
+
i
|
|
268
|
+
),
|
|
231
269
|
...p,
|
|
232
270
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ e(C, { asChild: !0, children: /* @__PURE__ */ l(
|
|
234
272
|
"button",
|
|
235
273
|
{
|
|
236
274
|
type: "button",
|
|
@@ -241,7 +279,7 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
241
279
|
"focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none"
|
|
242
280
|
),
|
|
243
281
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ e(
|
|
245
283
|
"span",
|
|
246
284
|
{
|
|
247
285
|
"aria-hidden": !0,
|
|
@@ -249,21 +287,21 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
249
287
|
"shrink-0 [&>svg]:size-3.5",
|
|
250
288
|
s != null ? "text-danger" : "text-tertiary"
|
|
251
289
|
),
|
|
252
|
-
children: h ?? (s != null ? /* @__PURE__ */
|
|
290
|
+
children: h ?? (s != null ? /* @__PURE__ */ e(j, {}) : /* @__PURE__ */ e(M, {}))
|
|
253
291
|
}
|
|
254
292
|
),
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
|
|
293
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-base font-medium text-secondary", children: r }),
|
|
294
|
+
a != null && /* @__PURE__ */ e(
|
|
257
295
|
y,
|
|
258
296
|
{
|
|
259
297
|
color: "default",
|
|
260
298
|
variant: "soft",
|
|
261
299
|
className: "shrink-0 font-normal tabular-nums",
|
|
262
|
-
children:
|
|
300
|
+
children: a
|
|
263
301
|
}
|
|
264
302
|
),
|
|
265
|
-
|
|
266
|
-
/* @__PURE__ */
|
|
303
|
+
o != null && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-tertiary tabular-nums", children: o }),
|
|
304
|
+
/* @__PURE__ */ e(
|
|
267
305
|
w,
|
|
268
306
|
{
|
|
269
307
|
"aria-hidden": !0,
|
|
@@ -276,7 +314,7 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
276
314
|
]
|
|
277
315
|
}
|
|
278
316
|
) }),
|
|
279
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ e(
|
|
280
318
|
T,
|
|
281
319
|
{
|
|
282
320
|
"data-slot": "chain-of-thought-evidence-content",
|
|
@@ -284,127 +322,139 @@ const k = O(!1), E = O("rail"), B = l(
|
|
|
284
322
|
"overflow-hidden outline-none",
|
|
285
323
|
"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"
|
|
286
324
|
),
|
|
287
|
-
children: /* @__PURE__ */
|
|
288
|
-
s != null && /* @__PURE__ */
|
|
289
|
-
|
|
290
|
-
|
|
325
|
+
children: /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5 pt-1.5", children: [
|
|
326
|
+
s != null && /* @__PURE__ */ e("p", { className: "text-xs text-danger", children: s }),
|
|
327
|
+
c,
|
|
328
|
+
t != null && /* @__PURE__ */ e("p", { className: "text-xs text-tertiary", children: t })
|
|
291
329
|
] })
|
|
292
330
|
}
|
|
293
331
|
)
|
|
294
332
|
]
|
|
295
333
|
}
|
|
296
334
|
)
|
|
297
|
-
), K =
|
|
335
|
+
), K = d(
|
|
298
336
|
({
|
|
299
337
|
className: i,
|
|
300
|
-
columns:
|
|
301
|
-
rows:
|
|
302
|
-
totalRows:
|
|
303
|
-
flag:
|
|
338
|
+
columns: r,
|
|
339
|
+
rows: a,
|
|
340
|
+
totalRows: o,
|
|
341
|
+
flag: t,
|
|
304
342
|
...s
|
|
305
343
|
}) => {
|
|
306
|
-
const h =
|
|
307
|
-
return /* @__PURE__ */
|
|
344
|
+
const h = o != null && o > a.length, m = (t == null ? void 0 : t.color) ?? "default";
|
|
345
|
+
return /* @__PURE__ */ l(
|
|
308
346
|
"div",
|
|
309
347
|
{
|
|
310
348
|
"data-slot": "chain-of-thought-evidence-table",
|
|
311
349
|
className: n("overflow-hidden rounded-lg bg-surface", i),
|
|
312
350
|
...s,
|
|
313
351
|
children: [
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ e("div", { className: "max-h-56 overflow-auto", children: /* @__PURE__ */ l("table", { className: "w-full border-collapse text-xs tabular-nums", children: [
|
|
353
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "text-tertiary", children: r.map((c) => /* @__PURE__ */ e(
|
|
316
354
|
"th",
|
|
317
355
|
{
|
|
318
356
|
className: n(
|
|
319
357
|
"sticky top-0 bg-surface px-2.5 py-1.5 font-medium whitespace-nowrap",
|
|
320
|
-
|
|
358
|
+
c.align === "end" ? "text-right" : "text-left"
|
|
321
359
|
),
|
|
322
|
-
children:
|
|
360
|
+
children: c.label
|
|
323
361
|
},
|
|
324
|
-
|
|
362
|
+
c.key
|
|
325
363
|
)) }) }),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
const u =
|
|
328
|
-
return /* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ e("tbody", { children: a.map((c, p) => {
|
|
365
|
+
const u = t != null && String(c[t.key]) === String(t.value);
|
|
366
|
+
return /* @__PURE__ */ e("tr", { className: n(u && "bg-muted"), children: r.map((g, f) => /* @__PURE__ */ e(
|
|
329
367
|
"td",
|
|
330
368
|
{
|
|
331
369
|
className: n(
|
|
332
370
|
"px-2.5 py-1 whitespace-nowrap",
|
|
333
371
|
g.align === "end" ? "text-right" : "text-left",
|
|
334
|
-
f === 0 ? "text-
|
|
372
|
+
f === 0 ? "text-secondary" : "text-tertiary",
|
|
335
373
|
u && f === 0 && "font-semibold",
|
|
336
374
|
u && f === 0 && m === "danger" && "text-danger",
|
|
337
375
|
u && f === 0 && m === "warning" && "text-warning"
|
|
338
376
|
),
|
|
339
|
-
children:
|
|
377
|
+
children: c[g.key]
|
|
340
378
|
},
|
|
341
379
|
g.key
|
|
342
380
|
)) }, p);
|
|
343
381
|
}) })
|
|
344
382
|
] }) }),
|
|
345
|
-
h && /* @__PURE__ */
|
|
346
|
-
|
|
383
|
+
h && /* @__PURE__ */ l("p", { className: "px-2.5 py-1.5 text-xs text-tertiary tabular-nums", children: [
|
|
384
|
+
a.length,
|
|
347
385
|
" of ",
|
|
348
|
-
|
|
386
|
+
o,
|
|
349
387
|
" rows"
|
|
350
388
|
] })
|
|
351
389
|
]
|
|
352
390
|
}
|
|
353
391
|
);
|
|
354
392
|
}
|
|
355
|
-
), Q =
|
|
356
|
-
({ className: i, role:
|
|
393
|
+
), Q = d(
|
|
394
|
+
({ className: i, role: r = "list", ...a }) => /* @__PURE__ */ e(
|
|
357
395
|
"div",
|
|
358
396
|
{
|
|
359
397
|
"data-slot": "chain-of-thought-metrics",
|
|
360
|
-
role:
|
|
361
|
-
className: n(
|
|
362
|
-
|
|
398
|
+
role: r,
|
|
399
|
+
className: n(
|
|
400
|
+
"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3",
|
|
401
|
+
i
|
|
402
|
+
),
|
|
403
|
+
...a
|
|
363
404
|
}
|
|
364
405
|
)
|
|
365
406
|
), V = {
|
|
366
|
-
default: "text-
|
|
407
|
+
default: "text-secondary",
|
|
367
408
|
danger: "text-danger",
|
|
368
409
|
warning: "text-warning",
|
|
369
410
|
success: "text-success",
|
|
370
411
|
info: "text-info"
|
|
371
|
-
}, Y =
|
|
412
|
+
}, Y = d(
|
|
372
413
|
({
|
|
373
414
|
className: i,
|
|
374
|
-
label:
|
|
375
|
-
value:
|
|
376
|
-
sub:
|
|
377
|
-
color:
|
|
415
|
+
label: r,
|
|
416
|
+
value: a,
|
|
417
|
+
sub: o,
|
|
418
|
+
color: t = "default",
|
|
378
419
|
role: s = "listitem",
|
|
379
420
|
...h
|
|
380
|
-
}) => /* @__PURE__ */
|
|
421
|
+
}) => /* @__PURE__ */ l(
|
|
381
422
|
"div",
|
|
382
423
|
{
|
|
383
424
|
"data-slot": "chain-of-thought-metric",
|
|
384
|
-
"data-color":
|
|
425
|
+
"data-color": t,
|
|
385
426
|
role: s,
|
|
386
|
-
className: n(
|
|
427
|
+
className: n(
|
|
428
|
+
"flex min-w-0 items-baseline justify-between gap-6",
|
|
429
|
+
i
|
|
430
|
+
),
|
|
387
431
|
...h,
|
|
388
432
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
|
|
433
|
+
/* @__PURE__ */ l("div", { className: "min-w-0 text-xs text-tertiary", children: [
|
|
434
|
+
r,
|
|
435
|
+
o != null && /* @__PURE__ */ l("span", { children: [
|
|
436
|
+
" (",
|
|
437
|
+
o,
|
|
438
|
+
")"
|
|
439
|
+
] })
|
|
440
|
+
] }),
|
|
441
|
+
/* @__PURE__ */ e(
|
|
391
442
|
"div",
|
|
392
443
|
{
|
|
393
444
|
className: n(
|
|
394
|
-
"text-base font-semibold tabular-nums",
|
|
395
|
-
V[
|
|
445
|
+
"shrink-0 text-base font-semibold tabular-nums",
|
|
446
|
+
V[t]
|
|
396
447
|
),
|
|
397
|
-
children:
|
|
448
|
+
children: a
|
|
398
449
|
}
|
|
399
|
-
)
|
|
400
|
-
a != null && /* @__PURE__ */ t("div", { className: "text-xs text-tertiary", children: a })
|
|
450
|
+
)
|
|
401
451
|
]
|
|
402
452
|
}
|
|
403
453
|
)
|
|
404
|
-
), Z =
|
|
405
|
-
({ className: i, children:
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
|
|
454
|
+
), Z = d(
|
|
455
|
+
({ className: i, children: r, caption: a, ...o }) => /* @__PURE__ */ l("div", { className: n("space-y-2", i), ...o, children: [
|
|
456
|
+
/* @__PURE__ */ e("div", { className: "relative flex max-h-88 items-center justify-center overflow-hidden rounded-lg bg-muted p-3", children: r }),
|
|
457
|
+
a && /* @__PURE__ */ e("p", { className: "text-xs text-tertiary", children: a })
|
|
408
458
|
] })
|
|
409
459
|
);
|
|
410
460
|
B.displayName = "ChainOfThought";
|