@actioneer/ads 0.5.4 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +2644 -311
- package/components/answer.js +1776 -371
- package/components/assistant-ui/answer-tool-ui.js +27 -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/follow-up-suggestions.d.ts +5 -1
- package/components/assistant-ui/follow-up-suggestions.js +47 -19
- 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.js +77 -77
- 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 +16 -16
- package/components/index.d.ts +4 -0
- package/components/index.js +525 -478
- 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.js +133 -133
- 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/llms.txt +98 -8
- package/manifest.json +1012 -96
- package/package.json +5 -5
- package/styles.css +206 -81
- package/theme.css +200 -77
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
|
@@ -1,67 +1,68 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { memo as U, useState as
|
|
4
|
-
import {
|
|
5
|
-
import { useScrollLock as
|
|
6
|
-
import { Collapsible as
|
|
7
|
-
import { cn as
|
|
3
|
+
import { memo as U, useState as C, useRef as _, useCallback as P } from "react";
|
|
4
|
+
import { ChevronDown as q } from "../../lib/icons.js";
|
|
5
|
+
import { useScrollLock as $, useToolCallElapsed as B } from "@assistant-ui/react";
|
|
6
|
+
import { Collapsible as M, CollapsibleTrigger as J, CollapsibleContent as V } from "../ui/collapsible.js";
|
|
7
|
+
import { cn as c } from "../../lib/cn.js";
|
|
8
8
|
import { Button as v } from "../ui/button.js";
|
|
9
|
-
|
|
9
|
+
import { TraceStateIcon as K } from "../ai-elements/chain-of-thought-icon.js";
|
|
10
|
+
const W = 200, w = "active:scale-[0.98]";
|
|
10
11
|
function D({
|
|
11
12
|
className: e,
|
|
12
13
|
open: l,
|
|
13
14
|
onOpenChange: t,
|
|
14
15
|
defaultOpen: n = !1,
|
|
15
16
|
children: r,
|
|
16
|
-
...
|
|
17
|
+
...f
|
|
17
18
|
}) {
|
|
18
|
-
const s =
|
|
19
|
-
(
|
|
20
|
-
|
|
19
|
+
const s = _(null), [i, N] = C(n), k = $(s, W), d = l !== void 0, b = d ? l : i, u = P(
|
|
20
|
+
(h) => {
|
|
21
|
+
k(), d || N(h), t == null || t(h);
|
|
21
22
|
},
|
|
22
|
-
[
|
|
23
|
+
[k, d, t]
|
|
23
24
|
);
|
|
24
25
|
return /* @__PURE__ */ o(
|
|
25
|
-
|
|
26
|
+
M,
|
|
26
27
|
{
|
|
27
28
|
ref: s,
|
|
28
29
|
"data-slot": "tool-fallback-root",
|
|
29
|
-
open:
|
|
30
|
-
onOpenChange:
|
|
31
|
-
className:
|
|
30
|
+
open: b,
|
|
31
|
+
onOpenChange: u,
|
|
32
|
+
className: c(
|
|
32
33
|
"aui-tool-fallback-root group/tool-fallback-root w-full",
|
|
33
34
|
e
|
|
34
35
|
),
|
|
35
|
-
...
|
|
36
|
+
...f,
|
|
36
37
|
children: r
|
|
37
38
|
}
|
|
38
39
|
);
|
|
39
40
|
}
|
|
40
|
-
const
|
|
41
|
-
running:
|
|
42
|
-
complete:
|
|
43
|
-
incomplete:
|
|
44
|
-
"requires-action":
|
|
45
|
-
},
|
|
41
|
+
const G = {
|
|
42
|
+
running: "active",
|
|
43
|
+
complete: "complete",
|
|
44
|
+
incomplete: "error",
|
|
45
|
+
"requires-action": "pending"
|
|
46
|
+
}, H = (e) => {
|
|
46
47
|
if (e < 1e3) return "<1s";
|
|
47
48
|
const l = e / 1e3;
|
|
48
49
|
return l < 10 ? `${(Math.floor(l * 10) / 10).toFixed(1)}s` : l < 60 ? `${Math.floor(l)}s` : `${Math.floor(l / 60)}m ${Math.floor(l % 60)}s`;
|
|
49
50
|
};
|
|
50
|
-
function
|
|
51
|
+
function Q({
|
|
51
52
|
className: e,
|
|
52
53
|
...l
|
|
53
54
|
}) {
|
|
54
|
-
const t =
|
|
55
|
+
const t = B();
|
|
55
56
|
return t === void 0 ? null : /* @__PURE__ */ o(
|
|
56
57
|
"span",
|
|
57
58
|
{
|
|
58
59
|
"data-slot": "tool-fallback-duration",
|
|
59
|
-
className:
|
|
60
|
+
className: c(
|
|
60
61
|
"aui-tool-fallback-duration text-muted-foreground text-xs tabular-nums",
|
|
61
62
|
e
|
|
62
63
|
),
|
|
63
64
|
...l,
|
|
64
|
-
children:
|
|
65
|
+
children: H(t)
|
|
65
66
|
}
|
|
66
67
|
);
|
|
67
68
|
}
|
|
@@ -71,50 +72,52 @@ function R({
|
|
|
71
72
|
className: t,
|
|
72
73
|
...n
|
|
73
74
|
}) {
|
|
74
|
-
const r = (l == null ? void 0 : l.type) ?? "complete",
|
|
75
|
+
const r = (l == null ? void 0 : l.type) ?? "complete", f = r === "running", s = (l == null ? void 0 : l.type) === "incomplete" && l.reason === "cancelled", i = s ? "Cancelled tool" : "Used tool";
|
|
75
76
|
return /* @__PURE__ */ m(
|
|
76
|
-
|
|
77
|
+
J,
|
|
77
78
|
{
|
|
78
79
|
"data-slot": "tool-fallback-trigger",
|
|
79
|
-
className:
|
|
80
|
+
className: c(
|
|
80
81
|
"aui-tool-fallback-trigger group/trigger text-muted-foreground hover:text-foreground flex w-fit origin-left items-center gap-2 py-1.5 text-xs transition-[color,scale] active:scale-[0.98]",
|
|
81
82
|
t
|
|
82
83
|
),
|
|
83
84
|
...n,
|
|
84
85
|
children: [
|
|
85
86
|
/* @__PURE__ */ o(
|
|
86
|
-
|
|
87
|
+
K,
|
|
87
88
|
{
|
|
88
89
|
"data-slot": "tool-fallback-trigger-icon",
|
|
89
|
-
|
|
90
|
+
toolName: e,
|
|
91
|
+
status: G[r],
|
|
92
|
+
className: c(
|
|
90
93
|
"aui-tool-fallback-trigger-icon size-4 shrink-0",
|
|
91
|
-
s && "text-muted-foreground"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
s && "text-muted-foreground"
|
|
95
|
+
),
|
|
96
|
+
"aria-hidden": !0
|
|
94
97
|
}
|
|
95
98
|
),
|
|
96
99
|
/* @__PURE__ */ m(
|
|
97
100
|
"span",
|
|
98
101
|
{
|
|
99
102
|
"data-slot": "tool-fallback-trigger-label",
|
|
100
|
-
className:
|
|
103
|
+
className: c(
|
|
101
104
|
"aui-tool-fallback-trigger-label-wrapper relative inline-block text-start leading-none",
|
|
102
105
|
s && "text-muted-foreground line-through"
|
|
103
106
|
),
|
|
104
107
|
children: [
|
|
105
108
|
/* @__PURE__ */ m("span", { children: [
|
|
106
|
-
|
|
109
|
+
i,
|
|
107
110
|
": ",
|
|
108
111
|
/* @__PURE__ */ o("b", { children: e })
|
|
109
112
|
] }),
|
|
110
|
-
|
|
113
|
+
f && /* @__PURE__ */ m(
|
|
111
114
|
"span",
|
|
112
115
|
{
|
|
113
116
|
"aria-hidden": !0,
|
|
114
117
|
"data-slot": "tool-fallback-trigger-shimmer",
|
|
115
118
|
className: "aui-tool-fallback-trigger-shimmer shimmer pointer-events-none absolute inset-0 motion-reduce:animate-none",
|
|
116
119
|
children: [
|
|
117
|
-
|
|
120
|
+
i,
|
|
118
121
|
": ",
|
|
119
122
|
/* @__PURE__ */ o("b", { children: e })
|
|
120
123
|
]
|
|
@@ -123,12 +126,12 @@ function R({
|
|
|
123
126
|
]
|
|
124
127
|
}
|
|
125
128
|
),
|
|
126
|
-
/* @__PURE__ */ o(
|
|
129
|
+
/* @__PURE__ */ o(Q, {}),
|
|
127
130
|
/* @__PURE__ */ o(
|
|
128
|
-
|
|
131
|
+
q,
|
|
129
132
|
{
|
|
130
133
|
"data-slot": "tool-fallback-trigger-chevron",
|
|
131
|
-
className:
|
|
134
|
+
className: c(
|
|
132
135
|
"aui-tool-fallback-trigger-chevron size-4 shrink-0",
|
|
133
136
|
"transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
|
|
134
137
|
"group-data-[state=closed]/trigger:-rotate-90",
|
|
@@ -140,16 +143,16 @@ function R({
|
|
|
140
143
|
}
|
|
141
144
|
);
|
|
142
145
|
}
|
|
143
|
-
function
|
|
146
|
+
function S({
|
|
144
147
|
className: e,
|
|
145
148
|
children: l,
|
|
146
149
|
...t
|
|
147
150
|
}) {
|
|
148
151
|
return /* @__PURE__ */ o(
|
|
149
|
-
|
|
152
|
+
V,
|
|
150
153
|
{
|
|
151
154
|
"data-slot": "tool-fallback-content",
|
|
152
|
-
className:
|
|
155
|
+
className: c(
|
|
153
156
|
"aui-tool-fallback-content relative overflow-hidden text-xs outline-none",
|
|
154
157
|
"group/collapsible-content",
|
|
155
158
|
"data-[state=closed]:pointer-events-none",
|
|
@@ -159,7 +162,7 @@ function E({
|
|
|
159
162
|
children: /* @__PURE__ */ o(
|
|
160
163
|
"div",
|
|
161
164
|
{
|
|
162
|
-
className:
|
|
165
|
+
className: c(
|
|
163
166
|
"flex flex-col gap-2 ps-6 pt-1 pb-2 ease-out motion-reduce:animate-none",
|
|
164
167
|
"group-data-[state=open]/collapsible-content:animate-in group-data-[state=open]/collapsible-content:fade-in-0 group-data-[state=open]/collapsible-content:blur-in-[2px] group-data-[state=open]/collapsible-content:slide-in-from-top-1",
|
|
165
168
|
"group-data-[state=closed]/collapsible-content:animate-out group-data-[state=closed]/collapsible-content:fade-out-0 group-data-[state=closed]/collapsible-content:blur-out-[2px] group-data-[state=closed]/collapsible-content:slide-out-to-top-1",
|
|
@@ -171,7 +174,7 @@ function E({
|
|
|
171
174
|
}
|
|
172
175
|
);
|
|
173
176
|
}
|
|
174
|
-
function
|
|
177
|
+
function E({
|
|
175
178
|
argsText: e,
|
|
176
179
|
className: l,
|
|
177
180
|
...t
|
|
@@ -180,13 +183,13 @@ function I({
|
|
|
180
183
|
"div",
|
|
181
184
|
{
|
|
182
185
|
"data-slot": "tool-fallback-args",
|
|
183
|
-
className:
|
|
186
|
+
className: c("aui-tool-fallback-args", l),
|
|
184
187
|
...t,
|
|
185
188
|
children: /* @__PURE__ */ o("pre", { className: "aui-tool-fallback-args-value bg-muted/50 text-foreground/90 rounded-md p-2.5 text-xs whitespace-pre-wrap", children: e })
|
|
186
189
|
}
|
|
187
190
|
) : null;
|
|
188
191
|
}
|
|
189
|
-
function
|
|
192
|
+
function I({
|
|
190
193
|
result: e,
|
|
191
194
|
className: l,
|
|
192
195
|
...t
|
|
@@ -195,7 +198,7 @@ function L({
|
|
|
195
198
|
"div",
|
|
196
199
|
{
|
|
197
200
|
"data-slot": "tool-fallback-result",
|
|
198
|
-
className:
|
|
201
|
+
className: c("aui-tool-fallback-result", l),
|
|
199
202
|
...t,
|
|
200
203
|
children: [
|
|
201
204
|
/* @__PURE__ */ o("p", { className: "aui-tool-fallback-result-header text-muted-foreground text-xs font-medium", children: "Result:" }),
|
|
@@ -204,7 +207,7 @@ function L({
|
|
|
204
207
|
}
|
|
205
208
|
);
|
|
206
209
|
}
|
|
207
|
-
function
|
|
210
|
+
function L({
|
|
208
211
|
status: e,
|
|
209
212
|
className: l,
|
|
210
213
|
...t
|
|
@@ -217,7 +220,7 @@ function S({
|
|
|
217
220
|
"div",
|
|
218
221
|
{
|
|
219
222
|
"data-slot": "tool-fallback-error",
|
|
220
|
-
className:
|
|
223
|
+
className: c("aui-tool-fallback-error", l),
|
|
221
224
|
...t,
|
|
222
225
|
children: [
|
|
223
226
|
/* @__PURE__ */ o("p", { className: "aui-tool-fallback-error-header text-muted-foreground font-semibold", children: s }),
|
|
@@ -226,56 +229,56 @@ function S({
|
|
|
226
229
|
}
|
|
227
230
|
);
|
|
228
231
|
}
|
|
229
|
-
const
|
|
232
|
+
const X = "Approved by user", Y = "User denied tool execution", O = {
|
|
230
233
|
"allow-once": "Allow",
|
|
231
234
|
"allow-always": "Always allow",
|
|
232
235
|
"reject-once": "Deny",
|
|
233
236
|
"reject-always": "Always deny"
|
|
234
|
-
},
|
|
237
|
+
}, A = (e) => e === "allow-once" || e === "allow-always", F = (e) => e.label ?? (Object.hasOwn(O, e.kind) ? O[e.kind] : void 0) ?? e.id;
|
|
235
238
|
function j({
|
|
236
239
|
className: e,
|
|
237
240
|
addResult: l,
|
|
238
241
|
resume: t,
|
|
239
242
|
interrupt: n,
|
|
240
243
|
approval: r,
|
|
241
|
-
respondToApproval:
|
|
244
|
+
respondToApproval: f,
|
|
242
245
|
...s
|
|
243
246
|
}) {
|
|
244
|
-
const [
|
|
247
|
+
const [i, N] = C(!1), [k, d] = C(null);
|
|
245
248
|
if (r != null && (r.approved !== void 0 || r.resolution !== void 0))
|
|
246
249
|
return null;
|
|
247
|
-
const
|
|
248
|
-
(a) => Object.hasOwn(
|
|
249
|
-
),
|
|
250
|
-
|
|
250
|
+
const b = f ? r == null ? void 0 : r.options : void 0, u = b == null ? void 0 : b.filter(
|
|
251
|
+
(a) => Object.hasOwn(O, a.kind)
|
|
252
|
+
), h = (a) => {
|
|
253
|
+
i || (r != null && r.approved === void 0 && f ? f({ approved: a }) : n ? t == null || t({ approved: a }) : l == null || l(a ? X : Y), N(!0));
|
|
251
254
|
}, T = (a) => {
|
|
252
|
-
|
|
255
|
+
i || (f == null || f({ optionId: a.id }), N(!0), d(null));
|
|
253
256
|
}, z = (a) => {
|
|
254
|
-
a.confirm ?
|
|
255
|
-
},
|
|
256
|
-
if (
|
|
257
|
-
const a = typeof
|
|
257
|
+
a.confirm ? d(a.id) : T(a);
|
|
258
|
+
}, g = k != null ? u == null ? void 0 : u.find((a) => a.id === k) : void 0;
|
|
259
|
+
if (g) {
|
|
260
|
+
const a = typeof g.confirm == "object" ? g.confirm : void 0, y = (a == null ? void 0 : a.description) ?? g.description;
|
|
258
261
|
return /* @__PURE__ */ m(
|
|
259
262
|
"div",
|
|
260
263
|
{
|
|
261
264
|
"data-slot": "tool-fallback-approval-confirm",
|
|
262
|
-
className:
|
|
265
|
+
className: c(
|
|
263
266
|
"aui-tool-fallback-approval-confirm flex flex-col gap-2 pt-1",
|
|
264
267
|
e
|
|
265
268
|
),
|
|
266
269
|
...s,
|
|
267
270
|
children: [
|
|
268
|
-
/* @__PURE__ */ o("p", { className: "aui-tool-fallback-approval-confirm-title font-semibold", children: (a == null ? void 0 : a.title) ?? `${
|
|
269
|
-
|
|
270
|
-
|
|
271
|
+
/* @__PURE__ */ o("p", { className: "aui-tool-fallback-approval-confirm-title font-semibold", children: (a == null ? void 0 : a.title) ?? `${F(g)}?` }),
|
|
272
|
+
y && /* @__PURE__ */ o("p", { className: "aui-tool-fallback-approval-confirm-description text-muted-foreground", children: y }),
|
|
273
|
+
g.grants && g.grants.length > 0 && /* @__PURE__ */ o("ul", { className: "aui-tool-fallback-approval-confirm-grants flex flex-col gap-1", children: g.grants.map((p) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o("code", { className: "aui-tool-fallback-approval-confirm-grant bg-muted rounded px-1.5 py-0.5 text-xs", children: p }) }, p)) }),
|
|
271
274
|
/* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
272
275
|
/* @__PURE__ */ o(
|
|
273
276
|
v,
|
|
274
277
|
{
|
|
275
278
|
size: "sm",
|
|
276
|
-
className:
|
|
277
|
-
onClick: () => T(
|
|
278
|
-
disabled:
|
|
279
|
+
className: w,
|
|
280
|
+
onClick: () => T(g),
|
|
281
|
+
disabled: i,
|
|
279
282
|
children: "Confirm"
|
|
280
283
|
}
|
|
281
284
|
),
|
|
@@ -284,9 +287,9 @@ function j({
|
|
|
284
287
|
{
|
|
285
288
|
size: "sm",
|
|
286
289
|
variant: "outline",
|
|
287
|
-
className:
|
|
288
|
-
onClick: () =>
|
|
289
|
-
disabled:
|
|
290
|
+
className: w,
|
|
291
|
+
onClick: () => d(null),
|
|
292
|
+
disabled: i,
|
|
290
293
|
children: "Back"
|
|
291
294
|
}
|
|
292
295
|
)
|
|
@@ -295,38 +298,38 @@ function j({
|
|
|
295
298
|
}
|
|
296
299
|
);
|
|
297
300
|
}
|
|
298
|
-
if (
|
|
299
|
-
const a = (
|
|
301
|
+
if (b && b.length > 0) {
|
|
302
|
+
const a = (u == null ? void 0 : u.filter((p) => A(p.kind))) ?? [], y = (u == null ? void 0 : u.filter((p) => !A(p.kind))) ?? [];
|
|
300
303
|
return /* @__PURE__ */ m(
|
|
301
304
|
"div",
|
|
302
305
|
{
|
|
303
306
|
"data-slot": "tool-fallback-approval",
|
|
304
|
-
className:
|
|
307
|
+
className: c(
|
|
305
308
|
"aui-tool-fallback-approval flex flex-wrap items-center gap-2 pt-1",
|
|
306
309
|
e
|
|
307
310
|
),
|
|
308
311
|
...s,
|
|
309
312
|
children: [
|
|
310
|
-
[...a, ...
|
|
313
|
+
[...a, ...y].map((p) => /* @__PURE__ */ o(
|
|
311
314
|
v,
|
|
312
315
|
{
|
|
313
316
|
size: "sm",
|
|
314
317
|
variant: p === a[0] ? "default" : "outline",
|
|
315
|
-
className:
|
|
318
|
+
className: w,
|
|
316
319
|
onClick: () => z(p),
|
|
317
|
-
disabled:
|
|
318
|
-
children:
|
|
320
|
+
disabled: i,
|
|
321
|
+
children: F(p)
|
|
319
322
|
},
|
|
320
323
|
p.id
|
|
321
324
|
)),
|
|
322
|
-
|
|
325
|
+
y.length === 0 && /* @__PURE__ */ o(
|
|
323
326
|
v,
|
|
324
327
|
{
|
|
325
328
|
size: "sm",
|
|
326
329
|
variant: "outline",
|
|
327
|
-
className:
|
|
328
|
-
onClick: () =>
|
|
329
|
-
disabled:
|
|
330
|
+
className: w,
|
|
331
|
+
onClick: () => h(!1),
|
|
332
|
+
disabled: i,
|
|
330
333
|
children: "Deny"
|
|
331
334
|
}
|
|
332
335
|
)
|
|
@@ -338,7 +341,7 @@ function j({
|
|
|
338
341
|
"div",
|
|
339
342
|
{
|
|
340
343
|
"data-slot": "tool-fallback-approval",
|
|
341
|
-
className:
|
|
344
|
+
className: c(
|
|
342
345
|
"aui-tool-fallback-approval flex items-center gap-2 pt-1",
|
|
343
346
|
e
|
|
344
347
|
),
|
|
@@ -348,9 +351,9 @@ function j({
|
|
|
348
351
|
v,
|
|
349
352
|
{
|
|
350
353
|
size: "sm",
|
|
351
|
-
className:
|
|
352
|
-
onClick: () =>
|
|
353
|
-
disabled:
|
|
354
|
+
className: w,
|
|
355
|
+
onClick: () => h(!0),
|
|
356
|
+
disabled: i,
|
|
354
357
|
children: "Allow"
|
|
355
358
|
}
|
|
356
359
|
),
|
|
@@ -359,9 +362,9 @@ function j({
|
|
|
359
362
|
{
|
|
360
363
|
size: "sm",
|
|
361
364
|
variant: "outline",
|
|
362
|
-
className:
|
|
363
|
-
onClick: () =>
|
|
364
|
-
disabled:
|
|
365
|
+
className: w,
|
|
366
|
+
onClick: () => h(!1),
|
|
367
|
+
disabled: i,
|
|
365
368
|
children: "Deny"
|
|
366
369
|
}
|
|
367
370
|
)
|
|
@@ -369,60 +372,60 @@ function j({
|
|
|
369
372
|
}
|
|
370
373
|
);
|
|
371
374
|
}
|
|
372
|
-
const
|
|
375
|
+
const Z = ({
|
|
373
376
|
toolName: e,
|
|
374
377
|
argsText: l,
|
|
375
378
|
result: t,
|
|
376
379
|
status: n,
|
|
377
380
|
addResult: r,
|
|
378
|
-
resume:
|
|
381
|
+
resume: f,
|
|
379
382
|
interrupt: s,
|
|
380
|
-
approval:
|
|
381
|
-
respondToApproval:
|
|
383
|
+
approval: i,
|
|
384
|
+
respondToApproval: N
|
|
382
385
|
}) => {
|
|
383
|
-
const
|
|
384
|
-
return
|
|
386
|
+
const k = (n == null ? void 0 : n.type) === "incomplete" && n.reason === "cancelled", d = (n == null ? void 0 : n.type) === "requires-action", [b, u] = C(d), [h, T] = C(d);
|
|
387
|
+
return d !== h && (T(d), d && u(!0)), /* @__PURE__ */ m(D, { open: b, onOpenChange: u, children: [
|
|
385
388
|
/* @__PURE__ */ o(R, { toolName: e, status: n }),
|
|
386
|
-
/* @__PURE__ */ m(
|
|
387
|
-
/* @__PURE__ */ o(
|
|
389
|
+
/* @__PURE__ */ m(S, { children: [
|
|
390
|
+
/* @__PURE__ */ o(L, { status: n }),
|
|
388
391
|
/* @__PURE__ */ o(
|
|
389
|
-
|
|
392
|
+
E,
|
|
390
393
|
{
|
|
391
394
|
argsText: l,
|
|
392
|
-
className:
|
|
395
|
+
className: c(k && "opacity-60")
|
|
393
396
|
}
|
|
394
397
|
),
|
|
395
|
-
|
|
398
|
+
d && /* @__PURE__ */ o(
|
|
396
399
|
j,
|
|
397
400
|
{
|
|
398
401
|
addResult: r,
|
|
399
|
-
resume:
|
|
402
|
+
resume: f,
|
|
400
403
|
interrupt: s,
|
|
401
|
-
approval:
|
|
402
|
-
respondToApproval:
|
|
404
|
+
approval: i,
|
|
405
|
+
respondToApproval: N
|
|
403
406
|
}
|
|
404
407
|
),
|
|
405
|
-
!
|
|
408
|
+
!k && /* @__PURE__ */ o(I, { result: t })
|
|
406
409
|
] })
|
|
407
410
|
] });
|
|
408
|
-
},
|
|
409
|
-
|
|
411
|
+
}, x = U(
|
|
412
|
+
Z
|
|
410
413
|
);
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
414
|
+
x.displayName = "ToolFallback";
|
|
415
|
+
x.Root = D;
|
|
416
|
+
x.Trigger = R;
|
|
417
|
+
x.Content = S;
|
|
418
|
+
x.Args = E;
|
|
419
|
+
x.Result = I;
|
|
420
|
+
x.Error = L;
|
|
421
|
+
x.Approval = j;
|
|
419
422
|
export {
|
|
420
|
-
|
|
423
|
+
x as ToolFallback,
|
|
421
424
|
j as ToolFallbackApproval,
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
425
|
+
E as ToolFallbackArgs,
|
|
426
|
+
S as ToolFallbackContent,
|
|
427
|
+
L as ToolFallbackError,
|
|
428
|
+
I as ToolFallbackResult,
|
|
426
429
|
D as ToolFallbackRoot,
|
|
427
430
|
R as ToolFallbackTrigger
|
|
428
431
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible';
|
|
4
|
+
import { ActiveChainOfThoughtState } from '../ai-elements/chain-of-thought-icon';
|
|
4
5
|
declare const toolGroupVariants: (props?: ({
|
|
5
6
|
variant?: "muted" | "outline" | "ghost" | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -10,9 +11,10 @@ export type ToolGroupRootProps = Omit<React.ComponentProps<typeof Collapsible>,
|
|
|
10
11
|
defaultOpen?: boolean;
|
|
11
12
|
};
|
|
12
13
|
declare function ToolGroupRoot({ className, variant, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen, children, ...props }: ToolGroupRootProps): import("react").JSX.Element;
|
|
13
|
-
declare function ToolGroupTrigger({ count, active, className, ...props }: React.ComponentProps<typeof CollapsibleTrigger> & {
|
|
14
|
+
declare function ToolGroupTrigger({ count, active, stage, className, ...props }: React.ComponentProps<typeof CollapsibleTrigger> & {
|
|
14
15
|
count: number;
|
|
15
16
|
active?: boolean;
|
|
17
|
+
stage?: ActiveChainOfThoughtState;
|
|
16
18
|
}): import("react").JSX.Element;
|
|
17
19
|
declare function ToolGroupContent({ className, children, ...props }: React.ComponentProps<typeof CollapsibleContent>): import("react").JSX.Element;
|
|
18
20
|
type ToolGroupComponent = FC<PropsWithChildren<{
|