@lukeashford/aurelius 2.12.0 → 2.14.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.
package/dist/index.mjs CHANGED
@@ -3300,11 +3300,299 @@ var Stepper = React40.forwardRef(
3300
3300
  );
3301
3301
  Stepper.displayName = "Stepper";
3302
3302
 
3303
+ // src/components/icons/ChevronLeftIcon.tsx
3304
+ import React41 from "react";
3305
+ function ChevronLeftIcon({ className, ...props }) {
3306
+ return /* @__PURE__ */ React41.createElement(
3307
+ "svg",
3308
+ {
3309
+ xmlns: "http://www.w3.org/2000/svg",
3310
+ viewBox: "0 0 20 20",
3311
+ fill: "currentColor",
3312
+ className,
3313
+ ...props
3314
+ },
3315
+ /* @__PURE__ */ React41.createElement(
3316
+ "path",
3317
+ {
3318
+ fillRule: "evenodd",
3319
+ d: "M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z",
3320
+ clipRule: "evenodd"
3321
+ }
3322
+ )
3323
+ );
3324
+ }
3325
+
3326
+ // src/components/icons/ChevronRightIcon.tsx
3327
+ import React42 from "react";
3328
+ function ChevronRightIcon({ className, ...props }) {
3329
+ return /* @__PURE__ */ React42.createElement(
3330
+ "svg",
3331
+ {
3332
+ xmlns: "http://www.w3.org/2000/svg",
3333
+ viewBox: "0 0 20 20",
3334
+ fill: "currentColor",
3335
+ className,
3336
+ ...props
3337
+ },
3338
+ /* @__PURE__ */ React42.createElement(
3339
+ "path",
3340
+ {
3341
+ fillRule: "evenodd",
3342
+ d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",
3343
+ clipRule: "evenodd"
3344
+ }
3345
+ )
3346
+ );
3347
+ }
3348
+
3349
+ // src/components/icons/CloseIcon.tsx
3350
+ import React43 from "react";
3351
+ function CloseIcon({ className, ...props }) {
3352
+ return /* @__PURE__ */ React43.createElement(
3353
+ "svg",
3354
+ {
3355
+ xmlns: "http://www.w3.org/2000/svg",
3356
+ viewBox: "0 0 20 20",
3357
+ fill: "currentColor",
3358
+ className,
3359
+ ...props
3360
+ },
3361
+ /* @__PURE__ */ React43.createElement(
3362
+ "path",
3363
+ {
3364
+ d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"
3365
+ }
3366
+ )
3367
+ );
3368
+ }
3369
+
3370
+ // src/components/icons/ExpandIcon.tsx
3371
+ import React44 from "react";
3372
+ function ExpandIcon({ className, ...props }) {
3373
+ return /* @__PURE__ */ React44.createElement(
3374
+ "svg",
3375
+ {
3376
+ xmlns: "http://www.w3.org/2000/svg",
3377
+ viewBox: "0 0 20 20",
3378
+ fill: "currentColor",
3379
+ className,
3380
+ ...props
3381
+ },
3382
+ /* @__PURE__ */ React44.createElement(
3383
+ "path",
3384
+ {
3385
+ d: "M13.28 7.78l3.22-3.22v2.69a.75.75 0 001.5 0v-4.5a.75.75 0 00-.75-.75h-4.5a.75.75 0 000 1.5h2.69l-3.22 3.22a.75.75 0 001.06 1.06zM2 17.25v-4.5a.75.75 0 011.5 0v2.69l3.22-3.22a.75.75 0 011.06 1.06L4.56 16.5h2.69a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75z"
3386
+ }
3387
+ )
3388
+ );
3389
+ }
3390
+
3391
+ // src/components/icons/HistoryIcon.tsx
3392
+ import React45 from "react";
3393
+ function HistoryIcon({ className, ...props }) {
3394
+ return /* @__PURE__ */ React45.createElement(
3395
+ "svg",
3396
+ {
3397
+ xmlns: "http://www.w3.org/2000/svg",
3398
+ viewBox: "0 0 20 20",
3399
+ fill: "currentColor",
3400
+ className,
3401
+ ...props
3402
+ },
3403
+ /* @__PURE__ */ React45.createElement(
3404
+ "path",
3405
+ {
3406
+ fillRule: "evenodd",
3407
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm.75-13a.75.75 0 00-1.5 0v5c0 .414.336.75.75.75h4a.75.75 0 000-1.5h-3.25V5z",
3408
+ clipRule: "evenodd"
3409
+ }
3410
+ )
3411
+ );
3412
+ }
3413
+
3414
+ // src/components/icons/LayersIcon.tsx
3415
+ import React46 from "react";
3416
+ function LayersIcon({ className, ...props }) {
3417
+ return /* @__PURE__ */ React46.createElement(
3418
+ "svg",
3419
+ {
3420
+ xmlns: "http://www.w3.org/2000/svg",
3421
+ viewBox: "0 0 20 20",
3422
+ fill: "currentColor",
3423
+ className,
3424
+ ...props
3425
+ },
3426
+ /* @__PURE__ */ React46.createElement(
3427
+ "path",
3428
+ {
3429
+ d: "M3.196 12.87l-.825.483a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.758 0l7.25-4.25a.75.75 0 000-1.294l-.825-.484-5.666 3.322a2.25 2.25 0 01-2.276 0L3.196 12.87z"
3430
+ }
3431
+ ),
3432
+ /* @__PURE__ */ React46.createElement(
3433
+ "path",
3434
+ {
3435
+ d: "M3.196 8.87l-.825.483a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.758 0l7.25-4.25a.75.75 0 000-1.294l-.825-.484-5.666 3.322a2.25 2.25 0 01-2.276 0L3.196 8.87z"
3436
+ }
3437
+ ),
3438
+ /* @__PURE__ */ React46.createElement(
3439
+ "path",
3440
+ {
3441
+ d: "M10.38 1.103a.75.75 0 00-.76 0l-7.25 4.25a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.76 0l7.25-4.25a.75.75 0 000-1.294l-7.25-4.25z"
3442
+ }
3443
+ )
3444
+ );
3445
+ }
3446
+
3447
+ // src/components/icons/PlusIcon.tsx
3448
+ import React47 from "react";
3449
+ function PlusIcon({ className, ...props }) {
3450
+ return /* @__PURE__ */ React47.createElement(
3451
+ "svg",
3452
+ {
3453
+ xmlns: "http://www.w3.org/2000/svg",
3454
+ viewBox: "0 0 20 20",
3455
+ fill: "currentColor",
3456
+ className,
3457
+ ...props
3458
+ },
3459
+ /* @__PURE__ */ React47.createElement(
3460
+ "path",
3461
+ {
3462
+ d: "M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z"
3463
+ }
3464
+ )
3465
+ );
3466
+ }
3467
+
3468
+ // src/components/icons/CheckSquareIcon.tsx
3469
+ import React48 from "react";
3470
+ function CheckSquareIcon({ className, ...props }) {
3471
+ return /* @__PURE__ */ React48.createElement(
3472
+ "div",
3473
+ {
3474
+ className: cx(
3475
+ "relative w-4 h-4 flex-shrink-0 border-2 border-gold bg-gold/10",
3476
+ className
3477
+ ),
3478
+ ...props
3479
+ },
3480
+ /* @__PURE__ */ React48.createElement(
3481
+ "svg",
3482
+ {
3483
+ viewBox: "0 0 16 16",
3484
+ fill: "none",
3485
+ className: "absolute inset-0 w-full h-full p-0.5"
3486
+ },
3487
+ /* @__PURE__ */ React48.createElement(
3488
+ "path",
3489
+ {
3490
+ d: "M3 8l3 3 7-7",
3491
+ stroke: "currentColor",
3492
+ strokeWidth: "2",
3493
+ strokeLinecap: "round",
3494
+ strokeLinejoin: "round",
3495
+ className: "text-gold"
3496
+ }
3497
+ )
3498
+ )
3499
+ );
3500
+ }
3501
+
3502
+ // src/components/icons/EmptySquareIcon.tsx
3503
+ import React49 from "react";
3504
+ function EmptySquareIcon({ className, ...props }) {
3505
+ return /* @__PURE__ */ React49.createElement(
3506
+ "div",
3507
+ {
3508
+ className: cx(
3509
+ "w-4 h-4 flex-shrink-0 border-2 border-ash/60",
3510
+ className
3511
+ ),
3512
+ ...props
3513
+ }
3514
+ );
3515
+ }
3516
+
3517
+ // src/components/icons/CrossSquareIcon.tsx
3518
+ import React50 from "react";
3519
+ function CrossSquareIcon({ className, variant = "cancelled", ...props }) {
3520
+ return /* @__PURE__ */ React50.createElement(
3521
+ "div",
3522
+ {
3523
+ className: cx(
3524
+ "relative w-4 h-4 flex-shrink-0 border-2",
3525
+ variant === "failed" ? "border-error/60 bg-error/5" : "border-ash/40 bg-ash/5",
3526
+ className
3527
+ ),
3528
+ ...props
3529
+ },
3530
+ /* @__PURE__ */ React50.createElement(
3531
+ "svg",
3532
+ {
3533
+ viewBox: "0 0 16 16",
3534
+ fill: "none",
3535
+ className: "absolute inset-0 w-full h-full p-0.5"
3536
+ },
3537
+ /* @__PURE__ */ React50.createElement(
3538
+ "path",
3539
+ {
3540
+ d: "M4 4l8 8M12 4l-8 8",
3541
+ stroke: "currentColor",
3542
+ strokeWidth: "2",
3543
+ strokeLinecap: "round",
3544
+ className: variant === "failed" ? "text-error/60" : "text-ash/40"
3545
+ }
3546
+ )
3547
+ )
3548
+ );
3549
+ }
3550
+
3551
+ // src/components/icons/SquareLoaderIcon.tsx
3552
+ import React51 from "react";
3553
+ function SquareLoaderIcon({ className, ...props }) {
3554
+ return /* @__PURE__ */ React51.createElement("div", { className: cx("relative w-4 h-4 flex-shrink-0", className), ...props }, /* @__PURE__ */ React51.createElement(
3555
+ "svg",
3556
+ {
3557
+ viewBox: "0 0 16 16",
3558
+ className: "w-full h-full animate-snake-spin"
3559
+ },
3560
+ /* @__PURE__ */ React51.createElement(
3561
+ "rect",
3562
+ {
3563
+ x: "1",
3564
+ y: "1",
3565
+ width: "14",
3566
+ height: "14",
3567
+ fill: "none",
3568
+ stroke: "currentColor",
3569
+ strokeWidth: "2",
3570
+ className: "text-ash/40"
3571
+ }
3572
+ ),
3573
+ /* @__PURE__ */ React51.createElement(
3574
+ "rect",
3575
+ {
3576
+ x: "1",
3577
+ y: "1",
3578
+ width: "14",
3579
+ height: "14",
3580
+ fill: "none",
3581
+ stroke: "currentColor",
3582
+ strokeWidth: "2",
3583
+ strokeDasharray: "14 42",
3584
+ strokeLinecap: "square",
3585
+ className: "text-gold animate-snake-travel"
3586
+ }
3587
+ )
3588
+ ));
3589
+ }
3590
+
3303
3591
  // src/components/Message.tsx
3304
- import React42, { useEffect as useEffect6, useRef as useRef5, useState as useState10 } from "react";
3592
+ import React53, { useEffect as useEffect6, useRef as useRef5, useState as useState10 } from "react";
3305
3593
 
3306
3594
  // src/components/MarkdownContent.tsx
3307
- import React41, { useMemo } from "react";
3595
+ import React52, { useMemo } from "react";
3308
3596
  import DOMPurify from "dompurify";
