@actioneer/ads 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/components/accordion.js +15 -15
  2. package/components/agent-icon.d.ts +64 -0
  3. package/components/agent-icon.js +251 -0
  4. package/components/ai-elements/agent-trace.d.ts +8 -1
  5. package/components/ai-elements/agent-trace.js +164 -129
  6. package/components/ai-elements/chain-of-thought-icon.d.ts +42 -0
  7. package/components/ai-elements/chain-of-thought-icon.js +283 -0
  8. package/components/ai-elements/chain-of-thought.js +7 -7
  9. package/components/ai-elements/chart.js +38 -35
  10. package/components/ai-elements/index.d.ts +1 -0
  11. package/components/ai-elements/inline-citation.js +40 -40
  12. package/components/ai-elements/message.js +5 -5
  13. package/components/ai-elements/queue.js +1 -1
  14. package/components/ai-elements/research-activity.d.ts +2 -0
  15. package/components/ai-elements/research-activity.js +79 -81
  16. package/components/ai-elements/task-progress.js +2 -2
  17. package/components/ai-elements/tool.d.ts +4 -2
  18. package/components/ai-elements/tool.js +74 -54
  19. package/components/ai-elements/transcript.js +1 -1
  20. package/components/alert.js +1 -1
  21. package/components/answer.d.ts +2643 -311
  22. package/components/answer.js +1836 -425
  23. package/components/assistant-ui/answer-tool-ui.js +23 -28
  24. package/components/assistant-ui/chain-of-thought.d.ts +7 -2
  25. package/components/assistant-ui/composer-harness.js +20 -16
  26. package/components/assistant-ui/reasoning.js +35 -31
  27. package/components/assistant-ui/tool-fallback.js +125 -122
  28. package/components/assistant-ui/tool-group.d.ts +3 -1
  29. package/components/assistant-ui/tool-group.js +48 -43
  30. package/components/audio-waveform.js +14 -14
  31. package/components/autocomplete.js +52 -48
  32. package/components/avatar.js +58 -44
  33. package/components/badge.js +3 -3
  34. package/components/brand-texture.js +1 -1
  35. package/components/breadcrumbs.d.ts +27 -1
  36. package/components/breadcrumbs.js +94 -42
  37. package/components/button.js +15 -15
  38. package/components/carousel.js +10 -10
  39. package/components/chart.js +77 -77
  40. package/components/chip.js +3 -3
  41. package/components/code-block.d.ts +39 -17
  42. package/components/code-block.js +153 -104
  43. package/components/command-palette.js +27 -25
  44. package/components/connector-card.js +2 -2
  45. package/components/dropdown.js +65 -61
  46. package/components/empty-state.js +15 -15
  47. package/components/field.js +23 -23
  48. package/components/index.d.ts +4 -0
  49. package/components/index.js +523 -477
  50. package/components/infinite-canvas.js +60 -60
  51. package/components/kbd.js +6 -6
  52. package/components/link.js +6 -6
  53. package/components/modal.js +22 -20
  54. package/components/page-header.js +1 -1
  55. package/components/pagination.js +22 -22
  56. package/components/pixel-blast-svg.js +1 -1
  57. package/components/pixel-icon.d.ts +31 -0
  58. package/components/pixel-icon.js +733 -0
  59. package/components/popover.js +46 -42
  60. package/components/ripple.d.ts +29 -0
  61. package/components/ripple.js +17 -0
  62. package/components/segmented.js +24 -23
  63. package/components/select.js +71 -67
  64. package/components/selection-action-bar.js +22 -22
  65. package/components/sidebar.d.ts +11 -3
  66. package/components/sidebar.js +161 -148
  67. package/components/stepper.d.ts +2 -0
  68. package/components/stepper.js +80 -43
  69. package/components/table.d.ts +7 -0
  70. package/components/table.js +223 -155
  71. package/components/tabs.d.ts +3 -1
  72. package/components/tabs.js +165 -144
  73. package/components/textarea.js +10 -8
  74. package/components/toast.js +48 -46
  75. package/components/tooltip.js +61 -59
  76. package/components/tree.js +44 -41
  77. package/components/typography.d.ts +1 -1
  78. package/components/typography.js +25 -25
  79. package/components/viz-charts.js +133 -133
  80. package/fonts/aribau-grotesk-500.otf +0 -0
  81. package/fonts/aribau-grotesk-600.woff2 +0 -0
  82. package/fonts.css +6 -4
  83. package/lib/icons.d.ts +411 -402
  84. package/lib/icons.js +109 -107
  85. package/llms.txt +96 -8
  86. package/manifest.json +951 -54
  87. package/package.json +5 -5
  88. package/styles.css +206 -81
  89. package/theme.css +200 -77
  90. package/fonts/aribau-grotesk-400.otf +0 -0
  91. 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 y, useRef as P, useCallback as _ } from "react";
