@lukeashford/aurelius 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +11 -60
- package/dist/index.d.ts +11 -60
- package/dist/index.js +248 -391
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +206 -348
- package/dist/index.mjs.map +1 -1
- package/llms.md +3 -19
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3320,9 +3320,9 @@ var Stepper = React40.forwardRef(
|
|
|
3320
3320
|
);
|
|
3321
3321
|
Stepper.displayName = "Stepper";
|
|
3322
3322
|
|
|
3323
|
-
// src/components/icons/
|
|
3323
|
+
// src/components/icons/ChatBubbleIcon.tsx
|
|
3324
3324
|
import React41 from "react";
|
|
3325
|
-
function
|
|
3325
|
+
function ChatBubbleIcon({ className, ...props }) {
|
|
3326
3326
|
return /* @__PURE__ */ React41.createElement(
|
|
3327
3327
|
"svg",
|
|
3328
3328
|
{
|
|
@@ -3333,6 +3333,27 @@ function ChevronLeftIcon({ className, ...props }) {
|
|
|
3333
3333
|
...props
|
|
3334
3334
|
},
|
|
3335
3335
|
/* @__PURE__ */ React41.createElement(
|
|
3336
|
+
"path",
|
|
3337
|
+
{
|
|
3338
|
+
d: "M2 3h16v11H6l-4 3V3z"
|
|
3339
|
+
}
|
|
3340
|
+
)
|
|
3341
|
+
);
|
|
3342
|
+
}
|
|
3343
|
+
|
|
3344
|
+
// src/components/icons/ChevronLeftIcon.tsx
|
|
3345
|
+
import React42 from "react";
|
|
3346
|
+
function ChevronLeftIcon({ className, ...props }) {
|
|
3347
|
+
return /* @__PURE__ */ React42.createElement(
|
|
3348
|
+
"svg",
|
|
3349
|
+
{
|
|
3350
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3351
|
+
viewBox: "0 0 20 20",
|
|
3352
|
+
fill: "currentColor",
|
|
3353
|
+
className,
|
|
3354
|
+
...props
|
|
3355
|
+
},
|
|
3356
|
+
/* @__PURE__ */ React42.createElement(
|
|
3336
3357
|
"path",
|
|
3337
3358
|
{
|
|
3338
3359
|
fillRule: "evenodd",
|
|
@@ -3344,9 +3365,9 @@ function ChevronLeftIcon({ className, ...props }) {
|
|
|
3344
3365
|
}
|
|
3345
3366
|
|
|
3346
3367
|
// src/components/icons/ChevronRightIcon.tsx
|
|
3347
|
-
import
|
|
3368
|
+
import React43 from "react";
|
|
3348
3369
|
function ChevronRightIcon({ className, ...props }) {
|
|
3349
|
-
return /* @__PURE__ */
|
|
3370
|
+
return /* @__PURE__ */ React43.createElement(
|
|
3350
3371
|
"svg",
|
|
3351
3372
|
{
|
|
3352
3373
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3355,7 +3376,7 @@ function ChevronRightIcon({ className, ...props }) {
|
|
|
3355
3376
|
className,
|
|
3356
3377
|
...props
|
|
3357
3378
|
},
|
|
3358
|
-
/* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ React43.createElement(
|
|
3359
3380
|
"path",
|
|
3360
3381
|
{
|
|
3361
3382
|
fillRule: "evenodd",
|
|
@@ -3367,9 +3388,9 @@ function ChevronRightIcon({ className, ...props }) {
|
|
|
3367
3388
|
}
|
|
3368
3389
|
|
|
3369
3390
|
// src/components/icons/CloseIcon.tsx
|
|
3370
|
-
import
|
|
3391
|
+
import React44 from "react";
|
|
3371
3392
|
function CloseIcon({ className, ...props }) {
|
|
3372
|
-
return /* @__PURE__ */
|
|
3393
|
+
return /* @__PURE__ */ React44.createElement(
|
|
3373
3394
|
"svg",
|
|
3374
3395
|
{
|
|
3375
3396
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3378,7 +3399,7 @@ function CloseIcon({ className, ...props }) {
|
|
|
3378
3399
|
className,
|
|
3379
3400
|
...props
|
|
3380
3401
|
},
|
|
3381
|
-
/* @__PURE__ */
|
|
3402
|
+
/* @__PURE__ */ React44.createElement(
|
|
3382
3403
|
"path",
|
|
3383
3404
|
{
|
|
3384
3405
|
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"
|
|
@@ -3388,9 +3409,9 @@ function CloseIcon({ className, ...props }) {
|
|
|
3388
3409
|
}
|
|
3389
3410
|
|
|
3390
3411
|
// src/components/icons/ExpandIcon.tsx
|
|
3391
|
-
import
|
|
3412
|
+
import React45 from "react";
|
|
3392
3413
|
function ExpandIcon({ className, ...props }) {
|
|
3393
|
-
return /* @__PURE__ */
|
|
3414
|
+
return /* @__PURE__ */ React45.createElement(
|
|
3394
3415
|
"svg",
|
|
3395
3416
|
{
|
|
3396
3417
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3399,7 +3420,7 @@ function ExpandIcon({ className, ...props }) {
|
|
|
3399
3420
|
className,
|
|
3400
3421
|
...props
|
|
3401
3422
|
},
|
|
3402
|
-
/* @__PURE__ */
|
|
3423
|
+
/* @__PURE__ */ React45.createElement(
|
|
3403
3424
|
"path",
|
|
3404
3425
|
{
|
|
3405
3426
|
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"
|
|
@@ -3409,9 +3430,9 @@ function ExpandIcon({ className, ...props }) {
|
|
|
3409
3430
|
}
|
|
3410
3431
|
|
|
3411
3432
|
// src/components/icons/HistoryIcon.tsx
|
|
3412
|
-
import
|
|
3433
|
+
import React46 from "react";
|
|
3413
3434
|
function HistoryIcon({ className, ...props }) {
|
|
3414
|
-
return /* @__PURE__ */
|
|
3435
|
+
return /* @__PURE__ */ React46.createElement(
|
|
3415
3436
|
"svg",
|
|
3416
3437
|
{
|
|
3417
3438
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3420,7 +3441,7 @@ function HistoryIcon({ className, ...props }) {
|
|
|
3420
3441
|
className,
|
|
3421
3442
|
...props
|
|
3422
3443
|
},
|
|
3423
|
-
/* @__PURE__ */
|
|
3444
|
+
/* @__PURE__ */ React46.createElement(
|
|
3424
3445
|
"path",
|
|
3425
3446
|
{
|
|
3426
3447
|
fillRule: "evenodd",
|
|
@@ -3432,9 +3453,9 @@ function HistoryIcon({ className, ...props }) {
|
|
|
3432
3453
|
}
|
|
3433
3454
|
|
|
3434
3455
|
// src/components/icons/LayersIcon.tsx
|
|
3435
|
-
import
|
|
3456
|
+
import React47 from "react";
|
|
3436
3457
|
function LayersIcon({ className, ...props }) {
|
|
3437
|
-
return /* @__PURE__ */
|
|
3458
|
+
return /* @__PURE__ */ React47.createElement(
|
|
3438
3459
|
"svg",
|
|
3439
3460
|
{
|
|
3440
3461
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3443,19 +3464,19 @@ function LayersIcon({ className, ...props }) {
|
|
|
3443
3464
|
className,
|
|
3444
3465
|
...props
|
|
3445
3466
|
},
|
|
3446
|
-
/* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ React47.createElement(
|
|
3447
3468
|
"path",
|
|
3448
3469
|
{
|
|
3449
3470
|
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"
|
|
3450
3471
|
}
|
|
3451
3472
|
),
|
|
3452
|
-
/* @__PURE__ */
|
|
3473
|
+
/* @__PURE__ */ React47.createElement(
|
|
3453
3474
|
"path",
|
|
3454
3475
|
{
|
|
3455
3476
|
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"
|
|
3456
3477
|
}
|
|
3457
3478
|
),
|
|
3458
|
-
/* @__PURE__ */
|
|
3479
|
+
/* @__PURE__ */ React47.createElement(
|
|
3459
3480
|
"path",
|
|
3460
3481
|
{
|
|
3461
3482
|
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"
|
|
@@ -3465,9 +3486,9 @@ function LayersIcon({ className, ...props }) {
|
|
|
3465
3486
|
}
|
|
3466
3487
|
|
|
3467
3488
|
// src/components/icons/MediaIcon.tsx
|
|
3468
|
-
import
|
|
3489
|
+
import React48 from "react";
|
|
3469
3490
|
function MediaIcon({ className, ...props }) {
|
|
3470
|
-
return /* @__PURE__ */
|
|
3491
|
+
return /* @__PURE__ */ React48.createElement(
|
|
3471
3492
|
"svg",
|
|
3472
3493
|
{
|
|
3473
3494
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3476,7 +3497,7 @@ function MediaIcon({ className, ...props }) {
|
|
|
3476
3497
|
className,
|
|
3477
3498
|
...props
|
|
3478
3499
|
},
|
|
3479
|
-
/* @__PURE__ */
|
|
3500
|
+
/* @__PURE__ */ React48.createElement(
|
|
3480
3501
|
"path",
|
|
3481
3502
|
{
|
|
3482
3503
|
fillRule: "evenodd",
|
|
@@ -3488,9 +3509,9 @@ function MediaIcon({ className, ...props }) {
|
|
|
3488
3509
|
}
|
|
3489
3510
|
|
|
3490
3511
|
// src/components/icons/PlusIcon.tsx
|
|
3491
|
-
import
|
|
3512
|
+
import React49 from "react";
|
|
3492
3513
|
function PlusIcon({ className, ...props }) {
|
|
3493
|
-
return /* @__PURE__ */
|
|
3514
|
+
return /* @__PURE__ */ React49.createElement(
|
|
3494
3515
|
"svg",
|
|
3495
3516
|
{
|
|
3496
3517
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3499,7 +3520,7 @@ function PlusIcon({ className, ...props }) {
|
|
|
3499
3520
|
className,
|
|
3500
3521
|
...props
|
|
3501
3522
|
},
|
|
3502
|
-
/* @__PURE__ */
|
|
3523
|
+
/* @__PURE__ */ React49.createElement(
|
|
3503
3524
|
"path",
|
|
3504
3525
|
{
|
|
3505
3526
|
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"
|
|
@@ -3509,9 +3530,9 @@ function PlusIcon({ className, ...props }) {
|
|
|
3509
3530
|
}
|
|
3510
3531
|
|
|
3511
3532
|
// src/components/icons/CheckSquareIcon.tsx
|
|
3512
|
-
import
|
|
3533
|
+
import React50 from "react";
|
|
3513
3534
|
function CheckSquareIcon({ className, ...props }) {
|
|
3514
|
-
return /* @__PURE__ */
|
|
3535
|
+
return /* @__PURE__ */ React50.createElement(
|
|
3515
3536
|
"div",
|
|
3516
3537
|
{
|
|
3517
3538
|
className: cx(
|
|
@@ -3520,14 +3541,14 @@ function CheckSquareIcon({ className, ...props }) {
|
|
|
3520
3541
|
),
|
|
3521
3542
|
...props
|
|
3522
3543
|
},
|
|
3523
|
-
/* @__PURE__ */
|
|
3544
|
+
/* @__PURE__ */ React50.createElement(
|
|
3524
3545
|
"svg",
|
|
3525
3546
|
{
|
|
3526
3547
|
viewBox: "0 0 16 16",
|
|
3527
3548
|
fill: "none",
|
|
3528
3549
|
className: "absolute inset-0 w-full h-full p-0.5"
|
|
3529
3550
|
},
|
|
3530
|
-
/* @__PURE__ */
|
|
3551
|
+
/* @__PURE__ */ React50.createElement(
|
|
3531
3552
|
"path",
|
|
3532
3553
|
{
|
|
3533
3554
|
d: "M3 8l3 3 7-7",
|
|
@@ -3543,9 +3564,9 @@ function CheckSquareIcon({ className, ...props }) {
|
|
|
3543
3564
|
}
|
|
3544
3565
|
|
|
3545
3566
|
// src/components/icons/EmptySquareIcon.tsx
|
|
3546
|
-
import
|
|
3567
|
+
import React51 from "react";
|
|
3547
3568
|
function EmptySquareIcon({ className, ...props }) {
|
|
3548
|
-
return /* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ React51.createElement(
|
|
3549
3570
|
"div",
|
|
3550
3571
|
{
|
|
3551
3572
|
className: cx(
|
|
@@ -3558,9 +3579,9 @@ function EmptySquareIcon({ className, ...props }) {
|
|
|
3558
3579
|
}
|
|
3559
3580
|
|
|
3560
3581
|
// src/components/icons/CrossSquareIcon.tsx
|
|
3561
|
-
import
|
|
3582
|
+
import React52 from "react";
|
|
3562
3583
|
function CrossSquareIcon({ className, variant = "cancelled", ...props }) {
|
|
3563
|
-
return /* @__PURE__ */
|
|
3584
|
+
return /* @__PURE__ */ React52.createElement(
|
|
3564
3585
|
"div",
|
|
3565
3586
|
{
|
|
3566
3587
|
className: cx(
|
|
@@ -3570,14 +3591,14 @@ function CrossSquareIcon({ className, variant = "cancelled", ...props }) {
|
|
|
3570
3591
|
),
|
|
3571
3592
|
...props
|
|
3572
3593
|
},
|
|
3573
|
-
/* @__PURE__ */
|
|
3594
|
+
/* @__PURE__ */ React52.createElement(
|
|
3574
3595
|
"svg",
|
|
3575
3596
|
{
|
|
3576
3597
|
viewBox: "0 0 16 16",
|
|
3577
3598
|
fill: "none",
|
|
3578
3599
|
className: "absolute inset-0 w-full h-full p-0.5"
|
|
3579
3600
|
},
|
|
3580
|
-
/* @__PURE__ */
|
|
3601
|
+
/* @__PURE__ */ React52.createElement(
|
|
3581
3602
|
"path",
|
|
3582
3603
|
{
|
|
3583
3604
|
d: "M4 4l8 8M12 4l-8 8",
|
|
@@ -3592,15 +3613,15 @@ function CrossSquareIcon({ className, variant = "cancelled", ...props }) {
|
|
|
3592
3613
|
}
|
|
3593
3614
|
|
|
3594
3615
|
// src/components/icons/SquareLoaderIcon.tsx
|
|
3595
|
-
import
|
|
3616
|
+
import React53 from "react";
|
|
3596
3617
|
function SquareLoaderIcon({ className, ...props }) {
|
|
3597
|
-
return /* @__PURE__ */
|
|
3618
|
+
return /* @__PURE__ */ React53.createElement("div", { className: cx("relative w-4 h-4 flex-shrink-0", className), ...props }, /* @__PURE__ */ React53.createElement(
|
|
3598
3619
|
"svg",
|
|
3599
3620
|
{
|
|
3600
3621
|
viewBox: "0 0 16 16",
|
|
3601
3622
|
className: "w-full h-full animate-snake-spin"
|
|
3602
3623
|
},
|
|
3603
|
-
/* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ React53.createElement(
|
|
3604
3625
|
"rect",
|
|
3605
3626
|
{
|
|
3606
3627
|
x: "1",
|
|
@@ -3613,7 +3634,7 @@ function SquareLoaderIcon({ className, ...props }) {
|
|
|
3613
3634
|
className: "text-ash/40"
|
|
3614
3635
|
}
|
|
3615
3636
|
),
|
|
3616
|
-
/* @__PURE__ */
|
|
3637
|
+
/* @__PURE__ */ React53.createElement(
|
|
3617
3638
|
"rect",
|
|
3618
3639
|
{
|
|
3619
3640
|
x: "1",
|
|
@@ -3632,10 +3653,10 @@ function SquareLoaderIcon({ className, ...props }) {
|
|
|
3632
3653
|
}
|
|
3633
3654
|
|
|
3634
3655
|
// src/components/Message.tsx
|
|
3635
|
-
import
|
|
3656
|
+
import React55, { useEffect as useEffect6, useRef as useRef5, useState as useState10 } from "react";
|
|
3636
3657
|
|
|
3637
3658
|
// src/components/MarkdownContent.tsx
|
|
3638
|
-
import
|
|
3659
|
+
import React54, { useMemo } from "react";
|
|
3639
3660
|
import DOMPurify from "dompurify";
|
|
3640
3661
|
import { marked } from "marked";
|
|
3641
3662
|
var DEFAULT_SANITIZE_CONFIG = {
|
|
@@ -3742,7 +3763,7 @@ function injectStreamingCursor(html, cursorClassName) {
|
|
|
3742
3763
|
target.insertAdjacentHTML("beforeend", cursorHtml);
|
|
3743
3764
|
return container.innerHTML;
|
|
3744
3765
|
}
|
|
3745
|
-
var MarkdownContent =
|
|
3766
|
+
var MarkdownContent = React54.forwardRef(
|
|
3746
3767
|
({ className, content, isMarkdown = true, sanitizeConfig, isStreaming, cursorClassName, ...rest }, ref) => {
|
|
3747
3768
|
useDOMPurifySetup();
|
|
3748
3769
|
const sanitizedHtml = useMemo(() => {
|
|
@@ -3767,7 +3788,7 @@ var MarkdownContent = React53.forwardRef(
|
|
|
3767
3788
|
}
|
|
3768
3789
|
return sanitized;
|
|
3769
3790
|
}, [content, sanitizeConfig, isStreaming, cursorClassName]);
|
|
3770
|
-
return /* @__PURE__ */
|
|
3791
|
+
return /* @__PURE__ */ React54.createElement(
|
|
3771
3792
|
"div",
|
|
3772
3793
|
{
|
|
3773
3794
|
ref,
|
|
@@ -3785,7 +3806,7 @@ var variantStyles2 = {
|
|
|
3785
3806
|
user: "bg-gold text-obsidian ml-auto",
|
|
3786
3807
|
assistant: "bg-charcoal border border-ash text-white mr-auto"
|
|
3787
3808
|
};
|
|
3788
|
-
var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */
|
|
3809
|
+
var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ React55.createElement(
|
|
3789
3810
|
"button",
|
|
3790
3811
|
{
|
|
3791
3812
|
type: "button",
|
|
@@ -3801,7 +3822,7 @@ var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__
|
|
|
3801
3822
|
},
|
|
3802
3823
|
children
|
|
3803
3824
|
);
|
|
3804
|
-
var CopyIcon = () => /* @__PURE__ */
|
|
3825
|
+
var CopyIcon = () => /* @__PURE__ */ React55.createElement(
|
|
3805
3826
|
"svg",
|
|
3806
3827
|
{
|
|
3807
3828
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3813,10 +3834,10 @@ var CopyIcon = () => /* @__PURE__ */ React54.createElement(
|
|
|
3813
3834
|
strokeLinejoin: "round",
|
|
3814
3835
|
className: "w-3.5 h-3.5"
|
|
3815
3836
|
},
|
|
3816
|
-
/* @__PURE__ */
|
|
3817
|
-
/* @__PURE__ */
|
|
3837
|
+
/* @__PURE__ */ React55.createElement("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
3838
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
3818
3839
|
);
|
|
3819
|
-
var CheckIcon = () => /* @__PURE__ */
|
|
3840
|
+
var CheckIcon = () => /* @__PURE__ */ React55.createElement(
|
|
3820
3841
|
"svg",
|
|
3821
3842
|
{
|
|
3822
3843
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3828,9 +3849,9 @@ var CheckIcon = () => /* @__PURE__ */ React54.createElement(
|
|
|
3828
3849
|
strokeLinejoin: "round",
|
|
3829
3850
|
className: "w-3.5 h-3.5 text-success"
|
|
3830
3851
|
},
|
|
3831
|
-
/* @__PURE__ */
|
|
3852
|
+
/* @__PURE__ */ React55.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
3832
3853
|
);
|
|
3833
|
-
var PencilIcon = () => /* @__PURE__ */
|
|
3854
|
+
var PencilIcon = () => /* @__PURE__ */ React55.createElement(
|
|
3834
3855
|
"svg",
|
|
3835
3856
|
{
|
|
3836
3857
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3842,10 +3863,10 @@ var PencilIcon = () => /* @__PURE__ */ React54.createElement(
|
|
|
3842
3863
|
strokeLinejoin: "round",
|
|
3843
3864
|
className: "w-3.5 h-3.5"
|
|
3844
3865
|
},
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
3866
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" }),
|
|
3867
|
+
/* @__PURE__ */ React55.createElement("path", { d: "m15 5 4 4" })
|
|
3847
3868
|
);
|
|
3848
|
-
var RetryIcon = () => /* @__PURE__ */
|
|
3869
|
+
var RetryIcon = () => /* @__PURE__ */ React55.createElement(
|
|
3849
3870
|
"svg",
|
|
3850
3871
|
{
|
|
3851
3872
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3857,12 +3878,12 @@ var RetryIcon = () => /* @__PURE__ */ React54.createElement(
|
|
|
3857
3878
|
strokeLinejoin: "round",
|
|
3858
3879
|
className: "w-3.5 h-3.5"
|
|
3859
3880
|
},
|
|
3860
|
-
/* @__PURE__ */
|
|
3861
|
-
/* @__PURE__ */
|
|
3862
|
-
/* @__PURE__ */
|
|
3863
|
-
/* @__PURE__ */
|
|
3881
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
3882
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M21 3v5h-5" }),
|
|
3883
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
3884
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M8 16H3v5" })
|
|
3864
3885
|
);
|
|
3865
|
-
var ChevronLeftIcon2 = () => /* @__PURE__ */
|
|
3886
|
+
var ChevronLeftIcon2 = () => /* @__PURE__ */ React55.createElement(
|
|
3866
3887
|
"svg",
|
|
3867
3888
|
{
|
|
3868
3889
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3874,9 +3895,9 @@ var ChevronLeftIcon2 = () => /* @__PURE__ */ React54.createElement(
|
|
|
3874
3895
|
strokeLinejoin: "round",
|
|
3875
3896
|
className: "w-3 h-3"
|
|
3876
3897
|
},
|
|
3877
|
-
/* @__PURE__ */
|
|
3898
|
+
/* @__PURE__ */ React55.createElement("path", { d: "m15 18-6-6 6-6" })
|
|
3878
3899
|
);
|
|
3879
|
-
var ChevronRightIcon2 = () => /* @__PURE__ */
|
|
3900
|
+
var ChevronRightIcon2 = () => /* @__PURE__ */ React55.createElement(
|
|
3880
3901
|
"svg",
|
|
3881
3902
|
{
|
|
3882
3903
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3888,9 +3909,9 @@ var ChevronRightIcon2 = () => /* @__PURE__ */ React54.createElement(
|
|
|
3888
3909
|
strokeLinejoin: "round",
|
|
3889
3910
|
className: "w-3 h-3"
|
|
3890
3911
|
},
|
|
3891
|
-
/* @__PURE__ */
|
|
3912
|
+
/* @__PURE__ */ React55.createElement("path", { d: "m9 18 6-6-6-6" })
|
|
3892
3913
|
);
|
|
3893
|
-
var GitBranchIcon = () => /* @__PURE__ */
|
|
3914
|
+
var GitBranchIcon = () => /* @__PURE__ */ React55.createElement(
|
|
3894
3915
|
"svg",
|
|
3895
3916
|
{
|
|
3896
3917
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3902,12 +3923,12 @@ var GitBranchIcon = () => /* @__PURE__ */ React54.createElement(
|
|
|
3902
3923
|
strokeLinejoin: "round",
|
|
3903
3924
|
className: "w-3 h-3 mr-0.5 text-silver/50"
|
|
3904
3925
|
},
|
|
3905
|
-
/* @__PURE__ */
|
|
3906
|
-
/* @__PURE__ */
|
|
3907
|
-
/* @__PURE__ */
|
|
3908
|
-
/* @__PURE__ */
|
|
3926
|
+
/* @__PURE__ */ React55.createElement("line", { x1: "6", x2: "6", y1: "3", y2: "15" }),
|
|
3927
|
+
/* @__PURE__ */ React55.createElement("circle", { cx: "18", cy: "6", r: "3" }),
|
|
3928
|
+
/* @__PURE__ */ React55.createElement("circle", { cx: "6", cy: "18", r: "3" }),
|
|
3929
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })
|
|
3909
3930
|
);
|
|
3910
|
-
var XIcon = () => /* @__PURE__ */
|
|
3931
|
+
var XIcon = () => /* @__PURE__ */ React55.createElement(
|
|
3911
3932
|
"svg",
|
|
3912
3933
|
{
|
|
3913
3934
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3919,10 +3940,10 @@ var XIcon = () => /* @__PURE__ */ React54.createElement(
|
|
|
3919
3940
|
strokeLinejoin: "round",
|
|
3920
3941
|
className: "w-4 h-4"
|
|
3921
3942
|
},
|
|
3922
|
-
/* @__PURE__ */
|
|
3923
|
-
/* @__PURE__ */
|
|
3943
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M18 6 6 18" }),
|
|
3944
|
+
/* @__PURE__ */ React55.createElement("path", { d: "m6 6 12 12" })
|
|
3924
3945
|
);
|
|
3925
|
-
var SendIcon = () => /* @__PURE__ */
|
|
3946
|
+
var SendIcon = () => /* @__PURE__ */ React55.createElement(
|
|
3926
3947
|
"svg",
|
|
3927
3948
|
{
|
|
3928
3949
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3934,10 +3955,10 @@ var SendIcon = () => /* @__PURE__ */ React54.createElement(
|
|
|
3934
3955
|
strokeLinejoin: "round",
|
|
3935
3956
|
className: "w-4 h-4"
|
|
3936
3957
|
},
|
|
3937
|
-
/* @__PURE__ */
|
|
3938
|
-
/* @__PURE__ */
|
|
3958
|
+
/* @__PURE__ */ React55.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }),
|
|
3959
|
+
/* @__PURE__ */ React55.createElement("path", { d: "M22 2 11 13" })
|
|
3939
3960
|
);
|
|
3940
|
-
var Message =
|
|
3961
|
+
var Message = React55.forwardRef(
|
|
3941
3962
|
({
|
|
3942
3963
|
variant = "assistant",
|
|
3943
3964
|
className,
|
|
@@ -4009,7 +4030,7 @@ var Message = React54.forwardRef(
|
|
|
4009
4030
|
textarea.style.height = "auto";
|
|
4010
4031
|
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
4011
4032
|
};
|
|
4012
|
-
return /* @__PURE__ */
|
|
4033
|
+
return /* @__PURE__ */ React55.createElement(
|
|
4013
4034
|
"div",
|
|
4014
4035
|
{
|
|
4015
4036
|
ref,
|
|
@@ -4020,7 +4041,7 @@ var Message = React54.forwardRef(
|
|
|
4020
4041
|
),
|
|
4021
4042
|
...rest
|
|
4022
4043
|
},
|
|
4023
|
-
isUser && isEditing ? /* @__PURE__ */
|
|
4044
|
+
isUser && isEditing ? /* @__PURE__ */ React55.createElement("div", { className: "w-full max-w-11/12" }, /* @__PURE__ */ React55.createElement("div", { className: "relative bg-gold" }, /* @__PURE__ */ React55.createElement(
|
|
4024
4045
|
"textarea",
|
|
4025
4046
|
{
|
|
4026
4047
|
ref: textareaRef,
|
|
@@ -4030,7 +4051,7 @@ var Message = React54.forwardRef(
|
|
|
4030
4051
|
className: "w-full bg-transparent text-obsidian px-3 py-2 pr-20 resize-none outline-none min-h-10 text-sm",
|
|
4031
4052
|
rows: 1
|
|
4032
4053
|
}
|
|
4033
|
-
), /* @__PURE__ */
|
|
4054
|
+
), /* @__PURE__ */ React55.createElement("div", { className: "absolute right-1 top-1/2 -translate-y-1/2 flex gap-0.5" }, /* @__PURE__ */ React55.createElement(
|
|
4034
4055
|
"button",
|
|
4035
4056
|
{
|
|
4036
4057
|
type: "button",
|
|
@@ -4038,8 +4059,8 @@ var Message = React54.forwardRef(
|
|
|
4038
4059
|
className: "p-1.5 text-obsidian/60 hover:text-obsidian transition-colors",
|
|
4039
4060
|
"aria-label": "Cancel edit"
|
|
4040
4061
|
},
|
|
4041
|
-
/* @__PURE__ */
|
|
4042
|
-
), /* @__PURE__ */
|
|
4062
|
+
/* @__PURE__ */ React55.createElement(XIcon, null)
|
|
4063
|
+
), /* @__PURE__ */ React55.createElement(
|
|
4043
4064
|
"button",
|
|
4044
4065
|
{
|
|
4045
4066
|
type: "button",
|
|
@@ -4048,8 +4069,8 @@ var Message = React54.forwardRef(
|
|
|
4048
4069
|
className: "p-1.5 text-obsidian/60 hover:text-obsidian transition-colors disabled:opacity-30",
|
|
4049
4070
|
"aria-label": "Submit edit"
|
|
4050
4071
|
},
|
|
4051
|
-
/* @__PURE__ */
|
|
4052
|
-
)))) : /* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ React55.createElement(SendIcon, null)
|
|
4073
|
+
)))) : /* @__PURE__ */ React55.createElement(
|
|
4053
4074
|
"div",
|
|
4054
4075
|
{
|
|
4055
4076
|
className: cx(
|
|
@@ -4057,7 +4078,7 @@ var Message = React54.forwardRef(
|
|
|
4057
4078
|
variantStyles2[variant]
|
|
4058
4079
|
)
|
|
4059
4080
|
},
|
|
4060
|
-
/* @__PURE__ */
|
|
4081
|
+
/* @__PURE__ */ React55.createElement(
|
|
4061
4082
|
MarkdownContent,
|
|
4062
4083
|
{
|
|
4063
4084
|
content,
|
|
@@ -4067,17 +4088,17 @@ var Message = React54.forwardRef(
|
|
|
4067
4088
|
}
|
|
4068
4089
|
)
|
|
4069
4090
|
),
|
|
4070
|
-
showActions && !isEditing && /* @__PURE__ */
|
|
4091
|
+
showActions && !isEditing && /* @__PURE__ */ React55.createElement("div", { className: cx(
|
|
4071
4092
|
"flex items-center gap-0.5 mt-1",
|
|
4072
4093
|
isUser ? "mr-1" : "ml-1"
|
|
4073
|
-
) }, actions.showCopy !== false && /* @__PURE__ */
|
|
4094
|
+
) }, actions.showCopy !== false && /* @__PURE__ */ React55.createElement(
|
|
4074
4095
|
ActionButton,
|
|
4075
4096
|
{
|
|
4076
4097
|
onClick: handleCopy,
|
|
4077
4098
|
label: copied ? "Copied!" : "Copy message"
|
|
4078
4099
|
},
|
|
4079
|
-
copied ? /* @__PURE__ */
|
|
4080
|
-
), isUser && actions.onEdit && /* @__PURE__ */
|
|
4100
|
+
copied ? /* @__PURE__ */ React55.createElement(CheckIcon, null) : /* @__PURE__ */ React55.createElement(CopyIcon, null)
|
|
4101
|
+
), isUser && actions.onEdit && /* @__PURE__ */ React55.createElement(ActionButton, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ React55.createElement(PencilIcon, null)), !isUser && actions.onRetry && /* @__PURE__ */ React55.createElement(ActionButton, { onClick: actions.onRetry, label: "Regenerate response" }, /* @__PURE__ */ React55.createElement(RetryIcon, null)), showBranchNav && /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement("div", { className: "w-px h-4 bg-ash/40 mx-1" }), /* @__PURE__ */ React55.createElement("div", { className: "flex items-center gap-0.5 text-silver/70" }, /* @__PURE__ */ React55.createElement(GitBranchIcon, null), /* @__PURE__ */ React55.createElement(
|
|
4081
4102
|
"button",
|
|
4082
4103
|
{
|
|
4083
4104
|
type: "button",
|
|
@@ -4089,8 +4110,8 @@ var Message = React54.forwardRef(
|
|
|
4089
4110
|
),
|
|
4090
4111
|
"aria-label": "Previous branch"
|
|
4091
4112
|
},
|
|
4092
|
-
/* @__PURE__ */
|
|
4093
|
-
), /* @__PURE__ */
|
|
4113
|
+
/* @__PURE__ */ React55.createElement(ChevronLeftIcon2, null)
|
|
4114
|
+
), /* @__PURE__ */ React55.createElement("span", { className: "text-xs tabular-nums min-w-6 text-center" }, branchInfo.current, "/", branchInfo.total), /* @__PURE__ */ React55.createElement(
|
|
4094
4115
|
"button",
|
|
4095
4116
|
{
|
|
4096
4117
|
type: "button",
|
|
@@ -4102,7 +4123,7 @@ var Message = React54.forwardRef(
|
|
|
4102
4123
|
),
|
|
4103
4124
|
"aria-label": "Next branch"
|
|
4104
4125
|
},
|
|
4105
|
-
/* @__PURE__ */
|
|
4126
|
+
/* @__PURE__ */ React55.createElement(ChevronRightIcon2, null)
|
|
4106
4127
|
))))
|
|
4107
4128
|
);
|
|
4108
4129
|
}
|
|
@@ -4110,15 +4131,15 @@ var Message = React54.forwardRef(
|
|
|
4110
4131
|
Message.displayName = "Message";
|
|
4111
4132
|
|
|
4112
4133
|
// src/components/StreamingCursor.tsx
|
|
4113
|
-
import
|
|
4114
|
-
var StreamingCursor =
|
|
4134
|
+
import React56 from "react";
|
|
4135
|
+
var StreamingCursor = React56.forwardRef(
|
|
4115
4136
|
({ className, variant = "line", ...rest }, ref) => {
|
|
4116
4137
|
const variantStyles3 = {
|
|
4117
4138
|
block: "w-2.5 h-cursor translate-y-cursor-offset",
|
|
4118
4139
|
line: "w-0.5 h-cursor translate-y-cursor-offset",
|
|
4119
4140
|
underscore: "w-2.5 h-0.5 self-end mb-0.5"
|
|
4120
4141
|
};
|
|
4121
|
-
return /* @__PURE__ */
|
|
4142
|
+
return /* @__PURE__ */ React56.createElement(
|
|
4122
4143
|
"span",
|
|
4123
4144
|
{
|
|
4124
4145
|
ref,
|
|
@@ -4139,7 +4160,7 @@ StreamingCursor.displayName = "StreamingCursor";
|
|
|
4139
4160
|
import React73, { useCallback as useCallback18, useEffect as useEffect15, useMemo as useMemo4, useRef as useRef13, useState as useState19 } from "react";
|
|
4140
4161
|
|
|
4141
4162
|
// src/components/chat/ChatView.tsx
|
|
4142
|
-
import
|
|
4163
|
+
import React58, { useEffect as useEffect9 } from "react";
|
|
4143
4164
|
|
|
4144
4165
|
// src/components/chat/hooks/useScrollAnchor.ts
|
|
4145
4166
|
import { useCallback as useCallback11, useRef as useRef6 } from "react";
|
|
@@ -4255,7 +4276,7 @@ function useAdaptiveSpacer(options = {}) {
|
|
|
4255
4276
|
}
|
|
4256
4277
|
|
|
4257
4278
|
// src/components/chat/ThinkingIndicator.tsx
|
|
4258
|
-
import
|
|
4279
|
+
import React57, { useEffect as useEffect8, useState as useState12 } from "react";
|
|
4259
4280
|
var THINKING_PHRASES = [
|
|
4260
4281
|
"Consulting the ancient tomes...",
|
|
4261
4282
|
"Parsing the ineffable...",
|
|
@@ -4271,7 +4292,7 @@ var THINKING_PHRASES = [
|
|
|
4271
4292
|
"Consulting my inner monologue...",
|
|
4272
4293
|
"Summoning the muse..."
|
|
4273
4294
|
];
|
|
4274
|
-
var ThinkingIndicator =
|
|
4295
|
+
var ThinkingIndicator = React57.forwardRef(
|
|
4275
4296
|
({
|
|
4276
4297
|
isVisible = true,
|
|
4277
4298
|
phraseInterval = 2500,
|
|
@@ -4299,7 +4320,7 @@ var ThinkingIndicator = React56.forwardRef(
|
|
|
4299
4320
|
if (!isVisible) {
|
|
4300
4321
|
return null;
|
|
4301
4322
|
}
|
|
4302
|
-
return /* @__PURE__ */
|
|
4323
|
+
return /* @__PURE__ */ React57.createElement(
|
|
4303
4324
|
"div",
|
|
4304
4325
|
{
|
|
4305
4326
|
ref,
|
|
@@ -4313,26 +4334,26 @@ var ThinkingIndicator = React56.forwardRef(
|
|
|
4313
4334
|
"aria-live": "polite",
|
|
4314
4335
|
...rest
|
|
4315
4336
|
},
|
|
4316
|
-
/* @__PURE__ */
|
|
4337
|
+
/* @__PURE__ */ React57.createElement("div", { className: "flex gap-1", "aria-hidden": "true" }, /* @__PURE__ */ React57.createElement(
|
|
4317
4338
|
"span",
|
|
4318
4339
|
{
|
|
4319
4340
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4320
4341
|
style: { animationDelay: "0ms" }
|
|
4321
4342
|
}
|
|
4322
|
-
), /* @__PURE__ */
|
|
4343
|
+
), /* @__PURE__ */ React57.createElement(
|
|
4323
4344
|
"span",
|
|
4324
4345
|
{
|
|
4325
4346
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4326
4347
|
style: { animationDelay: "150ms" }
|
|
4327
4348
|
}
|
|
4328
|
-
), /* @__PURE__ */
|
|
4349
|
+
), /* @__PURE__ */ React57.createElement(
|
|
4329
4350
|
"span",
|
|
4330
4351
|
{
|
|
4331
4352
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4332
4353
|
style: { animationDelay: "300ms" }
|
|
4333
4354
|
}
|
|
4334
4355
|
)),
|
|
4335
|
-
/* @__PURE__ */
|
|
4356
|
+
/* @__PURE__ */ React57.createElement(
|
|
4336
4357
|
"span",
|
|
4337
4358
|
{
|
|
4338
4359
|
className: cx(
|
|
@@ -4348,7 +4369,7 @@ var ThinkingIndicator = React56.forwardRef(
|
|
|
4348
4369
|
ThinkingIndicator.displayName = "ThinkingIndicator";
|
|
4349
4370
|
|
|
4350
4371
|
// src/components/chat/ChatView.tsx
|
|
4351
|
-
var ChatView =
|
|
4372
|
+
var ChatView = React58.forwardRef(
|
|
4352
4373
|
({ messages, latestUserMessageIndex, isStreaming, isThinking, onScroll, className, ...rest }, ref) => {
|
|
4353
4374
|
const { containerRef, anchorRef, scrollToAnchor } = useScrollAnchor({
|
|
4354
4375
|
behavior: "smooth",
|
|
@@ -4370,7 +4391,7 @@ var ChatView = React57.forwardRef(
|
|
|
4370
4391
|
return found;
|
|
4371
4392
|
}, -1);
|
|
4372
4393
|
const showThinking = isThinking && messages.length > 0 && messages[messages.length - 1]?.variant === "user";
|
|
4373
|
-
return /* @__PURE__ */
|
|
4394
|
+
return /* @__PURE__ */ React58.createElement(
|
|
4374
4395
|
"div",
|
|
4375
4396
|
{
|
|
4376
4397
|
ref: (node) => {
|
|
@@ -4390,7 +4411,7 @@ var ChatView = React57.forwardRef(
|
|
|
4390
4411
|
),
|
|
4391
4412
|
...rest
|
|
4392
4413
|
},
|
|
4393
|
-
/* @__PURE__ */
|
|
4414
|
+
/* @__PURE__ */ React58.createElement("div", { ref: contentRef, className: "relative flex flex-col gap-3" }, messages.map(({
|
|
4394
4415
|
id,
|
|
4395
4416
|
variant,
|
|
4396
4417
|
className: messageClassName,
|
|
@@ -4403,14 +4424,14 @@ var ChatView = React57.forwardRef(
|
|
|
4403
4424
|
const isLastMessage = index === messages.length - 1;
|
|
4404
4425
|
const showStreaming = isLastMessage && isStreaming && variant === "assistant";
|
|
4405
4426
|
const isMessageStreaming = showStreaming || !!nodeIsStreaming;
|
|
4406
|
-
return /* @__PURE__ */
|
|
4427
|
+
return /* @__PURE__ */ React58.createElement(
|
|
4407
4428
|
"div",
|
|
4408
4429
|
{
|
|
4409
4430
|
key: id ?? `msg-${index}`,
|
|
4410
4431
|
ref: isAnchor ? anchorRef : void 0,
|
|
4411
4432
|
className: isAnchor ? "scroll-mt-4" : void 0
|
|
4412
4433
|
},
|
|
4413
|
-
/* @__PURE__ */
|
|
4434
|
+
/* @__PURE__ */ React58.createElement(
|
|
4414
4435
|
Message,
|
|
4415
4436
|
{
|
|
4416
4437
|
variant,
|
|
@@ -4423,8 +4444,8 @@ var ChatView = React57.forwardRef(
|
|
|
4423
4444
|
}
|
|
4424
4445
|
)
|
|
4425
4446
|
);
|
|
4426
|
-
}), showThinking && /* @__PURE__ */
|
|
4427
|
-
/* @__PURE__ */
|
|
4447
|
+
}), showThinking && /* @__PURE__ */ React58.createElement(ThinkingIndicator, { isVisible: true })),
|
|
4448
|
+
/* @__PURE__ */ React58.createElement(
|
|
4428
4449
|
"div",
|
|
4429
4450
|
{
|
|
4430
4451
|
ref: spacerRef,
|
|
@@ -4439,7 +4460,7 @@ var ChatView = React57.forwardRef(
|
|
|
4439
4460
|
ChatView.displayName = "ChatView";
|
|
4440
4461
|
|
|
4441
4462
|
// src/components/chat/ChatInput.tsx
|
|
4442
|
-
import
|
|
4463
|
+
import React59, { useCallback as useCallback13, useEffect as useEffect10, useRef as useRef8, useState as useState13 } from "react";
|
|
4443
4464
|
import { Paperclip, Send, Square } from "lucide-react";
|
|
4444
4465
|
|
|
4445
4466
|
// src/components/chat/types.ts
|
|
@@ -4608,7 +4629,7 @@ function isBranchPoint(tree, nodeId) {
|
|
|
4608
4629
|
}
|
|
4609
4630
|
|
|
4610
4631
|
// src/components/chat/ChatInput.tsx
|
|
4611
|
-
var ChatInput =
|
|
4632
|
+
var ChatInput = React59.forwardRef(
|
|
4612
4633
|
({
|
|
4613
4634
|
position = "bottom",
|
|
4614
4635
|
placeholder = "Send a message...",
|
|
@@ -4742,7 +4763,7 @@ var ChatInput = React58.forwardRef(
|
|
|
4742
4763
|
const isCentered = position === "centered";
|
|
4743
4764
|
const hasAttachments = attachments.length > 0;
|
|
4744
4765
|
const canSubmit = value.trim() && !disabled && !isStreaming;
|
|
4745
|
-
return /* @__PURE__ */
|
|
4766
|
+
return /* @__PURE__ */ React59.createElement(
|
|
4746
4767
|
"div",
|
|
4747
4768
|
{
|
|
4748
4769
|
ref,
|
|
@@ -4754,8 +4775,8 @@ var ChatInput = React58.forwardRef(
|
|
|
4754
4775
|
),
|
|
4755
4776
|
...rest
|
|
4756
4777
|
},
|
|
4757
|
-
isCentered && helperText && /* @__PURE__ */
|
|
4758
|
-
/* @__PURE__ */
|
|
4778
|
+
isCentered && helperText && /* @__PURE__ */ React59.createElement("p", { className: "text-silver text-sm mb-4 text-center" }, helperText),
|
|
4779
|
+
/* @__PURE__ */ React59.createElement(
|
|
4759
4780
|
"div",
|
|
4760
4781
|
{
|
|
4761
4782
|
className: cx(
|
|
@@ -4770,7 +4791,7 @@ var ChatInput = React58.forwardRef(
|
|
|
4770
4791
|
onDragOver: showAttachmentButton ? handleDragOver : void 0,
|
|
4771
4792
|
onDrop: showAttachmentButton ? handleDrop : void 0
|
|
4772
4793
|
},
|
|
4773
|
-
hasAttachments && /* @__PURE__ */
|
|
4794
|
+
hasAttachments && /* @__PURE__ */ React59.createElement("div", { className: "px-3 pt-3 pb-1" }, /* @__PURE__ */ React59.createElement(
|
|
4774
4795
|
AttachmentPreview,
|
|
4775
4796
|
{
|
|
4776
4797
|
attachments,
|
|
@@ -4778,14 +4799,14 @@ var ChatInput = React58.forwardRef(
|
|
|
4778
4799
|
removable: !isStreaming
|
|
4779
4800
|
}
|
|
4780
4801
|
)),
|
|
4781
|
-
isDragOver && /* @__PURE__ */
|
|
4802
|
+
isDragOver && /* @__PURE__ */ React59.createElement(
|
|
4782
4803
|
"div",
|
|
4783
4804
|
{
|
|
4784
4805
|
className: "absolute inset-0 bg-gold/10 flex items-center justify-center z-10 pointer-events-none"
|
|
4785
4806
|
},
|
|
4786
|
-
/* @__PURE__ */
|
|
4807
|
+
/* @__PURE__ */ React59.createElement("span", { className: "text-gold text-sm font-medium" }, "Drop files here")
|
|
4787
4808
|
),
|
|
4788
|
-
/* @__PURE__ */
|
|
4809
|
+
/* @__PURE__ */ React59.createElement("div", { className: "flex items-end" }, showAttachmentButton && /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(
|
|
4789
4810
|
"button",
|
|
4790
4811
|
{
|
|
4791
4812
|
type: "button",
|
|
@@ -4797,8 +4818,8 @@ var ChatInput = React58.forwardRef(
|
|
|
4797
4818
|
),
|
|
4798
4819
|
"aria-label": "Attach file"
|
|
4799
4820
|
},
|
|
4800
|
-
/* @__PURE__ */
|
|
4801
|
-
), /* @__PURE__ */
|
|
4821
|
+
/* @__PURE__ */ React59.createElement(Paperclip, { className: "w-5 h-5" })
|
|
4822
|
+
), /* @__PURE__ */ React59.createElement(
|
|
4802
4823
|
"input",
|
|
4803
4824
|
{
|
|
4804
4825
|
ref: fileInputRef,
|
|
@@ -4809,7 +4830,7 @@ var ChatInput = React58.forwardRef(
|
|
|
4809
4830
|
className: "hidden",
|
|
4810
4831
|
"aria-hidden": "true"
|
|
4811
4832
|
}
|
|
4812
|
-
)), /* @__PURE__ */
|
|
4833
|
+
)), /* @__PURE__ */ React59.createElement(
|
|
4813
4834
|
"textarea",
|
|
4814
4835
|
{
|
|
4815
4836
|
ref: textareaRef,
|
|
@@ -4827,7 +4848,7 @@ var ChatInput = React58.forwardRef(
|
|
|
4827
4848
|
),
|
|
4828
4849
|
style: { maxHeight: 200 }
|
|
4829
4850
|
}
|
|
4830
|
-
), isStreaming ? /* @__PURE__ */
|
|
4851
|
+
), isStreaming ? /* @__PURE__ */ React59.createElement(
|
|
4831
4852
|
"button",
|
|
4832
4853
|
{
|
|
4833
4854
|
type: "button",
|
|
@@ -4838,8 +4859,8 @@ var ChatInput = React58.forwardRef(
|
|
|
4838
4859
|
),
|
|
4839
4860
|
"aria-label": "Stop generation"
|
|
4840
4861
|
},
|
|
4841
|
-
/* @__PURE__ */
|
|
4842
|
-
) : /* @__PURE__ */
|
|
4862
|
+
/* @__PURE__ */ React59.createElement(Square, { className: "w-5 h-5 fill-current" })
|
|
4863
|
+
) : /* @__PURE__ */ React59.createElement(
|
|
4843
4864
|
"button",
|
|
4844
4865
|
{
|
|
4845
4866
|
type: "button",
|
|
@@ -4852,7 +4873,7 @@ var ChatInput = React58.forwardRef(
|
|
|
4852
4873
|
),
|
|
4853
4874
|
"aria-label": "Send message"
|
|
4854
4875
|
},
|
|
4855
|
-
/* @__PURE__ */
|
|
4876
|
+
/* @__PURE__ */ React59.createElement(Send, { className: "w-5 h-5" })
|
|
4856
4877
|
))
|
|
4857
4878
|
)
|
|
4858
4879
|
);
|
|
@@ -4860,193 +4881,6 @@ var ChatInput = React58.forwardRef(
|
|
|
4860
4881
|
);
|
|
4861
4882
|
ChatInput.displayName = "ChatInput";
|
|
4862
4883
|
|
|
4863
|
-
// src/components/chat/ConversationSidebar.tsx
|
|
4864
|
-
import React59 from "react";
|
|
4865
|
-
function HistoryIcon2({ className }) {
|
|
4866
|
-
return /* @__PURE__ */ React59.createElement(
|
|
4867
|
-
"svg",
|
|
4868
|
-
{
|
|
4869
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4870
|
-
viewBox: "0 0 20 20",
|
|
4871
|
-
fill: "currentColor",
|
|
4872
|
-
className
|
|
4873
|
-
},
|
|
4874
|
-
/* @__PURE__ */ React59.createElement(
|
|
4875
|
-
"path",
|
|
4876
|
-
{
|
|
4877
|
-
fillRule: "evenodd",
|
|
4878
|
-
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",
|
|
4879
|
-
clipRule: "evenodd"
|
|
4880
|
-
}
|
|
4881
|
-
)
|
|
4882
|
-
);
|
|
4883
|
-
}
|
|
4884
|
-
function ChevronLeftIcon3({ className }) {
|
|
4885
|
-
return /* @__PURE__ */ React59.createElement(
|
|
4886
|
-
"svg",
|
|
4887
|
-
{
|
|
4888
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4889
|
-
viewBox: "0 0 20 20",
|
|
4890
|
-
fill: "currentColor",
|
|
4891
|
-
className
|
|
4892
|
-
},
|
|
4893
|
-
/* @__PURE__ */ React59.createElement(
|
|
4894
|
-
"path",
|
|
4895
|
-
{
|
|
4896
|
-
fillRule: "evenodd",
|
|
4897
|
-
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",
|
|
4898
|
-
clipRule: "evenodd"
|
|
4899
|
-
}
|
|
4900
|
-
)
|
|
4901
|
-
);
|
|
4902
|
-
}
|
|
4903
|
-
var ConversationSidebar = React59.forwardRef(
|
|
4904
|
-
({
|
|
4905
|
-
conversations,
|
|
4906
|
-
isCollapsed = false,
|
|
4907
|
-
onSelectConversation,
|
|
4908
|
-
onNewChat,
|
|
4909
|
-
onToggleCollapse,
|
|
4910
|
-
width,
|
|
4911
|
-
onResizeStart,
|
|
4912
|
-
className,
|
|
4913
|
-
...rest
|
|
4914
|
-
}, ref) => {
|
|
4915
|
-
if (isCollapsed) {
|
|
4916
|
-
return /* @__PURE__ */ React59.createElement(
|
|
4917
|
-
"div",
|
|
4918
|
-
{
|
|
4919
|
-
ref,
|
|
4920
|
-
className: cx(
|
|
4921
|
-
"h-full bg-charcoal/80 border-r border-ash/40 flex flex-col items-center py-3",
|
|
4922
|
-
"w-12 flex-shrink-0",
|
|
4923
|
-
className
|
|
4924
|
-
),
|
|
4925
|
-
...rest
|
|
4926
|
-
},
|
|
4927
|
-
/* @__PURE__ */ React59.createElement(
|
|
4928
|
-
"button",
|
|
4929
|
-
{
|
|
4930
|
-
onClick: onToggleCollapse,
|
|
4931
|
-
className: cx(
|
|
4932
|
-
"p-2",
|
|
4933
|
-
"text-silver hover:text-white hover:bg-ash/20",
|
|
4934
|
-
"transition-colors duration-150"
|
|
4935
|
-
),
|
|
4936
|
-
"aria-label": "Expand sidebar"
|
|
4937
|
-
},
|
|
4938
|
-
/* @__PURE__ */ React59.createElement(HistoryIcon2, { className: "w-5 h-5" })
|
|
4939
|
-
)
|
|
4940
|
-
);
|
|
4941
|
-
}
|
|
4942
|
-
return /* @__PURE__ */ React59.createElement(
|
|
4943
|
-
"div",
|
|
4944
|
-
{
|
|
4945
|
-
ref,
|
|
4946
|
-
"data-testid": "conversation-sidebar",
|
|
4947
|
-
className: cx(
|
|
4948
|
-
"h-full bg-charcoal/80 border-r border-ash/40 flex flex-col relative group",
|
|
4949
|
-
!width && "w-64",
|
|
4950
|
-
"flex-shrink-0",
|
|
4951
|
-
className
|
|
4952
|
-
),
|
|
4953
|
-
style: width ? { width } : void 0,
|
|
4954
|
-
...rest
|
|
4955
|
-
},
|
|
4956
|
-
/* @__PURE__ */ React59.createElement(
|
|
4957
|
-
"div",
|
|
4958
|
-
{
|
|
4959
|
-
onMouseDown: onResizeStart,
|
|
4960
|
-
"data-testid": "sidebar-resize-handle",
|
|
4961
|
-
className: cx(
|
|
4962
|
-
"absolute top-0 right-0 w-1 h-full cursor-col-resize z-50",
|
|
4963
|
-
"hover:bg-gold/50 transition-colors",
|
|
4964
|
-
"after:absolute after:inset-y-0 after:-right-1 after:w-2"
|
|
4965
|
-
// Larger hit area
|
|
4966
|
-
)
|
|
4967
|
-
}
|
|
4968
|
-
),
|
|
4969
|
-
/* @__PURE__ */ React59.createElement("div", { className: "p-3 border-b border-ash/40 flex-shrink-0 flex items-center gap-2" }, /* @__PURE__ */ React59.createElement(
|
|
4970
|
-
"button",
|
|
4971
|
-
{
|
|
4972
|
-
onClick: onToggleCollapse,
|
|
4973
|
-
className: cx(
|
|
4974
|
-
"p-1.5",
|
|
4975
|
-
"text-silver hover:text-white hover:bg-ash/20",
|
|
4976
|
-
"transition-colors duration-150"
|
|
4977
|
-
),
|
|
4978
|
-
"aria-label": "Collapse sidebar"
|
|
4979
|
-
},
|
|
4980
|
-
/* @__PURE__ */ React59.createElement(ChevronLeftIcon3, { className: "w-5 h-5" })
|
|
4981
|
-
), /* @__PURE__ */ React59.createElement(
|
|
4982
|
-
"button",
|
|
4983
|
-
{
|
|
4984
|
-
onClick: onNewChat,
|
|
4985
|
-
className: cx(
|
|
4986
|
-
"flex-1 px-3 py-2",
|
|
4987
|
-
"bg-gold/10 hover:bg-gold/20 text-gold",
|
|
4988
|
-
"border border-gold/30",
|
|
4989
|
-
"flex items-center justify-center gap-2",
|
|
4990
|
-
"transition-colors duration-200"
|
|
4991
|
-
)
|
|
4992
|
-
},
|
|
4993
|
-
/* @__PURE__ */ React59.createElement(
|
|
4994
|
-
"svg",
|
|
4995
|
-
{
|
|
4996
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4997
|
-
viewBox: "0 0 20 20",
|
|
4998
|
-
fill: "currentColor",
|
|
4999
|
-
className: "w-4 h-4"
|
|
5000
|
-
},
|
|
5001
|
-
/* @__PURE__ */ React59.createElement(
|
|
5002
|
-
"path",
|
|
5003
|
-
{
|
|
5004
|
-
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"
|
|
5005
|
-
}
|
|
5006
|
-
)
|
|
5007
|
-
),
|
|
5008
|
-
/* @__PURE__ */ React59.createElement("span", { className: "text-sm font-medium" }, "New Chat")
|
|
5009
|
-
)),
|
|
5010
|
-
/* @__PURE__ */ React59.createElement("div", { className: "flex-1 overflow-y-auto py-2" }, conversations.length === 0 ? /* @__PURE__ */ React59.createElement("p", { className: "px-4 py-2 text-sm text-silver/60" }, "No conversations yet") : /* @__PURE__ */ React59.createElement("div", { className: "space-y-1 px-2" }, conversations.map((conversation) => /* @__PURE__ */ React59.createElement(
|
|
5011
|
-
"button",
|
|
5012
|
-
{
|
|
5013
|
-
key: conversation.id,
|
|
5014
|
-
onClick: () => onSelectConversation?.(conversation.id),
|
|
5015
|
-
className: cx(
|
|
5016
|
-
"w-full px-3 py-2 text-left",
|
|
5017
|
-
"transition-colors duration-150",
|
|
5018
|
-
conversation.isActive ? "bg-ash/40 text-white" : "text-silver hover:bg-ash/20 hover:text-white"
|
|
5019
|
-
)
|
|
5020
|
-
},
|
|
5021
|
-
/* @__PURE__ */ React59.createElement("p", { className: "text-sm font-medium truncate" }, conversation.title),
|
|
5022
|
-
conversation.preview && /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-silver/60 truncate mt-0.5" }, conversation.preview),
|
|
5023
|
-
conversation.timestamp && /* @__PURE__ */ React59.createElement("p", { className: "text-xs text-silver/40 mt-1" }, conversation.timestamp)
|
|
5024
|
-
))))
|
|
5025
|
-
);
|
|
5026
|
-
}
|
|
5027
|
-
);
|
|
5028
|
-
ConversationSidebar.displayName = "ConversationSidebar";
|
|
5029
|
-
var CollapsedSidebarToggle = React59.forwardRef(({ onExpand, className, ...rest }, ref) => {
|
|
5030
|
-
return /* @__PURE__ */ React59.createElement(
|
|
5031
|
-
"button",
|
|
5032
|
-
{
|
|
5033
|
-
ref,
|
|
5034
|
-
onClick: onExpand,
|
|
5035
|
-
className: cx(
|
|
5036
|
-
"p-2",
|
|
5037
|
-
"bg-charcoal/80 border border-ash/40",
|
|
5038
|
-
"text-silver hover:text-white hover:bg-ash/20",
|
|
5039
|
-
"transition-colors duration-150",
|
|
5040
|
-
className
|
|
5041
|
-
),
|
|
5042
|
-
"aria-label": "Expand sidebar",
|
|
5043
|
-
...rest
|
|
5044
|
-
},
|
|
5045
|
-
/* @__PURE__ */ React59.createElement(HistoryIcon2, { className: "w-5 h-5" })
|
|
5046
|
-
);
|
|
5047
|
-
});
|
|
5048
|
-
CollapsedSidebarToggle.displayName = "CollapsedSidebarToggle";
|
|
5049
|
-
|
|
5050
4884
|
// src/components/chat/ArtifactsPanel.tsx
|
|
5051
4885
|
import React69, { useCallback as useCallback15, useEffect as useEffect12, useRef as useRef10, useState as useState16 } from "react";
|
|
5052
4886
|
|
|
@@ -6434,7 +6268,6 @@ var ChatInterface = React73.forwardRef(
|
|
|
6434
6268
|
isThinking = false,
|
|
6435
6269
|
placeholder = "Send a message...",
|
|
6436
6270
|
emptyStateHelper = "Let's talk.",
|
|
6437
|
-
initialSidebarCollapsed = false,
|
|
6438
6271
|
emptyState,
|
|
6439
6272
|
showAttachmentButton = true,
|
|
6440
6273
|
enableMessageActions = true,
|
|
@@ -6449,11 +6282,10 @@ var ChatInterface = React73.forwardRef(
|
|
|
6449
6282
|
className,
|
|
6450
6283
|
...rest
|
|
6451
6284
|
}, ref) => {
|
|
6452
|
-
const [sidebarCollapsed, setSidebarCollapsed] = useState19(initialSidebarCollapsed);
|
|
6453
6285
|
const prevArtifactNodesRef = useRef13([]);
|
|
6454
6286
|
const prevTasksRef = useRef13([]);
|
|
6455
6287
|
const [internalTools, setInternalTools] = useState19({
|
|
6456
|
-
"top-left":
|
|
6288
|
+
"top-left": "history",
|
|
6457
6289
|
"bottom-left": null,
|
|
6458
6290
|
"top-right": null,
|
|
6459
6291
|
"bottom-right": null
|
|
@@ -6471,15 +6303,6 @@ var ChatInterface = React73.forwardRef(
|
|
|
6471
6303
|
}, [isPanelControlled, isArtifactsPanelOpen, internalTools]);
|
|
6472
6304
|
const isLeftPanelOpen = activeTools["top-left"] !== null || activeTools["bottom-left"] !== null;
|
|
6473
6305
|
const isRightPanelOpen = activeTools["top-right"] !== null || activeTools["bottom-right"] !== null;
|
|
6474
|
-
const {
|
|
6475
|
-
width: sidebarWidth,
|
|
6476
|
-
startResizing: startResizingSidebar
|
|
6477
|
-
} = useResizable({
|
|
6478
|
-
initialWidthPercent: 15,
|
|
6479
|
-
minWidthPercent: 12,
|
|
6480
|
-
maxWidthPercent: 25,
|
|
6481
|
-
direction: "right"
|
|
6482
|
-
});
|
|
6483
6306
|
const {
|
|
6484
6307
|
width: rightToolsWidth,
|
|
6485
6308
|
startResizing: startResizingRightTools
|
|
@@ -6501,7 +6324,7 @@ var ChatInterface = React73.forwardRef(
|
|
|
6501
6324
|
const allSettled = tasks.length === 0 || areAllTasksSettled(tasks);
|
|
6502
6325
|
const allToolDefinitions = useMemo4(() => {
|
|
6503
6326
|
const builtIn = [
|
|
6504
|
-
{ id: "history", icon: /* @__PURE__ */ React73.createElement(
|
|
6327
|
+
{ id: "history", icon: /* @__PURE__ */ React73.createElement(ChatBubbleIcon, null), label: "History", group: "top-left" },
|
|
6505
6328
|
{ id: "artifacts", icon: /* @__PURE__ */ React73.createElement(MediaIcon, null), label: "Artifacts", group: "top-right" },
|
|
6506
6329
|
{
|
|
6507
6330
|
id: "todos",
|
|
@@ -6515,7 +6338,9 @@ var ChatInterface = React73.forwardRef(
|
|
|
6515
6338
|
}, [allSettled, externalTools]);
|
|
6516
6339
|
const toggleTool = useCallback18((toolId) => {
|
|
6517
6340
|
const toolDef = allToolDefinitions.find((t) => t.id === toolId);
|
|
6518
|
-
if (!toolDef)
|
|
6341
|
+
if (!toolDef) {
|
|
6342
|
+
return;
|
|
6343
|
+
}
|
|
6519
6344
|
const group = toolDef.group;
|
|
6520
6345
|
if (toolId === "artifacts" && isPanelControlled) {
|
|
6521
6346
|
const isCurrentlyOpen = activeTools["top-right"] === "artifacts";
|
|
@@ -6555,7 +6380,9 @@ var ChatInterface = React73.forwardRef(
|
|
|
6555
6380
|
}, [isTreeMode, conversationTree, messages]);
|
|
6556
6381
|
const latestUserMessageIndex = useMemo4(() => {
|
|
6557
6382
|
for (let i = effectiveMessages.length - 1; i >= 0; i--) {
|
|
6558
|
-
if (effectiveMessages[i].variant === "user")
|
|
6383
|
+
if (effectiveMessages[i].variant === "user") {
|
|
6384
|
+
return i;
|
|
6385
|
+
}
|
|
6559
6386
|
}
|
|
6560
6387
|
return -1;
|
|
6561
6388
|
}, [effectiveMessages]);
|
|
@@ -6569,9 +6396,15 @@ var ChatInterface = React73.forwardRef(
|
|
|
6569
6396
|
const hasNewOrUpdatedTask = (curr, prev) => {
|
|
6570
6397
|
return curr.some((c) => {
|
|
6571
6398
|
const p = prev.find((x) => x.id === c.id);
|
|
6572
|
-
if (!p)
|
|
6573
|
-
|
|
6574
|
-
|
|
6399
|
+
if (!p) {
|
|
6400
|
+
return true;
|
|
6401
|
+
}
|
|
6402
|
+
if (c.status !== p.status || c.label !== p.label) {
|
|
6403
|
+
return true;
|
|
6404
|
+
}
|
|
6405
|
+
if (c.subtasks && hasNewOrUpdatedTask(c.subtasks, p?.subtasks || [])) {
|
|
6406
|
+
return true;
|
|
6407
|
+
}
|
|
6575
6408
|
return false;
|
|
6576
6409
|
});
|
|
6577
6410
|
};
|
|
@@ -6583,7 +6416,9 @@ var ChatInterface = React73.forwardRef(
|
|
|
6583
6416
|
}, [artifactNodes, tasks, isPanelControlled]);
|
|
6584
6417
|
const handleBranchSwitch = useCallback18(
|
|
6585
6418
|
(nodeId, direction) => {
|
|
6586
|
-
if (!isTreeMode || !conversationTree || !onTreeChange)
|
|
6419
|
+
if (!isTreeMode || !conversationTree || !onTreeChange) {
|
|
6420
|
+
return;
|
|
6421
|
+
}
|
|
6587
6422
|
const newTree = switchBranch(conversationTree, nodeId, direction);
|
|
6588
6423
|
onTreeChange(newTree);
|
|
6589
6424
|
},
|
|
@@ -6625,25 +6460,61 @@ var ChatInterface = React73.forwardRef(
|
|
|
6625
6460
|
},
|
|
6626
6461
|
[onMessageSubmit]
|
|
6627
6462
|
);
|
|
6628
|
-
const toggleSidebar = useCallback18(() => {
|
|
6629
|
-
setSidebarCollapsed((prev) => !prev);
|
|
6630
|
-
}, []);
|
|
6631
6463
|
const isEmpty = effectiveMessages.length === 0;
|
|
6632
6464
|
const leftToolDefs = useMemo4(
|
|
6633
6465
|
() => allToolDefinitions.filter((t) => t.group === "top-left" || t.group === "bottom-left"),
|
|
6634
6466
|
[allToolDefinitions]
|
|
6635
6467
|
);
|
|
6636
6468
|
const rightToolDefs = useMemo4(
|
|
6637
|
-
() => allToolDefinitions.filter(
|
|
6469
|
+
() => allToolDefinitions.filter(
|
|
6470
|
+
(t) => t.group === "top-right" || t.group === "bottom-right"
|
|
6471
|
+
),
|
|
6638
6472
|
[allToolDefinitions]
|
|
6639
6473
|
);
|
|
6640
6474
|
const hasLeftTools = leftToolDefs.length > 0;
|
|
6641
6475
|
const hasRightTools = rightToolDefs.length > 0;
|
|
6642
6476
|
const renderToolContent = (toolId) => {
|
|
6643
|
-
if (!toolId)
|
|
6477
|
+
if (!toolId) {
|
|
6478
|
+
return null;
|
|
6479
|
+
}
|
|
6644
6480
|
switch (toolId) {
|
|
6645
6481
|
case "history":
|
|
6646
|
-
return /* @__PURE__ */ React73.createElement("div", { className: "h-full flex flex-col" }, /* @__PURE__ */ React73.createElement(
|
|
6482
|
+
return /* @__PURE__ */ React73.createElement("div", { className: "h-full flex flex-col" }, /* @__PURE__ */ React73.createElement(
|
|
6483
|
+
"div",
|
|
6484
|
+
{
|
|
6485
|
+
className: "flex items-center justify-between p-4 border-b border-ash/40 shrink-0"
|
|
6486
|
+
},
|
|
6487
|
+
/* @__PURE__ */ React73.createElement("h3", { className: "text-xs font-medium text-white" }, "History"),
|
|
6488
|
+
onNewChat && /* @__PURE__ */ React73.createElement(
|
|
6489
|
+
"button",
|
|
6490
|
+
{
|
|
6491
|
+
onClick: onNewChat,
|
|
6492
|
+
className: cx(
|
|
6493
|
+
"flex px-3 py-1.5",
|
|
6494
|
+
"bg-gold/10 hover:bg-gold/20 text-gold",
|
|
6495
|
+
"border border-gold/30",
|
|
6496
|
+
"text-xs font-medium",
|
|
6497
|
+
"transition-colors duration-200"
|
|
6498
|
+
)
|
|
6499
|
+
},
|
|
6500
|
+
/* @__PURE__ */ React73.createElement(
|
|
6501
|
+
"svg",
|
|
6502
|
+
{
|
|
6503
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6504
|
+
viewBox: "0 0 20 20",
|
|
6505
|
+
fill: "currentColor",
|
|
6506
|
+
className: "w-4 h-4"
|
|
6507
|
+
},
|
|
6508
|
+
/* @__PURE__ */ React73.createElement(
|
|
6509
|
+
"path",
|
|
6510
|
+
{
|
|
6511
|
+
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"
|
|
6512
|
+
}
|
|
6513
|
+
)
|
|
6514
|
+
),
|
|
6515
|
+
"New Chat"
|
|
6516
|
+
)
|
|
6517
|
+
), /* @__PURE__ */ React73.createElement("div", { className: "flex-1 overflow-y-auto py-2" }, conversations.length === 0 ? /* @__PURE__ */ React73.createElement("p", { className: "px-4 py-2 text-xs text-silver/60" }, "No conversations yet") : /* @__PURE__ */ React73.createElement("div", { className: "space-y-1 px-2" }, conversations.map((conversation) => /* @__PURE__ */ React73.createElement(
|
|
6647
6518
|
"button",
|
|
6648
6519
|
{
|
|
6649
6520
|
key: conversation.id,
|
|
@@ -6681,18 +6552,6 @@ var ChatInterface = React73.forwardRef(
|
|
|
6681
6552
|
className: cx("flex h-full w-full bg-obsidian overflow-hidden", className),
|
|
6682
6553
|
...rest
|
|
6683
6554
|
},
|
|
6684
|
-
/* @__PURE__ */ React73.createElement(
|
|
6685
|
-
ConversationSidebar,
|
|
6686
|
-
{
|
|
6687
|
-
conversations,
|
|
6688
|
-
isCollapsed: sidebarCollapsed,
|
|
6689
|
-
onSelectConversation,
|
|
6690
|
-
onNewChat,
|
|
6691
|
-
onToggleCollapse: toggleSidebar,
|
|
6692
|
-
width: sidebarWidth,
|
|
6693
|
-
onResizeStart: startResizingSidebar
|
|
6694
|
-
}
|
|
6695
|
-
),
|
|
6696
6555
|
hasLeftTools && /* @__PURE__ */ React73.createElement(
|
|
6697
6556
|
ToolSidebar,
|
|
6698
6557
|
{
|
|
@@ -7115,6 +6974,7 @@ export {
|
|
|
7115
6974
|
BreadcrumbLink,
|
|
7116
6975
|
Button,
|
|
7117
6976
|
Card,
|
|
6977
|
+
ChatBubbleIcon,
|
|
7118
6978
|
ChatInput,
|
|
7119
6979
|
ChatInterface,
|
|
7120
6980
|
ChatView,
|
|
@@ -7124,11 +6984,9 @@ export {
|
|
|
7124
6984
|
ChevronRightIcon,
|
|
7125
6985
|
CloseIcon,
|
|
7126
6986
|
Col,
|
|
7127
|
-
CollapsedSidebarToggle,
|
|
7128
6987
|
ColorSwatch,
|
|
7129
6988
|
ConfirmDialog,
|
|
7130
6989
|
Container,
|
|
7131
|
-
ConversationSidebar,
|
|
7132
6990
|
CrossSquareIcon,
|
|
7133
6991
|
Divider,
|
|
7134
6992
|
Drawer,
|