3309
3597
  var DEFAULT_SANITIZE_CONFIG = {
3310
3598
  ALLOWED_TAGS: [
@@ -3410,7 +3698,7 @@ function injectStreamingCursor(html, cursorClassName) {
3410
3698
  target.insertAdjacentHTML("beforeend", cursorHtml);
3411
3699
  return container.innerHTML;
3412
3700
  }
3413
- var MarkdownContent = React41.forwardRef(
3701
+ var MarkdownContent = React52.forwardRef(
3414
3702
  ({ className, content, sanitizeConfig, isStreaming, cursorClassName, ...rest }, ref) => {
3415
3703
  useDOMPurifySetup();
3416
3704
  const sanitizedHtml = useMemo(() => {
@@ -3424,7 +3712,7 @@ var MarkdownContent = React41.forwardRef(
3424
3712
  }
3425
3713
  return sanitized;
3426
3714
  }, [content, sanitizeConfig, isStreaming, cursorClassName]);
3427
- return /* @__PURE__ */ React41.createElement(
3715
+ return /* @__PURE__ */ React52.createElement(
3428
3716
  "div",
3429
3717
  {
3430
3718
  ref,
@@ -3442,7 +3730,7 @@ var variantStyles2 = {
3442
3730
  user: "bg-gold text-obsidian ml-auto",
3443
3731
  assistant: "bg-charcoal border border-ash text-white mr-auto"
3444
3732
  };
3445
- var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React42.createElement(
3733
+ var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React53.createElement(
3446
3734
  "button",
3447
3735
  {
3448
3736
  type: "button",
@@ -3458,7 +3746,7 @@ var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__
3458
3746
  },
3459
3747
  children
3460
3748
  );
3461
- var CopyIcon = () => /* @__PURE__ */ React42.createElement(
3749
+ var CopyIcon = () => /* @__PURE__ */ React53.createElement(
3462
3750
  "svg",
3463
3751
  {
3464
3752
  xmlns: "http://www.w3.org/2000/svg",
@@ -3470,10 +3758,10 @@ var CopyIcon = () => /* @__PURE__ */ React42.createElement(
3470
3758
  strokeLinejoin: "round",
3471
3759
  className: "w-3.5 h-3.5"
3472
3760
  },
3473
- /* @__PURE__ */ React42.createElement("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
3474
- /* @__PURE__ */ React42.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
3761
+ /* @__PURE__ */ React53.createElement("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
3762
+ /* @__PURE__ */ React53.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
3475
3763
  );
3476
- var CheckIcon = () => /* @__PURE__ */ React42.createElement(
3764
+ var CheckIcon = () => /* @__PURE__ */ React53.createElement(
3477
3765
  "svg",
3478
3766
  {
3479
3767
  xmlns: "http://www.w3.org/2000/svg",
@@ -3485,9 +3773,9 @@ var CheckIcon = () => /* @__PURE__ */ React42.createElement(
3485
3773
  strokeLinejoin: "round",
3486
3774
  className: "w-3.5 h-3.5 text-success"
3487
3775
  },
3488
- /* @__PURE__ */ React42.createElement("polyline", { points: "20 6 9 17 4 12" })
3776
+ /* @__PURE__ */ React53.createElement("polyline", { points: "20 6 9 17 4 12" })
3489
3777
  );
3490
- var PencilIcon = () => /* @__PURE__ */ React42.createElement(
3778
+ var PencilIcon = () => /* @__PURE__ */ React53.createElement(
3491
3779
  "svg",
3492
3780
  {
3493
3781
  xmlns: "http://www.w3.org/2000/svg",
@@ -3499,10 +3787,10 @@ var PencilIcon = () => /* @__PURE__ */ React42.createElement(
3499
3787
  strokeLinejoin: "round",
3500
3788
  className: "w-3.5 h-3.5"
3501
3789
  },
3502
- /* @__PURE__ */ React42.createElement("path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" }),
3503
- /* @__PURE__ */ React42.createElement("path", { d: "m15 5 4 4" })
3790
+ /* @__PURE__ */ React53.createElement("path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" }),
3791
+ /* @__PURE__ */ React53.createElement("path", { d: "m15 5 4 4" })
3504
3792
  );
3505
- var RetryIcon = () => /* @__PURE__ */ React42.createElement(
3793
+ var RetryIcon = () => /* @__PURE__ */ React53.createElement(
3506
3794
  "svg",
3507
3795
  {
3508
3796
  xmlns: "http://www.w3.org/2000/svg",
@@ -3514,12 +3802,12 @@ var RetryIcon = () => /* @__PURE__ */ React42.createElement(
3514
3802
  strokeLinejoin: "round",
3515
3803
  className: "w-3.5 h-3.5"
3516
3804
  },
3517
- /* @__PURE__ */ React42.createElement("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
3518
- /* @__PURE__ */ React42.createElement("path", { d: "M21 3v5h-5" }),
3519
- /* @__PURE__ */ React42.createElement("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
3520
- /* @__PURE__ */ React42.createElement("path", { d: "M8 16H3v5" })
3805
+ /* @__PURE__ */ React53.createElement("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
3806
+ /* @__PURE__ */ React53.createElement("path", { d: "M21 3v5h-5" }),
3807
+ /* @__PURE__ */ React53.createElement("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
3808
+ /* @__PURE__ */ React53.createElement("path", { d: "M8 16H3v5" })
3521
3809
  );
3522
- var ChevronLeftIcon = () => /* @__PURE__ */ React42.createElement(
3810
+ var ChevronLeftIcon2 = () => /* @__PURE__ */ React53.createElement(
3523
3811
  "svg",
3524
3812
  {
3525
3813
  xmlns: "http://www.w3.org/2000/svg",
@@ -3531,9 +3819,9 @@ var ChevronLeftIcon = () => /* @__PURE__ */ React42.createElement(
3531
3819
  strokeLinejoin: "round",
3532
3820
  className: "w-3 h-3"
3533
3821
  },
3534
- /* @__PURE__ */ React42.createElement("path", { d: "m15 18-6-6 6-6" })
3822
+ /* @__PURE__ */ React53.createElement("path", { d: "m15 18-6-6 6-6" })
3535
3823
  );
3536
- var ChevronRightIcon = () => /* @__PURE__ */ React42.createElement(
3824
+ var ChevronRightIcon2 = () => /* @__PURE__ */ React53.createElement(
3537
3825
  "svg",
3538
3826
  {
3539
3827
  xmlns: "http://www.w3.org/2000/svg",
@@ -3545,9 +3833,9 @@ var ChevronRightIcon = () => /* @__PURE__ */ React42.createElement(
3545
3833
  strokeLinejoin: "round",
3546
3834
  className: "w-3 h-3"
3547
3835
  },
3548
- /* @__PURE__ */ React42.createElement("path", { d: "m9 18 6-6-6-6" })
3836
+ /* @__PURE__ */ React53.createElement("path", { d: "m9 18 6-6-6-6" })
3549
3837
  );
3550
- var GitBranchIcon = () => /* @__PURE__ */ React42.createElement(
3838
+ var GitBranchIcon = () => /* @__PURE__ */ React53.createElement(
3551
3839
  "svg",
3552
3840
  {
3553
3841
  xmlns: "http://www.w3.org/2000/svg",
@@ -3559,12 +3847,12 @@ var GitBranchIcon = () => /* @__PURE__ */ React42.createElement(
3559
3847
  strokeLinejoin: "round",
3560
3848
  className: "w-3 h-3 mr-0.5 text-silver/50"
3561
3849
  },
3562
- /* @__PURE__ */ React42.createElement("line", { x1: "6", x2: "6", y1: "3", y2: "15" }),
3563
- /* @__PURE__ */ React42.createElement("circle", { cx: "18", cy: "6", r: "3" }),
3564
- /* @__PURE__ */ React42.createElement("circle", { cx: "6", cy: "18", r: "3" }),
3565
- /* @__PURE__ */ React42.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })
3850
+ /* @__PURE__ */ React53.createElement("line", { x1: "6", x2: "6", y1: "3", y2: "15" }),
3851
+ /* @__PURE__ */ React53.createElement("circle", { cx: "18", cy: "6", r: "3" }),
3852
+ /* @__PURE__ */ React53.createElement("circle", { cx: "6", cy: "18", r: "3" }),
3853
+ /* @__PURE__ */ React53.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })
3566
3854
  );
3567
- var XIcon = () => /* @__PURE__ */ React42.createElement(
3855
+ var XIcon = () => /* @__PURE__ */ React53.createElement(
3568
3856
  "svg",
3569
3857
  {
3570
3858
  xmlns: "http://www.w3.org/2000/svg",
@@ -3576,10 +3864,10 @@ var XIcon = () => /* @__PURE__ */ React42.createElement(
3576
3864
  strokeLinejoin: "round",
3577
3865
  className: "w-4 h-4"
3578
3866
  },
3579
- /* @__PURE__ */ React42.createElement("path", { d: "M18 6 6 18" }),
3580
- /* @__PURE__ */ React42.createElement("path", { d: "m6 6 12 12" })
3867
+ /* @__PURE__ */ React53.createElement("path", { d: "M18 6 6 18" }),
3868
+ /* @__PURE__ */ React53.createElement("path", { d: "m6 6 12 12" })
3581
3869
  );
3582
- var SendIcon = () => /* @__PURE__ */ React42.createElement(
3870
+ var SendIcon = () => /* @__PURE__ */ React53.createElement(
3583
3871
  "svg",
3584
3872
  {
3585
3873
  xmlns: "http://www.w3.org/2000/svg",
@@ -3591,10 +3879,10 @@ var SendIcon = () => /* @__PURE__ */ React42.createElement(
3591
3879
  strokeLinejoin: "round",
3592
3880
  className: "w-4 h-4"
3593
3881
  },
3594
- /* @__PURE__ */ React42.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }),
3595
- /* @__PURE__ */ React42.createElement("path", { d: "M22 2 11 13" })
3882
+ /* @__PURE__ */ React53.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }),
3883
+ /* @__PURE__ */ React53.createElement("path", { d: "M22 2 11 13" })
3596
3884
  );
3597
- var Message = React42.forwardRef(
3885
+ var Message = React53.forwardRef(
3598
3886
  ({
3599
3887
  variant = "assistant",
3600
3888
  className,
@@ -3666,7 +3954,7 @@ var Message = React42.forwardRef(
3666
3954
  textarea.style.height = "auto";
3667
3955
  textarea.style.height = `${textarea.scrollHeight}px`;
3668
3956
  };
3669
- return /* @__PURE__ */ React42.createElement(
3957
+ return /* @__PURE__ */ React53.createElement(
3670
3958
  "div",
3671
3959
  {
3672
3960
  ref,
@@ -3677,7 +3965,7 @@ var Message = React42.forwardRef(
3677
3965
  ),
3678
3966
  ...rest
3679
3967
  },
3680
- isUser && isEditing ? /* @__PURE__ */ React42.createElement("div", { className: "w-full max-w-11/12" }, /* @__PURE__ */ React42.createElement("div", { className: "relative bg-gold" }, /* @__PURE__ */ React42.createElement(
3968
+ isUser && isEditing ? /* @__PURE__ */ React53.createElement("div", { className: "w-full max-w-11/12" }, /* @__PURE__ */ React53.createElement("div", { className: "relative bg-gold" }, /* @__PURE__ */ React53.createElement(
3681
3969
  "textarea",
3682
3970
  {
3683
3971
  ref: textareaRef,
@@ -3687,7 +3975,7 @@ var Message = React42.forwardRef(
3687
3975
  className: "w-full bg-transparent text-obsidian px-3 py-2 pr-20 resize-none outline-none min-h-10 text-sm",
3688
3976
  rows: 1
3689
3977
  }
3690
- ), /* @__PURE__ */ React42.createElement("div", { className: "absolute right-1 top-1/2 -translate-y-1/2 flex gap-0.5" }, /* @__PURE__ */ React42.createElement(
3978
+ ), /* @__PURE__ */ React53.createElement("div", { className: "absolute right-1 top-1/2 -translate-y-1/2 flex gap-0.5" }, /* @__PURE__ */ React53.createElement(
3691
3979
  "button",
3692
3980
  {
3693
3981
  type: "button",
@@ -3695,8 +3983,8 @@ var Message = React42.forwardRef(
3695
3983
  className: "p-1.5 text-obsidian/60 hover:text-obsidian transition-colors",
3696
3984
  "aria-label": "Cancel edit"
3697
3985
  },
3698
- /* @__PURE__ */ React42.createElement(XIcon, null)
3699
- ), /* @__PURE__ */ React42.createElement(
3986
+ /* @__PURE__ */ React53.createElement(XIcon, null)
3987
+ ), /* @__PURE__ */ React53.createElement(
3700
3988
  "button",
3701
3989
  {
3702
3990
  type: "button",
@@ -3705,8 +3993,8 @@ var Message = React42.forwardRef(
3705
3993
  className: "p-1.5 text-obsidian/60 hover:text-obsidian transition-colors disabled:opacity-30",
3706
3994
  "aria-label": "Submit edit"
3707
3995
  },
3708
- /* @__PURE__ */ React42.createElement(SendIcon, null)
3709
- )))) : /* @__PURE__ */ React42.createElement(
3996
+ /* @__PURE__ */ React53.createElement(SendIcon, null)
3997
+ )))) : /* @__PURE__ */ React53.createElement(
3710
3998
  "div",
3711
3999
  {
3712
4000
  className: cx(
@@ -3714,7 +4002,7 @@ var Message = React42.forwardRef(
3714
4002
  variantStyles2[variant]
3715
4003
  )
3716
4004
  },
3717
- /* @__PURE__ */ React42.createElement(
4005
+ /* @__PURE__ */ React53.createElement(
3718
4006
  MarkdownContent,
3719
4007
  {
3720
4008
  content,
@@ -3724,17 +4012,17 @@ var Message = React42.forwardRef(
3724
4012
  }
3725
4013
  )
3726
4014
  ),
3727
- showActions && !isEditing && /* @__PURE__ */ React42.createElement("div", { className: cx(
4015
+ showActions && !isEditing && /* @__PURE__ */ React53.createElement("div", { className: cx(
3728
4016
  "flex items-center gap-0.5 mt-1",
3729
4017
  isUser ? "mr-1" : "ml-1"
3730
- ) }, actions.showCopy !== false && /* @__PURE__ */ React42.createElement(
4018
+ ) }, actions.showCopy !== false && /* @__PURE__ */ React53.createElement(
3731
4019
  ActionButton,
3732
4020
  {
3733
4021
  onClick: handleCopy,
3734
4022
  label: copied ? "Copied!" : "Copy message"
3735
4023
  },
3736
- copied ? /* @__PURE__ */ React42.createElement(CheckIcon, null) : /* @__PURE__ */ React42.createElement(CopyIcon, null)
3737
- ), isUser && actions.onEdit && /* @__PURE__ */ React42.createElement(ActionButton, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React42.createElement(PencilIcon, null)), !isUser && actions.onRetry && /* @__PURE__ */ React42.createElement(ActionButton, { onClick: actions.onRetry, label: "Regenerate response" }, /* @__PURE__ */ React42.createElement(RetryIcon, null)), showBranchNav && /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement("div", { className: "w-px h-4 bg-ash/40 mx-1" }), /* @__PURE__ */ React42.createElement("div", { className: "flex items-center gap-0.5 text-silver/70" }, /* @__PURE__ */ React42.createElement(GitBranchIcon, null), /* @__PURE__ */ React42.createElement(
4024
+ copied ? /* @__PURE__ */ React53.createElement(CheckIcon, null) : /* @__PURE__ */ React53.createElement(CopyIcon, null)
4025
+ ), isUser && actions.onEdit && /* @__PURE__ */ React53.createElement(ActionButton, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React53.createElement(PencilIcon, null)), !isUser && actions.onRetry && /* @__PURE__ */ React53.createElement(ActionButton, { onClick: actions.onRetry, label: "Regenerate response" }, /* @__PURE__ */ React53.createElement(RetryIcon, null)), showBranchNav && /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement("div", { className: "w-px h-4 bg-ash/40 mx-1" }), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-0.5 text-silver/70" }, /* @__PURE__ */ React53.createElement(GitBranchIcon, null), /* @__PURE__ */ React53.createElement(
3738
4026
  "button",
3739
4027
  {
3740
4028
  type: "button",
@@ -3746,8 +4034,8 @@ var Message = React42.forwardRef(
3746
4034
  ),
3747
4035
  "aria-label": "Previous branch"
3748
4036
  },
3749
- /* @__PURE__ */ React42.createElement(ChevronLeftIcon, null)
3750
- ), /* @__PURE__ */ React42.createElement("span", { className: "text-xs tabular-nums min-w-6 text-center" }, branchInfo.current, "/", branchInfo.total), /* @__PURE__ */ React42.createElement(
4037
+ /* @__PURE__ */ React53.createElement(ChevronLeftIcon2, null)
4038
+ ), /* @__PURE__ */ React53.createElement("span", { className: "text-xs tabular-nums min-w-6 text-center" }, branchInfo.current, "/", branchInfo.total), /* @__PURE__ */ React53.createElement(
3751
4039
  "button",
3752
4040
  {
3753
4041
  type: "button",
@@ -3759,7 +4047,7 @@ var Message = React42.forwardRef(
3759
4047
  ),
3760
4048
  "aria-label": "Next branch"
3761
4049
  },
3762
- /* @__PURE__ */ React42.createElement(ChevronRightIcon, null)
4050
+ /* @__PURE__ */ React53.createElement(ChevronRightIcon2, null)
3763
4051
  ))))
3764
4052
  );
3765
4053
  }
@@ -3767,15 +4055,15 @@ var Message = React42.forwardRef(
3767
4055
  Message.displayName = "Message";
3768
4056
 
3769
4057
  // src/components/StreamingCursor.tsx
3770
- import React43 from "react";
3771
- var StreamingCursor = React43.forwardRef(
4058
+ import React54 from "react";
4059
+ var StreamingCursor = React54.forwardRef(
3772
4060
  ({ className, variant = "line", ...rest }, ref) => {
3773
4061
  const variantStyles3 = {
3774
4062
  block: "w-2.5 h-cursor translate-y-cursor-offset",
3775
4063
  line: "w-0.5 h-cursor translate-y-cursor-offset",
3776
4064
  underscore: "w-2.5 h-0.5 self-end mb-0.5"
3777
4065
  };
3778
- return /* @__PURE__ */ React43.createElement(
4066
+ return /* @__PURE__ */ React54.createElement(
3779
4067
  "span",
3780
4068
  {
3781
4069
  ref,
@@ -3793,10 +4081,10 @@ var StreamingCursor = React43.forwardRef(
3793
4081
  StreamingCursor.displayName = "StreamingCursor";
3794
4082
 
3795
4083
  // src/components/chat/ChatInterface.tsx
3796
- import React51, { useCallback as useCallback15, useMemo as useMemo2, useState as useState16 } from "react";
4084
+ import React65, { useCallback as useCallback16, useMemo as useMemo3, useState as useState16 } from "react";
3797
4085
 
3798
4086
  // src/components/chat/ChatView.tsx
3799
- import React45, { useEffect as useEffect9 } from "react";
4087
+ import React56, { useEffect as useEffect9 } from "react";
3800
4088
 
3801
4089
  // src/components/chat/hooks/useScrollAnchor.ts
3802
4090
  import { useCallback as useCallback11, useRef as useRef6 } from "react";
@@ -3912,7 +4200,7 @@ function useAdaptiveSpacer(options = {}) {
3912
4200
  }
3913
4201
 
3914
4202
  // src/components/chat/ThinkingIndicator.tsx
3915
- import React44, { useEffect as useEffect8, useState as useState12 } from "react";
4203
+ import React55, { useEffect as useEffect8, useState as useState12 } from "react";
3916
4204
  var THINKING_PHRASES = [
3917
4205
  "Consulting the ancient tomes...",
3918
4206
  "Parsing the ineffable...",
@@ -3928,7 +4216,7 @@ var THINKING_PHRASES = [
3928
4216
  "Consulting my inner monologue...",
3929
4217
  "Summoning the muse..."
3930
4218
  ];
3931
- var ThinkingIndicator = React44.forwardRef(
4219
+ var ThinkingIndicator = React55.forwardRef(
3932
4220
  ({
3933
4221
  isVisible = true,
3934
4222
  phraseInterval = 2500,
@@ -3956,7 +4244,7 @@ var ThinkingIndicator = React44.forwardRef(
3956
4244
  if (!isVisible) {
3957
4245
  return null;
3958
4246
  }
3959
- return /* @__PURE__ */ React44.createElement(
4247
+ return /* @__PURE__ */ React55.createElement(
3960
4248
  "div",
3961
4249
  {
3962
4250
  ref,
@@ -3970,26 +4258,26 @@ var ThinkingIndicator = React44.forwardRef(
3970
4258
  "aria-live": "polite",
3971
4259
  ...rest
3972
4260
  },
3973
- /* @__PURE__ */ React44.createElement("div", { className: "flex gap-1", "aria-hidden": "true" }, /* @__PURE__ */ React44.createElement(
4261
+ /* @__PURE__ */ React55.createElement("div", { className: "flex gap-1", "aria-hidden": "true" }, /* @__PURE__ */ React55.createElement(
3974
4262
  "span",
3975
4263
  {
3976
4264
  className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
3977
4265
  style: { animationDelay: "0ms" }
3978
4266
  }
3979
- ), /* @__PURE__ */ React44.createElement(
4267
+ ), /* @__PURE__ */ React55.createElement(
3980
4268
  "span",
3981
4269
  {
3982
4270
  className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
3983
4271
  style: { animationDelay: "150ms" }
3984
4272
  }
3985
- ), /* @__PURE__ */ React44.createElement(
4273
+ ), /* @__PURE__ */ React55.createElement(
3986
4274
  "span",
3987
4275
  {
3988
4276
  className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
3989
4277
  style: { animationDelay: "300ms" }
3990
4278
  }
3991
4279
  )),
3992
- /* @__PURE__ */ React44.createElement(
4280
+ /* @__PURE__ */ React55.createElement(
3993
4281
  "span",
3994
4282
  {
3995
4283
  className: cx(
@@ -4005,7 +4293,7 @@ var ThinkingIndicator = React44.forwardRef(
4005
4293
  ThinkingIndicator.displayName = "ThinkingIndicator";
4006
4294
 
4007
4295
  // src/components/chat/ChatView.tsx
4008
- var ChatView = React45.forwardRef(
4296
+ var ChatView = React56.forwardRef(
4009
4297
  ({ messages, latestUserMessageIndex, isStreaming, isThinking, onScroll, className, ...rest }, ref) => {
4010
4298
  const { containerRef, anchorRef, scrollToAnchor } = useScrollAnchor({
4011
4299
  behavior: "smooth",
@@ -4027,7 +4315,7 @@ var ChatView = React45.forwardRef(
4027
4315
  return found;
4028
4316
  }, -1);
4029
4317
  const showThinking = isThinking && messages.length > 0 && messages[messages.length - 1]?.variant === "user";
4030
- return /* @__PURE__ */ React45.createElement(
4318
+ return /* @__PURE__ */ React56.createElement(
4031
4319
  "div",
4032
4320
  {
4033
4321
  ref: (node) => {
@@ -4047,7 +4335,7 @@ var ChatView = React45.forwardRef(
4047
4335
  ),
4048
4336
  ...rest
4049
4337
  },
4050
- /* @__PURE__ */ React45.createElement("div", { ref: contentRef, className: "relative flex flex-col gap-3" }, messages.map(({
4338
+ /* @__PURE__ */ React56.createElement("div", { ref: contentRef, className: "relative flex flex-col gap-3" }, messages.map(({
4051
4339
  id,
4052
4340
  variant,
4053
4341
  className: messageClassName,
@@ -4060,14 +4348,14 @@ var ChatView = React45.forwardRef(
4060
4348
  const isLastMessage = index === messages.length - 1;
4061
4349
  const showStreaming = isLastMessage && isStreaming && variant === "assistant";
4062
4350
  const isMessageStreaming = showStreaming || !!nodeIsStreaming;
4063
- return /* @__PURE__ */ React45.createElement(
4351
+ return /* @__PURE__ */ React56.createElement(
4064
4352
  "div",
4065
4353
  {
4066
4354
  key: id ?? `msg-${index}`,
4067
4355
  ref: isAnchor ? anchorRef : void 0,
4068
4356
  className: isAnchor ? "scroll-mt-4" : void 0
4069
4357
  },
4070
- /* @__PURE__ */ React45.createElement(
4358
+ /* @__PURE__ */ React56.createElement(
4071
4359
  Message,
4072
4360
  {
4073
4361
  variant,
@@ -4080,8 +4368,8 @@ var ChatView = React45.forwardRef(
4080
4368
  }
4081
4369
  )
4082
4370
  );
4083
- }), showThinking && /* @__PURE__ */ React45.createElement(ThinkingIndicator, { isVisible: true })),
4084
- /* @__PURE__ */ React45.createElement(
4371
+ }), showThinking && /* @__PURE__ */ React56.createElement(ThinkingIndicator, { isVisible: true })),
4372
+ /* @__PURE__ */ React56.createElement(
4085
4373
  "div",
4086
4374
  {
4087
4375
  ref: spacerRef,
@@ -4096,7 +4384,7 @@ var ChatView = React45.forwardRef(
4096
4384
  ChatView.displayName = "ChatView";
4097
4385
 
4098
4386
  // src/components/chat/ChatInput.tsx
4099
- import React46, { useCallback as useCallback13, useEffect as useEffect10, useRef as useRef8, useState as useState13 } from "react";
4387
+ import React57, { useCallback as useCallback13, useEffect as useEffect10, useRef as useRef8, useState as useState13 } from "react";
4100
4388
  import { Paperclip, Send, Square } from "lucide-react";
4101
4389
 
4102
4390
  // src/components/chat/types.ts
@@ -4265,7 +4553,7 @@ function isBranchPoint(tree, nodeId) {
4265
4553
  }
4266
4554
 
4267
4555
  // src/components/chat/ChatInput.tsx
4268
- var ChatInput = React46.forwardRef(
4556
+ var ChatInput = React57.forwardRef(
4269
4557
  ({
4270
4558
  position = "bottom",
4271
4559
  placeholder = "Send a message...",
@@ -4399,7 +4687,7 @@ var ChatInput = React46.forwardRef(
4399
4687
  const isCentered = position === "centered";
4400
4688
  const hasAttachments = attachments.length > 0;
4401
4689
  const canSubmit = value.trim() && !disabled && !isStreaming;
4402
- return /* @__PURE__ */ React46.createElement(
4690
+ return /* @__PURE__ */ React57.createElement(
4403
4691
  "div",
4404
4692
  {
4405
4693
  ref,
@@ -4411,8 +4699,8 @@ var ChatInput = React46.forwardRef(
4411
4699
  ),
4412
4700
  ...rest
4413
4701
  },
4414
- isCentered && helperText && /* @__PURE__ */ React46.createElement("p", { className: "text-silver text-sm mb-4 text-center" }, helperText),
4415
- /* @__PURE__ */ React46.createElement(
4702
+ isCentered && helperText && /* @__PURE__ */ React57.createElement("p", { className: "text-silver text-sm mb-4 text-center" }, helperText),
4703
+ /* @__PURE__ */ React57.createElement(
4416
4704
  "div",
4417
4705
  {
4418
4706
  className: cx(
@@ -4427,7 +4715,7 @@ var ChatInput = React46.forwardRef(
4427
4715
  onDragOver: showAttachmentButton ? handleDragOver : void 0,
4428
4716
  onDrop: showAttachmentButton ? handleDrop : void 0
4429
4717
  },
4430
- hasAttachments && /* @__PURE__ */ React46.createElement("div", { className: "px-3 pt-3 pb-1" }, /* @__PURE__ */ React46.createElement(
4718
+ hasAttachments && /* @__PURE__ */ React57.createElement("div", { className: "px-3 pt-3 pb-1" }, /* @__PURE__ */ React57.createElement(
4431
4719
  AttachmentPreview,
4432
4720
  {
4433
4721
  attachments,
@@ -4435,14 +4723,14 @@ var ChatInput = React46.forwardRef(
4435
4723
  removable: !isStreaming
4436
4724
  }
4437
4725
  )),
4438
- isDragOver && /* @__PURE__ */ React46.createElement(
4726
+ isDragOver && /* @__PURE__ */ React57.createElement(
4439
4727
  "div",
4440
4728
  {
4441
4729
  className: "absolute inset-0 bg-gold/10 flex items-center justify-center z-10 pointer-events-none"
4442
4730
  },
4443
- /* @__PURE__ */ React46.createElement("span", { className: "text-gold text-sm font-medium" }, "Drop files here")
4731
+ /* @__PURE__ */ React57.createElement("span", { className: "text-gold text-sm font-medium" }, "Drop files here")
4444
4732
  ),
4445
- /* @__PURE__ */ React46.createElement("div", { className: "flex items-end" }, showAttachmentButton && /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(
4733
+ /* @__PURE__ */ React57.createElement("div", { className: "flex items-end" }, showAttachmentButton && /* @__PURE__ */ React57.createElement(React57.Fragment, null, /* @__PURE__ */ React57.createElement(
4446
4734
  "button",
4447
4735
  {
4448
4736
  type: "button",
@@ -4454,8 +4742,8 @@ var ChatInput = React46.forwardRef(
4454
4742
  ),
4455
4743
  "aria-label": "Attach file"
4456
4744
  },
4457
- /* @__PURE__ */ React46.createElement(Paperclip, { className: "w-5 h-5" })
4458
- ), /* @__PURE__ */ React46.createElement(
4745
+ /* @__PURE__ */ React57.createElement(Paperclip, { className: "w-5 h-5" })
4746
+ ), /* @__PURE__ */ React57.createElement(
4459
4747
  "input",
4460
4748
  {
4461
4749
  ref: fileInputRef,
@@ -4466,7 +4754,7 @@ var ChatInput = React46.forwardRef(
4466
4754
  className: "hidden",
4467
4755
  "aria-hidden": "true"
4468
4756
  }
4469
- )), /* @__PURE__ */ React46.createElement(
4757
+ )), /* @__PURE__ */ React57.createElement(
4470
4758
  "textarea",
4471
4759
  {
4472
4760
  ref: textareaRef,
@@ -4484,7 +4772,7 @@ var ChatInput = React46.forwardRef(
4484
4772
  ),
4485
4773
  style: { maxHeight: 200 }
4486
4774
  }
4487
- ), isStreaming ? /* @__PURE__ */ React46.createElement(
4775
+ ), isStreaming ? /* @__PURE__ */ React57.createElement(
4488
4776
  "button",
4489
4777
  {
4490
4778
  type: "button",
@@ -4495,8 +4783,8 @@ var ChatInput = React46.forwardRef(
4495
4783
  ),
4496
4784
  "aria-label": "Stop generation"
4497
4785
  },
4498
- /* @__PURE__ */ React46.createElement(Square, { className: "w-5 h-5 fill-current" })
4499
- ) : /* @__PURE__ */ React46.createElement(
4786
+ /* @__PURE__ */ React57.createElement(Square, { className: "w-5 h-5 fill-current" })
4787
+ ) : /* @__PURE__ */ React57.createElement(
4500
4788
  "button",
4501
4789
  {
4502
4790
  type: "button",
@@ -4509,7 +4797,7 @@ var ChatInput = React46.forwardRef(
4509
4797
  ),
4510
4798
  "aria-label": "Send message"
4511
4799
  },
4512
- /* @__PURE__ */ React46.createElement(Send, { className: "w-5 h-5" })
4800
+ /* @__PURE__ */ React57.createElement(Send, { className: "w-5 h-5" })
4513
4801
  ))
4514
4802
  )
4515
4803
  );
@@ -4518,9 +4806,9 @@ var ChatInput = React46.forwardRef(
4518
4806
  ChatInput.displayName = "ChatInput";
4519
4807
 
4520
4808
  // src/components/chat/ConversationSidebar.tsx
4521
- import React47 from "react";
4522
- function HistoryIcon({ className }) {
4523
- return /* @__PURE__ */ React47.createElement(
4809
+ import React58 from "react";
4810
+ function HistoryIcon2({ className }) {
4811
+ return /* @__PURE__ */ React58.createElement(
4524
4812
  "svg",
4525
4813
  {
4526
4814
  xmlns: "http://www.w3.org/2000/svg",
@@ -4528,7 +4816,7 @@ function HistoryIcon({ className }) {
4528
4816
  fill: "currentColor",
4529
4817
  className
4530
4818
  },
4531
- /* @__PURE__ */ React47.createElement(
4819
+ /* @__PURE__ */ React58.createElement(
4532
4820
  "path",
4533
4821
  {
4534
4822
  fillRule: "evenodd",
@@ -4538,8 +4826,8 @@ function HistoryIcon({ className }) {
4538
4826
  )
4539
4827
  );
4540
4828
  }
4541
- function ChevronLeftIcon2({ className }) {
4542
- return /* @__PURE__ */ React47.createElement(
4829
+ function ChevronLeftIcon3({ className }) {
4830
+ return /* @__PURE__ */ React58.createElement(
4543
4831
  "svg",
4544
4832
  {
4545
4833
  xmlns: "http://www.w3.org/2000/svg",
@@ -4547,7 +4835,7 @@ function ChevronLeftIcon2({ className }) {
4547
4835
  fill: "currentColor",
4548
4836
  className
4549
4837
  },
4550
- /* @__PURE__ */ React47.createElement(
4838
+ /* @__PURE__ */ React58.createElement(
4551
4839
  "path",
4552
4840
  {
4553
4841
  fillRule: "evenodd",
@@ -4557,7 +4845,7 @@ function ChevronLeftIcon2({ className }) {
4557
4845
  )
4558
4846
  );
4559
4847
  }
4560
- var ConversationSidebar = React47.forwardRef(
4848
+ var ConversationSidebar = React58.forwardRef(
4561
4849
  ({
4562
4850
  conversations,
4563
4851
  isCollapsed = false,
@@ -4570,7 +4858,7 @@ var ConversationSidebar = React47.forwardRef(
4570
4858
  ...rest
4571
4859
  }, ref) => {
4572
4860
  if (isCollapsed) {
4573
- return /* @__PURE__ */ React47.createElement(
4861
+ return /* @__PURE__ */ React58.createElement(
4574
4862
  "div",
4575
4863
  {
4576
4864
  ref,
@@ -4581,7 +4869,7 @@ var ConversationSidebar = React47.forwardRef(
4581
4869
  ),
4582
4870
  ...rest
4583
4871
  },
4584
- /* @__PURE__ */ React47.createElement(
4872
+ /* @__PURE__ */ React58.createElement(
4585
4873
  "button",
4586
4874
  {
4587
4875
  onClick: onToggleCollapse,
@@ -4592,11 +4880,11 @@ var ConversationSidebar = React47.forwardRef(
4592
4880
  ),
4593
4881
  "aria-label": "Expand sidebar"
4594
4882
  },
4595
- /* @__PURE__ */ React47.createElement(HistoryIcon, { className: "w-5 h-5" })
4883
+ /* @__PURE__ */ React58.createElement(HistoryIcon2, { className: "w-5 h-5" })
4596
4884
  )
4597
4885
  );
4598
4886
  }
4599
- return /* @__PURE__ */ React47.createElement(
4887
+ return /* @__PURE__ */ React58.createElement(
4600
4888
  "div",
4601
4889
  {
4602
4890
  ref,
@@ -4607,10 +4895,10 @@ var ConversationSidebar = React47.forwardRef(
4607
4895
  "flex-shrink-0",
4608
4896
  className
4609
4897
  ),
4610
- style: width ? { width: `${width}px` } : void 0,
4898
+ style: width ? { width } : void 0,
4611
4899
  ...rest
4612
4900
  },
4613
- /* @__PURE__ */ React47.createElement(
4901
+ /* @__PURE__ */ React58.createElement(
4614
4902
  "div",
4615
4903
  {
4616
4904
  onMouseDown: onResizeStart,
@@ -4623,7 +4911,7 @@ var ConversationSidebar = React47.forwardRef(
4623
4911
  )
4624
4912
  }
4625
4913
  ),
4626
- /* @__PURE__ */ React47.createElement("div", { className: "p-3 border-b border-ash/40 flex-shrink-0 flex items-center gap-2" }, /* @__PURE__ */ React47.createElement(
4914
+ /* @__PURE__ */ React58.createElement("div", { className: "p-3 border-b border-ash/40 flex-shrink-0 flex items-center gap-2" }, /* @__PURE__ */ React58.createElement(
4627
4915
  "button",
4628
4916
  {
4629
4917
  onClick: onToggleCollapse,
@@ -4634,8 +4922,8 @@ var ConversationSidebar = React47.forwardRef(
4634
4922
  ),
4635
4923
  "aria-label": "Collapse sidebar"
4636
4924
  },
4637
- /* @__PURE__ */ React47.createElement(ChevronLeftIcon2, { className: "w-5 h-5" })
4638
- ), /* @__PURE__ */ React47.createElement(
4925
+ /* @__PURE__ */ React58.createElement(ChevronLeftIcon3, { className: "w-5 h-5" })
4926
+ ), /* @__PURE__ */ React58.createElement(
4639
4927
  "button",
4640
4928
  {
4641
4929
  onClick: onNewChat,
@@ -4647,7 +4935,7 @@ var ConversationSidebar = React47.forwardRef(
4647
4935
  "transition-colors duration-200"
4648
4936
  )
4649
4937
  },
4650
- /* @__PURE__ */ React47.createElement(
4938
+ /* @__PURE__ */ React58.createElement(
4651
4939
  "svg",
4652
4940
  {
4653
4941
  xmlns: "http://www.w3.org/2000/svg",
@@ -4655,16 +4943,16 @@ var ConversationSidebar = React47.forwardRef(
4655
4943
  fill: "currentColor",
4656
4944
  className: "w-4 h-4"
4657
4945
  },
4658
- /* @__PURE__ */ React47.createElement(
4946
+ /* @__PURE__ */ React58.createElement(
4659
4947
  "path",
4660
4948
  {
4661
4949
  d: "M10.75 4.75a.75.75 0 00-1.5 0v4.5h-4.5a.75.75 0 000 1.5h4.5v4.5a.75.75 0 001.5 0v-4.5h4.5a.75.75 0 000-1.5h-4.5v-4.5z"
4662
4950
  }
4663
4951
  )
4664
4952
  ),
4665
- /* @__PURE__ */ React47.createElement("span", { className: "text-sm font-medium" }, "New Chat")
4953
+ /* @__PURE__ */ React58.createElement("span", { className: "text-sm font-medium" }, "New Chat")
4666
4954
  )),
4667
- /* @__PURE__ */ React47.createElement("div", { className: "flex-1 overflow-y-auto py-2" }, conversations.length === 0 ? /* @__PURE__ */ React47.createElement("p", { className: "px-4 py-2 text-sm text-silver/60" }, "No conversations yet") : /* @__PURE__ */ React47.createElement("div", { className: "space-y-1 px-2" }, conversations.map((conversation) => /* @__PURE__ */ React47.createElement(
4955
+ /* @__PURE__ */ React58.createElement("div", { className: "flex-1 overflow-y-auto py-2" }, conversations.length === 0 ? /* @__PURE__ */ React58.createElement("p", { className: "px-4 py-2 text-sm text-silver/60" }, "No conversations yet") : /* @__PURE__ */ React58.createElement("div", { className: "space-y-1 px-2" }, conversations.map((conversation) => /* @__PURE__ */ React58.createElement(
4668
4956
  "button",
4669
4957
  {
4670
4958
  key: conversation.id,
@@ -4675,16 +4963,16 @@ var ConversationSidebar = React47.forwardRef(
4675
4963
  conversation.isActive ? "bg-ash/40 text-white" : "text-silver hover:bg-ash/20 hover:text-white"
4676
4964
  )
4677
4965
  },
4678
- /* @__PURE__ */ React47.createElement("p", { className: "text-sm font-medium truncate" }, conversation.title),
4679
- conversation.preview && /* @__PURE__ */ React47.createElement("p", { className: "text-xs text-silver/60 truncate mt-0.5" }, conversation.preview),
4680
- conversation.timestamp && /* @__PURE__ */ React47.createElement("p", { className: "text-xs text-silver/40 mt-1" }, conversation.timestamp)
4966
+ /* @__PURE__ */ React58.createElement("p", { className: "text-sm font-medium truncate" }, conversation.title),
4967
+ conversation.preview && /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-silver/60 truncate mt-0.5" }, conversation.preview),
4968
+ conversation.timestamp && /* @__PURE__ */ React58.createElement("p", { className: "text-xs text-silver/40 mt-1" }, conversation.timestamp)
4681
4969
  ))))
4682
4970
  );
4683
4971
  }
4684
4972
  );
4685
4973
  ConversationSidebar.displayName = "ConversationSidebar";
4686
- var CollapsedSidebarToggle = React47.forwardRef(({ onExpand, className, ...rest }, ref) => {
4687
- return /* @__PURE__ */ React47.createElement(
4974
+ var CollapsedSidebarToggle = React58.forwardRef(({ onExpand, className, ...rest }, ref) => {
4975
+ return /* @__PURE__ */ React58.createElement(
4688
4976
  "button",
4689
4977
  {
4690
4978
  ref,
@@ -4699,16 +4987,16 @@ var CollapsedSidebarToggle = React47.forwardRef(({ onExpand, className, ...rest
4699
4987
  "aria-label": "Expand sidebar",
4700
4988
  ...rest
4701
4989
  },
4702
- /* @__PURE__ */ React47.createElement(HistoryIcon, { className: "w-5 h-5" })
4990
+ /* @__PURE__ */ React58.createElement(HistoryIcon2, { className: "w-5 h-5" })
4703
4991
  );
4704
4992
  });
4705
4993
  CollapsedSidebarToggle.displayName = "CollapsedSidebarToggle";
4706
4994
 
4707
4995
  // src/components/chat/ArtifactsPanel.tsx
4708
- import React50, { useEffect as useEffect11, useState as useState14 } from "react";
4996
+ import React63, { useCallback as useCallback14, useEffect as useEffect11, useState as useState14 } from "react";
4709
4997
 
4710
4998
  // src/components/ImageCard.tsx
4711
- import React48 from "react";
4999
+ import React59 from "react";
4712
5000
  var ASPECT_RATIO_PRESETS = {
4713
5001
  landscape: "3 / 2",
4714
5002
  portrait: "2 / 3",
@@ -4720,7 +5008,7 @@ function resolveAspectRatio(ratio) {
4720
5008
  }
4721
5009
  return ratio.replace("/", " / ");
4722
5010
  }
4723
- var ImageCard = React48.forwardRef(
5011
+ var ImageCard = React59.forwardRef(
4724
5012
  ({
4725
5013
  src,
4726
5014
  alt,
@@ -4737,7 +5025,7 @@ var ImageCard = React48.forwardRef(
4737
5025
  }, ref) => {
4738
5026
  const hasAspectRatio = aspectRatio !== void 0;
4739
5027
  const isContain = objectFit === "contain";
4740
- return /* @__PURE__ */ React48.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-fit", className), ...props }, /* @__PURE__ */ React48.createElement(
5028
+ return /* @__PURE__ */ React59.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-fit", className), ...props }, /* @__PURE__ */ React59.createElement(
4741
5029
  "div",
4742
5030
  {
4743
5031
  className: cx(
@@ -4747,7 +5035,7 @@ var ImageCard = React48.forwardRef(
4747
5035
  ),
4748
5036
  style: hasAspectRatio ? { aspectRatio: resolveAspectRatio(aspectRatio) } : void 0
4749
5037
  },
4750
- /* @__PURE__ */ React48.createElement(
5038
+ /* @__PURE__ */ React59.createElement(
4751
5039
  "img",
4752
5040
  {
4753
5041
  src,
@@ -4760,20 +5048,20 @@ var ImageCard = React48.forwardRef(
4760
5048
  )
4761
5049
  }
4762
5050
  ),
4763
- overlay && /* @__PURE__ */ React48.createElement(
5051
+ overlay && /* @__PURE__ */ React59.createElement(
4764
5052
  "div",
4765
5053
  {
4766
5054
  className: "absolute inset-0 bg-obsidian/80 opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-center justify-center"
4767
5055
  },
4768
5056
  overlay
4769
5057
  )
4770
- ), (title || subtitle || children) && /* @__PURE__ */ React48.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ React48.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ React48.createElement("p", { className: "text-sm text-silver leading-normal" }, subtitle), children));
5058
+ ), (title || subtitle || children) && /* @__PURE__ */ React59.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ React59.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ React59.createElement("p", { className: "text-sm text-silver leading-normal" }, subtitle), children));
4771
5059
  }
4772
5060
  );
4773
5061
  ImageCard.displayName = "ImageCard";
4774
5062
 
4775
5063
  // src/components/VideoCard.tsx
4776
- import React49 from "react";
5064
+ import React60 from "react";
4777
5065
  import ReactPlayer2 from "react-player";
4778
5066
  var ASPECT_RATIO_PRESETS2 = {
4779
5067
  video: "16 / 9",
@@ -4786,7 +5074,7 @@ function resolveAspectRatio2(ratio) {
4786
5074
  }
4787
5075
  return ratio.replace("/", " / ");
4788
5076
  }
4789
- var VideoCard = React49.forwardRef(
5077
+ var VideoCard = React60.forwardRef(
4790
5078
  ({
4791
5079
  src,
4792
5080
  title,
@@ -4806,7 +5094,7 @@ var VideoCard = React49.forwardRef(
4806
5094
  ...props
4807
5095
  }, ref) => {
4808
5096
  const hasAspectRatio = aspectRatio !== void 0;
4809
- return /* @__PURE__ */ React49.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ React49.createElement(
5097
+ return /* @__PURE__ */ React60.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ React60.createElement(
4810
5098
  "div",
4811
5099
  {
4812
5100
  className: cx(
@@ -4815,7 +5103,7 @@ var VideoCard = React49.forwardRef(
4815
5103
  ),
4816
5104
  style: { aspectRatio: resolveAspectRatio2(aspectRatio) }
4817
5105
  },
4818
- /* @__PURE__ */ React49.createElement(
5106
+ /* @__PURE__ */ React60.createElement(
4819
5107
  ReactPlayer2,
4820
5108
  {
4821
5109
  src,
@@ -4831,7 +5119,7 @@ var VideoCard = React49.forwardRef(
4831
5119
  ...playerProps
4832
5120
  }
4833
5121
  )
4834
- ), (title || subtitle || children) && /* @__PURE__ */ React49.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ React49.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ React49.createElement(
5122
+ ), (title || subtitle || children) && /* @__PURE__ */ React60.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ React60.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ React60.createElement(
4835
5123
  "p",
4836
5124
  {
4837
5125
  className: "text-sm text-silver leading-normal mt-1"
@@ -4842,65 +5130,232 @@ var VideoCard = React49.forwardRef(
4842
5130
  );
4843
5131
  VideoCard.displayName = "VideoCard";
4844
5132
 
4845
- // src/components/chat/ArtifactsPanel.tsx
4846
- function LayersIcon({ className }) {
4847
- return /* @__PURE__ */ React50.createElement(
4848
- "svg",
4849
- {
4850
- xmlns: "http://www.w3.org/2000/svg",
4851
- viewBox: "0 0 20 20",
4852
- fill: "currentColor",
4853
- className
4854
- },
4855
- /* @__PURE__ */ React50.createElement(
4856
- "path",
5133
+ // src/components/AudioCard.tsx
5134
+ import React61 from "react";
5135
+ import ReactPlayer3 from "react-player";
5136
+ import { Music } from "lucide-react";
5137
+ var AudioCard = React61.forwardRef(
5138
+ ({
5139
+ src,
5140
+ title,
5141
+ subtitle,
5142
+ playing = false,
5143
+ controls = true,
5144
+ volume,
5145
+ muted = false,
5146
+ loop = false,
5147
+ mediaClassName,
5148
+ contentClassName,
5149
+ className,
5150
+ children,
5151
+ playerProps,
5152
+ ...props
5153
+ }, ref) => {
5154
+ return /* @__PURE__ */ React61.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ React61.createElement(
5155
+ "div",
4857
5156
  {
4858
- d: "M3.196 12.87l-.825.483a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.758 0l7.25-4.25a.75.75 0 000-1.294l-.825-.484-5.666 3.322a2.25 2.25 0 01-2.276 0L3.196 12.87z"
4859
- }
4860
- ),
4861
- /* @__PURE__ */ React50.createElement(
4862
- "path",
5157
+ className: cx(
5158
+ "relative bg-obsidian py-8 flex flex-col items-center justify-center border-b border-ash",
5159
+ mediaClassName
5160
+ )
5161
+ },
5162
+ /* @__PURE__ */ React61.createElement("div", { className: "mb-4 text-gold" }, /* @__PURE__ */ React61.createElement(Music, { size: 48 })),
5163
+ /* @__PURE__ */ React61.createElement("div", { className: "w-full px-4" }, /* @__PURE__ */ React61.createElement(
5164
+ ReactPlayer3,
5165
+ {
5166
+ src,
5167
+ playing,
5168
+ controls,
5169
+ volume,
5170
+ muted,
5171
+ loop,
5172
+ width: "100%",
5173
+ height: "40px",
5174
+ style: { backgroundColor: "transparent" },
5175
+ config: {
5176
+ file: {
5177
+ forceAudio: true,
5178
+ attributes: {
5179
+ style: { width: "100%", height: "40px" }
5180
+ }
5181
+ }
5182
+ },
5183
+ ...playerProps
5184
+ }
5185
+ ))
5186
+ ), (title || subtitle || children) && /* @__PURE__ */ React61.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ React61.createElement(
5187
+ "h4",
4863
5188
  {
4864
- d: "M3.196 8.87l-.825.483a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.758 0l7.25-4.25a.75.75 0 000-1.294l-.825-.484-5.666 3.322a2.25 2.25 0 01-2.276 0L3.196 8.87z"
4865
- }
4866
- ),
4867
- /* @__PURE__ */ React50.createElement(
4868
- "path",
5189
+ className: "text-lg font-semibold leading-tight"
5190
+ },
5191
+ title
5192
+ ), subtitle && /* @__PURE__ */ React61.createElement(
5193
+ "p",
4869
5194
  {
4870
- d: "M10.38 1.103a.75.75 0 00-.76 0l-7.25 4.25a.75.75 0 000 1.294l7.25 4.25a.75.75 0 00.76 0l7.25-4.25a.75.75 0 000-1.294l-7.25-4.25z"
4871
- }
4872
- )
4873
- );
5195
+ className: "text-sm text-silver leading-normal mt-1"
5196
+ },
5197
+ subtitle
5198
+ ), children));
5199
+ }
5200
+ );
5201
+ AudioCard.displayName = "AudioCard";
5202
+
5203
+ // src/components/ScriptCard.tsx
5204
+ import React62 from "react";
5205
+ function ScriptElementRenderer({ element }) {
5206
+ switch (element.type) {
5207
+ case "scene-heading":
5208
+ return /* @__PURE__ */ React62.createElement("p", { className: "mt-4 mb-2 font-bold uppercase text-gold text-xs tracking-wide" }, element.content);
5209
+ case "action":
5210
+ return /* @__PURE__ */ React62.createElement("p", { className: "my-2 text-silver text-xs leading-relaxed" }, element.content);
5211
+ case "character":
5212
+ return /* @__PURE__ */ React62.createElement("p", { className: "mt-4 mb-0.5 ml-8 font-bold text-white text-xs uppercase tracking-wide" }, element.content);
5213
+ case "parenthetical":
5214
+ return /* @__PURE__ */ React62.createElement("p", { className: "ml-6 text-silver/70 text-xs italic" }, "(", element.content, ")");
5215
+ case "dialogue":
5216
+ return /* @__PURE__ */ React62.createElement("p", { className: "ml-4 mr-8 text-silver text-xs leading-relaxed" }, element.content);
5217
+ case "transition":
5218
+ return /* @__PURE__ */ React62.createElement("p", { className: "mt-4 mb-2 text-right font-bold uppercase text-gold/80 text-xs tracking-wide" }, element.content);
5219
+ case "title":
5220
+ return /* @__PURE__ */ React62.createElement("p", { className: "mt-6 mb-2 text-center font-bold text-gold text-sm" }, element.content);
5221
+ case "subtitle":
5222
+ return /* @__PURE__ */ React62.createElement("p", { className: "text-center italic text-gold/70 text-xs" }, element.content);
5223
+ default:
5224
+ return null;
5225
+ }
4874
5226
  }
4875
- function ChevronRightIcon2({ className }) {
4876
- return /* @__PURE__ */ React50.createElement(
4877
- "svg",
4878
- {
4879
- xmlns: "http://www.w3.org/2000/svg",
4880
- viewBox: "0 0 20 20",
4881
- fill: "currentColor",
4882
- className
4883
- },
4884
- /* @__PURE__ */ React50.createElement(
4885
- "path",
5227
+ var ScriptCard = React62.forwardRef(
5228
+ ({ title, subtitle, elements, maxHeight = "16rem", className, style, ...rest }, ref) => {
5229
+ return /* @__PURE__ */ React62.createElement(
5230
+ "div",
4886
5231
  {
4887
- fillRule: "evenodd",
4888
- d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",
4889
- clipRule: "evenodd"
4890
- }
4891
- )
4892
- );
4893
- }
4894
- function ArtifactSkeleton({ type }) {
5232
+ ref,
5233
+ className: cx(
5234
+ "bg-charcoal border border-ash/40",
5235
+ className
5236
+ ),
5237
+ ...rest
5238
+ },
5239
+ (title || subtitle) && /* @__PURE__ */ React62.createElement("div", { className: "px-4 py-3 border-b border-ash/40" }, title && /* @__PURE__ */ React62.createElement("h4", { className: "text-sm font-heading text-gold" }, title), subtitle && /* @__PURE__ */ React62.createElement("p", { className: "text-xs text-silver/60 mt-0.5" }, subtitle)),
5240
+ /* @__PURE__ */ React62.createElement(
5241
+ "div",
5242
+ {
5243
+ className: "px-4 py-3 font-mono overflow-y-auto",
5244
+ style: { maxHeight, ...style }
5245
+ },
5246
+ elements.map((element, index) => /* @__PURE__ */ React62.createElement(ScriptElementRenderer, { key: index, element }))
5247
+ )
5248
+ );
5249
+ }
5250
+ );
5251
+ ScriptCard.displayName = "ScriptCard";
5252
+
5253
+ // src/components/chat/ArtifactsPanel.tsx
5254
+ function ArtifactSkeleton({ type, fullWidth }) {
5255
+ const wrapperClass = fullWidth ? "col-span-full" : "";
4895
5256
  if (type === "image") {
4896
- return /* @__PURE__ */ React50.createElement("div", { className: "overflow-hidden" }, /* @__PURE__ */ React50.createElement(Skeleton, { className: "w-full h-48" }), /* @__PURE__ */ React50.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React50.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React50.createElement(Skeleton, { className: "h-4 w-1/2" })));
5257
+ return /* @__PURE__ */ React63.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "w-full h-48" }), /* @__PURE__ */ React63.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-1/2" })));
4897
5258
  }
4898
5259
  if (type === "video") {
4899
- return /* @__PURE__ */ React50.createElement("div", { className: "overflow-hidden" }, /* @__PURE__ */ React50.createElement(Skeleton, { className: "w-full aspect-video" }), /* @__PURE__ */ React50.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React50.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React50.createElement(Skeleton, { className: "h-4 w-1/2" })));
5260
+ return /* @__PURE__ */ React63.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "w-full aspect-video" }), /* @__PURE__ */ React63.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-1/2" })));
5261
+ }
5262
+ if (type === "audio") {
5263
+ return /* @__PURE__ */ React63.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "w-full h-32" }), /* @__PURE__ */ React63.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-1/2" })));
4900
5264
  }
4901
- return /* @__PURE__ */ React50.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 space-y-2" }, /* @__PURE__ */ React50.createElement(Skeleton, { className: "h-5 w-1/2" }), /* @__PURE__ */ React50.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React50.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React50.createElement(Skeleton, { className: "h-4 w-3/4" }));
5265
+ if (type === "html") {
5266
+ return /* @__PURE__ */ React63.createElement("div", { className: cx("p-4 bg-charcoal border border-ash/40 space-y-2", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-1/3 mb-4" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-2/3" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-full" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-3/4" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-full" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-3 w-1/2" }));
5267
+ }
5268
+ return /* @__PURE__ */ React63.createElement("div", { className: cx("p-4 bg-charcoal border border-ash/40 space-y-2", wrapperClass) }, /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-5 w-1/2" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ React63.createElement(Skeleton, { className: "h-4 w-3/4" }));
4902
5269
  }
4903
- function ArtifactRenderer({ artifact, isLoading }) {
5270
+ function ArtifactModal({
5271
+ artifact,
5272
+ onClose
5273
+ }) {
5274
+ useEffect11(() => {
5275
+ const handleKeyDown = (e) => {
5276
+ if (e.key === "Escape") {
5277
+ onClose();
5278
+ }
5279
+ };
5280
+ document.addEventListener("keydown", handleKeyDown);
5281
+ return () => document.removeEventListener("keydown", handleKeyDown);
5282
+ }, [onClose]);
5283
+ const handleBackdropClick = useCallback14((e) => {
5284
+ if (e.target === e.currentTarget) {
5285
+ onClose();
5286
+ }
5287
+ }, [onClose]);
5288
+ return /* @__PURE__ */ React63.createElement(
5289
+ "div",
5290
+ {
5291
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-void/90 backdrop-blur-sm animate-fade-in",
5292
+ onClick: handleBackdropClick
5293
+ },
5294
+ /* @__PURE__ */ React63.createElement(
5295
+ "div",
5296
+ {
5297
+ className: "relative w-11/12 h-5/6 max-w-6xl bg-charcoal border border-ash/40 flex flex-col overflow-hidden"
5298
+ },
5299
+ /* @__PURE__ */ React63.createElement(
5300
+ "div",
5301
+ {
5302
+ className: "flex items-center justify-between p-4 border-b border-ash/40 shrink-0"
5303
+ },
5304
+ /* @__PURE__ */ React63.createElement("div", null, artifact.title && /* @__PURE__ */ React63.createElement("h3", { className: "text-sm font-semibold text-white" }, artifact.title), artifact.subtitle && /* @__PURE__ */ React63.createElement("p", { className: "text-xs text-silver" }, artifact.subtitle)),
5305
+ /* @__PURE__ */ React63.createElement(
5306
+ "button",
5307
+ {
5308
+ onClick: onClose,
5309
+ className: "p-2 text-silver hover:text-white hover:bg-ash/20 transition-colors",
5310
+ "aria-label": "Close modal"
5311
+ },
5312
+ /* @__PURE__ */ React63.createElement(CloseIcon, { className: "w-5 h-5" })
5313
+ )
5314
+ ),
5315
+ /* @__PURE__ */ React63.createElement("div", { className: "flex-1 overflow-auto p-4" }, artifact.type === "image" && /* @__PURE__ */ React63.createElement(
5316
+ "img",
5317
+ {
5318
+ src: artifact.src,
5319
+ alt: artifact.alt || "Artifact image",
5320
+ className: "max-w-full max-h-full object-contain mx-auto"
5321
+ }
5322
+ ), artifact.type === "video" && /* @__PURE__ */ React63.createElement(
5323
+ VideoCard,
5324
+ {
5325
+ src: artifact.src || "",
5326
+ aspectRatio: "video",
5327
+ controls: true,
5328
+ className: "max-w-full max-h-full mx-auto"
5329
+ }
5330
+ ), artifact.type === "audio" && /* @__PURE__ */ React63.createElement(
5331
+ AudioCard,
5332
+ {
5333
+ src: artifact.src || "",
5334
+ controls: true,
5335
+ className: "max-w-xl mx-auto"
5336
+ }
5337
+ ), artifact.type === "text" && /* @__PURE__ */ React63.createElement(
5338
+ MarkdownContent,
5339
+ {
5340
+ content: artifact.content || "",
5341
+ className: "prose-sm prose-invert max-w-none"
5342
+ }
5343
+ ), artifact.type === "html" && artifact.scriptElements && /* @__PURE__ */ React63.createElement(
5344
+ ScriptCard,
5345
+ {
5346
+ elements: artifact.scriptElements,
5347
+ maxHeight: "100%",
5348
+ className: "max-w-3xl mx-auto border-0"
5349
+ }
5350
+ ))
5351
+ )
5352
+ );
5353
+ }
5354
+ function ArtifactRenderer({
5355
+ artifact,
5356
+ isLoading,
5357
+ onExpand
5358
+ }) {
4904
5359
  const [imageLoaded, setImageLoaded] = useState14(false);
4905
5360
  const [minDelayPassed, setMinDelayPassed] = useState14(false);
4906
5361
  useEffect11(() => {
@@ -4911,76 +5366,146 @@ function ArtifactRenderer({ artifact, isLoading }) {
4911
5366
  }, 800);
4912
5367
  return () => clearTimeout(timer);
4913
5368
  }, [artifact.src, artifact.id]);
5369
+ const fullWidthClass = artifact.fullWidth ? "col-span-full" : "";
4914
5370
  if (isLoading || artifact.isPending) {
4915
- return /* @__PURE__ */ React50.createElement(ArtifactSkeleton, { type: artifact.type });
5371
+ return /* @__PURE__ */ React63.createElement(ArtifactSkeleton, { type: artifact.type, fullWidth: artifact.fullWidth });
4916
5372
  }
4917
- const showContent = imageLoaded && minDelayPassed;
5373
+ const showContent = artifact.type !== "image" || imageLoaded && minDelayPassed;
5374
+ const expandButton = onExpand && /* @__PURE__ */ React63.createElement(
5375
+ "button",
5376
+ {
5377
+ onClick: (e) => {
5378
+ e.stopPropagation();
5379
+ onExpand();
5380
+ },
5381
+ className: cx(
5382
+ "absolute top-2 right-2 z-10 p-1.5",
5383
+ "bg-obsidian/80 text-silver hover:text-white hover:bg-obsidian",
5384
+ "opacity-0 group-hover:opacity-100 transition-opacity"
5385
+ ),
5386
+ "aria-label": "Expand artifact"
5387
+ },
5388
+ /* @__PURE__ */ React63.createElement(ExpandIcon, { className: "w-4 h-4" })
5389
+ );
4918
5390
  switch (artifact.type) {
4919
5391
  case "image":
4920
- return /* @__PURE__ */ React50.createElement("div", { className: "relative" }, !showContent && /* @__PURE__ */ React50.createElement(ArtifactSkeleton, { type: "image" }), /* @__PURE__ */ React50.createElement(
4921
- ImageCard,
5392
+ return /* @__PURE__ */ React63.createElement(
5393
+ "div",
5394
+ {
5395
+ className: cx("relative group cursor-pointer", fullWidthClass),
5396
+ onClick: onExpand
5397
+ },
5398
+ !showContent && /* @__PURE__ */ React63.createElement(ArtifactSkeleton, { type: "image" }),
5399
+ expandButton,
5400
+ /* @__PURE__ */ React63.createElement(
5401
+ ImageCard,
5402
+ {
5403
+ src: artifact.src || "",
5404
+ alt: artifact.alt || "Artifact image",
5405
+ title: artifact.title,
5406
+ subtitle: artifact.subtitle,
5407
+ aspectRatio: "landscape",
5408
+ className: cx(
5409
+ "w-full transition-opacity duration-300",
5410
+ showContent ? "opacity-100" : "opacity-0 absolute inset-0"
5411
+ ),
5412
+ onLoad: () => setImageLoaded(true)
5413
+ }
5414
+ )
5415
+ );
5416
+ case "video":
5417
+ return /* @__PURE__ */ React63.createElement("div", { className: cx("relative group", fullWidthClass) }, expandButton, /* @__PURE__ */ React63.createElement(
5418
+ VideoCard,
4922
5419
  {
4923
5420
  src: artifact.src || "",
4924
- alt: artifact.alt || "Artifact image",
4925
5421
  title: artifact.title,
4926
5422
  subtitle: artifact.subtitle,
4927
- aspectRatio: "landscape",
4928
- className: cx(
4929
- "w-full transition-opacity duration-300",
4930
- showContent ? "opacity-100" : "opacity-0 absolute inset-0"
4931
- ),
4932
- onLoad: () => setImageLoaded(true)
5423
+ aspectRatio: "video",
5424
+ controls: true,
5425
+ className: "w-full"
4933
5426
  }
4934
5427
  ));
4935
- case "video":
4936
- return /* @__PURE__ */ React50.createElement(
4937
- VideoCard,
5428
+ case "audio":
5429
+ return /* @__PURE__ */ React63.createElement("div", { className: cx("relative group", fullWidthClass) }, expandButton, /* @__PURE__ */ React63.createElement(
5430
+ AudioCard,
4938
5431
  {
4939
5432
  src: artifact.src || "",
4940
5433
  title: artifact.title,
4941
5434
  subtitle: artifact.subtitle,
4942
- aspectRatio: "video",
4943
5435
  controls: true,
4944
5436
  className: "w-full"
4945
5437
  }
5438
+ ));
5439
+ case "html":
5440
+ return /* @__PURE__ */ React63.createElement(
5441
+ "div",
5442
+ {
5443
+ className: cx("relative group cursor-pointer", fullWidthClass),
5444
+ onClick: onExpand
5445
+ },
5446
+ expandButton,
5447
+ /* @__PURE__ */ React63.createElement(
5448
+ ScriptCard,
5449
+ {
5450
+ title: artifact.title,
5451
+ subtitle: artifact.subtitle,
5452
+ elements: artifact.scriptElements || [],
5453
+ maxHeight: "16rem",
5454
+ className: "w-full"
5455
+ }
5456
+ )
4946
5457
  );
4947
5458
  case "text":
4948
- return /* @__PURE__ */ React50.createElement("div", { className: "p-4 bg-charcoal border border-ash/40" }, artifact.title && /* @__PURE__ */ React50.createElement("h4", { className: "text-lg font-semibold text-white mb-2" }, artifact.title), /* @__PURE__ */ React50.createElement(
4949
- MarkdownContent,
5459
+ return /* @__PURE__ */ React63.createElement(
5460
+ "div",
4950
5461
  {
4951
- content: artifact.content || "",
4952
- className: "prose-sm prose-invert"
4953
- }
4954
- ));
5462
+ className: cx(
5463
+ "relative group cursor-pointer p-4 bg-charcoal border border-ash/40",
5464
+ fullWidthClass
5465
+ ),
5466
+ onClick: onExpand
5467
+ },
5468
+ expandButton,
5469
+ artifact.title && /* @__PURE__ */ React63.createElement("h4", { className: "text-sm font-semibold text-white mb-2" }, artifact.title),
5470
+ /* @__PURE__ */ React63.createElement(
5471
+ MarkdownContent,
5472
+ {
5473
+ content: artifact.content || "",
5474
+ className: "prose-sm prose-invert max-h-48 overflow-y-auto"
5475
+ }
5476
+ )
5477
+ );
4955
5478
  default:
4956
5479
  return null;
4957
5480
  }
4958
5481
  }
4959
- var ArtifactsPanel = React50.forwardRef(
5482
+ var ArtifactsPanel = React63.forwardRef(
4960
5483
  ({
4961
5484
  artifacts,
4962
5485
  isOpen = false,
4963
5486
  onClose,
4964
5487
  isLoading = false,
4965
5488
  width,
5489
+ widthPercent,
4966
5490
  onResizeStart,
4967
5491
  className,
4968
5492
  ...rest
4969
5493
  }, ref) => {
4970
- const columns = width && width > 800 ? 3 : width && width > 500 ? 2 : 1;
5494
+ const [expandedArtifact, setExpandedArtifact] = useState14(null);
5495
+ const columns = widthPercent && widthPercent > 55 ? 3 : widthPercent && widthPercent > 35 ? 2 : 1;
4971
5496
  if (!isOpen) {
4972
- return /* @__PURE__ */ React50.createElement(
5497
+ return /* @__PURE__ */ React63.createElement(
4973
5498
  "div",
4974
5499
  {
4975
5500
  ref,
4976
5501
  className: cx(
4977
5502
  "h-full bg-charcoal/80 border-l border-ash/40 flex flex-col items-center py-3",
4978
- "w-12 flex-shrink-0",
5503
+ "w-12 shrink-0",
4979
5504
  className
4980
5505
  ),
4981
5506
  ...rest
4982
5507
  },
4983
- /* @__PURE__ */ React50.createElement(
5508
+ /* @__PURE__ */ React63.createElement(
4984
5509
  "button",
4985
5510
  {
4986
5511
  onClick: onClose,
@@ -4992,8 +5517,8 @@ var ArtifactsPanel = React50.forwardRef(
4992
5517
  ),
4993
5518
  "aria-label": "Expand artifacts panel"
4994
5519
  },
4995
- /* @__PURE__ */ React50.createElement(LayersIcon, { className: "w-5 h-5" }),
4996
- artifacts.length > 0 && /* @__PURE__ */ React50.createElement(
5520
+ /* @__PURE__ */ React63.createElement(LayersIcon, { className: "w-5 h-5" }),
5521
+ artifacts.length > 0 && /* @__PURE__ */ React63.createElement(
4997
5522
  "span",
4998
5523
  {
4999
5524
  className: "absolute -top-1 -right-1 w-4 h-4 bg-gold text-obsidian text-xs font-medium flex items-center justify-center rounded-full"
@@ -5003,7 +5528,7 @@ var ArtifactsPanel = React50.forwardRef(
5003
5528
  )
5004
5529
  );
5005
5530
  }
5006
- return /* @__PURE__ */ React50.createElement(
5531
+ return /* @__PURE__ */ React63.createElement(React63.Fragment, null, /* @__PURE__ */ React63.createElement(
5007
5532
  "div",
5008
5533
  {
5009
5534
  ref,
@@ -5011,13 +5536,13 @@ var ArtifactsPanel = React50.forwardRef(
5011
5536
  className: cx(
5012
5537
  "h-full bg-charcoal/50 border-l border-ash/40 flex flex-col relative",
5013
5538
  !width && "w-96",
5014
- "flex-shrink-0",
5539
+ "shrink-0",
5015
5540
  className
5016
5541
  ),
5017
- style: width ? { width: `${width}px` } : void 0,
5542
+ style: width ? { width } : void 0,
5018
5543
  ...rest
5019
5544
  },
5020
- /* @__PURE__ */ React50.createElement(
5545
+ /* @__PURE__ */ React63.createElement(
5021
5546
  "div",
5022
5547
  {
5023
5548
  onMouseDown: onResizeStart,
@@ -5030,13 +5555,13 @@ var ArtifactsPanel = React50.forwardRef(
5030
5555
  )
5031
5556
  }
5032
5557
  ),
5033
- /* @__PURE__ */ React50.createElement(
5558
+ /* @__PURE__ */ React63.createElement(
5034
5559
  "div",
5035
5560
  {
5036
- className: "flex items-center justify-between p-4 border-b border-ash/40 flex-shrink-0"
5561
+ className: "flex items-center justify-between p-4 border-b border-ash/40 shrink-0"
5037
5562
  },
5038
- /* @__PURE__ */ React50.createElement("h3", { className: "text-lg font-semibold text-white" }, "Artifacts"),
5039
- /* @__PURE__ */ React50.createElement(
5563
+ /* @__PURE__ */ React63.createElement("h3", { className: "text-sm font-semibold text-white" }, "Artifacts"),
5564
+ /* @__PURE__ */ React63.createElement(
5040
5565
  "button",
5041
5566
  {
5042
5567
  onClick: onClose,
@@ -5047,10 +5572,10 @@ var ArtifactsPanel = React50.forwardRef(
5047
5572
  ),
5048
5573
  "aria-label": "Collapse artifacts panel"
5049
5574
  },
5050
- /* @__PURE__ */ React50.createElement(ChevronRightIcon2, { className: "w-5 h-5" })
5575
+ /* @__PURE__ */ React63.createElement(ChevronRightIcon, { className: "w-5 h-5" })
5051
5576
  )
5052
5577
  ),
5053
- /* @__PURE__ */ React50.createElement(
5578
+ /* @__PURE__ */ React63.createElement(
5054
5579
  "div",
5055
5580
  {
5056
5581
  "data-testid": "artifacts-grid",
@@ -5061,21 +5586,28 @@ var ArtifactsPanel = React50.forwardRef(
5061
5586
  columns === 3 && "grid-cols-3"
5062
5587
  )
5063
5588
  },
5064
- artifacts.length === 0 && !isLoading ? /* @__PURE__ */ React50.createElement("p", { className: "text-sm text-silver/60 text-center py-8" }, "No artifacts to display") : artifacts.map((artifact) => /* @__PURE__ */ React50.createElement(
5589
+ artifacts.length === 0 && !isLoading ? /* @__PURE__ */ React63.createElement("p", { className: "text-xs text-silver/60 text-center py-8" }, "No artifacts to display") : artifacts.map((artifact) => /* @__PURE__ */ React63.createElement(
5065
5590
  ArtifactRenderer,
5066
5591
  {
5067
5592
  key: artifact.id,
5068
5593
  artifact,
5069
- isLoading
5594
+ isLoading,
5595
+ onExpand: () => setExpandedArtifact(artifact)
5070
5596
  }
5071
5597
  ))
5072
5598
  )
5073
- );
5599
+ ), expandedArtifact && /* @__PURE__ */ React63.createElement(
5600
+ ArtifactModal,
5601
+ {
5602
+ artifact: expandedArtifact,
5603
+ onClose: () => setExpandedArtifact(null)
5604
+ }
5605
+ ));
5074
5606
  }
5075
5607
  );
5076
5608
  ArtifactsPanel.displayName = "ArtifactsPanel";
5077
- var ArtifactsPanelToggle = React50.forwardRef(({ artifactCount = 0, onExpand, className, ...rest }, ref) => {
5078
- return /* @__PURE__ */ React50.createElement(
5609
+ var ArtifactsPanelToggle = React63.forwardRef(({ artifactCount = 0, onExpand, className, ...rest }, ref) => {
5610
+ return /* @__PURE__ */ React63.createElement(
5079
5611
  "button",
5080
5612
  {
5081
5613
  ref,
@@ -5092,8 +5624,8 @@ var ArtifactsPanelToggle = React50.forwardRef(({ artifactCount = 0, onExpand, cl
5092
5624
  "aria-label": "Expand artifacts panel",
5093
5625
  ...rest
5094
5626
  },
5095
- /* @__PURE__ */ React50.createElement(LayersIcon, { className: "w-5 h-5" }),
5096
- artifactCount > 0 && /* @__PURE__ */ React50.createElement(
5627
+ /* @__PURE__ */ React63.createElement(LayersIcon, { className: "w-5 h-5" }),
5628
+ artifactCount > 0 && /* @__PURE__ */ React63.createElement(
5097
5629
  "span",
5098
5630
  {
5099
5631
  className: "absolute -top-1 -right-1 w-4 h-4 bg-gold text-obsidian text-xs font-medium flex items-center justify-center rounded-full"
@@ -5104,40 +5636,141 @@ var ArtifactsPanelToggle = React50.forwardRef(({ artifactCount = 0, onExpand, cl
5104
5636
  });
5105
5637
  ArtifactsPanelToggle.displayName = "ArtifactsPanelToggle";
5106
5638
 
5639
+ // src/components/chat/TodosList.tsx
5640
+ import React64, { useMemo as useMemo2 } from "react";
5641
+ function TaskIcon({ status }) {
5642
+ switch (status) {
5643
+ case "done":
5644
+ return /* @__PURE__ */ React64.createElement(CheckSquareIcon, null);
5645
+ case "in_progress":
5646
+ return /* @__PURE__ */ React64.createElement(SquareLoaderIcon, null);
5647
+ case "cancelled":
5648
+ return /* @__PURE__ */ React64.createElement(CrossSquareIcon, { variant: "cancelled" });
5649
+ case "failed":
5650
+ return /* @__PURE__ */ React64.createElement(CrossSquareIcon, { variant: "failed" });
5651
+ case "pending":
5652
+ default:
5653
+ return /* @__PURE__ */ React64.createElement(EmptySquareIcon, null);
5654
+ }
5655
+ }
5656
+ function sortTasks(tasks) {
5657
+ const normal = [];
5658
+ const bottomItems = [];
5659
+ for (const task of tasks) {
5660
+ if (task.status === "cancelled" || task.status === "failed") {
5661
+ bottomItems.push(task);
5662
+ } else {
5663
+ normal.push(task);
5664
+ }
5665
+ }
5666
+ return [...normal, ...bottomItems];
5667
+ }
5668
+ function TaskItem({ task, depth = 0 }) {
5669
+ const isTerminal = task.status === "done" || task.status === "cancelled" || task.status === "failed";
5670
+ const isSubtle = task.status === "cancelled" || task.status === "failed";
5671
+ const showSubtasks = (task.status === "in_progress" || task.status === "done") && task.subtasks && task.subtasks.length > 0;
5672
+ const sortedSubtasks = showSubtasks ? sortTasks(task.subtasks) : [];
5673
+ return /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React64.createElement(
5674
+ "div",
5675
+ {
5676
+ className: cx(
5677
+ "flex items-center gap-2 py-1",
5678
+ depth > 0 && "pl-6"
5679
+ )
5680
+ },
5681
+ /* @__PURE__ */ React64.createElement(TaskIcon, { status: task.status }),
5682
+ /* @__PURE__ */ React64.createElement(
5683
+ "span",
5684
+ {
5685
+ className: cx(
5686
+ "text-xs leading-tight transition-colors",
5687
+ isTerminal && "line-through",
5688
+ isSubtle ? "text-silver/50" : "text-silver",
5689
+ task.status === "in_progress" && "text-white",
5690
+ task.status === "done" && "text-silver/70"
5691
+ )
5692
+ },
5693
+ task.label,
5694
+ task.status === "cancelled" && /* @__PURE__ */ React64.createElement("span", { className: "text-silver/40 ml-1" }, "(cancelled)"),
5695
+ task.status === "failed" && /* @__PURE__ */ React64.createElement("span", { className: "text-error/60 ml-1" }, "(failed)")
5696
+ )
5697
+ ), showSubtasks && /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col" }, sortedSubtasks.map((subtask) => /* @__PURE__ */ React64.createElement(TaskItem, { key: subtask.id, task: subtask, depth: depth + 1 }))));
5698
+ }
5699
+ var TodosList = React64.forwardRef(
5700
+ ({ tasks, title = "Tasks", className, ...rest }, ref) => {
5701
+ const sortedTasks = useMemo2(() => sortTasks(tasks), [tasks]);
5702
+ const countCompleted = (taskList) => {
5703
+ let count = 0;
5704
+ for (const task of taskList) {
5705
+ if (task.status === "done") count++;
5706
+ if (task.subtasks) count += countCompleted(task.subtasks);
5707
+ }
5708
+ return count;
5709
+ };
5710
+ const countTotal = (taskList) => {
5711
+ let count = taskList.length;
5712
+ for (const task of taskList) {
5713
+ if (task.subtasks) count += countTotal(task.subtasks);
5714
+ }
5715
+ return count;
5716
+ };
5717
+ if (tasks.length === 0) {
5718
+ return null;
5719
+ }
5720
+ return /* @__PURE__ */ React64.createElement(
5721
+ "div",
5722
+ {
5723
+ ref,
5724
+ className: cx(
5725
+ "flex flex-col bg-charcoal/30 border-l border-ash/40",
5726
+ "overflow-hidden",
5727
+ className
5728
+ ),
5729
+ style: { maxHeight: "25vh" },
5730
+ ...rest
5731
+ },
5732
+ /* @__PURE__ */ React64.createElement("div", { className: "flex items-center justify-between px-4 py-2 border-b border-ash/40 flex-shrink-0" }, /* @__PURE__ */ React64.createElement("h4", { className: "text-xs font-medium text-white" }, title), /* @__PURE__ */ React64.createElement("span", { className: "text-xs text-silver/60" }, countCompleted(tasks), "/", countTotal(tasks))),
5733
+ /* @__PURE__ */ React64.createElement("div", { className: "flex-1 overflow-y-auto px-4 py-2" }, sortedTasks.map((task) => /* @__PURE__ */ React64.createElement(TaskItem, { key: task.id, task })))
5734
+ );
5735
+ }
5736
+ );
5737
+ TodosList.displayName = "TodosList";
5738
+
5107
5739
  // src/components/chat/hooks/useResizable.ts
5108
- import { useCallback as useCallback14, useEffect as useEffect12, useRef as useRef9, useState as useState15 } from "react";
5740
+ import { useCallback as useCallback15, useEffect as useEffect12, useRef as useRef9, useState as useState15 } from "react";
5109
5741
  function useResizable({
5110
- initialWidth,
5111
- minWidth,
5112
- maxWidth,
5742
+ initialWidthPercent,
5743
+ minWidthPercent,
5744
+ maxWidthPercent,
5113
5745
  direction
5114
5746
  }) {
5115
- const [width, setWidth] = useState15(initialWidth);
5747
+ const [widthPercent, setWidthPercent] = useState15(initialWidthPercent);
5116
5748
  const [isResizing, setIsResizing] = useState15(false);
5117
5749
  const lastX = useRef9(null);
5118
- const startResizing = useCallback14((e) => {
5750
+ const startResizing = useCallback15((e) => {
5119
5751
  e.preventDefault();
5120
5752
  setIsResizing(true);
5121
5753
  lastX.current = e.clientX;
5122
5754
  }, []);
5123
- const stopResizing = useCallback14(() => {
5755
+ const stopResizing = useCallback15(() => {
5124
5756
  setIsResizing(false);
5125
5757
  lastX.current = null;
5126
5758
  }, []);
5127
- const resize = useCallback14(
5759
+ const resize = useCallback15(
5128
5760
  (e) => {
5129
5761
  if (!isResizing || lastX.current === null) {
5130
5762
  return;
5131
5763
  }
5132
5764
  const deltaX = e.clientX - lastX.current;
5133
5765
  const factor = direction === "right" ? 1 : -1;
5134
- setWidth((prevWidth) => {
5135
- const newWidth = prevWidth + deltaX * factor;
5136
- return Math.min(Math.max(newWidth, minWidth), maxWidth);
5766
+ const deltaPercent = deltaX / window.innerWidth * 100;
5767
+ setWidthPercent((prevPercent) => {
5768
+ const newPercent = prevPercent + deltaPercent * factor;
5769
+ return Math.min(Math.max(newPercent, minWidthPercent), maxWidthPercent);
5137
5770
  });
5138
5771
  lastX.current = e.clientX;
5139
5772
  },
5140
- [isResizing, direction, minWidth, maxWidth]
5773
+ [isResizing, direction, minWidthPercent, maxWidthPercent]
5141
5774
  );
5142
5775
  useEffect12(() => {
5143
5776
  if (isResizing) {
@@ -5158,11 +5791,12 @@ function useResizable({
5158
5791
  document.body.style.userSelect = "";
5159
5792
  };
5160
5793
  }, [isResizing, resize, stopResizing]);
5161
- return { width, isResizing, startResizing };
5794
+ const width = `${widthPercent}vw`;
5795
+ return { width, widthPercent, isResizing, startResizing };
5162
5796
  }
5163
5797
 
5164
5798
  // src/components/chat/ChatInterface.tsx
5165
- var ChatInterface = React51.forwardRef(
5799
+ var ChatInterface = React65.forwardRef(
5166
5800
  ({
5167
5801
  messages = [],
5168
5802
  conversationTree,
@@ -5187,6 +5821,8 @@ var ChatInterface = React51.forwardRef(
5187
5821
  artifacts = [],
5188
5822
  isArtifactsPanelOpen,
5189
5823
  onArtifactsPanelOpenChange,
5824
+ tasks = [],
5825
+ tasksTitle,
5190
5826
  className,
5191
5827
  ...rest
5192
5828
  }, ref) => {
@@ -5196,26 +5832,25 @@ var ChatInterface = React51.forwardRef(
5196
5832
  width: sidebarWidth,
5197
5833
  startResizing: startResizingSidebar
5198
5834
  } = useResizable({
5199
- initialWidth: 256,
5200
- // w-64
5201
- minWidth: 200,
5202
- maxWidth: 500,
5835
+ initialWidthPercent: 15,
5836
+ minWidthPercent: 12,
5837
+ maxWidthPercent: 25,
5203
5838
  direction: "right"
5204
5839
  });
5205
5840
  const {
5206
5841
  width: artifactsWidth,
5842
+ widthPercent: artifactsWidthPercent,
5207
5843
  startResizing: startResizingArtifacts
5208
5844
  } = useResizable({
5209
- initialWidth: 384,
5210
- // w-96
5211
- minWidth: 300,
5212
- maxWidth: 1200,
5845
+ initialWidthPercent: 50,
5846
+ minWidthPercent: 25,
5847
+ maxWidthPercent: 70,
5213
5848
  direction: "left"
5214
5849
  });
5215
5850
  const isPanelControlled = isArtifactsPanelOpen !== void 0;
5216
5851
  const artifactsPanelOpen = isPanelControlled ? isArtifactsPanelOpen : internalPanelOpen;
5217
5852
  const isTreeMode = !!conversationTree;
5218
- const effectiveMessages = useMemo2(() => {
5853
+ const effectiveMessages = useMemo3(() => {
5219
5854
  if (isTreeMode && conversationTree) {
5220
5855
  const pathNodes = getActivePathMessages(conversationTree);
5221
5856
  return pathNodes.map((node) => ({
@@ -5227,7 +5862,7 @@ var ChatInterface = React51.forwardRef(
5227
5862
  }
5228
5863
  return messages;
5229
5864
  }, [isTreeMode, conversationTree, messages]);
5230
- const latestUserMessageIndex = useMemo2(() => {
5865
+ const latestUserMessageIndex = useMemo3(() => {
5231
5866
  for (let i = effectiveMessages.length - 1; i >= 0; i--) {
5232
5867
  if (effectiveMessages[i].variant === "user") {
5233
5868
  return i;
@@ -5235,15 +5870,15 @@ var ChatInterface = React51.forwardRef(
5235
5870
  }
5236
5871
  return -1;
5237
5872
  }, [effectiveMessages]);
5238
- const hasPendingArtifact = useMemo2(() => {
5873
+ const hasPendingArtifact = useMemo3(() => {
5239
5874
  return artifacts.some((a) => a.isPending);
5240
5875
  }, [artifacts]);
5241
- React51.useEffect(() => {
5876
+ React65.useEffect(() => {
5242
5877
  if (!isPanelControlled && artifacts.length > 0) {
5243
5878
  setInternalPanelOpen(true);
5244
5879
  }
5245
5880
  }, [artifacts.length, isPanelControlled]);
5246
- const handleBranchSwitch = useCallback15(
5881
+ const handleBranchSwitch = useCallback16(
5247
5882
  (nodeId, direction) => {
5248
5883
  if (!isTreeMode || !conversationTree || !onTreeChange) {
5249
5884
  return;
@@ -5253,7 +5888,7 @@ var ChatInterface = React51.forwardRef(
5253
5888
  },
5254
5889
  [isTreeMode, conversationTree, onTreeChange]
5255
5890
  );
5256
- const displayMessages = useMemo2(() => {
5891
+ const displayMessages = useMemo3(() => {
5257
5892
  return effectiveMessages.map((msg) => {
5258
5893
  let branchInfo = void 0;
5259
5894
  if (isTreeMode && conversationTree) {
@@ -5287,16 +5922,16 @@ var ChatInterface = React51.forwardRef(
5287
5922
  onRetryMessage,
5288
5923
  handleBranchSwitch
5289
5924
  ]);
5290
- const handleSubmit = useCallback15(
5925
+ const handleSubmit = useCallback16(
5291
5926
  (message, attachments) => {
5292
5927
  onMessageSubmit?.(message, attachments);
5293
5928
  },
5294
5929
  [onMessageSubmit]
5295
5930
  );
5296
- const toggleSidebar = useCallback15(() => {
5931
+ const toggleSidebar = useCallback16(() => {
5297
5932
  setSidebarCollapsed((prev) => !prev);
5298
5933
  }, []);
5299
- const toggleArtifactsPanel = useCallback15(() => {
5934
+ const toggleArtifactsPanel = useCallback16(() => {
5300
5935
  if (isPanelControlled) {
5301
5936
  onArtifactsPanelOpenChange?.(!artifactsPanelOpen);
5302
5937
  } else {
@@ -5304,14 +5939,14 @@ var ChatInterface = React51.forwardRef(
5304
5939
  }
5305
5940
  }, [isPanelControlled, artifactsPanelOpen, onArtifactsPanelOpenChange]);
5306
5941
  const isEmpty = effectiveMessages.length === 0;
5307
- return /* @__PURE__ */ React51.createElement(
5942
+ return /* @__PURE__ */ React65.createElement(
5308
5943
  "div",
5309
5944
  {
5310
5945
  ref,
5311
5946
  className: cx("flex h-full w-full bg-obsidian overflow-hidden", className),
5312
5947
  ...rest
5313
5948
  },
5314
- /* @__PURE__ */ React51.createElement(
5949
+ /* @__PURE__ */ React65.createElement(
5315
5950
  ConversationSidebar,
5316
5951
  {
5317
5952
  conversations,
@@ -5323,16 +5958,16 @@ var ChatInterface = React51.forwardRef(
5323
5958
  onResizeStart: startResizingSidebar
5324
5959
  }
5325
5960
  ),
5326
- /* @__PURE__ */ React51.createElement("div", { className: "flex-1 flex flex-col min-w-0 relative" }, /* @__PURE__ */ React51.createElement("div", { className: cx(
5961
+ /* @__PURE__ */ React65.createElement("div", { className: "flex-1 flex flex-col min-w-0 relative" }, /* @__PURE__ */ React65.createElement("div", { className: cx(
5327
5962
  "flex-1 flex flex-col min-h-0 relative",
5328
5963
  isEmpty ? "justify-center" : "justify-start"
5329
- ) }, /* @__PURE__ */ React51.createElement("div", { className: cx(
5964
+ ) }, /* @__PURE__ */ React65.createElement("div", { className: cx(
5330
5965
  "transition-all duration-500 ease-in-out",
5331
5966
  isEmpty ? "flex-1" : "flex-zero"
5332
- ) }), /* @__PURE__ */ React51.createElement("div", { className: cx(
5967
+ ) }), /* @__PURE__ */ React65.createElement("div", { className: cx(
5333
5968
  "transition-all duration-500 ease-in-out overflow-hidden flex flex-col",
5334
5969
  isEmpty ? "flex-zero opacity-0" : "flex-1 opacity-100"
5335
- ) }, /* @__PURE__ */ React51.createElement(
5970
+ ) }, /* @__PURE__ */ React65.createElement(
5336
5971
  ChatView,
5337
5972
  {
5338
5973
  messages: displayMessages,
@@ -5341,10 +5976,10 @@ var ChatInterface = React51.forwardRef(
5341
5976
  isThinking,
5342
5977
  className: "flex-1"
5343
5978
  }
5344
- )), /* @__PURE__ */ React51.createElement("div", { className: cx(
5979
+ )), /* @__PURE__ */ React65.createElement("div", { className: cx(
5345
5980
  "transition-all duration-500 ease-in-out z-10 w-full",
5346
5981
  isEmpty ? "p-4" : "shrink-0 p-4 border-t border-ash/40 bg-obsidian"
5347
- ) }, isEmpty && emptyState ? /* @__PURE__ */ React51.createElement("div", { className: "flex justify-center" }, emptyState) : /* @__PURE__ */ React51.createElement(
5982
+ ) }, isEmpty && emptyState ? /* @__PURE__ */ React65.createElement("div", { className: "flex justify-center" }, emptyState) : /* @__PURE__ */ React65.createElement(
5348
5983
  ChatInput,
5349
5984
  {
5350
5985
  position: isEmpty ? "centered" : "bottom",
@@ -5358,11 +5993,11 @@ var ChatInterface = React51.forwardRef(
5358
5993
  attachments: propsAttachments,
5359
5994
  onAttachmentsChange
5360
5995
  }
5361
- )), /* @__PURE__ */ React51.createElement("div", { className: cx(
5996
+ )), /* @__PURE__ */ React65.createElement("div", { className: cx(
5362
5997
  "transition-all duration-500 ease-in-out",
5363
5998
  isEmpty ? "flex-1" : "flex-zero"
5364
5999
  ) }))),
5365
- /* @__PURE__ */ React51.createElement(
6000
+ /* @__PURE__ */ React65.createElement("div", { className: "h-full flex flex-col flex-shrink-0" }, /* @__PURE__ */ React65.createElement("div", { className: "flex-1 min-h-0" }, /* @__PURE__ */ React65.createElement(
5366
6001
  ArtifactsPanel,
5367
6002
  {
5368
6003
  artifacts,
@@ -5370,18 +6005,27 @@ var ChatInterface = React51.forwardRef(
5370
6005
  onClose: toggleArtifactsPanel,
5371
6006
  isLoading: isStreaming && hasPendingArtifact,
5372
6007
  width: artifactsWidth,
5373
- onResizeStart: startResizingArtifacts
6008
+ widthPercent: artifactsWidthPercent,
6009
+ onResizeStart: startResizingArtifacts,
6010
+ className: "h-full"
5374
6011
  }
5375
- )
6012
+ )), tasks.length > 0 && artifactsPanelOpen && /* @__PURE__ */ React65.createElement(
6013
+ TodosList,
6014
+ {
6015
+ tasks,
6016
+ title: tasksTitle,
6017
+ style: { width: artifactsWidth }
6018
+ }
6019
+ ))
5376
6020
  );
5377
6021
  }
5378
6022
  );
5379
6023
  ChatInterface.displayName = "ChatInterface";
5380
6024
 
5381
6025
  // src/components/chat/MessageActions.tsx
5382
- import React52, { useCallback as useCallback16, useState as useState17 } from "react";
6026
+ import React66, { useCallback as useCallback17, useState as useState17 } from "react";
5383
6027
  import { Check as Check3, Copy, Pencil, RotateCcw, Send as Send2, X as X5 } from "lucide-react";
5384
- var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React52.createElement(
6028
+ var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React66.createElement(
5385
6029
  "button",
5386
6030
  {
5387
6031
  type: "button",
@@ -5397,7 +6041,7 @@ var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @_
5397
6041
  },
5398
6042
  children
5399
6043
  );
5400
- var MessageActions = React52.forwardRef(
6044
+ var MessageActions = React66.forwardRef(
5401
6045
  ({
5402
6046
  variant,
5403
6047
  content,
@@ -5414,7 +6058,7 @@ var MessageActions = React52.forwardRef(
5414
6058
  const [copied, setCopied] = useState17(false);
5415
6059
  const isEditing = controlledIsEditing ?? localIsEditing;
5416
6060
  const editValue = controlledEditValue ?? localEditValue;
5417
- const setIsEditing = useCallback16(
6061
+ const setIsEditing = useCallback17(
5418
6062
  (value) => {
5419
6063
  if (onEditingChange) {
5420
6064
  onEditingChange(value);
@@ -5424,10 +6068,10 @@ var MessageActions = React52.forwardRef(
5424
6068
  },
5425
6069
  [onEditingChange]
5426
6070
  );
5427
- const setEditValue = useCallback16((value) => {
6071
+ const setEditValue = useCallback17((value) => {
5428
6072
  setLocalEditValue(value);
5429
6073
  }, []);
5430
- const handleCopy = useCallback16(async () => {
6074
+ const handleCopy = useCallback17(async () => {
5431
6075
  try {
5432
6076
  await navigator.clipboard.writeText(content);
5433
6077
  setCopied(true);
@@ -5443,22 +6087,22 @@ var MessageActions = React52.forwardRef(
5443
6087
  setTimeout(() => setCopied(false), 2e3);
5444
6088
  }
5445
6089
  }, [content]);
5446
- const handleStartEdit = useCallback16(() => {
6090
+ const handleStartEdit = useCallback17(() => {
5447
6091
  setLocalEditValue(content);
5448
6092
  setIsEditing(true);
5449
6093
  }, [content, setIsEditing]);
5450
- const handleCancelEdit = useCallback16(() => {
6094
+ const handleCancelEdit = useCallback17(() => {
5451
6095
  setIsEditing(false);
5452
6096
  setLocalEditValue(content);
5453
6097
  }, [content, setIsEditing]);
5454
- const handleSubmitEdit = useCallback16(() => {
6098
+ const handleSubmitEdit = useCallback17(() => {
5455
6099
  const trimmed = editValue.trim();
5456
6100
  if (trimmed && trimmed !== content) {
5457
6101
  onEdit?.(trimmed);
5458
6102
  }
5459
6103
  setIsEditing(false);
5460
6104
  }, [editValue, content, onEdit, setIsEditing]);
5461
- const handleEditKeyDown = useCallback16(
6105
+ const handleEditKeyDown = useCallback17(
5462
6106
  (e) => {
5463
6107
  if (e.key === "Enter" && !e.shiftKey) {
5464
6108
  e.preventDefault();
@@ -5471,19 +6115,19 @@ var MessageActions = React52.forwardRef(
5471
6115
  );
5472
6116
  const isUser = variant === "user";
5473
6117
  if (isUser && isEditing) {
5474
- return /* @__PURE__ */ React52.createElement(
6118
+ return /* @__PURE__ */ React66.createElement(
5475
6119
  "div",
5476
6120
  {
5477
6121
  ref,
5478
6122
  className: cx("mt-2", className),
5479
6123
  ...rest
5480
6124
  },
5481
- /* @__PURE__ */ React52.createElement(
6125
+ /* @__PURE__ */ React66.createElement(
5482
6126
  "div",
5483
6127
  {
5484
6128
  className: "relative bg-charcoal border border-ash/60 focus-within:border-gold/60 focus-within:ring-1 focus-within:ring-gold/20"
5485
6129
  },
5486
- /* @__PURE__ */ React52.createElement(
6130
+ /* @__PURE__ */ React66.createElement(
5487
6131
  "textarea",
5488
6132
  {
5489
6133
  value: editValue,
@@ -5494,15 +6138,15 @@ var MessageActions = React52.forwardRef(
5494
6138
  rows: 2
5495
6139
  }
5496
6140
  ),
5497
- /* @__PURE__ */ React52.createElement("div", { className: "absolute right-2 bottom-2 flex gap-1" }, /* @__PURE__ */ React52.createElement(
6141
+ /* @__PURE__ */ React66.createElement("div", { className: "absolute right-2 bottom-2 flex gap-1" }, /* @__PURE__ */ React66.createElement(
5498
6142
  ActionButton2,
5499
6143
  {
5500
6144
  onClick: handleCancelEdit,
5501
6145
  label: "Cancel edit",
5502
6146
  className: "text-silver/60 hover:text-error"
5503
6147
  },
5504
- /* @__PURE__ */ React52.createElement(X5, { className: "w-4 h-4" })
5505
- ), /* @__PURE__ */ React52.createElement(
6148
+ /* @__PURE__ */ React66.createElement(X5, { className: "w-4 h-4" })
6149
+ ), /* @__PURE__ */ React66.createElement(
5506
6150
  ActionButton2,
5507
6151
  {
5508
6152
  onClick: handleSubmitEdit,
@@ -5510,13 +6154,13 @@ var MessageActions = React52.forwardRef(
5510
6154
  className: "text-silver/60 hover:text-gold",
5511
6155
  disabled: !editValue.trim() || editValue.trim() === content
5512
6156
  },
5513
- /* @__PURE__ */ React52.createElement(Send2, { className: "w-4 h-4" })
6157
+ /* @__PURE__ */ React66.createElement(Send2, { className: "w-4 h-4" })
5514
6158
  ))
5515
6159
  ),
5516
- /* @__PURE__ */ React52.createElement("p", { className: "text-xs text-silver/50 mt-1" }, "Press Enter to submit, Esc to cancel. This will create a new branch.")
6160
+ /* @__PURE__ */ React66.createElement("p", { className: "text-xs text-silver/50 mt-1" }, "Press Enter to submit, Esc to cancel. This will create a new branch.")
5517
6161
  );
5518
6162
  }
5519
- return /* @__PURE__ */ React52.createElement(
6163
+ return /* @__PURE__ */ React66.createElement(
5520
6164
  "div",
5521
6165
  {
5522
6166
  ref,
@@ -5527,18 +6171,18 @@ var MessageActions = React52.forwardRef(
5527
6171
  ),
5528
6172
  ...rest
5529
6173
  },
5530
- /* @__PURE__ */ React52.createElement(ActionButton2, { onClick: handleCopy, label: copied ? "Copied!" : "Copy message" }, copied ? /* @__PURE__ */ React52.createElement(Check3, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ React52.createElement(Copy, { className: "w-3.5 h-3.5" })),
5531
- isUser && onEdit && /* @__PURE__ */ React52.createElement(ActionButton2, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React52.createElement(Pencil, { className: "w-3.5 h-3.5" })),
5532
- !isUser && onRetry && /* @__PURE__ */ React52.createElement(ActionButton2, { onClick: onRetry, label: "Regenerate response" }, /* @__PURE__ */ React52.createElement(RotateCcw, { className: "w-3.5 h-3.5" }))
6174
+ /* @__PURE__ */ React66.createElement(ActionButton2, { onClick: handleCopy, label: copied ? "Copied!" : "Copy message" }, copied ? /* @__PURE__ */ React66.createElement(Check3, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ React66.createElement(Copy, { className: "w-3.5 h-3.5" })),
6175
+ isUser && onEdit && /* @__PURE__ */ React66.createElement(ActionButton2, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React66.createElement(Pencil, { className: "w-3.5 h-3.5" })),
6176
+ !isUser && onRetry && /* @__PURE__ */ React66.createElement(ActionButton2, { onClick: onRetry, label: "Regenerate response" }, /* @__PURE__ */ React66.createElement(RotateCcw, { className: "w-3.5 h-3.5" }))
5533
6177
  );
5534
6178
  }
5535
6179
  );
5536
6180
  MessageActions.displayName = "MessageActions";
5537
6181
 
5538
6182
  // src/components/chat/BranchNavigator.tsx
5539
- import React53 from "react";
6183
+ import React67 from "react";
5540
6184
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3, GitBranch } from "lucide-react";
5541
- var BranchNavigator = React53.forwardRef(
6185
+ var BranchNavigator = React67.forwardRef(
5542
6186
  ({
5543
6187
  current,
5544
6188
  total,
@@ -5557,7 +6201,7 @@ var BranchNavigator = React53.forwardRef(
5557
6201
  const buttonSize = size === "sm" ? "p-0.5" : "p-1";
5558
6202
  const iconSize = size === "sm" ? "w-3 h-3" : "w-4 h-4";
5559
6203
  const textSize = size === "sm" ? "text-xs" : "text-sm";
5560
- return /* @__PURE__ */ React53.createElement(
6204
+ return /* @__PURE__ */ React67.createElement(
5561
6205
  "div",
5562
6206
  {
5563
6207
  ref,
@@ -5569,8 +6213,8 @@ var BranchNavigator = React53.forwardRef(
5569
6213
  "aria-label": "Branch navigation",
5570
6214
  ...rest
5571
6215
  },
5572
- showIcon && /* @__PURE__ */ React53.createElement(GitBranch, { className: cx(iconSize, "mr-0.5 text-silver/50"), "aria-hidden": "true" }),
5573
- /* @__PURE__ */ React53.createElement(
6216
+ showIcon && /* @__PURE__ */ React67.createElement(GitBranch, { className: cx(iconSize, "mr-0.5 text-silver/50"), "aria-hidden": "true" }),
6217
+ /* @__PURE__ */ React67.createElement(
5574
6218
  "button",
5575
6219
  {
5576
6220
  type: "button",
@@ -5583,10 +6227,10 @@ var BranchNavigator = React53.forwardRef(
5583
6227
  ),
5584
6228
  "aria-label": "Previous branch"
5585
6229
  },
5586
- /* @__PURE__ */ React53.createElement(ChevronLeft2, { className: iconSize })
6230
+ /* @__PURE__ */ React67.createElement(ChevronLeft2, { className: iconSize })
5587
6231
  ),
5588
- /* @__PURE__ */ React53.createElement("span", { className: cx(textSize, "tabular-nums min-w-6 text-center") }, current, "/", total),
5589
- /* @__PURE__ */ React53.createElement(
6232
+ /* @__PURE__ */ React67.createElement("span", { className: cx(textSize, "tabular-nums min-w-6 text-center") }, current, "/", total),
6233
+ /* @__PURE__ */ React67.createElement(
5590
6234
  "button",
5591
6235
  {
5592
6236
  type: "button",
@@ -5599,7 +6243,7 @@ var BranchNavigator = React53.forwardRef(
5599
6243
  ),
5600
6244
  "aria-label": "Next branch"
5601
6245
  },
5602
- /* @__PURE__ */ React53.createElement(ChevronRight3, { className: iconSize })
6246
+ /* @__PURE__ */ React67.createElement(ChevronRight3, { className: iconSize })
5603
6247
  )
5604
6248
  );
5605
6249
  }
@@ -5607,13 +6251,13 @@ var BranchNavigator = React53.forwardRef(
5607
6251
  BranchNavigator.displayName = "BranchNavigator";
5608
6252
 
5609
6253
  // src/components/chat/hooks/useArtifacts.ts
5610
- import { useCallback as useCallback17, useState as useState18 } from "react";
6254
+ import { useCallback as useCallback18, useState as useState18 } from "react";
5611
6255
  function useArtifacts() {
5612
6256
  const [artifacts, setArtifacts] = useState18([]);
5613
- const scheduleArtifact = useCallback17((artifact) => {
6257
+ const scheduleArtifact = useCallback18((artifact) => {
5614
6258
  setArtifacts((prev) => [...prev, { ...artifact, isPending: true }]);
5615
6259
  }, []);
5616
- const showArtifact = useCallback17(
6260
+ const showArtifact = useCallback18(
5617
6261
  (artifactId, updates) => {
5618
6262
  setArtifacts((prev) => {
5619
6263
  const existingIndex = prev.findIndex((a) => a.id === artifactId);
@@ -5628,26 +6272,26 @@ function useArtifacts() {
5628
6272
  },
5629
6273
  []
5630
6274
  );
5631
- const removeArtifact = useCallback17((artifactId) => {
6275
+ const removeArtifact = useCallback18((artifactId) => {
5632
6276
  setArtifacts((prev) => prev.filter((a) => a.id !== artifactId));
5633
6277
  }, []);
5634
- const clearArtifacts = useCallback17(() => {
6278
+ const clearArtifacts = useCallback18(() => {
5635
6279
  setArtifacts([]);
5636
6280
  }, []);
5637
6281
  return { artifacts, scheduleArtifact, showArtifact, removeArtifact, clearArtifacts };
5638
6282
  }
5639
6283
 
5640
6284
  // src/components/BrandIcon.tsx
5641
- import React54 from "react";
6285
+ import React68 from "react";
5642
6286
  var sizeMap2 = {
5643
6287
  sm: "h-8 w-8 text-sm",
5644
6288
  md: "h-12 w-12 text-base",
5645
6289
  lg: "h-16 w-16 text-lg"
5646
6290
  };
5647
- var BrandIcon = React54.forwardRef(
6291
+ var BrandIcon = React68.forwardRef(
5648
6292
  ({ size = "md", variant = "solid", children, className, ...rest }, ref) => {
5649
6293
  const variantClasses = variant === "solid" ? "bg-gold text-obsidian border-2 border-gold" : "bg-transparent text-gold border-2 border-gold";
5650
- return /* @__PURE__ */ React54.createElement(
6294
+ return /* @__PURE__ */ React68.createElement(
5651
6295
  "div",
5652
6296
  {
5653
6297
  ref,
@@ -5666,17 +6310,17 @@ var BrandIcon = React54.forwardRef(
5666
6310
  BrandIcon.displayName = "BrandIcon";
5667
6311
 
5668
6312
  // src/components/ColorSwatch.tsx
5669
- import React55 from "react";
5670
- var ColorSwatch = React55.forwardRef(
6313
+ import React69 from "react";
6314
+ var ColorSwatch = React69.forwardRef(
5671
6315
  ({ color, label, className, ...rest }, ref) => {
5672
- return /* @__PURE__ */ React55.createElement(
6316
+ return /* @__PURE__ */ React69.createElement(
5673
6317
  "div",
5674
6318
  {
5675
6319
  ref,
5676
6320
  className: cx("flex flex-col items-center gap-2", className),
5677
6321
  ...rest
5678
6322
  },
5679
- /* @__PURE__ */ React55.createElement(
6323
+ /* @__PURE__ */ React69.createElement(
5680
6324
  "div",
5681
6325
  {
5682
6326
  className: "h-16 w-16 border-2 border-ash rounded-none shadow-sm",
@@ -5684,22 +6328,22 @@ var ColorSwatch = React55.forwardRef(
5684
6328
  "aria-label": label || color
5685
6329
  }
5686
6330
  ),
5687
- label && /* @__PURE__ */ React55.createElement("span", { className: "text-xs text-silver font-medium" }, label)
6331
+ label && /* @__PURE__ */ React69.createElement("span", { className: "text-xs text-silver font-medium" }, label)
5688
6332
  );
5689
6333
  }
5690
6334
  );
5691
6335
  ColorSwatch.displayName = "ColorSwatch";
5692
6336
 
5693
6337
  // src/components/SectionHeading.tsx
5694
- import React56 from "react";
6338
+ import React70 from "react";
5695
6339
  var levelStyles = {
5696
6340
  h2: "text-2xl mb-4",
5697
6341
  h3: "text-xl mb-3"
5698
6342
  };
5699
- var SectionHeading = React56.forwardRef(
6343
+ var SectionHeading = React70.forwardRef(
5700
6344
  ({ level = "h2", children, className, ...rest }, ref) => {
5701
6345
  const Component = level;
5702
- return /* @__PURE__ */ React56.createElement(
6346
+ return /* @__PURE__ */ React70.createElement(
5703
6347
  Component,
5704
6348
  {
5705
6349
  ref,
@@ -5728,6 +6372,7 @@ export {
5728
6372
  ArtifactsPanel,
5729
6373
  ArtifactsPanelToggle,
5730
6374
  AttachmentPreview,
6375
+ AudioCard,
5731
6376
  Avatar,
5732
6377
  Badge,
5733
6378
  BranchNavigator,
@@ -5740,17 +6385,25 @@ export {
5740
6385
  ChatInput,
5741
6386
  ChatInterface,
5742
6387
  ChatView,
6388
+ CheckSquareIcon,
5743
6389
  Checkbox,
6390
+ ChevronLeftIcon,
6391
+ ChevronRightIcon,
6392
+ CloseIcon,
5744
6393
  Col,
5745
6394
  CollapsedSidebarToggle,
5746
6395
  ColorSwatch,
5747
6396
  ConfirmDialog,
5748
6397
  Container,
5749
6398
  ConversationSidebar,
6399
+ CrossSquareIcon,
5750
6400
  Divider,
5751
6401
  Drawer,
6402
+ EmptySquareIcon,
6403
+ ExpandIcon,
5752
6404
  FileChip,
5753
6405
  HelperText,
6406
+ HistoryIcon,
5754
6407
  ImageCard,
5755
6408
  Input,
5756
6409
  InputGroup,
@@ -5760,6 +6413,7 @@ export {
5760
6413
  InputRightElement,
5761
6414
  InputWrapper,
5762
6415
  Label,
6416
+ LayersIcon,
5763
6417
  List,
5764
6418
  ListItem,
5765
6419
  ListItemText,
@@ -5781,16 +6435,19 @@ export {
5781
6435
  NavbarItem,
5782
6436
  NavbarLink,
5783
6437
  Pagination,
6438
+ PlusIcon,
5784
6439
  Popover,
5785
6440
  Progress,
5786
6441
  PromptDialog,
5787
6442
  Radio,
5788
6443
  Row,
6444
+ ScriptCard,
5789
6445
  SectionHeading,
5790
6446
  Select,
5791
6447
  Skeleton,
5792
6448
  Slider,
5793
6449
  Spinner,
6450
+ SquareLoaderIcon,
5794
6451
  Stack,
5795
6452
  Stepper,
5796
6453
  StreamingCursor,
@@ -5810,6 +6467,7 @@ export {
5810
6467
  Textarea,
5811
6468
  ThinkingIndicator,
5812
6469
  ToastProvider,
6470
+ TodosList,
5813
6471
  Tooltip,
5814
6472
  VideoCard,
5815
6473
  addMessageToTree,