@krak-stack/registry 0.1.18 → 0.1.20

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 (54) hide show
  1. package/README.md +5 -0
  2. package/dist/components/ui/code-block.d.ts +1 -3
  3. package/dist/components/ui/code-block.js +32 -60
  4. package/dist/components/ui/data-table.d.ts +202 -273
  5. package/dist/components/ui/data-table.js +1810 -2115
  6. package/dist/components/ui/effect-form.js +169 -170
  7. package/dist/components/ui/form.js +112 -113
  8. package/dist/components/ui/icon-input.js +40 -43
  9. package/dist/components/ui/menubar.d.ts +29 -0
  10. package/dist/components/ui/pagination.js +2 -2
  11. package/dist/components/ui/sidebar-layout.js +67 -72
  12. package/dist/components/ui/theme-switcher.js +3 -3
  13. package/dist/components/ui/virtualized-combobox.js +31 -34
  14. package/dist/lib/{docs-core.d.ts → docs.d.ts} +135 -144
  15. package/dist/lib/{docs-core.js → docs.js} +597 -440
  16. package/dist/lib/documentation-toolkit.d.ts +19 -1
  17. package/dist/lib/documentation-toolkit.js +164 -66
  18. package/dist/lib/httpapi-cli.d.ts +5 -4
  19. package/dist/lib/httpapi-cli.js +256 -34
  20. package/dist/lib/httpapi-client.js +3 -3
  21. package/dist/lib/httpapi-helpers.d.ts +8 -6
  22. package/dist/lib/httpapi-helpers.js +12 -12
  23. package/dist/lib/httpapi-mcp.js +3 -3
  24. package/dist/lib/httpapi-toolkit.js +3 -3
  25. package/dist/lib/markdown/content.d.ts +13 -0
  26. package/dist/lib/markdown/server.d.ts +19 -0
  27. package/dist/lib/query.js +6 -6
  28. package/dist/lib/seo.js +2 -2
  29. package/dist/lib/webfetch-toolkit.js +6 -6
  30. package/dist/services/agent/client/atom.d.ts +7 -0
  31. package/dist/services/agent/client/index.js +481 -304
  32. package/dist/services/agent/index.d.ts +16 -0
  33. package/dist/services/agent/index.js +102 -1
  34. package/dist/services/agent/schema.d.ts +28 -0
  35. package/dist/services/agent/schema.js +15 -4
  36. package/dist/services/file-extraction/index.js +4 -4
  37. package/dist/services/file-extraction/schema.js +2 -2
  38. package/dist/services/health/api.builder.d.ts +66 -0
  39. package/dist/services/health/api.group.d.ts +58 -0
  40. package/dist/services/health/index.d.ts +253 -0
  41. package/dist/services/health/index.js +186 -0
  42. package/dist/services/health/schema.d.ts +50 -0
  43. package/dist/services/notification/channels/ses/index.js +2 -2
  44. package/dist/services/notification/channels/ses/schema.js +2 -2
  45. package/dist/services/notification/client/index.js +5 -5
  46. package/dist/services/notification/index.js +2 -2
  47. package/dist/services/notification/persistence/drizzle.js +2 -2
  48. package/dist/services/notification/persistence/index.js +15 -15
  49. package/dist/services/notification/persistence/schema.js +12 -12
  50. package/dist/services/notification/public.js +7 -7
  51. package/dist/services/notification/schema.js +2 -2
  52. package/dist/services/s3/index.js +2 -2
  53. package/dist/services/s3/schema.js +2 -2
  54. package/package.json +10 -38
@@ -56,6 +56,17 @@ var reduceAgentEvent = (state, event) => {
56
56
  ...state,
57
57
  messages: state.messages.map((message) => message.id === event.messageId ? { ...message, text: message.text + event.delta } : message)
58
58
  };
59
+ case "markdown-snapshot":
60
+ return {
61
+ ...state,
62
+ messages: state.messages.map((message) => message.id === event.messageId ? {
63
+ ...message,
64
+ markdown: {
65
+ codeBlocks: event.codeBlocks,
66
+ html: event.html
67
+ }
68
+ } : message)
69
+ };
59
70
  case "history":
60
71
  return { ...state, history: event.value };
61
72
  case "error":