4
- import { WarningCircle as q, CloseCircle as $, Check as M, Loader as B, ChevronDown as J } from "../../lib/icons.js";
5
- import { useScrollLock as V, useToolCallElapsed as W } from "@assistant-ui/react";
6
- import { Collapsible as K, CollapsibleTrigger as G, CollapsibleContent as H } from "../ui/collapsible.js";
7
- import { cn as i } from "../../lib/cn.js";
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
- const Q = 200, C = "active:scale-[0.98]";
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
- ...c
17
+ ...f
17
18
  }) {
18
- const s = P(null), [d, b] = y(n), h = V(s, Q), u = l !== void 0, g = u ? l : d, f = _(
19
- (x) => {
20
- h(), u || b(x), t == null || t(x);
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
- [h, u, t]
23
+ [k, d, t]
23
24
  );
24
25
  return /* @__PURE__ */ o(
25
- K,
26
+ M,
26
27
  {
27
28
  ref: s,
28
29
  "data-slot": "tool-fallback-root",
29
- open: g,
30
- onOpenChange: f,
31
- className: i(
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
- ...c,
36
+ ...f,
36
37
  children: r
37
38
  }
38
39
  );
39
40
  }
40
- const X = {
41
- running: B,
42
- complete: M,
43
- incomplete: $,
44
- "requires-action": q
45
- }, Y = (e) => {
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 Z({
51
+ function Q({
51
52
  className: e,
52
53
  ...l
53
54
  }) {
54
- const t = W();
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: i(
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: Y(t)
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", c = r === "running", s = (l == null ? void 0 : l.type) === "incomplete" && l.reason === "cancelled", d = X[r], b = s ? "Cancelled tool" : "Used tool";
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
- G,
77
+ J,
77
78
  {
78
79
  "data-slot": "tool-fallback-trigger",
79
- className: i(
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
- d,
87
+ K,
87
88
  {
88
89
  "data-slot": "tool-fallback-trigger-icon",
89
- className: i(
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
- c && "animate-spin [animation-duration:var(--duration-spin)] motion-reduce:animate-none"
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: i(
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
- b,
109
+ i,
107
110
  ": ",
108
111
  /* @__PURE__ */ o("b", { children: e })
109
112
  ] }),
110
- c && /* @__PURE__ */ m(
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
- b,
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(Z, {}),
129
+ /* @__PURE__ */ o(Q, {}),
127
130
  /* @__PURE__ */ o(
128
- J,
131
+ q,
129
132
  {
130
133
  "data-slot": "tool-fallback-trigger-chevron",
131
- className: i(
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 E({
146
+ function S({
144
147
  className: e,
145
148
  children: l,
146
149
  ...t
147
150
  }) {
148
151
  return /* @__PURE__ */ o(
149
- H,
152
+ V,
150
153
  {
151
154
  "data-slot": "tool-fallback-content",
152
- className: i(
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: i(
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 I({
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: i("aui-tool-fallback-args", l),
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 L({
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: i("aui-tool-fallback-result", l),
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 S({
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: i("aui-tool-fallback-error", l),
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 ee = "Approved by user", le = "User denied tool execution", A = {
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
- }, F = (e) => e === "allow-once" || e === "allow-always", O = (e) => e.label ?? (Object.hasOwn(A, e.kind) ? A[e.kind] : void 0) ?? e.id;
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: c,
244
+ respondToApproval: f,
242
245
  ...s
243
246
  }) {
244
- const [d, b] = y(!1), [h, u] = y(null);
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 g = c ? r == null ? void 0 : r.options : void 0, f = g == null ? void 0 : g.filter(
248
- (a) => Object.hasOwn(A, a.kind)
249
- ), x = (a) => {
250
- d || (r != null && r.approved === void 0 && c ? c({ approved: a }) : n ? t == null || t({ approved: a }) : l == null || l(a ? ee : le), b(!0));
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
- d || (c == null || c({ optionId: a.id }), b(!0), u(null));
255
+ i || (f == null || f({ optionId: a.id }), N(!0), d(null));
253
256
  }, z = (a) => {
254
- a.confirm ? u(a.id) : T(a);
255
- }, k = h != null ? f == null ? void 0 : f.find((a) => a.id === h) : void 0;
256
- if (k) {
257
- const a = typeof k.confirm == "object" ? k.confirm : void 0, w = (a == null ? void 0 : a.description) ?? k.description;
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: i(
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) ?? `${O(k)}?` }),
269
- w && /* @__PURE__ */ o("p", { className: "aui-tool-fallback-approval-confirm-description text-muted-foreground", children: w }),
270
- k.grants && k.grants.length > 0 && /* @__PURE__ */ o("ul", { className: "aui-tool-fallback-approval-confirm-grants flex flex-col gap-1", children: k.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
+ /* @__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: C,
277
- onClick: () => T(k),
278
- disabled: d,
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: C,
288
- onClick: () => u(null),
289
- disabled: d,
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 (g && g.length > 0) {
299
- const a = (f == null ? void 0 : f.filter((p) => F(p.kind))) ?? [], w = (f == null ? void 0 : f.filter((p) => !F(p.kind))) ?? [];
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: i(
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, ...w].map((p) => /* @__PURE__ */ o(
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: C,
318
+ className: w,
316
319
  onClick: () => z(p),
317
- disabled: d,
318
- children: O(p)
320
+ disabled: i,
321
+ children: F(p)
319
322
  },
320
323
  p.id
321
324
  )),
322
- w.length === 0 && /* @__PURE__ */ o(
325
+ y.length === 0 && /* @__PURE__ */ o(
323
326
  v,
324
327
  {
325
328
  size: "sm",
326
329
  variant: "outline",
327
- className: C,
328
- onClick: () => x(!1),
329
- disabled: d,
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: i(
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: C,
352
- onClick: () => x(!0),
353
- disabled: d,
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: C,
363
- onClick: () => x(!1),
364
- disabled: d,
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 oe = ({
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: c,
381
+ resume: f,
379
382
  interrupt: s,
380
- approval: d,
381
- respondToApproval: b
383
+ approval: i,
384
+ respondToApproval: N
382
385
  }) => {
383
- const h = (n == null ? void 0 : n.type) === "incomplete" && n.reason === "cancelled", u = (n == null ? void 0 : n.type) === "requires-action", [g, f] = y(u), [x, T] = y(u);
384
- return u !== x && (T(u), u && f(!0)), /* @__PURE__ */ m(D, { open: g, onOpenChange: f, children: [
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(E, { children: [
387
- /* @__PURE__ */ o(S, { status: n }),
389
+ /* @__PURE__ */ m(S, { children: [
390
+ /* @__PURE__ */ o(L, { status: n }),
388
391
  /* @__PURE__ */ o(
389
- I,
392
+ E,
390
393
  {
391
394
  argsText: l,
392
- className: i(h && "opacity-60")
395
+ className: c(k && "opacity-60")
393
396
  }
394
397
  ),
395
- u && /* @__PURE__ */ o(
398
+ d && /* @__PURE__ */ o(
396
399
  j,
397
400
  {
398
401
  addResult: r,
399
- resume: c,
402
+ resume: f,
400
403
  interrupt: s,
401
- approval: d,
402
- respondToApproval: b
404
+ approval: i,
405
+ respondToApproval: N
403
406
  }
404
407
  ),
405
- !h && /* @__PURE__ */ o(L, { result: t })
408
+ !k && /* @__PURE__ */ o(I, { result: t })
406
409
  ] })
407
410
  ] });
408
- }, N = U(
409
- oe
411
+ }, x = U(
412
+ Z
410
413
  );
411
- N.displayName = "ToolFallback";
412
- N.Root = D;
413
- N.Trigger = R;
414
- N.Content = E;
415
- N.Args = I;
416
- N.Result = L;
417
- N.Error = S;
418
- N.Approval = j;
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
- N as ToolFallback,
423
+ x as ToolFallback,
421
424
  j as ToolFallbackApproval,
422
- I as ToolFallbackArgs,
423
- E as ToolFallbackContent,
424
- S as ToolFallbackError,
425
- L as ToolFallbackResult,
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<{