laif-ds 0.1.99 → 0.2.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.
@@ -1,18 +1,21 @@
1
1
  "use client";
2
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
3
- import { useMemo as v, Suspense as g, useState as w } from "react";
4
- import { cva as C } from "../../node_modules/class-variance-authority/dist/index.js";
5
- import { motion as k } from "framer-motion";
6
- import { cn as t } from "../../lib/utils.js";
7
- import { Collapsible as U, CollapsibleTrigger as S, CollapsibleContent as T } from "./collapsible.js";
8
- import { FilePreview as O } from "./file-preview.js";
9
- import { MarkdownRenderer as h } from "./markdown-renderer.js";
10
- import B from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
11
- import M from "../../node_modules/lucide-react/dist/esm/icons/ban.js";
12
- import R from "../../node_modules/lucide-react/dist/esm/icons/code-xml.js";
13
- import I from "../../node_modules/lucide-react/dist/esm/icons/terminal.js";
14
- import $ from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
15
- const x = C(
2
+ import { jsxs as o, jsx as e, Fragment as C } from "react/jsx-runtime";
3
+ import { useMemo as I, useState as B, useRef as M, useEffect as F, Suspense as w } from "react";
4
+ import { cva as W } from "../../node_modules/class-variance-authority/dist/index.js";
5
+ import { motion as $ } from "framer-motion";
6
+ import { cn as l } from "../../lib/utils.js";
7
+ import { Collapsible as j, CollapsibleTrigger as L, CollapsibleContent as P } from "./collapsible.js";
8
+ import { FilePreview as V } from "./file-preview.js";
9
+ import { MarkdownRenderer as k } from "./markdown-renderer.js";
10
+ import E from "../../node_modules/lucide-react/dist/esm/icons/x.js";
11
+ import S from "../../node_modules/lucide-react/dist/esm/icons/check.js";
12
+ import U from "../../node_modules/lucide-react/dist/esm/icons/pen.js";
13
+ import X from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
14
+ import z from "../../node_modules/lucide-react/dist/esm/icons/ban.js";
15
+ import J from "../../node_modules/lucide-react/dist/esm/icons/code-xml.js";
16
+ import _ from "../../node_modules/lucide-react/dist/esm/icons/terminal.js";
17
+ import q from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
18
+ const R = W(
16
19
  "group/message relative break-words rounded-lg p-3 text-sm sm:max-w-[70%]",
17
20
  {
18
21
  variants: {
@@ -50,217 +53,388 @@ const x = C(
50
53
  }
51
54
  ]
52
55
  }
53
- ), W = ({
54
- role: s,
55
- content: a,
56
- createdAt: n,
57
- showTimeStamp: c = !1,
58
- animation: d = "scale",
59
- actions: m,
60
- experimental_attachments: b,
61
- toolInvocations: f,
62
- parts: u
56
+ ), fe = ({
57
+ role: i,
58
+ content: n,
59
+ createdAt: a,
60
+ showTimeStamp: f = !1,
61
+ animation: m = "scale",
62
+ actions: b,
63
+ onEdit: T,
64
+ experimental_attachments: O,
65
+ toolInvocations: h,
66
+ parts: N
63
67
  }) => {
64
- const N = v(() => b?.map((l) => {
65
- const o = j(l.url);
66
- return new File([o], l.name ?? "Unknown");
67
- }), [b]), i = s === "user", p = n?.toLocaleTimeString("en-US", {
68
+ const D = I(() => O?.map((r) => {
69
+ const s = G(r.url);
70
+ return new File([s], r.name ?? "Unknown");
71
+ }), [O]), d = i === "user", x = !d && T, [t, u] = B(!1), c = M(null);
72
+ F(() => {
73
+ if (t && c.current) {
74
+ c.current.focus();
75
+ const r = document.createRange(), s = window.getSelection();
76
+ r.selectNodeContents(c.current), r.collapse(!1), s?.removeAllRanges(), s?.addRange(r);
77
+ }
78
+ }, [t]);
79
+ const p = () => {
80
+ const r = c.current?.textContent || "";
81
+ r.trim() && r !== n && T?.(r.trim()), u(!1);
82
+ }, g = () => {
83
+ u(!1);
84
+ }, v = (r) => {
85
+ r.key === "Enter" && !r.shiftKey ? (r.preventDefault(), p()) : r.key === "Escape" && (r.preventDefault(), g());
86
+ }, y = a?.toLocaleTimeString("en-US", {
68
87
  hour: "2-digit",
69
88
  minute: "2-digit"
70
89
  });
71
- return i ? /* @__PURE__ */ r(
90
+ return d ? /* @__PURE__ */ o(
72
91
  "div",
73
92
  {
74
- className: t("flex flex-col", i ? "items-end" : "items-start"),
93
+ className: l("flex flex-col", d ? "items-end" : "items-start"),
75
94
  children: [
76
- N ? /* @__PURE__ */ e("div", { className: "mb-1 flex flex-wrap gap-2", children: N.map((l, o) => /* @__PURE__ */ e(O, { file: l }, o)) }) : null,
77
- /* @__PURE__ */ e("div", { className: t(x({ isUser: i, animation: d })), children: /* @__PURE__ */ e(
78
- g,
95
+ D ? /* @__PURE__ */ e("div", { className: "mb-1 flex flex-wrap gap-2", children: D.map((r, s) => /* @__PURE__ */ e(V, { file: r }, s)) }) : null,
96
+ /* @__PURE__ */ o(
97
+ "div",
79
98
  {
80
- fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
81
- children: /* @__PURE__ */ e(h, { children: a })
99
+ className: l(
100
+ R({ isUser: d, animation: m }),
101
+ "group relative",
102
+ t && "border-d-primary border"
103
+ ),
104
+ children: [
105
+ /* @__PURE__ */ e(
106
+ "div",
107
+ {
108
+ ref: c,
109
+ contentEditable: t,
110
+ onKeyDown: t ? v : void 0,
111
+ className: l(
112
+ "focus:outline-none",
113
+ !t && "pointer-events-none"
114
+ ),
115
+ suppressContentEditableWarning: !0,
116
+ children: /* @__PURE__ */ e(
117
+ w,
118
+ {
119
+ fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
120
+ children: /* @__PURE__ */ e(k, { children: n })
121
+ }
122
+ )
123
+ }
124
+ ),
125
+ x && /* @__PURE__ */ e("div", { className: "absolute -top-2 -right-2 flex gap-1", children: t ? /* @__PURE__ */ o(C, { children: [
126
+ /* @__PURE__ */ e(
127
+ "button",
128
+ {
129
+ onClick: g,
130
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 transition-colors",
131
+ title: "Cancel",
132
+ children: /* @__PURE__ */ e(E, { className: "h-3 w-3" })
133
+ }
134
+ ),
135
+ /* @__PURE__ */ e(
136
+ "button",
137
+ {
138
+ onClick: p,
139
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 transition-colors",
140
+ title: "Save",
141
+ children: /* @__PURE__ */ e(S, { className: "h-3 w-3" })
142
+ }
143
+ )
144
+ ] }) : /* @__PURE__ */ e(
145
+ "button",
146
+ {
147
+ onClick: () => u(!0),
148
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 opacity-0 transition-opacity group-hover:opacity-100",
149
+ title: "Edit message",
150
+ children: /* @__PURE__ */ e(U, { className: "h-3 w-3" })
151
+ }
152
+ ) })
153
+ ]
82
154
  }
83
- ) }),
84
- c && n ? /* @__PURE__ */ e(
155
+ ),
156
+ f && a ? /* @__PURE__ */ e(
85
157
  "time",
86
158
  {
87
- dateTime: n.toISOString(),
88
- className: t(
159
+ dateTime: a.toISOString(),
160
+ className: l(
89
161
  "mt-1 block px-1 text-xs opacity-50",
90
- d !== "none" && "animate-in fade-in-0 duration-500"
162
+ m !== "none" && "animate-in fade-in-0 duration-500"
91
163
  ),
92
- children: p
164
+ children: y
93
165
  }
94
166
  ) : null
95
167
  ]
96
168
  }
97
- ) : u && u.length > 0 ? u.map((l, o) => l.type === "text" ? /* @__PURE__ */ r(
169
+ ) : N && N.length > 0 ? N.map((r, s) => r.type === "text" ? /* @__PURE__ */ o(
98
170
  "div",
99
171
  {
100
- className: t(
172
+ className: l(
101
173
  "flex flex-col",
102
- i ? "items-end" : "items-start"
174
+ d ? "items-end" : "items-start"
103
175
  ),
104
176
  children: [
105
- /* @__PURE__ */ r("div", { className: t(x({ isUser: i, animation: d })), children: [
106
- /* @__PURE__ */ e(
107
- g,
108
- {
109
- fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
110
- children: /* @__PURE__ */ e(h, { children: l.text })
111
- }
112
- ),
113
- m ? /* @__PURE__ */ e("div", { className: "bg-d-background text-d-foreground border-d-border absolute right-2 -bottom-4 flex space-x-1 rounded-lg border p-1 opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
114
- ] }),
115
- c && n ? /* @__PURE__ */ e(
177
+ /* @__PURE__ */ o(
178
+ "div",
179
+ {
180
+ className: l(
181
+ R({ isUser: d, animation: m }),
182
+ "group relative",
183
+ t && "border-d-primary border"
184
+ ),
185
+ children: [
186
+ /* @__PURE__ */ e(
187
+ "div",
188
+ {
189
+ ref: c,
190
+ contentEditable: t,
191
+ onKeyDown: t ? v : void 0,
192
+ className: l(
193
+ "focus:outline-none",
194
+ !t && "pointer-events-none"
195
+ ),
196
+ suppressContentEditableWarning: !0,
197
+ children: /* @__PURE__ */ e(
198
+ w,
199
+ {
200
+ fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
201
+ children: /* @__PURE__ */ e(k, { children: r.text })
202
+ }
203
+ )
204
+ }
205
+ ),
206
+ x && /* @__PURE__ */ e("div", { className: "absolute -top-2 -right-2 flex gap-1", children: t ? /* @__PURE__ */ o(C, { children: [
207
+ /* @__PURE__ */ e(
208
+ "button",
209
+ {
210
+ onClick: g,
211
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 transition-colors",
212
+ title: "Cancel",
213
+ children: /* @__PURE__ */ e(E, { className: "h-3 w-3" })
214
+ }
215
+ ),
216
+ /* @__PURE__ */ e(
217
+ "button",
218
+ {
219
+ onClick: p,
220
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 transition-colors",
221
+ title: "Save",
222
+ children: /* @__PURE__ */ e(S, { className: "h-3 w-3" })
223
+ }
224
+ )
225
+ ] }) : /* @__PURE__ */ e(
226
+ "button",
227
+ {
228
+ onClick: () => u(!0),
229
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 opacity-0 transition-opacity group-hover:opacity-100",
230
+ title: "Edit message",
231
+ children: /* @__PURE__ */ e(U, { className: "h-3 w-3" })
232
+ }
233
+ ) }),
234
+ b && !t ? /* @__PURE__ */ e("div", { className: "bg-d-background text-d-foreground border-d-border absolute right-2 -bottom-4 flex space-x-1 rounded-lg border p-1 opacity-0 transition-opacity group-hover/message:opacity-100", children: b }) : null
235
+ ]
236
+ }
237
+ ),
238
+ f && a ? /* @__PURE__ */ e(
116
239
  "time",
117
240
  {
118
- dateTime: n.toISOString(),
119
- className: t(
241
+ dateTime: a.toISOString(),
242
+ className: l(
120
243
  "mt-1 block px-1 text-xs opacity-50",
121
- d !== "none" && "animate-in fade-in-0 duration-500"
244
+ m !== "none" && "animate-in fade-in-0 duration-500"
122
245
  ),
123
- children: p
246
+ children: y
124
247
  }
125
248
  ) : null
126
249
  ]
127
250
  },
128
- `text-${o}`
129
- ) : l.type === "reasoning" ? /* @__PURE__ */ e(F, { part: l }, `reasoning-${o}`) : l.type === "tool-invocation" ? /* @__PURE__ */ e(
130
- y,
251
+ `text-${s}`
252
+ ) : r.type === "reasoning" ? /* @__PURE__ */ e(H, { part: r }, `reasoning-${s}`) : r.type === "tool-invocation" ? /* @__PURE__ */ e(
253
+ K,
131
254
  {
132
- toolInvocations: [l.toolInvocation]
255
+ toolInvocations: [r.toolInvocation]
133
256
  },
134
- `tool-${o}`
135
- ) : null) : f && f.length > 0 ? /* @__PURE__ */ e(y, { toolInvocations: f }) : /* @__PURE__ */ r("div", { className: t("flex flex-col", i ? "items-end" : "items-start"), children: [
136
- /* @__PURE__ */ r("div", { className: t(x({ isUser: i, animation: d })), children: [
137
- /* @__PURE__ */ e(
138
- g,
139
- {
140
- fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
141
- children: /* @__PURE__ */ e(h, { children: a })
142
- }
143
- ),
144
- m ? /* @__PURE__ */ e("div", { className: "bg-d-background text-foreground absolute right-2 -bottom-4 flex space-x-1 rounded-lg border p-1 opacity-0 transition-opacity group-hover/message:opacity-100", children: m }) : null
145
- ] }),
146
- c && n ? /* @__PURE__ */ e(
257
+ `tool-${s}`
258
+ ) : null) : h && h.length > 0 ? /* @__PURE__ */ e(K, { toolInvocations: h }) : /* @__PURE__ */ o("div", { className: l("flex flex-col", d ? "items-end" : "items-start"), children: [
259
+ /* @__PURE__ */ o(
260
+ "div",
261
+ {
262
+ className: l(
263
+ R({ isUser: d, animation: m }),
264
+ "group relative",
265
+ t && "border-d-primary border"
266
+ ),
267
+ children: [
268
+ /* @__PURE__ */ e(
269
+ "div",
270
+ {
271
+ ref: c,
272
+ contentEditable: t,
273
+ onKeyDown: t ? v : void 0,
274
+ className: l(
275
+ "focus:outline-none",
276
+ !t && "pointer-events-none"
277
+ ),
278
+ suppressContentEditableWarning: !0,
279
+ children: /* @__PURE__ */ e(
280
+ w,
281
+ {
282
+ fallback: /* @__PURE__ */ e("div", { className: "text-d-secondary-foreground", children: "Caricamento..." }),
283
+ children: /* @__PURE__ */ e(k, { children: n })
284
+ }
285
+ )
286
+ }
287
+ ),
288
+ x && /* @__PURE__ */ e("div", { className: "absolute -top-2 -right-2 flex gap-1", children: t ? /* @__PURE__ */ o(C, { children: [
289
+ /* @__PURE__ */ e(
290
+ "button",
291
+ {
292
+ onClick: g,
293
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 transition-colors",
294
+ title: "Cancel",
295
+ children: /* @__PURE__ */ e(E, { className: "h-3 w-3" })
296
+ }
297
+ ),
298
+ /* @__PURE__ */ e(
299
+ "button",
300
+ {
301
+ onClick: p,
302
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 transition-colors",
303
+ title: "Save",
304
+ children: /* @__PURE__ */ e(S, { className: "h-3 w-3" })
305
+ }
306
+ )
307
+ ] }) : /* @__PURE__ */ e(
308
+ "button",
309
+ {
310
+ onClick: () => u(!0),
311
+ className: "bg-d-background border-d-border hover:bg-d-muted rounded-full border p-1 opacity-0 transition-opacity group-hover:opacity-100",
312
+ title: "Edit message",
313
+ children: /* @__PURE__ */ e(U, { className: "h-3 w-3" })
314
+ }
315
+ ) }),
316
+ b && !t ? /* @__PURE__ */ e("div", { className: "bg-d-background text-foreground absolute right-2 -bottom-4 flex space-x-1 rounded-lg border p-1 opacity-0 transition-opacity group-hover/message:opacity-100", children: b }) : null
317
+ ]
318
+ }
319
+ ),
320
+ f && a ? /* @__PURE__ */ e(
147
321
  "time",
148
322
  {
149
- dateTime: n.toISOString(),
150
- className: t(
323
+ dateTime: a.toISOString(),
324
+ className: l(
151
325
  "mt-1 block px-1 text-xs opacity-50",
152
- d !== "none" && "animate-in fade-in-0 duration-500"
326
+ m !== "none" && "animate-in fade-in-0 duration-500"
153
327
  ),
154
- children: p
328
+ children: y
155
329
  }
156
330
  ) : null
157
331
  ] });
158
332
  };
159
- function j(s) {
160
- const a = s.split(",")[1], n = Buffer.from(a, "base64");
161
- return new Uint8Array(n);
333
+ function G(i) {
334
+ const n = i.split(",")[1], a = Buffer.from(n, "base64");
335
+ return new Uint8Array(a);
162
336
  }
163
- const F = ({ part: s }) => {
164
- const [a, n] = w(!1);
165
- return /* @__PURE__ */ e("div", { className: "mb-2 flex flex-col items-start sm:max-w-[70%]", children: /* @__PURE__ */ r(
166
- U,
337
+ const H = ({ part: i }) => {
338
+ const [n, a] = B(!1);
339
+ return /* @__PURE__ */ e("div", { className: "mb-2 flex flex-col items-start sm:max-w-[70%]", children: /* @__PURE__ */ o(
340
+ j,
167
341
  {
168
- open: a,
169
- onOpenChange: n,
342
+ open: n,
343
+ onOpenChange: a,
170
344
  className: "group bg-d-secondary/50 border-d-border w-full overflow-hidden rounded-lg",
171
345
  children: [
172
- /* @__PURE__ */ e("div", { className: "flex items-center p-2", children: /* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ r("button", { className: "text-d-secondary-foreground hover:text-d-foreground flex items-center gap-2 text-sm", children: [
173
- /* @__PURE__ */ e(B, { className: "h-4 w-4 transition-transform group-data-[state=open]:rotate-90" }),
346
+ /* @__PURE__ */ e("div", { className: "flex items-center p-2", children: /* @__PURE__ */ e(L, { asChild: !0, children: /* @__PURE__ */ o("button", { className: "text-d-secondary-foreground hover:text-d-foreground flex items-center gap-2 text-sm", children: [
347
+ /* @__PURE__ */ e(X, { className: "h-4 w-4 transition-transform group-data-[state=open]:rotate-90" }),
174
348
  /* @__PURE__ */ e("span", { children: "Thinking" })
175
349
  ] }) }) }),
176
- /* @__PURE__ */ e(T, { forceMount: !0, children: /* @__PURE__ */ e(
177
- k.div,
350
+ /* @__PURE__ */ e(P, { forceMount: !0, children: /* @__PURE__ */ e(
351
+ $.div,
178
352
  {
179
353
  initial: !1,
180
- animate: a ? "open" : "closed",
354
+ animate: n ? "open" : "closed",
181
355
  variants: {
182
356
  open: { height: "auto", opacity: 1 },
183
357
  closed: { height: 0, opacity: 0 }
184
358
  },
185
359
  transition: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] },
186
360
  className: "border-d-border border-t",
187
- children: /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e("div", { className: "text-xs whitespace-pre-wrap", children: s.reasoning }) })
361
+ children: /* @__PURE__ */ e("div", { className: "p-2", children: /* @__PURE__ */ e("div", { className: "text-xs whitespace-pre-wrap", children: i.reasoning }) })
188
362
  }
189
363
  ) })
190
364
  ]
191
365
  }
192
366
  ) });
193
367
  };
194
- function y({
195
- toolInvocations: s
368
+ function K({
369
+ toolInvocations: i
196
370
  }) {
197
- return s?.length ? /* @__PURE__ */ e("div", { className: "flex flex-col items-start gap-2", children: s.map((a, n) => {
198
- if (a.state === "result" && a.result.__cancelled === !0)
199
- return /* @__PURE__ */ r(
371
+ return i?.length ? /* @__PURE__ */ e("div", { className: "flex flex-col items-start gap-2", children: i.map((n, a) => {
372
+ if (n.state === "result" && n.result.__cancelled === !0)
373
+ return /* @__PURE__ */ o(
200
374
  "div",
201
375
  {
202
376
  className: "bg-d-secondary/50 text-d-secondary-foreground border-d-border flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",
203
377
  children: [
204
- /* @__PURE__ */ e(M, { className: "h-4 w-4" }),
205
- /* @__PURE__ */ r("span", { children: [
378
+ /* @__PURE__ */ e(z, { className: "h-4 w-4" }),
379
+ /* @__PURE__ */ o("span", { children: [
206
380
  "Cancelled",
207
381
  " ",
208
- /* @__PURE__ */ r("span", { className: "font-mono", children: [
382
+ /* @__PURE__ */ o("span", { className: "font-mono", children: [
209
383
  "`",
210
- a.toolName,
384
+ n.toolName,
211
385
  "`"
212
386
  ] })
213
387
  ] })
214
388
  ]
215
389
  },
216
- n
390
+ a
217
391
  );
218
- switch (a.state) {
392
+ switch (n.state) {
219
393
  case "partial-call":
220
394
  case "call":
221
- return /* @__PURE__ */ r(
395
+ return /* @__PURE__ */ o(
222
396
  "div",
223
397
  {
224
398
  className: "bg-d-secondary/50 text-d-secondary-foreground border-d-border flex items-center gap-2 rounded-lg border px-3 py-2 text-sm",
225
399
  children: [
226
- /* @__PURE__ */ e(I, { className: "h-4 w-4" }),
227
- /* @__PURE__ */ r("span", { children: [
400
+ /* @__PURE__ */ e(_, { className: "h-4 w-4" }),
401
+ /* @__PURE__ */ o("span", { children: [
228
402
  "Calling",
229
403
  " ",
230
- /* @__PURE__ */ r("span", { className: "font-mono", children: [
404
+ /* @__PURE__ */ o("span", { className: "font-mono", children: [
231
405
  "`",
232
- a.toolName,
406
+ n.toolName,
233
407
  "`"
234
408
  ] }),
235
409
  "..."
236
410
  ] }),
237
- /* @__PURE__ */ e($, { className: "h-3 w-3 animate-spin" })
411
+ /* @__PURE__ */ e(q, { className: "h-3 w-3 animate-spin" })
238
412
  ]
239
413
  },
240
- n
414
+ a
241
415
  );
242
416
  case "result":
243
- return /* @__PURE__ */ r(
417
+ return /* @__PURE__ */ o(
244
418
  "div",
245
419
  {
246
420
  className: "bg-d-secondary/50 border-d-border flex flex-col gap-1.5 rounded-lg border px-3 py-2 text-sm",
247
421
  children: [
248
- /* @__PURE__ */ r("div", { className: "text-d-secondary-foreground flex items-center gap-2", children: [
249
- /* @__PURE__ */ e(R, { className: "h-4 w-4" }),
250
- /* @__PURE__ */ r("span", { children: [
422
+ /* @__PURE__ */ o("div", { className: "text-d-secondary-foreground flex items-center gap-2", children: [
423
+ /* @__PURE__ */ e(J, { className: "h-4 w-4" }),
424
+ /* @__PURE__ */ o("span", { children: [
251
425
  "Result from",
252
426
  " ",
253
- /* @__PURE__ */ r("span", { className: "font-mono", children: [
427
+ /* @__PURE__ */ o("span", { className: "font-mono", children: [
254
428
  "`",
255
- a.toolName,
429
+ n.toolName,
256
430
  "`"
257
431
  ] })
258
432
  ] })
259
433
  ] }),
260
- /* @__PURE__ */ e("pre", { className: "text-d-foreground overflow-x-auto whitespace-pre-wrap", children: JSON.stringify(a.result, null, 2) })
434
+ /* @__PURE__ */ e("pre", { className: "text-d-foreground overflow-x-auto whitespace-pre-wrap", children: JSON.stringify(n.result, null, 2) })
261
435
  ]
262
436
  },
263
- n
437
+ a
264
438
  );
265
439
  default:
266
440
  return null;
@@ -268,5 +442,5 @@ function y({
268
442
  }) }) : null;
269
443
  }
270
444
  export {
271
- W as ChatMessage
445
+ fe as ChatMessage
272
446
  };