@@ -133,9 +144,8 @@ var makeAgentAtoms = ({
133
144
  return { removeContext, reset, state, submit };
134
145
  };
135
146
  // ../../src/services/agent/client/widget.tsx
136
- import { useEffect, useId, useRef, useState } from "react";
147
+ import { useEffect as useEffect2, useId, useRef as useRef2, useState as useState2 } from "react";
137
148
  import { Dialog as DialogPrimitive2 } from "@base-ui/react/dialog";
138
- import { code } from "@streamdown/code";
139
149
  import {
140
150
  ArrowDownIcon as ArrowDownIcon2,
141
151
  BotIcon,
@@ -148,9 +158,9 @@ import {
148
158
  SquareIcon,
149
159
  XIcon as XIcon2
150
160
  } from "lucide-react";
151
- import { Streamdown } from "streamdown";
152
161
 
153
- // ../../src/components/ui/alert.tsx
162
+ // ../../src/components/ui/button.tsx
163
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
154
164
  import { cva } from "class-variance-authority";
155
165
 
156
166
  // ../../src/lib/utils.ts
@@ -160,9 +170,235 @@ function cn(...inputs) {
160
170
  return twMerge(clsx(inputs));
161
171
  }
162
172
 
163
- // ../../src/components/ui/alert.tsx
173
+ // ../../src/components/ui/button.tsx
164
174
  import { jsx } from "react/jsx-runtime";
165
- var alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
175
+ var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
176
+ variants: {
177
+ variant: {
178
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
179
+ outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
180
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
181
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
182
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
183
+ link: "text-primary underline-offset-4 hover:underline"
184
+ },
185
+ size: {
186
+ default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
187
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
188
+ sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
189
+ lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
190
+ icon: "size-9",
191
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
192
+ "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
193
+ "icon-lg": "size-10"
194
+ }
195
+ },
196
+ defaultVariants: {
197
+ variant: "default",
198
+ size: "default"
199
+ }
200
+ });
201
+ function Button({
202
+ className,
203
+ variant = "default",
204
+ size = "default",
205
+ ...props
206
+ }) {
207
+ return /* @__PURE__ */ jsx(ButtonPrimitive, {
208
+ "data-slot": "button",
209
+ className: cn(buttonVariants({ variant, size, className })),
210
+ ...props
211
+ });
212
+ }
213
+
214
+ // ../../src/components/ui/copy-button.tsx
215
+ import { Check, Copy, TriangleAlert } from "lucide-react";
216
+ import { useEffect, useRef, useState } from "react";
217
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
218
+ function CopyButton({
219
+ value,
220
+ valueDescription,
221
+ copyVariant = "default",
222
+ messages,
223
+ onCopied,
224
+ onCopyError,
225
+ resetDelay = 1500,
226
+ disabled,
227
+ size,
228
+ "aria-label": ariaLabel,
229
+ ...props
230
+ }) {
231
+ const [copyState, setCopyState] = useState("idle");
232
+ const copyTimeout = useRef(undefined);
233
+ const labels = {
234
+ copy: messages?.copy ?? "Copy",
235
+ copied: messages?.copied ?? "Copied",
236
+ copyFailed: messages?.copyFailed ?? "Copy failed"
237
+ };
238
+ const accessibleLabel = ariaLabel ?? (valueDescription ? `${labels.copy} ${valueDescription}` : labels.copy);
239
+ const isLarge = copyVariant === "large";
240
+ const defaultSize = copyVariant === "sm" ? "icon-xs" : isLarge ? "sm" : "icon-sm";
241
+ useEffect(() => {
242
+ return () => {
243
+ if (copyTimeout.current)
244
+ clearTimeout(copyTimeout.current);
245
+ };
246
+ }, []);
247
+ const resetCopyState = () => {
248
+ if (copyTimeout.current)
249
+ clearTimeout(copyTimeout.current);
250
+ copyTimeout.current = setTimeout(() => setCopyState("idle"), resetDelay);
251
+ };
252
+ const copy = async () => {
253
+ try {
254
+ await navigator.clipboard.writeText(value);
255
+ setCopyState("copied");
256
+ onCopied?.();
257
+ } catch (error) {
258
+ setCopyState("failed");
259
+ onCopyError?.(error instanceof Error ? error : new Error("Copy failed", { cause: error }));
260
+ }
261
+ resetCopyState();
262
+ };
263
+ const status = copyState === "copied" ? valueDescription ? `${labels.copied}: ${valueDescription}` : labels.copied : copyState === "failed" ? valueDescription ? `${labels.copyFailed}: ${valueDescription}` : labels.copyFailed : "";
264
+ return /* @__PURE__ */ jsxs(Button, {
265
+ "aria-label": accessibleLabel,
266
+ disabled,
267
+ onClick: copy,
268
+ size: size ?? defaultSize,
269
+ ...props,
270
+ children: [
271
+ /* @__PURE__ */ jsx2("span", {
272
+ "aria-live": "polite",
273
+ className: "sr-only",
274
+ role: "status",
275
+ children: status
276
+ }),
277
+ copyState === "copied" ? /* @__PURE__ */ jsx2(Check, {
278
+ "aria-hidden": "true"
279
+ }) : null,
280
+ copyState === "failed" ? /* @__PURE__ */ jsx2(TriangleAlert, {
281
+ "aria-hidden": "true"
282
+ }) : null,
283
+ copyState === "idle" ? /* @__PURE__ */ jsx2(Copy, {
284
+ "aria-hidden": "true"
285
+ }) : null,
286
+ isLarge ? /* @__PURE__ */ jsx2("span", {
287
+ children: labels.copy
288
+ }) : null
289
+ ]
290
+ });
291
+ }
292
+
293
+ // ../../src/components/ui/code-block.tsx
294
+ import { highlight } from "@tanstack/highlight";
295
+ import { createThemeCss } from "@tanstack/highlight/theme";
296
+ import { githubDarkTheme } from "@tanstack/highlight/themes/github-dark";
297
+ import { githubLightTheme } from "@tanstack/highlight/themes/github-light";
298
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
299
+ var themeCss = `${createThemeCss({
300
+ light: githubLightTheme,
301
+ dark: githubDarkTheme,
302
+ lightSelector: "[data-code-theme]",
303
+ darkSelector: ".dark [data-code-theme]",
304
+ codeBlockSelector: "[data-code-theme] pre.th-code",
305
+ lineNumbersSelector: "[data-code-theme] .th-code--line-numbers"
306
+ })}
307
+ [data-code-theme] pre.th-code {
308
+ margin: 0;
309
+ overflow: visible;
310
+ background: transparent;
311
+ font: inherit;
312
+ color: inherit;
313
+ }
314
+ [data-code-theme] pre.th-code code { font: inherit; }`;
315
+ function CodeBlock({
316
+ code,
317
+ language = "text",
318
+ messages
319
+ }) {
320
+ const normalizedLanguage = language.toLowerCase() || "text";
321
+ const highlighted = highlight(code, { lang: normalizedLanguage });
322
+ const copyMessages = {};
323
+ if (messages?.copy !== undefined)
324
+ copyMessages.copy = messages.copy;
325
+ if (messages?.copied !== undefined)
326
+ copyMessages.copied = messages.copied;
327
+ if (messages?.copyFailed !== undefined) {
328
+ copyMessages.copyFailed = messages.copyFailed;
329
+ }
330
+ return /* @__PURE__ */ jsxs2("div", {
331
+ className: "not-prose bg-muted overflow-hidden rounded-md border text-[var(--th-token)]",
332
+ "data-code-theme": true,
333
+ children: [
334
+ /* @__PURE__ */ jsx3("style", {
335
+ children: themeCss
336
+ }),
337
+ /* @__PURE__ */ jsxs2("div", {
338
+ className: "bg-background border-border/60 flex items-center justify-between border-b px-3 py-2",
339
+ children: [
340
+ /* @__PURE__ */ jsx3("span", {
341
+ className: "text-muted-foreground font-mono text-xs",
342
+ children: highlighted.lang
343
+ }),
344
+ /* @__PURE__ */ jsx3(CopyButton, {
345
+ value: code,
346
+ valueDescription: `${highlighted.lang} code`,
347
+ variant: "secondary",
348
+ messages: copyMessages
349
+ })
350
+ ]
351
+ }),
352
+ /* @__PURE__ */ jsx3("div", {
353
+ className: "max-h-full overflow-auto font-mono text-[0.875rem] leading-[1.625]",
354
+ dangerouslySetInnerHTML: { __html: highlighted.html }
355
+ })
356
+ ]
357
+ });
358
+ }
359
+
360
+ // ../../src/lib/markdown/content.tsx
361
+ import { jsx as jsx4 } from "react/jsx-runtime";
362
+ var MarkdownContent = ({
363
+ className,
364
+ codeBlocks,
365
+ html,
366
+ messages
367
+ }) => {
368
+ const content = [];
369
+ let remainingHtml = html;
370
+ codeBlocks.forEach((block, index) => {
371
+ const marker = `<markdown-code-block data-index="${index}"></markdown-code-block>`;
372
+ const markerIndex = remainingHtml.indexOf(marker);
373
+ if (markerIndex === -1)
374
+ return;
375
+ content.push(/* @__PURE__ */ jsx4("div", {
376
+ dangerouslySetInnerHTML: {
377
+ __html: remainingHtml.slice(0, markerIndex)
378
+ }
379
+ }, `html-${index}`), /* @__PURE__ */ jsx4("div", {
380
+ className: "my-5",
381
+ children: /* @__PURE__ */ jsx4(CodeBlock, {
382
+ code: block.code,
383
+ language: block.language,
384
+ messages: { copy: messages?.copy, copied: messages?.copied }
385
+ })
386
+ }, `code-${index}`));
387
+ remainingHtml = remainingHtml.slice(markerIndex + marker.length);
388
+ });
389
+ content.push(/* @__PURE__ */ jsx4("div", {
390
+ dangerouslySetInnerHTML: { __html: remainingHtml }
391
+ }, "html-final"));
392
+ return /* @__PURE__ */ jsx4("div", {
393
+ className: cn("[&_a:hover]:text-primary [&_a]:decoration-border [&_blockquote]:border-primary/40 [&_blockquote]:bg-muted/40 [&_h2_a]:text-muted-foreground [&_h3_a]:text-muted-foreground [&_[data-inline-code]]:bg-muted text-[0.98rem] leading-7 [&_[data-markdown-table]]:overflow-x-auto [&_[data-inline-code]]:rounded [&_[data-inline-code]]:px-1.5 [&_[data-inline-code]]:py-0.5 [&_[data-inline-code]]:font-mono [&_[data-inline-code]]:text-[0.875em] [&_a]:font-medium [&_a]:underline [&_a]:decoration-1 [&_a]:underline-offset-4 [&_a]:transition-colors [&_blockquote]:rounded-r-lg [&_blockquote]:border-l-4 [&_blockquote]:px-5 [&_blockquote]:py-1 [&_h2]:mt-12 [&_h2]:scroll-mt-20 [&_h2]:border-t [&_h2]:pt-8 [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:tracking-tight [&_h2_a]:ml-2 [&_h2_a]:no-underline [&_h2:first-of-type]:mt-0 [&_h2:first-of-type]:border-t-0 [&_h2:first-of-type]:pt-0 [&_h3]:mt-8 [&_h3]:scroll-mt-20 [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:tracking-tight [&_h3_a]:ml-2 [&_h3_a]:no-underline [&_ol]:my-5 [&_p]:my-5 [&_table]:w-full [&_table]:text-sm [&_td]:border-b [&_td]:p-2 [&_th]:border-b [&_th]:p-2 [&_th]:text-left [&_ul]:my-5", className),
394
+ children: content
395
+ });
396
+ };
397
+
398
+ // ../../src/components/ui/alert.tsx
399
+ import { cva as cva2 } from "class-variance-authority";
400
+ import { jsx as jsx5 } from "react/jsx-runtime";
401
+ var alertVariants = cva2("group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
166
402
  variants: {
167
403
  variant: {
168
404
  default: "bg-card text-card-foreground",
@@ -178,7 +414,7 @@ function Alert({
178
414
  variant,
179
415
  ...props
180
416
  }) {
181
- return /* @__PURE__ */ jsx("div", {
417
+ return /* @__PURE__ */ jsx5("div", {
182
418
  "data-slot": "alert",
183
419
  role: "alert",
184
420
  className: cn(alertVariants({ variant }), className),
@@ -186,7 +422,7 @@ function Alert({
186
422
  });
187
423
  }
188
424
  function AlertTitle({ className, ...props }) {
189
- return /* @__PURE__ */ jsx("div", {
425
+ return /* @__PURE__ */ jsx5("div", {
190
426
  "data-slot": "alert-title",
191
427
  className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
192
428
  ...props
@@ -196,7 +432,7 @@ function AlertDescription({
196
432
  className,
197
433
  ...props
198
434
  }) {
199
- return /* @__PURE__ */ jsx("div", {
435
+ return /* @__PURE__ */ jsx5("div", {
200
436
  "data-slot": "alert-description",
201
437
  className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
202
438
  ...props
@@ -206,8 +442,8 @@ function AlertDescription({
206
442
  // ../../src/components/ui/badge.tsx
207
443
  import { mergeProps } from "@base-ui/react/merge-props";
208
444
  import { useRender } from "@base-ui/react/use-render";
209
- import { cva as cva2 } from "class-variance-authority";
210
- var badgeVariants = cva2("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
445
+ import { cva as cva3 } from "class-variance-authority";
446
+ var badgeVariants = cva3("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
211
447
  variants: {
212
448
  variant: {
213
449
  default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
@@ -244,9 +480,9 @@ function Badge({
244
480
  // ../../src/components/ui/bubble.tsx
245
481
  import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
246
482
  import { useRender as useRender2 } from "@base-ui/react/use-render";
247
- import { cva as cva3 } from "class-variance-authority";
248
- import { jsx as jsx2 } from "react/jsx-runtime";
249
- var bubbleVariants = cva3("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
483
+ import { cva as cva4 } from "class-variance-authority";
484
+ import { jsx as jsx6 } from "react/jsx-runtime";
485
+ var bubbleVariants = cva4("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
250
486
  variants: {
251
487
  variant: {
252
488
  default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
@@ -268,7 +504,7 @@ function Bubble({
268
504
  className,
269
505
  ...props
270
506
  }) {
271
- return /* @__PURE__ */ jsx2("div", {
507
+ return /* @__PURE__ */ jsx6("div", {
272
508
  "data-slot": "bubble",
273
509
  "data-variant": variant,
274
510
  "data-align": align,
@@ -292,7 +528,7 @@ function BubbleContent({
292
528
  }
293
529
  });
294
530
  }
295
- var bubbleReactionsVariants = cva3("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
531
+ var bubbleReactionsVariants = cva4("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
296
532
  variants: {
297
533
  side: {
298
534
  top: "top-0 -translate-y-3/4",
@@ -309,57 +545,14 @@ var bubbleReactionsVariants = cva3("absolute z-10 flex w-fit shrink-0 items-cent
309
545
  }
310
546
  });
311
547
 
312
- // ../../src/components/ui/button.tsx
313
- import { Button as ButtonPrimitive } from "@base-ui/react/button";
314
- import { cva as cva4 } from "class-variance-authority";
315
- import { jsx as jsx3 } from "react/jsx-runtime";
316
- var buttonVariants = cva4("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
317
- variants: {
318
- variant: {
319
- default: "bg-primary text-primary-foreground hover:bg-primary/80",
320
- outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
321
- secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
322
- ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
323
- destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
324
- link: "text-primary underline-offset-4 hover:underline"
325
- },
326
- size: {
327
- default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
328
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
329
- sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
330
- lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
331
- icon: "size-9",
332
- "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
333
- "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
334
- "icon-lg": "size-10"
335
- }
336
- },
337
- defaultVariants: {
338
- variant: "default",
339
- size: "default"
340
- }
341
- });
342
- function Button({
343
- className,
344
- variant = "default",
345
- size = "default",
346
- ...props
347
- }) {
348
- return /* @__PURE__ */ jsx3(ButtonPrimitive, {
349
- "data-slot": "button",
350
- className: cn(buttonVariants({ variant, size, className })),
351
- ...props
352
- });
353
- }
354
-
355
548
  // ../../src/components/ui/card.tsx
356
- import { jsx as jsx4 } from "react/jsx-runtime";
549
+ import { jsx as jsx7 } from "react/jsx-runtime";
357
550
  function Card({
358
551
  className,
359
552
  size = "default",
360
553
  ...props
361
554
  }) {
362
- return /* @__PURE__ */ jsx4("div", {
555
+ return /* @__PURE__ */ jsx7("div", {
363
556
  "data-slot": "card",
364
557
  "data-size": size,
365
558
  className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
@@ -367,35 +560,35 @@ function Card({
367
560
  });
368
561
  }
369
562
  function CardHeader({ className, ...props }) {
370
- return /* @__PURE__ */ jsx4("div", {
563
+ return /* @__PURE__ */ jsx7("div", {
371
564
  "data-slot": "card-header",
372
565
  className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className),
373
566
  ...props
374
567
  });
375
568
  }
376
569
  function CardTitle({ className, ...props }) {
377
- return /* @__PURE__ */ jsx4("div", {
570
+ return /* @__PURE__ */ jsx7("div", {
378
571
  "data-slot": "card-title",
379
572
  className: cn("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm", className),
380
573
  ...props
381
574
  });
382
575
  }
383
576
  function CardDescription({ className, ...props }) {
384
- return /* @__PURE__ */ jsx4("div", {
577
+ return /* @__PURE__ */ jsx7("div", {
385
578
  "data-slot": "card-description",
386
579
  className: cn("text-sm text-muted-foreground", className),
387
580
  ...props
388
581
  });
389
582
  }
390
583
  function CardContent({ className, ...props }) {
391
- return /* @__PURE__ */ jsx4("div", {
584
+ return /* @__PURE__ */ jsx7("div", {
392
585
  "data-slot": "card-content",
393
586
  className: cn("px-(--card-spacing)", className),
394
587
  ...props
395
588
  });
396
589
  }
397
590
  function CardFooter({ className, ...props }) {
398
- return /* @__PURE__ */ jsx4("div", {
591
+ return /* @__PURE__ */ jsx7("div", {
399
592
  "data-slot": "card-footer",
400
593
  className: cn("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)", className),
401
594
  ...props
@@ -404,21 +597,21 @@ function CardFooter({ className, ...props }) {
404
597
 
405
598
  // ../../src/components/ui/collapsible.tsx
406
599
  import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
407
- import { jsx as jsx5 } from "react/jsx-runtime";
600
+ import { jsx as jsx8 } from "react/jsx-runtime";
408
601
  function Collapsible({ ...props }) {
409
- return /* @__PURE__ */ jsx5(CollapsiblePrimitive.Root, {
602
+ return /* @__PURE__ */ jsx8(CollapsiblePrimitive.Root, {
410
603
  "data-slot": "collapsible",
411
604
  ...props
412
605
  });
413
606
  }
414
607
  function CollapsibleTrigger({ ...props }) {
415
- return /* @__PURE__ */ jsx5(CollapsiblePrimitive.Trigger, {
608
+ return /* @__PURE__ */ jsx8(CollapsiblePrimitive.Trigger, {
416
609
  "data-slot": "collapsible-trigger",
417
610
  ...props
418
611
  });
419
612
  }
420
613
  function CollapsibleContent({ ...props }) {
421
- return /* @__PURE__ */ jsx5(CollapsiblePrimitive.Panel, {
614
+ return /* @__PURE__ */ jsx8(CollapsiblePrimitive.Panel, {
422
615
  "data-slot": "collapsible-content",
423
616
  ...props
424
617
  });
@@ -431,33 +624,33 @@ import { SearchIcon } from "lucide-react";
431
624
  // ../../src/components/ui/dialog.tsx
432
625
  import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
433
626
  import { XIcon } from "lucide-react";
434
- import { jsx as jsx6, jsxs } from "react/jsx-runtime";
627
+ import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
435
628
  function Dialog({ ...props }) {
436
- return /* @__PURE__ */ jsx6(DialogPrimitive.Root, {
629
+ return /* @__PURE__ */ jsx9(DialogPrimitive.Root, {
437
630
  "data-slot": "dialog",
438
631
  ...props
439
632
  });
440
633
  }
441
634
  function DialogTrigger({ ...props }) {
442
- return /* @__PURE__ */ jsx6(DialogPrimitive.Trigger, {
635
+ return /* @__PURE__ */ jsx9(DialogPrimitive.Trigger, {
443
636
  "data-slot": "dialog-trigger",
444
637
  ...props
445
638
  });
446
639
  }
447
640
  function DialogPortal({ ...props }) {
448
- return /* @__PURE__ */ jsx6(DialogPrimitive.Portal, {
641
+ return /* @__PURE__ */ jsx9(DialogPrimitive.Portal, {
449
642
  "data-slot": "dialog-portal",
450
643
  ...props
451
644
  });
452
645
  }
453
646
  function DialogClose({ ...props }) {
454
- return /* @__PURE__ */ jsx6(DialogPrimitive.Close, {
647
+ return /* @__PURE__ */ jsx9(DialogPrimitive.Close, {
455
648
  "data-slot": "dialog-close",
456
649
  ...props
457
650
  });
458
651
  }
459
652
  function DialogHeader({ className, ...props }) {
460
- return /* @__PURE__ */ jsx6("div", {
653
+ return /* @__PURE__ */ jsx9("div", {
461
654
  "data-slot": "dialog-header",
462
655
  className: cn("grid gap-1.5", className),
463
656
  ...props
@@ -467,7 +660,7 @@ function DialogTitle({
467
660
  className,
468
661
  ...props
469
662
  }) {
470
- return /* @__PURE__ */ jsx6(DialogPrimitive.Title, {
663
+ return /* @__PURE__ */ jsx9(DialogPrimitive.Title, {
471
664
  "data-slot": "dialog-title",
472
665
  className: cn("text-lg font-medium", className),
473
666
  ...props
@@ -475,12 +668,12 @@ function DialogTitle({
475
668
  }
476
669
 
477
670
  // ../../src/components/ui/command.tsx
478
- import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
671
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
479
672
  function Command({
480
673
  className,
481
674
  ...props
482
675
  }) {
483
- return /* @__PURE__ */ jsx7(CommandPrimitive, {
676
+ return /* @__PURE__ */ jsx10(CommandPrimitive, {
484
677
  "data-slot": "command",
485
678
  className: cn("flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground", className),
486
679
  ...props
@@ -490,7 +683,7 @@ function CommandList({
490
683
  className,
491
684
  ...props
492
685
  }) {
493
- return /* @__PURE__ */ jsx7(CommandPrimitive.List, {
686
+ return /* @__PURE__ */ jsx10(CommandPrimitive.List, {
494
687
  "data-slot": "command-list",
495
688
  className: cn("max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", className),
496
689
  ...props
@@ -500,7 +693,7 @@ function CommandEmpty({
500
693
  className,
501
694
  ...props
502
695
  }) {
503
- return /* @__PURE__ */ jsx7(CommandPrimitive.Empty, {
696
+ return /* @__PURE__ */ jsx10(CommandPrimitive.Empty, {
504
697
  "data-slot": "command-empty",
505
698
  className: cn("py-6 text-center text-sm", className),
506
699
  ...props
@@ -510,7 +703,7 @@ function CommandGroup({
510
703
  className,
511
704
  ...props
512
705
  }) {
513
- return /* @__PURE__ */ jsx7(CommandPrimitive.Group, {
706
+ return /* @__PURE__ */ jsx10(CommandPrimitive.Group, {
514
707
  "data-slot": "command-group",
515
708
  className: cn("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", className),
516
709
  ...props
@@ -520,7 +713,7 @@ function CommandItem({
520
713
  className,
521
714
  ...props
522
715
  }) {
523
- return /* @__PURE__ */ jsx7(CommandPrimitive.Item, {
716
+ return /* @__PURE__ */ jsx10(CommandPrimitive.Item, {
524
717
  "data-slot": "command-item",
525
718
  className: cn("group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
526
719
  ...props
@@ -529,16 +722,16 @@ function CommandItem({
529
722
 
530
723
  // ../../src/components/ui/empty.tsx
531
724
  import { cva as cva5 } from "class-variance-authority";
532
- import { jsx as jsx8 } from "react/jsx-runtime";
725
+ import { jsx as jsx11 } from "react/jsx-runtime";
533
726
  function Empty({ className, ...props }) {
534
- return /* @__PURE__ */ jsx8("div", {
727
+ return /* @__PURE__ */ jsx11("div", {
535
728
  "data-slot": "empty",
536
729
  className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance", className),
537
730
  ...props
538
731
  });
539
732
  }
540
733
  function EmptyHeader({ className, ...props }) {
541
- return /* @__PURE__ */ jsx8("div", {
734
+ return /* @__PURE__ */ jsx11("div", {
542
735
  "data-slot": "empty-header",
543
736
  className: cn("flex max-w-sm flex-col items-center gap-2", className),
544
737
  ...props
@@ -560,7 +753,7 @@ function EmptyMedia({
560
753
  variant = "default",
561
754
  ...props
562
755
  }) {
563
- return /* @__PURE__ */ jsx8("div", {
756
+ return /* @__PURE__ */ jsx11("div", {
564
757
  "data-slot": "empty-icon",
565
758
  "data-variant": variant,
566
759
  className: cn(emptyMediaVariants({ variant, className })),
@@ -568,14 +761,14 @@ function EmptyMedia({
568
761
  });
569
762
  }
570
763
  function EmptyTitle({ className, ...props }) {
571
- return /* @__PURE__ */ jsx8("div", {
764
+ return /* @__PURE__ */ jsx11("div", {
572
765
  "data-slot": "empty-title",
573
766
  className: cn("text-lg font-medium tracking-tight", className),
574
767
  ...props
575
768
  });
576
769
  }
577
770
  function EmptyDescription({ className, ...props }) {
578
- return /* @__PURE__ */ jsx8("div", {
771
+ return /* @__PURE__ */ jsx11("div", {
579
772
  "data-slot": "empty-description",
580
773
  className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
581
774
  ...props
@@ -587,12 +780,11 @@ import { cva as cva6 } from "class-variance-authority";
587
780
 
588
781
  // ../../src/components/ui/input.tsx
589
782
  import { Input as InputPrimitive } from "@base-ui/react/input";
590
- import { jsx as jsx9 } from "react/jsx-runtime";
591
783
 
592
784
  // ../../src/components/ui/textarea.tsx
593
- import { jsx as jsx10 } from "react/jsx-runtime";
785
+ import { jsx as jsx12 } from "react/jsx-runtime";
594
786
  function Textarea({ className, ...props }) {
595
- return /* @__PURE__ */ jsx10("textarea", {
787
+ return /* @__PURE__ */ jsx12("textarea", {
596
788
  "data-slot": "textarea",
597
789
  className: cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
598
790
  ...props
@@ -600,9 +792,9 @@ function Textarea({ className, ...props }) {
600
792
  }
601
793
 
602
794
  // ../../src/components/ui/input-group.tsx
603
- import { jsx as jsx11 } from "react/jsx-runtime";
795
+ import { jsx as jsx13 } from "react/jsx-runtime";
604
796
  function InputGroup({ className, ...props }) {
605
- return /* @__PURE__ */ jsx11("div", {
797
+ return /* @__PURE__ */ jsx13("div", {
606
798
  "data-slot": "input-group",
607
799
  role: "group",
608
800
  className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
@@ -625,7 +817,7 @@ function InputGroupAddon({
625
817
  align = "inline-start",
626
818
  ...props
627
819
  }) {
628
- return /* @__PURE__ */ jsx11("div", {
820
+ return /* @__PURE__ */ jsx13("div", {
629
821
  role: "group",
630
822
  "data-slot": "input-group-addon",
631
823
  "data-align": align,
@@ -657,7 +849,7 @@ function InputGroupButton({
657
849
  size = "xs",
658
850
  ...props
659
851
  }) {
660
- return /* @__PURE__ */ jsx11(Button, {
852
+ return /* @__PURE__ */ jsx13(Button, {
661
853
  type,
662
854
  "data-size": size,
663
855
  variant,
@@ -669,7 +861,7 @@ function InputGroupTextarea({
669
861
  className,
670
862
  ...props
671
863
  }) {
672
- return /* @__PURE__ */ jsx11(Textarea, {
864
+ return /* @__PURE__ */ jsx13(Textarea, {
673
865
  "data-slot": "input-group-control",
674
866
  className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
675
867
  ...props
@@ -680,7 +872,7 @@ function InputGroupTextarea({
680
872
  import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
681
873
  import { useRender as useRender3 } from "@base-ui/react/use-render";
682
874
  import { cva as cva7 } from "class-variance-authority";
683
- import { jsx as jsx12 } from "react/jsx-runtime";
875
+ import { jsx as jsx14 } from "react/jsx-runtime";
684
876
  var markerVariants = cva7("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", {
685
877
  variants: {
686
878
  variant: {
@@ -709,7 +901,7 @@ function Marker({
709
901
  });
710
902
  }
711
903
  function MarkerContent({ className, ...props }) {
712
- return /* @__PURE__ */ jsx12("span", {
904
+ return /* @__PURE__ */ jsx14("span", {
713
905
  "data-slot": "marker-content",
714
906
  className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
715
907
  ...props
@@ -717,13 +909,13 @@ function MarkerContent({ className, ...props }) {
717
909
  }
718
910
 
719
911
  // ../../src/components/ui/message.tsx
720
- import { jsx as jsx13 } from "react/jsx-runtime";
912
+ import { jsx as jsx15 } from "react/jsx-runtime";
721
913
  function Message({
722
914
  className,
723
915
  align = "start",
724
916
  ...props
725
917
  }) {
726
- return /* @__PURE__ */ jsx13("div", {
918
+ return /* @__PURE__ */ jsx15("div", {
727
919
  "data-slot": "message",
728
920
  "data-align": align,
729
921
  className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
@@ -731,7 +923,7 @@ function Message({
731
923
  });
732
924
  }
733
925
  function MessageContent({ className, ...props }) {
734
- return /* @__PURE__ */ jsx13("div", {
926
+ return /* @__PURE__ */ jsx15("div", {
735
927
  "data-slot": "message-content",
736
928
  className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
737
929
  ...props
@@ -746,9 +938,9 @@ import {
746
938
  useMessageScrollerVisibility
747
939
  } from "@shadcn/react/message-scroller";
748
940
  import { ArrowDownIcon } from "lucide-react";
749
- import { jsx as jsx14, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
941
+ import { jsx as jsx16, jsxs as jsxs5, Fragment } from "react/jsx-runtime";
750
942
  function MessageScrollerProvider(props) {
751
- return /* @__PURE__ */ jsx14(MessageScrollerPrimitive.Provider, {
943
+ return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Provider, {
752
944
  ...props
753
945
  });
754
946
  }
@@ -756,7 +948,7 @@ function MessageScroller({
756
948
  className,
757
949
  ...props
758
950
  }) {
759
- return /* @__PURE__ */ jsx14(MessageScrollerPrimitive.Root, {
951
+ return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Root, {
760
952
  "data-slot": "message-scroller",
761
953
  className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
762
954
  ...props
@@ -766,7 +958,7 @@ function MessageScrollerViewport({
766
958
  className,
767
959
  ...props
768
960
  }) {
769
- return /* @__PURE__ */ jsx14(MessageScrollerPrimitive.Viewport, {
961
+ return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Viewport, {
770
962
  "data-slot": "message-scroller-viewport",
771
963
  className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent", className),
772
964
  ...props
@@ -776,7 +968,7 @@ function MessageScrollerContent({
776
968
  className,
777
969
  ...props
778
970
  }) {
779
- return /* @__PURE__ */ jsx14(MessageScrollerPrimitive.Content, {
971
+ return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Content, {
780
972
  "data-slot": "message-scroller-content",
781
973
  className: cn("flex h-max min-h-full flex-col gap-8", className),
782
974
  ...props
@@ -787,7 +979,7 @@ function MessageScrollerItem({
787
979
  scrollAnchor = false,
788
980
  ...props
789
981
  }) {
790
- return /* @__PURE__ */ jsx14(MessageScrollerPrimitive.Item, {
982
+ return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Item, {
791
983
  "data-slot": "message-scroller-item",
792
984
  scrollAnchor,
793
985
  className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
@@ -803,22 +995,22 @@ function MessageScrollerButton({
803
995
  size = "icon-sm",
804
996
  ...props
805
997
  }) {
806
- return /* @__PURE__ */ jsx14(MessageScrollerPrimitive.Button, {
998
+ return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Button, {
807
999
  "data-slot": "message-scroller-button",
808
1000
  "data-direction": direction,
809
1001
  "data-variant": variant,
810
1002
  "data-size": size,
811
1003
  direction,
812
1004
  className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
813
- render: render ?? /* @__PURE__ */ jsx14(Button, {
1005
+ render: render ?? /* @__PURE__ */ jsx16(Button, {
814
1006
  variant,
815
1007
  size
816
1008
  }),
817
1009
  ...props,
818
- children: children ?? /* @__PURE__ */ jsxs3(Fragment, {
1010
+ children: children ?? /* @__PURE__ */ jsxs5(Fragment, {
819
1011
  children: [
820
- /* @__PURE__ */ jsx14(ArrowDownIcon, {}),
821
- /* @__PURE__ */ jsx14("span", {
1012
+ /* @__PURE__ */ jsx16(ArrowDownIcon, {}),
1013
+ /* @__PURE__ */ jsx16("span", {
822
1014
  className: "sr-only",
823
1015
  children: direction === "end" ? "Scroll to end" : "Scroll to start"
824
1016
  })
@@ -829,15 +1021,15 @@ function MessageScrollerButton({
829
1021
 
830
1022
  // ../../src/components/ui/popover.tsx
831
1023
  import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
832
- import { jsx as jsx15 } from "react/jsx-runtime";
1024
+ import { jsx as jsx17 } from "react/jsx-runtime";
833
1025
  function Popover({ ...props }) {
834
- return /* @__PURE__ */ jsx15(PopoverPrimitive.Root, {
1026
+ return /* @__PURE__ */ jsx17(PopoverPrimitive.Root, {
835
1027
  "data-slot": "popover",
836
1028
  ...props
837
1029
  });
838
1030
  }
839
1031
  function PopoverTrigger({ ...props }) {
840
- return /* @__PURE__ */ jsx15(PopoverPrimitive.Trigger, {
1032
+ return /* @__PURE__ */ jsx17(PopoverPrimitive.Trigger, {
841
1033
  "data-slot": "popover-trigger",
842
1034
  ...props
843
1035
  });
@@ -850,14 +1042,14 @@ function PopoverContent({
850
1042
  sideOffset = 4,
851
1043
  ...props
852
1044
  }) {
853
- return /* @__PURE__ */ jsx15(PopoverPrimitive.Portal, {
854
- children: /* @__PURE__ */ jsx15(PopoverPrimitive.Positioner, {
1045
+ return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, {
1046
+ children: /* @__PURE__ */ jsx17(PopoverPrimitive.Positioner, {
855
1047
  align,
856
1048
  alignOffset,
857
1049
  side,
858
1050
  sideOffset,
859
1051
  className: "isolate z-50",
860
- children: /* @__PURE__ */ jsx15(PopoverPrimitive.Popup, {
1052
+ children: /* @__PURE__ */ jsx17(PopoverPrimitive.Popup, {
861
1053
  "data-slot": "popover-content",
862
1054
  className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
863
1055
  ...props
@@ -868,16 +1060,16 @@ function PopoverContent({
868
1060
 
869
1061
  // ../../src/components/ui/tooltip.tsx
870
1062
  import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
871
- import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
1063
+ import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
872
1064
  "use client";
873
1065
  function Tooltip({ ...props }) {
874
- return /* @__PURE__ */ jsx16(TooltipPrimitive.Root, {
1066
+ return /* @__PURE__ */ jsx18(TooltipPrimitive.Root, {
875
1067
  "data-slot": "tooltip",
876
1068
  ...props
877
1069
  });
878
1070
  }
879
1071
  function TooltipTrigger({ ...props }) {
880
- return /* @__PURE__ */ jsx16(TooltipPrimitive.Trigger, {
1072
+ return /* @__PURE__ */ jsx18(TooltipPrimitive.Trigger, {
881
1073
  "data-slot": "tooltip-trigger",
882
1074
  ...props
883
1075
  });
@@ -891,20 +1083,20 @@ function TooltipContent({
891
1083
  children,
892
1084
  ...props
893
1085
  }) {
894
- return /* @__PURE__ */ jsx16(TooltipPrimitive.Portal, {
895
- children: /* @__PURE__ */ jsx16(TooltipPrimitive.Positioner, {
1086
+ return /* @__PURE__ */ jsx18(TooltipPrimitive.Portal, {
1087
+ children: /* @__PURE__ */ jsx18(TooltipPrimitive.Positioner, {
896
1088
  align,
897
1089
  alignOffset,
898
1090
  side,
899
1091
  sideOffset,
900
1092
  className: "isolate z-50",
901
- children: /* @__PURE__ */ jsxs4(TooltipPrimitive.Popup, {
1093
+ children: /* @__PURE__ */ jsxs6(TooltipPrimitive.Popup, {
902
1094
  "data-slot": "tooltip-content",
903
1095
  className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
904
1096
  ...props,
905
1097
  children: [
906
1098
  children,
907
- /* @__PURE__ */ jsx16(TooltipPrimitive.Arrow, {
1099
+ /* @__PURE__ */ jsx18(TooltipPrimitive.Arrow, {
908
1100
  className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"
909
1101
  })
910
1102
  ]
@@ -1370,6 +1562,10 @@ var AgentToolMetadata = Schema2.Struct({
1370
1562
  description: Schema2.optional(Schema2.String),
1371
1563
  destructive: Schema2.Boolean
1372
1564
  }).annotate({ identifier: "AgentToolMetadata" });
1565
+ var AgentMarkdownCodeBlock = Schema2.Struct({
1566
+ code: Schema2.String,
1567
+ language: Schema2.String
1568
+ }).annotate({ identifier: "AgentMarkdownCodeBlock" });
1373
1569
  var AgentEvent = Schema2.Union([
1374
1570
  Schema2.Struct({
1375
1571
  type: Schema2.Literal("message-start"),
@@ -1380,6 +1576,12 @@ var AgentEvent = Schema2.Union([
1380
1576
  messageId: Schema2.String,
1381
1577
  delta: Schema2.String
1382
1578
  }),
1579
+ Schema2.Struct({
1580
+ type: Schema2.Literal("markdown-snapshot"),
1581
+ messageId: Schema2.String,
1582
+ html: Schema2.String,
1583
+ codeBlocks: Schema2.Array(AgentMarkdownCodeBlock)
1584
+ }),
1383
1585
  Schema2.Struct({
1384
1586
  type: Schema2.Literal("tool-call"),
1385
1587
  messageId: Schema2.String,
@@ -1422,7 +1624,7 @@ var AgentStreamError = Schema2.Struct({
1422
1624
  });
1423
1625
 
1424
1626
  // ../../src/services/agent/client/widget.tsx
1425
- import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
1627
+ import { jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
1426
1628
  var messages = {
1427
1629
  en: {
1428
1630
  approve: "Approve",
@@ -1495,8 +1697,8 @@ var agentWidgetMessages = (locale = getLocale(), overrides) => ({
1495
1697
  ...locale.startsWith("fr") ? messages.fr : messages.en,
1496
1698
  ...overrides
1497
1699
  });
1498
- var errorMessage = (code2, labels) => {
1499
- switch (code2) {
1700
+ var errorMessage = (code, labels) => {
1701
+ switch (code) {
1500
1702
  case "invalid-request":
1501
1703
  return labels.errorInvalidRequest;
1502
1704
  case "stream-failed":
@@ -1505,14 +1707,7 @@ var errorMessage = (code2, labels) => {
1505
1707
  return labels.errorUnavailable;
1506
1708
  }
1507
1709
  };
1508
- var inputCodeBlock = (input) => {
1509
- const value = JSON.stringify(input, null, 2) ?? String(input);
1510
- const longestFence = Math.max(0, ...value.match(/`+/g)?.map((fence2) => fence2.length) ?? []);
1511
- const fence = "`".repeat(Math.max(3, longestFence + 1));
1512
- return `${fence}json
1513
- ${value}
1514
- ${fence}`;
1515
- };
1710
+ var inputCode = (input) => JSON.stringify(input, null, 2) ?? String(input);
1516
1711
  var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1517
1712
  var referenceMentionPattern = (label) => new RegExp(`@${escapeRegExp(label)}(?![\\p{L}\\p{N}_-])`, "u");
1518
1713
  var hasReferenceMention = (input, label) => referenceMentionPattern(label).test(input);
@@ -1522,7 +1717,7 @@ var highlightedInput = (input, references) => {
1522
1717
  return input;
1523
1718
  const mentionPattern = new RegExp(`(${mentions.map(escapeRegExp).join("|")})(?![\\p{L}\\p{N}_-])`, "gu");
1524
1719
  const mentionSet = new Set(mentions);
1525
- return input.split(mentionPattern).map((part, index) => mentionSet.has(part) ? /* @__PURE__ */ jsx17("span", {
1720
+ return input.split(mentionPattern).map((part, index) => mentionSet.has(part) ? /* @__PURE__ */ jsx19("span", {
1526
1721
  className: "bg-primary text-primary-foreground rounded-sm [box-shadow:2px_0_0_var(--primary),-2px_0_0_var(--primary)]",
1527
1722
  children: part
1528
1723
  }, `${part}:${index}`) : part);
@@ -1557,16 +1752,16 @@ var ToolLabel = ({
1557
1752
  }) => {
1558
1753
  if (!description)
1559
1754
  return label;
1560
- return /* @__PURE__ */ jsxs5(Tooltip, {
1755
+ return /* @__PURE__ */ jsxs7(Tooltip, {
1561
1756
  children: [
1562
- /* @__PURE__ */ jsx17(TooltipTrigger, {
1563
- render: /* @__PURE__ */ jsx17("span", {
1757
+ /* @__PURE__ */ jsx19(TooltipTrigger, {
1758
+ render: /* @__PURE__ */ jsx19("span", {
1564
1759
  className: "cursor-help",
1565
1760
  tabIndex: 0
1566
1761
  }),
1567
1762
  children: label
1568
1763
  }),
1569
- /* @__PURE__ */ jsx17(TooltipContent, {
1764
+ /* @__PURE__ */ jsx19(TooltipContent, {
1570
1765
  className: "max-w-sm",
1571
1766
  children: description
1572
1767
  })
@@ -1579,101 +1774,91 @@ function ToolActivityCard({
1579
1774
  onApproval,
1580
1775
  tool
1581
1776
  }) {
1582
- const [detailsOpen, setDetailsOpen] = useState(false);
1777
+ const [detailsOpen, setDetailsOpen] = useState2(false);
1583
1778
  const requiresApproval = tool.status === "approval-required";
1584
1779
  const label = tool.metadata.title ?? tool.name;
1585
1780
  if (!requiresApproval) {
1586
- return /* @__PURE__ */ jsxs5(Marker, {
1781
+ return /* @__PURE__ */ jsxs7(Marker, {
1587
1782
  children: [
1588
- /* @__PURE__ */ jsx17(MarkerContent, {
1589
- children: /* @__PURE__ */ jsx17("span", {
1783
+ /* @__PURE__ */ jsx19(MarkerContent, {
1784
+ children: /* @__PURE__ */ jsx19("span", {
1590
1785
  className: cn("block w-fit max-w-full", tool.status === "running" && "shimmer"),
1591
- children: /* @__PURE__ */ jsx17(ToolLabel, {
1786
+ children: /* @__PURE__ */ jsx19(ToolLabel, {
1592
1787
  description: tool.metadata.description,
1593
1788
  label
1594
1789
  })
1595
1790
  })
1596
1791
  }),
1597
- tool.status === "failed" || tool.status === "denied" ? /* @__PURE__ */ jsx17(Badge, {
1792
+ tool.status === "failed" || tool.status === "denied" ? /* @__PURE__ */ jsx19(Badge, {
1598
1793
  variant: "destructive",
1599
1794
  children: tool.status === "failed" ? labels.toolFailed : labels.toolDenied
1600
1795
  }) : null
1601
1796
  ]
1602
1797
  });
1603
1798
  }
1604
- return /* @__PURE__ */ jsx17(Collapsible, {
1799
+ return /* @__PURE__ */ jsx19(Collapsible, {
1605
1800
  className: "mx-1",
1606
1801
  open: detailsOpen,
1607
1802
  onOpenChange: setDetailsOpen,
1608
- children: /* @__PURE__ */ jsxs5(Card, {
1803
+ children: /* @__PURE__ */ jsxs7(Card, {
1609
1804
  size: "sm",
1610
1805
  className: "w-full border shadow-none ring-0",
1611
1806
  children: [
1612
- /* @__PURE__ */ jsxs5(CardHeader, {
1807
+ /* @__PURE__ */ jsxs7(CardHeader, {
1613
1808
  children: [
1614
- /* @__PURE__ */ jsxs5(CardTitle, {
1809
+ /* @__PURE__ */ jsxs7(CardTitle, {
1615
1810
  className: "flex items-center gap-2",
1616
1811
  children: [
1617
- /* @__PURE__ */ jsx17(ToolLabel, {
1812
+ /* @__PURE__ */ jsx19(ToolLabel, {
1618
1813
  description: tool.metadata.description,
1619
1814
  label
1620
1815
  }),
1621
- tool.metadata.destructive ? /* @__PURE__ */ jsx17(Badge, {
1816
+ tool.metadata.destructive ? /* @__PURE__ */ jsx19(Badge, {
1622
1817
  variant: "destructive",
1623
1818
  children: labels.approvalDestructiveLabel
1624
1819
  }) : null
1625
1820
  ]
1626
1821
  }),
1627
- /* @__PURE__ */ jsx17(CardDescription, {
1822
+ /* @__PURE__ */ jsx19(CardDescription, {
1628
1823
  children: tool.metadata.destructive ? labels.approvalDestructive : labels.approvalRequired
1629
1824
  })
1630
1825
  ]
1631
1826
  }),
1632
- /* @__PURE__ */ jsx17(CollapsibleContent, {
1633
- children: /* @__PURE__ */ jsx17(CardContent, {
1827
+ /* @__PURE__ */ jsx19(CollapsibleContent, {
1828
+ children: /* @__PURE__ */ jsx19(CardContent, {
1634
1829
  className: "min-w-0 overflow-hidden border-y py-3",
1635
- children: /* @__PURE__ */ jsx17(Streamdown, {
1636
- className: "min-w-0 text-xs",
1637
- controls: {
1638
- code: { copy: true, download: false },
1639
- mermaid: false,
1640
- table: false
1641
- },
1642
- linkSafety: { enabled: false },
1643
- plugins: { code },
1644
- translations: {
1645
- copied: labels.copied,
1646
- copyCode: labels.copy
1647
- },
1648
- children: inputCodeBlock(tool.input)
1830
+ children: /* @__PURE__ */ jsx19(CodeBlock, {
1831
+ code: inputCode(tool.input),
1832
+ language: "json",
1833
+ messages: { copied: labels.copied, copy: labels.copy }
1649
1834
  })
1650
1835
  })
1651
1836
  }),
1652
- /* @__PURE__ */ jsxs5(CardFooter, {
1837
+ /* @__PURE__ */ jsxs7(CardFooter, {
1653
1838
  className: "flex flex-wrap gap-2",
1654
1839
  children: [
1655
- /* @__PURE__ */ jsx17(Button, {
1840
+ /* @__PURE__ */ jsx19(Button, {
1656
1841
  size: "sm",
1657
1842
  variant: tool.metadata.destructive ? "destructive" : "default",
1658
1843
  disabled,
1659
1844
  onClick: () => onApproval(tool, true),
1660
1845
  children: labels.approve
1661
1846
  }),
1662
- /* @__PURE__ */ jsx17(Button, {
1847
+ /* @__PURE__ */ jsx19(Button, {
1663
1848
  size: "sm",
1664
1849
  variant: "outline",
1665
1850
  disabled,
1666
1851
  onClick: () => onApproval(tool, false),
1667
1852
  children: labels.cancel
1668
1853
  }),
1669
- /* @__PURE__ */ jsx17(CollapsibleTrigger, {
1670
- render: /* @__PURE__ */ jsxs5(Button, {
1854
+ /* @__PURE__ */ jsx19(CollapsibleTrigger, {
1855
+ render: /* @__PURE__ */ jsxs7(Button, {
1671
1856
  variant: "ghost",
1672
1857
  size: "sm",
1673
1858
  className: "ml-auto",
1674
1859
  children: [
1675
1860
  detailsOpen ? labels.viewLess : labels.viewMore,
1676
- /* @__PURE__ */ jsx17(ChevronDownIcon, {
1861
+ /* @__PURE__ */ jsx19(ChevronDownIcon, {
1677
1862
  "data-icon": "inline-end",
1678
1863
  className: cn("transition-transform", detailsOpen && "rotate-180")
1679
1864
  })
@@ -1694,12 +1879,12 @@ function ToolActivityLog({
1694
1879
  tools,
1695
1880
  workedSeconds
1696
1881
  }) {
1697
- const [logOpen, setLogOpen] = useState(false);
1882
+ const [logOpen, setLogOpen] = useState2(false);
1698
1883
  const currentTool = tools.at(-1);
1699
1884
  if (!currentTool) {
1700
- return /* @__PURE__ */ jsx17(Marker, {
1701
- children: /* @__PURE__ */ jsx17(MarkerContent, {
1702
- children: /* @__PURE__ */ jsx17("span", {
1885
+ return /* @__PURE__ */ jsx19(Marker, {
1886
+ children: /* @__PURE__ */ jsx19(MarkerContent, {
1887
+ children: /* @__PURE__ */ jsx19("span", {
1703
1888
  className: "shimmer block w-fit max-w-full",
1704
1889
  children: labels.toolRunning
1705
1890
  })
@@ -1711,30 +1896,30 @@ function ToolActivityLog({
1711
1896
  const isWorking = pending && workedSeconds === undefined && currentTool.status !== "approval-required";
1712
1897
  const loggedTools = showWorkedSummary ? tools : tools.slice(0, -1);
1713
1898
  if (currentTool.status === "approval-required") {
1714
- return /* @__PURE__ */ jsxs5("div", {
1899
+ return /* @__PURE__ */ jsxs7("div", {
1715
1900
  className: "flex flex-col gap-2",
1716
1901
  children: [
1717
- loggedTools.length > 0 ? /* @__PURE__ */ jsxs5(Collapsible, {
1902
+ loggedTools.length > 0 ? /* @__PURE__ */ jsxs7(Collapsible, {
1718
1903
  open: logOpen,
1719
1904
  onOpenChange: setLogOpen,
1720
1905
  children: [
1721
- /* @__PURE__ */ jsxs5(CollapsibleTrigger, {
1722
- render: /* @__PURE__ */ jsx17(Button, {
1906
+ /* @__PURE__ */ jsxs7(CollapsibleTrigger, {
1907
+ render: /* @__PURE__ */ jsx19(Button, {
1723
1908
  variant: "ghost",
1724
1909
  size: "sm",
1725
1910
  className: "ml-auto"
1726
1911
  }),
1727
1912
  children: [
1728
1913
  logOpen ? labels.viewLess : labels.viewMore,
1729
- /* @__PURE__ */ jsx17(ChevronDownIcon, {
1914
+ /* @__PURE__ */ jsx19(ChevronDownIcon, {
1730
1915
  "data-icon": "inline-end",
1731
1916
  className: cn("transition-transform", logOpen && "rotate-180")
1732
1917
  })
1733
1918
  ]
1734
1919
  }),
1735
- /* @__PURE__ */ jsx17(CollapsibleContent, {
1920
+ /* @__PURE__ */ jsx19(CollapsibleContent, {
1736
1921
  className: "mt-2 ml-2 flex flex-col gap-2 border-l pl-3",
1737
- children: loggedTools.map((tool) => /* @__PURE__ */ jsx17(ToolActivityCard, {
1922
+ children: loggedTools.map((tool) => /* @__PURE__ */ jsx19(ToolActivityCard, {
1738
1923
  disabled,
1739
1924
  labels,
1740
1925
  onApproval,
@@ -1743,7 +1928,7 @@ function ToolActivityLog({
1743
1928
  })
1744
1929
  ]
1745
1930
  }) : null,
1746
- /* @__PURE__ */ jsx17(ToolActivityCard, {
1931
+ /* @__PURE__ */ jsx19(ToolActivityCard, {
1747
1932
  disabled,
1748
1933
  labels,
1749
1934
  onApproval,
@@ -1752,47 +1937,47 @@ function ToolActivityLog({
1752
1937
  ]
1753
1938
  });
1754
1939
  }
1755
- return /* @__PURE__ */ jsxs5(Collapsible, {
1940
+ return /* @__PURE__ */ jsxs7(Collapsible, {
1756
1941
  open: logOpen,
1757
1942
  onOpenChange: setLogOpen,
1758
1943
  children: [
1759
- /* @__PURE__ */ jsxs5(CollapsibleTrigger, {
1760
- render: /* @__PURE__ */ jsx17(Marker, {
1944
+ /* @__PURE__ */ jsxs7(CollapsibleTrigger, {
1945
+ render: /* @__PURE__ */ jsx19(Marker, {
1761
1946
  className: "focus-visible:ring-ring/50 cursor-pointer rounded-sm outline-none focus-visible:ring-3",
1762
- render: /* @__PURE__ */ jsx17("button", {
1947
+ render: /* @__PURE__ */ jsx19("button", {
1763
1948
  type: "button"
1764
1949
  })
1765
1950
  }),
1766
1951
  children: [
1767
- /* @__PURE__ */ jsx17(MarkerContent, {
1952
+ /* @__PURE__ */ jsx19(MarkerContent, {
1768
1953
  className: "flex-1",
1769
- children: /* @__PURE__ */ jsx17("span", {
1954
+ children: /* @__PURE__ */ jsx19("span", {
1770
1955
  className: cn("block w-fit max-w-full", isWorking && "shimmer"),
1771
1956
  children: showWorkedSummary ? labels.toolWorked(workedSeconds) : label
1772
1957
  })
1773
1958
  }),
1774
- currentTool.status === "failed" || currentTool.status === "denied" ? /* @__PURE__ */ jsx17(Badge, {
1959
+ currentTool.status === "failed" || currentTool.status === "denied" ? /* @__PURE__ */ jsx19(Badge, {
1775
1960
  variant: "destructive",
1776
1961
  children: currentTool.status === "failed" ? labels.toolFailed : labels.toolDenied
1777
1962
  }) : null,
1778
- /* @__PURE__ */ jsx17(ChevronDownIcon, {
1963
+ /* @__PURE__ */ jsx19(ChevronDownIcon, {
1779
1964
  className: cn("transition-transform", logOpen && "rotate-180")
1780
1965
  }),
1781
- /* @__PURE__ */ jsx17("span", {
1966
+ /* @__PURE__ */ jsx19("span", {
1782
1967
  className: "sr-only",
1783
1968
  children: logOpen ? labels.viewLess : labels.viewMore
1784
1969
  })
1785
1970
  ]
1786
1971
  }),
1787
- /* @__PURE__ */ jsxs5(CollapsibleContent, {
1972
+ /* @__PURE__ */ jsxs7(CollapsibleContent, {
1788
1973
  className: "mt-2 ml-2 flex flex-col gap-2 border-l pl-3",
1789
1974
  children: [
1790
- /* @__PURE__ */ jsx17(Marker, {
1791
- children: /* @__PURE__ */ jsx17(MarkerContent, {
1975
+ /* @__PURE__ */ jsx19(Marker, {
1976
+ children: /* @__PURE__ */ jsx19(MarkerContent, {
1792
1977
  children: labels.toolRunning
1793
1978
  })
1794
1979
  }),
1795
- loggedTools.map((tool) => /* @__PURE__ */ jsx17(ToolActivityCard, {
1980
+ loggedTools.map((tool) => /* @__PURE__ */ jsx19(ToolActivityCard, {
1796
1981
  disabled,
1797
1982
  labels,
1798
1983
  onApproval,
@@ -1811,12 +1996,12 @@ function AgentMessageRow({
1811
1996
  pending
1812
1997
  }) {
1813
1998
  const isUser = message.role === "user";
1814
- const activeStartedAt = useRef(undefined);
1815
- const activeMilliseconds = useRef(0);
1816
- const wasPending = useRef(pending);
1817
- const [workedSeconds, setWorkedSeconds] = useState();
1999
+ const activeStartedAt = useRef2(undefined);
2000
+ const activeMilliseconds = useRef2(0);
2001
+ const wasPending = useRef2(pending);
2002
+ const [workedSeconds, setWorkedSeconds] = useState2();
1818
2003
  const hasPendingApproval = message.tools.some((tool) => tool.status === "approval-required");
1819
- useEffect(() => {
2004
+ useEffect2(() => {
1820
2005
  const isWorking = pending && !hasPendingApproval;
1821
2006
  if (isWorking) {
1822
2007
  wasPending.current = true;
@@ -1840,11 +2025,11 @@ function AgentMessageRow({
1840
2025
  pending,
1841
2026
  workedSeconds
1842
2027
  ]);
1843
- return /* @__PURE__ */ jsx17(Message, {
2028
+ return /* @__PURE__ */ jsx19(Message, {
1844
2029
  align: isUser ? "end" : "start",
1845
- children: /* @__PURE__ */ jsxs5(MessageContent, {
2030
+ children: /* @__PURE__ */ jsxs7(MessageContent, {
1846
2031
  children: [
1847
- !isUser && (message.tools.length > 0 || pending && !message.text) ? /* @__PURE__ */ jsx17(ToolActivityLog, {
2032
+ !isUser && (message.tools.length > 0 || pending && !message.text) ? /* @__PURE__ */ jsx19(ToolActivityLog, {
1848
2033
  disabled,
1849
2034
  labels,
1850
2035
  onApproval,
@@ -1852,27 +2037,19 @@ function AgentMessageRow({
1852
2037
  tools: message.tools,
1853
2038
  workedSeconds
1854
2039
  }) : null,
1855
- message.text ? isUser ? /* @__PURE__ */ jsx17(Bubble, {
2040
+ message.text ? isUser ? /* @__PURE__ */ jsx19(Bubble, {
1856
2041
  align: "end",
1857
- children: /* @__PURE__ */ jsx17(BubbleContent, {
2042
+ children: /* @__PURE__ */ jsx19(BubbleContent, {
1858
2043
  className: "whitespace-pre-wrap",
1859
2044
  children: message.text
1860
2045
  })
1861
- }) : /* @__PURE__ */ jsx17(Streamdown, {
1862
- animated: true,
2046
+ }) : message.markdown ? /* @__PURE__ */ jsx19(MarkdownContent, {
1863
2047
  className: "w-full",
1864
- controls: {
1865
- code: { copy: true, download: false },
1866
- mermaid: false,
1867
- table: false
1868
- },
1869
- isAnimating: pending,
1870
- linkSafety: { enabled: false },
1871
- plugins: { code },
1872
- translations: {
1873
- copied: labels.copied,
1874
- copyCode: labels.copy
1875
- },
2048
+ codeBlocks: message.markdown.codeBlocks,
2049
+ html: message.markdown.html,
2050
+ messages: { copied: labels.copied, copy: labels.copy }
2051
+ }) : /* @__PURE__ */ jsx19("div", {
2052
+ className: "w-full whitespace-pre-wrap",
1876
2053
  children: message.text
1877
2054
  }) : null
1878
2055
  ]
@@ -1892,15 +2069,15 @@ function AgentWidget({
1892
2069
  const labels = agentWidgetMessages(getLocale(), messageOverrides);
1893
2070
  const referenceInputId = useId();
1894
2071
  const referenceListId = `${referenceInputId}-list`;
1895
- const [open, setOpen] = useState(false);
1896
- const [maximized, setMaximized] = useState(false);
1897
- const [referencePickerOpen, setReferencePickerOpen] = useState(false);
1898
- const [activeReferenceKey, setActiveReferenceKey] = useState("");
1899
- const [activeReferenceSearch, setActiveReferenceSearch] = useState();
1900
- const [input, setInput] = useState("");
1901
- const inputRef = useRef(null);
1902
- const inputOverlayRef = useRef(null);
1903
- const [references, setReferences] = useState([]);
2072
+ const [open, setOpen] = useState2(false);
2073
+ const [maximized, setMaximized] = useState2(false);
2074
+ const [referencePickerOpen, setReferencePickerOpen] = useState2(false);
2075
+ const [activeReferenceKey, setActiveReferenceKey] = useState2("");
2076
+ const [activeReferenceSearch, setActiveReferenceSearch] = useState2();
2077
+ const [input, setInput] = useState2("");
2078
+ const inputRef = useRef2(null);
2079
+ const inputOverlayRef = useRef2(null);
2080
+ const [references, setReferences] = useState2([]);
1904
2081
  const activeContext = state.contextLocked ? state.context ? {
1905
2082
  ...state.context,
1906
2083
  icon: availableReferences.find(({ key }) => key === state.context?.key)?.icon
@@ -1967,71 +2144,71 @@ function AgentWidget({
1967
2144
  }
1968
2145
  setOpen(nextOpen);
1969
2146
  };
1970
- return /* @__PURE__ */ jsxs5(Dialog, {
2147
+ return /* @__PURE__ */ jsxs7(Dialog, {
1971
2148
  open,
1972
2149
  onOpenChange: handleOpenChange,
1973
2150
  modal: false,
1974
2151
  disablePointerDismissal: true,
1975
2152
  children: [
1976
- /* @__PURE__ */ jsxs5(DialogTrigger, {
1977
- render: /* @__PURE__ */ jsx17(Button, {
2153
+ /* @__PURE__ */ jsxs7(DialogTrigger, {
2154
+ render: /* @__PURE__ */ jsx19(Button, {
1978
2155
  size: "icon-lg",
1979
2156
  className: "fixed right-4 bottom-4 z-9999 rounded-full shadow-lg md:right-6 md:bottom-6"
1980
2157
  }),
1981
2158
  children: [
1982
- /* @__PURE__ */ jsx17(BotIcon, {}),
1983
- /* @__PURE__ */ jsx17("span", {
2159
+ /* @__PURE__ */ jsx19(BotIcon, {}),
2160
+ /* @__PURE__ */ jsx19("span", {
1984
2161
  className: "sr-only",
1985
2162
  children: labels.open
1986
2163
  })
1987
2164
  ]
1988
2165
  }),
1989
- /* @__PURE__ */ jsx17(DialogPortal, {
1990
- children: /* @__PURE__ */ jsxs5(DialogPrimitive2.Popup, {
2166
+ /* @__PURE__ */ jsx19(DialogPortal, {
2167
+ children: /* @__PURE__ */ jsxs7(DialogPrimitive2.Popup, {
1991
2168
  "data-slot": "dialog-content",
1992
2169
  className: cn("bg-popover text-popover-foreground ring-foreground/10 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 fixed z-50 flex flex-col gap-0 overflow-hidden rounded-xl text-sm shadow-lg ring-1 duration-100 outline-none", maximized ? "inset-4 max-h-none max-w-none md:inset-6" : "right-4 bottom-20 h-[min(42rem,calc(100svh-6rem))] w-[calc(100%-2rem)] max-w-md md:right-6"),
1993
2170
  children: [
1994
- /* @__PURE__ */ jsx17(DialogHeader, {
2171
+ /* @__PURE__ */ jsx19(DialogHeader, {
1995
2172
  className: "shrink-0 border-b p-4",
1996
- children: /* @__PURE__ */ jsxs5("div", {
2173
+ children: /* @__PURE__ */ jsxs7("div", {
1997
2174
  className: "flex items-center gap-1",
1998
2175
  children: [
1999
- /* @__PURE__ */ jsx17(DialogTitle, {
2176
+ /* @__PURE__ */ jsx19(DialogTitle, {
2000
2177
  className: "min-w-0 flex-1 truncate text-sm leading-none font-medium",
2001
2178
  children: labels.title
2002
2179
  }),
2003
- /* @__PURE__ */ jsxs5(Button, {
2180
+ /* @__PURE__ */ jsxs7(Button, {
2004
2181
  variant: "ghost",
2005
2182
  size: "icon-sm",
2006
2183
  onClick: () => setOpen(false),
2007
2184
  children: [
2008
- /* @__PURE__ */ jsx17(MinusIcon, {}),
2009
- /* @__PURE__ */ jsx17("span", {
2185
+ /* @__PURE__ */ jsx19(MinusIcon, {}),
2186
+ /* @__PURE__ */ jsx19("span", {
2010
2187
  className: "sr-only",
2011
2188
  children: labels.minimize
2012
2189
  })
2013
2190
  ]
2014
2191
  }),
2015
- /* @__PURE__ */ jsxs5(Button, {
2192
+ /* @__PURE__ */ jsxs7(Button, {
2016
2193
  variant: "ghost",
2017
2194
  size: "icon-sm",
2018
2195
  onClick: () => setMaximized((current) => !current),
2019
2196
  children: [
2020
- maximized ? /* @__PURE__ */ jsx17(Minimize2Icon, {}) : /* @__PURE__ */ jsx17(Maximize2Icon, {}),
2021
- /* @__PURE__ */ jsx17("span", {
2197
+ maximized ? /* @__PURE__ */ jsx19(Minimize2Icon, {}) : /* @__PURE__ */ jsx19(Maximize2Icon, {}),
2198
+ /* @__PURE__ */ jsx19("span", {
2022
2199
  className: "sr-only",
2023
2200
  children: maximized ? labels.restore : labels.maximize
2024
2201
  })
2025
2202
  ]
2026
2203
  }),
2027
- /* @__PURE__ */ jsxs5(DialogClose, {
2028
- render: /* @__PURE__ */ jsx17(Button, {
2204
+ /* @__PURE__ */ jsxs7(DialogClose, {
2205
+ render: /* @__PURE__ */ jsx19(Button, {
2029
2206
  variant: "ghost",
2030
2207
  size: "icon-sm"
2031
2208
  }),
2032
2209
  children: [
2033
- /* @__PURE__ */ jsx17(XIcon2, {}),
2034
- /* @__PURE__ */ jsx17("span", {
2210
+ /* @__PURE__ */ jsx19(XIcon2, {}),
2211
+ /* @__PURE__ */ jsx19("span", {
2035
2212
  className: "sr-only",
2036
2213
  children: labels.close
2037
2214
  })
@@ -2040,39 +2217,39 @@ function AgentWidget({
2040
2217
  ]
2041
2218
  })
2042
2219
  }),
2043
- /* @__PURE__ */ jsx17("div", {
2220
+ /* @__PURE__ */ jsx19("div", {
2044
2221
  className: "min-h-0 flex-1 overflow-hidden",
2045
- children: state.messages.length === 0 && !state.error ? /* @__PURE__ */ jsx17(Empty, {
2222
+ children: state.messages.length === 0 && !state.error ? /* @__PURE__ */ jsx19(Empty, {
2046
2223
  className: "h-full",
2047
- children: /* @__PURE__ */ jsxs5(EmptyHeader, {
2224
+ children: /* @__PURE__ */ jsxs7(EmptyHeader, {
2048
2225
  children: [
2049
- /* @__PURE__ */ jsx17(EmptyMedia, {
2226
+ /* @__PURE__ */ jsx19(EmptyMedia, {
2050
2227
  variant: "icon",
2051
- children: /* @__PURE__ */ jsx17(MessageCircleDashedIcon, {})
2228
+ children: /* @__PURE__ */ jsx19(MessageCircleDashedIcon, {})
2052
2229
  }),
2053
- /* @__PURE__ */ jsx17(EmptyTitle, {
2230
+ /* @__PURE__ */ jsx19(EmptyTitle, {
2054
2231
  children: labels.welcome
2055
2232
  }),
2056
- /* @__PURE__ */ jsx17(EmptyDescription, {
2233
+ /* @__PURE__ */ jsx19(EmptyDescription, {
2057
2234
  children: labels.description
2058
2235
  })
2059
2236
  ]
2060
2237
  })
2061
- }) : /* @__PURE__ */ jsx17(MessageScrollerProvider, {
2238
+ }) : /* @__PURE__ */ jsx19(MessageScrollerProvider, {
2062
2239
  autoScroll: true,
2063
- children: /* @__PURE__ */ jsxs5(MessageScroller, {
2240
+ children: /* @__PURE__ */ jsxs7(MessageScroller, {
2064
2241
  children: [
2065
- /* @__PURE__ */ jsx17(MessageScrollerViewport, {
2242
+ /* @__PURE__ */ jsx19(MessageScrollerViewport, {
2066
2243
  "aria-label": labels.title,
2067
2244
  className: "[scrollbar-width:thin] [scrollbar-color:var(--border)_transparent]",
2068
- children: /* @__PURE__ */ jsxs5(MessageScrollerContent, {
2245
+ children: /* @__PURE__ */ jsxs7(MessageScrollerContent, {
2069
2246
  "aria-busy": state.pending,
2070
2247
  className: "p-4",
2071
2248
  children: [
2072
- state.messages.map((message, index) => /* @__PURE__ */ jsx17(MessageScrollerItem, {
2249
+ state.messages.map((message, index) => /* @__PURE__ */ jsx19(MessageScrollerItem, {
2073
2250
  messageId: message.id,
2074
2251
  scrollAnchor: message.role === "user",
2075
- children: /* @__PURE__ */ jsx17(AgentMessageRow, {
2252
+ children: /* @__PURE__ */ jsx19(AgentMessageRow, {
2076
2253
  disabled: state.pending,
2077
2254
  labels,
2078
2255
  message,
@@ -2080,15 +2257,15 @@ function AgentWidget({
2080
2257
  pending: state.pending && index === state.messages.length - 1
2081
2258
  })
2082
2259
  }, message.id)),
2083
- state.error ? /* @__PURE__ */ jsx17(MessageScrollerItem, {
2260
+ state.error ? /* @__PURE__ */ jsx19(MessageScrollerItem, {
2084
2261
  messageId: "error",
2085
- children: /* @__PURE__ */ jsxs5(Alert, {
2262
+ children: /* @__PURE__ */ jsxs7(Alert, {
2086
2263
  variant: "destructive",
2087
2264
  children: [
2088
- /* @__PURE__ */ jsx17(AlertTitle, {
2265
+ /* @__PURE__ */ jsx19(AlertTitle, {
2089
2266
  children: labels.title
2090
2267
  }),
2091
- /* @__PURE__ */ jsx17(AlertDescription, {
2268
+ /* @__PURE__ */ jsx19(AlertDescription, {
2092
2269
  children: errorMessage(state.error, labels)
2093
2270
  })
2094
2271
  ]
@@ -2097,10 +2274,10 @@ function AgentWidget({
2097
2274
  ]
2098
2275
  })
2099
2276
  }),
2100
- /* @__PURE__ */ jsxs5(MessageScrollerButton, {
2277
+ /* @__PURE__ */ jsxs7(MessageScrollerButton, {
2101
2278
  children: [
2102
- /* @__PURE__ */ jsx17(ArrowDownIcon2, {}),
2103
- /* @__PURE__ */ jsx17("span", {
2279
+ /* @__PURE__ */ jsx19(ArrowDownIcon2, {}),
2280
+ /* @__PURE__ */ jsx19("span", {
2104
2281
  className: "sr-only",
2105
2282
  children: labels.scrollLatest
2106
2283
  })
@@ -2110,47 +2287,47 @@ function AgentWidget({
2110
2287
  })
2111
2288
  })
2112
2289
  }),
2113
- /* @__PURE__ */ jsx17("form", {
2290
+ /* @__PURE__ */ jsx19("form", {
2114
2291
  className: "shrink-0 border-t p-3",
2115
2292
  onSubmit: (event) => {
2116
2293
  event.preventDefault();
2117
2294
  sendMessage();
2118
2295
  },
2119
- children: /* @__PURE__ */ jsxs5(InputGroup, {
2296
+ children: /* @__PURE__ */ jsxs7(InputGroup, {
2120
2297
  children: [
2121
- activeContext ? /* @__PURE__ */ jsxs5(InputGroupAddon, {
2298
+ activeContext ? /* @__PURE__ */ jsxs7(InputGroupAddon, {
2122
2299
  align: "block-start",
2123
2300
  className: "bg-background rounded-t-[calc(var(--radius-md)-1px)] border-b",
2124
2301
  children: [
2125
2302
  activeContext.icon,
2126
- /* @__PURE__ */ jsx17("span", {
2303
+ /* @__PURE__ */ jsx19("span", {
2127
2304
  className: "min-w-0 flex-1 truncate text-left",
2128
2305
  children: activeContext.label
2129
2306
  }),
2130
- onRemoveContext ? /* @__PURE__ */ jsx17(InputGroupButton, {
2307
+ onRemoveContext ? /* @__PURE__ */ jsx19(InputGroupButton, {
2131
2308
  size: "icon-xs",
2132
2309
  "aria-label": `${labels.removeContext}: ${activeContext.label}`,
2133
2310
  onClick: onRemoveContext,
2134
- children: /* @__PURE__ */ jsx17(XIcon2, {})
2311
+ children: /* @__PURE__ */ jsx19(XIcon2, {})
2135
2312
  }) : null
2136
2313
  ]
2137
2314
  }) : null,
2138
- /* @__PURE__ */ jsxs5("div", {
2315
+ /* @__PURE__ */ jsxs7("div", {
2139
2316
  className: "relative w-full min-w-0 self-stretch text-left",
2140
2317
  children: [
2141
- /* @__PURE__ */ jsx17("div", {
2318
+ /* @__PURE__ */ jsx19("div", {
2142
2319
  ref: inputOverlayRef,
2143
2320
  "aria-hidden": "true",
2144
2321
  className: "text-foreground pointer-events-none absolute inset-0 [scrollbar-width:thin] [scrollbar-gutter:stable] overflow-hidden px-2.5 py-2 text-left font-[inherit] text-base break-words whitespace-pre-wrap md:text-sm",
2145
2322
  children: highlightedInput(input, references)
2146
2323
  }),
2147
- /* @__PURE__ */ jsxs5(Popover, {
2324
+ /* @__PURE__ */ jsxs7(Popover, {
2148
2325
  open: referencePickerOpen,
2149
2326
  triggerId: referenceInputId,
2150
2327
  children: [
2151
- /* @__PURE__ */ jsx17(PopoverTrigger, {
2328
+ /* @__PURE__ */ jsx19(PopoverTrigger, {
2152
2329
  id: referenceInputId,
2153
- render: /* @__PURE__ */ jsx17(InputGroupTextarea, {
2330
+ render: /* @__PURE__ */ jsx19(InputGroupTextarea, {
2154
2331
  ref: inputRef,
2155
2332
  className: "caret-foreground selection:bg-primary selection:text-primary-foreground relative max-h-32 w-full [scrollbar-width:thin] [scrollbar-color:var(--border)_transparent] [scrollbar-gutter:stable] overflow-y-auto overscroll-contain text-left text-transparent",
2156
2333
  value: input,
@@ -2202,30 +2379,30 @@ function AgentWidget({
2202
2379
  }
2203
2380
  })
2204
2381
  }),
2205
- /* @__PURE__ */ jsx17(PopoverContent, {
2382
+ /* @__PURE__ */ jsx19(PopoverContent, {
2206
2383
  align: "start",
2207
2384
  initialFocus: false,
2208
2385
  side: "top",
2209
2386
  className: "w-[min(24rem,calc(100vw-2rem))] p-0",
2210
- children: /* @__PURE__ */ jsx17(Command, {
2387
+ children: /* @__PURE__ */ jsx19(Command, {
2211
2388
  shouldFilter: false,
2212
2389
  value: activeReference?.key ?? "",
2213
2390
  onValueChange: setActiveReferenceKey,
2214
- children: /* @__PURE__ */ jsxs5(CommandList, {
2391
+ children: /* @__PURE__ */ jsxs7(CommandList, {
2215
2392
  id: referenceListId,
2216
2393
  children: [
2217
- /* @__PURE__ */ jsx17(CommandEmpty, {
2394
+ /* @__PURE__ */ jsx19(CommandEmpty, {
2218
2395
  children: labels.noReferences
2219
2396
  }),
2220
- matchingReferences.length > 0 ? /* @__PURE__ */ jsx17(CommandGroup, {
2397
+ matchingReferences.length > 0 ? /* @__PURE__ */ jsx19(CommandGroup, {
2221
2398
  heading: labels.references,
2222
- children: matchingReferences.map((reference, index) => /* @__PURE__ */ jsxs5(CommandItem, {
2399
+ children: matchingReferences.map((reference, index) => /* @__PURE__ */ jsxs7(CommandItem, {
2223
2400
  id: `${referenceInputId}-reference-${index}`,
2224
2401
  value: reference.key,
2225
2402
  onSelect: () => selectReference(reference),
2226
2403
  children: [
2227
2404
  reference.icon,
2228
- /* @__PURE__ */ jsx17("span", {
2405
+ /* @__PURE__ */ jsx19("span", {
2229
2406
  className: "truncate",
2230
2407
  children: reference.label
2231
2408
  })
@@ -2240,26 +2417,26 @@ function AgentWidget({
2240
2417
  })
2241
2418
  ]
2242
2419
  }),
2243
- /* @__PURE__ */ jsx17(InputGroupAddon, {
2420
+ /* @__PURE__ */ jsx19(InputGroupAddon, {
2244
2421
  align: "block-end",
2245
2422
  className: "justify-end",
2246
- children: state.pending ? /* @__PURE__ */ jsxs5(InputGroupButton, {
2423
+ children: state.pending ? /* @__PURE__ */ jsxs7(InputGroupButton, {
2247
2424
  size: "icon-xs",
2248
2425
  onClick: onInterrupt,
2249
2426
  children: [
2250
- /* @__PURE__ */ jsx17(SquareIcon, {}),
2251
- /* @__PURE__ */ jsx17("span", {
2427
+ /* @__PURE__ */ jsx19(SquareIcon, {}),
2428
+ /* @__PURE__ */ jsx19("span", {
2252
2429
  className: "sr-only",
2253
2430
  children: labels.stop
2254
2431
  })
2255
2432
  ]
2256
- }) : /* @__PURE__ */ jsxs5(InputGroupButton, {
2433
+ }) : /* @__PURE__ */ jsxs7(InputGroupButton, {
2257
2434
  type: "submit",
2258
2435
  size: "icon-xs",
2259
2436
  disabled: !input.trim() || hasPendingApproval,
2260
2437
  children: [
2261
- /* @__PURE__ */ jsx17(SendIcon, {}),
2262
- /* @__PURE__ */ jsx17("span", {
2438
+ /* @__PURE__ */ jsx19(SendIcon, {}),
2439
+ /* @__PURE__ */ jsx19("span", {
2263
2440
  className: "sr-only",
2264
2441
  children: labels.send
2265
2442
  })
@@ -2276,9 +2453,9 @@ function AgentWidget({
2276
2453
  });
2277
2454
  }
2278
2455
  export {
2279
- reduceAgentEvent,
2280
- makeAgentAtoms,
2281
- initialAgentState,
2456
+ AgentWidget,
2282
2457
  agentWidgetMessages,
2283
- AgentWidget
2458
+ initialAgentState,
2459
+ makeAgentAtoms,
2460
+ reduceAgentEvent
2284
2461
  };