@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/README.md +109 -118
- package/dist/index.d.mts +195 -11
- package/dist/index.d.ts +195 -11
- package/dist/index.js +1034 -362
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +965 -307
- package/dist/index.mjs.map +1 -1
- package/dist/styles/theme.css +20 -0
- package/llms.md +68 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __export(index_exports, {
|
|
|
39
39
|
ArtifactsPanel: () => ArtifactsPanel,
|
|
40
40
|
ArtifactsPanelToggle: () => ArtifactsPanelToggle,
|
|
41
41
|
AttachmentPreview: () => AttachmentPreview,
|
|
42
|
+
AudioCard: () => AudioCard,
|
|
42
43
|
Avatar: () => Avatar,
|
|
43
44
|
Badge: () => Badge,
|
|
44
45
|
BranchNavigator: () => BranchNavigator,
|
|
@@ -51,17 +52,25 @@ __export(index_exports, {
|
|
|
51
52
|
ChatInput: () => ChatInput,
|
|
52
53
|
ChatInterface: () => ChatInterface,
|
|
53
54
|
ChatView: () => ChatView,
|
|
55
|
+
CheckSquareIcon: () => CheckSquareIcon,
|
|
54
56
|
Checkbox: () => Checkbox,
|
|
57
|
+
ChevronLeftIcon: () => ChevronLeftIcon,
|
|
58
|
+
ChevronRightIcon: () => ChevronRightIcon,
|
|
59
|
+
CloseIcon: () => CloseIcon,
|
|
55
60
|
Col: () => Col,
|
|
56
61
|
CollapsedSidebarToggle: () => CollapsedSidebarToggle,
|
|
57
62
|
ColorSwatch: () => ColorSwatch,
|
|
58
63
|
ConfirmDialog: () => ConfirmDialog,
|
|
59
64
|
Container: () => Container,
|
|
60
65
|
ConversationSidebar: () => ConversationSidebar,
|
|
66
|
+
CrossSquareIcon: () => CrossSquareIcon,
|
|
61
67
|
Divider: () => Divider,
|
|
62
68
|
Drawer: () => Drawer,
|
|
69
|
+
EmptySquareIcon: () => EmptySquareIcon,
|
|
70
|
+
ExpandIcon: () => ExpandIcon,
|
|
63
71
|
FileChip: () => FileChip,
|
|
64
72
|
HelperText: () => HelperText,
|
|
73
|
+
HistoryIcon: () => HistoryIcon,
|
|
65
74
|
ImageCard: () => ImageCard,
|
|
66
75
|
Input: () => Input,
|
|
67
76
|
InputGroup: () => InputGroup,
|
|
@@ -71,6 +80,7 @@ __export(index_exports, {
|
|
|
71
80
|
InputRightElement: () => InputRightElement,
|
|
72
81
|
InputWrapper: () => InputWrapper,
|
|
73
82
|
Label: () => Label,
|
|
83
|
+
LayersIcon: () => LayersIcon,
|
|
74
84
|
List: () => List,
|
|
75
85
|
ListItem: () => ListItem,
|
|
76
86
|
ListItemText: () => ListItemText,
|
|
@@ -92,16 +102,19 @@ __export(index_exports, {
|
|
|
92
102
|
NavbarItem: () => NavbarItem,
|
|
93
103
|
NavbarLink: () => NavbarLink,
|
|
94
104
|
Pagination: () => Pagination,
|
|
105
|
+
PlusIcon: () => PlusIcon,
|
|
95
106
|
Popover: () => Popover,
|
|
96
107
|
Progress: () => Progress,
|
|
97
108
|
PromptDialog: () => PromptDialog,
|
|
98
109
|
Radio: () => Radio,
|
|
99
110
|
Row: () => Row,
|
|
111
|
+
ScriptCard: () => ScriptCard,
|
|
100
112
|
SectionHeading: () => SectionHeading,
|
|
101
113
|
Select: () => Select,
|
|
102
114
|
Skeleton: () => Skeleton,
|
|
103
115
|
Slider: () => Slider,
|
|
104
116
|
Spinner: () => Spinner,
|
|
117
|
+
SquareLoaderIcon: () => SquareLoaderIcon,
|
|
105
118
|
Stack: () => Stack,
|
|
106
119
|
Stepper: () => Stepper,
|
|
107
120
|
StreamingCursor: () => StreamingCursor,
|
|
@@ -121,6 +134,7 @@ __export(index_exports, {
|
|
|
121
134
|
Textarea: () => Textarea,
|
|
122
135
|
ThinkingIndicator: () => ThinkingIndicator,
|
|
123
136
|
ToastProvider: () => ToastProvider,
|
|
137
|
+
TodosList: () => TodosList,
|
|
124
138
|
Tooltip: () => Tooltip,
|
|
125
139
|
VideoCard: () => VideoCard,
|
|
126
140
|
addMessageToTree: () => addMessageToTree,
|
|
@@ -3427,11 +3441,299 @@ var Stepper = import_react40.default.forwardRef(
|
|
|
3427
3441
|
);
|
|
3428
3442
|
Stepper.displayName = "Stepper";
|
|
3429
3443
|
|
|
3430
|
-
// src/components/
|
|
3444
|
+
// src/components/icons/ChevronLeftIcon.tsx
|
|
3445
|
+
var import_react41 = __toESM(require("react"));
|
|
3446
|
+
function ChevronLeftIcon({ className, ...props }) {
|
|
3447
|
+
return /* @__PURE__ */ import_react41.default.createElement(
|
|
3448
|
+
"svg",
|
|
3449
|
+
{
|
|
3450
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3451
|
+
viewBox: "0 0 20 20",
|
|
3452
|
+
fill: "currentColor",
|
|
3453
|
+
className,
|
|
3454
|
+
...props
|
|
3455
|
+
},
|
|
3456
|
+
/* @__PURE__ */ import_react41.default.createElement(
|
|
3457
|
+
"path",
|
|
3458
|
+
{
|
|
3459
|
+
fillRule: "evenodd",
|
|
3460
|
+
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",
|
|
3461
|
+
clipRule: "evenodd"
|
|
3462
|
+
}
|
|
3463
|
+
)
|
|
3464
|
+
);
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
// src/components/icons/ChevronRightIcon.tsx
|
|
3431
3468
|
var import_react42 = __toESM(require("react"));
|
|
3469
|
+
function ChevronRightIcon({ className, ...props }) {
|
|
3470
|
+
return /* @__PURE__ */ import_react42.default.createElement(
|
|
3471
|
+
"svg",
|
|
3472
|
+
{
|
|
3473
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3474
|
+
viewBox: "0 0 20 20",
|
|
3475
|
+
fill: "currentColor",
|
|
3476
|
+
className,
|
|
3477
|
+
...props
|
|
3478
|
+
},
|
|
3479
|
+
/* @__PURE__ */ import_react42.default.createElement(
|
|
3480
|
+
"path",
|
|
3481
|
+
{
|
|
3482
|
+
fillRule: "evenodd",
|
|
3483
|
+
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",
|
|
3484
|
+
clipRule: "evenodd"
|
|
3485
|
+
}
|
|
3486
|
+
)
|
|
3487
|
+
);
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
// src/components/icons/CloseIcon.tsx
|
|
3491
|
+
var import_react43 = __toESM(require("react"));
|
|
3492
|
+
function CloseIcon({ className, ...props }) {
|
|
3493
|
+
return /* @__PURE__ */ import_react43.default.createElement(
|
|
3494
|
+
"svg",
|
|
3495
|
+
{
|
|
3496
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3497
|
+
viewBox: "0 0 20 20",
|
|
3498
|
+
fill: "currentColor",
|
|
3499
|
+
className,
|
|
3500
|
+
...props
|
|
3501
|
+
},
|
|
3502
|
+
/* @__PURE__ */ import_react43.default.createElement(
|
|
3503
|
+
"path",
|
|
3504
|
+
{
|
|
3505
|
+
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"
|
|
3506
|
+
}
|
|
3507
|
+
)
|
|
3508
|
+
);
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3511
|
+
// src/components/icons/ExpandIcon.tsx
|
|
3512
|
+
var import_react44 = __toESM(require("react"));
|
|
3513
|
+
function ExpandIcon({ className, ...props }) {
|
|
3514
|
+
return /* @__PURE__ */ import_react44.default.createElement(
|
|
3515
|
+
"svg",
|
|
3516
|
+
{
|
|
3517
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3518
|
+
viewBox: "0 0 20 20",
|
|
3519
|
+
fill: "currentColor",
|
|
3520
|
+
className,
|
|
3521
|
+
...props
|
|
3522
|
+
},
|
|
3523
|
+
/* @__PURE__ */ import_react44.default.createElement(
|
|
3524
|
+
"path",
|
|
3525
|
+
{
|
|
3526
|
+
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"
|
|
3527
|
+
}
|
|
3528
|
+
)
|
|
3529
|
+
);
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
// src/components/icons/HistoryIcon.tsx
|
|
3533
|
+
var import_react45 = __toESM(require("react"));
|
|
3534
|
+
function HistoryIcon({ className, ...props }) {
|
|
3535
|
+
return /* @__PURE__ */ import_react45.default.createElement(
|
|
3536
|
+
"svg",
|
|
3537
|
+
{
|
|
3538
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3539
|
+
viewBox: "0 0 20 20",
|
|
3540
|
+
fill: "currentColor",
|
|
3541
|
+
className,
|
|
3542
|
+
...props
|
|
3543
|
+
},
|
|
3544
|
+
/* @__PURE__ */ import_react45.default.createElement(
|
|
3545
|
+
"path",
|
|
3546
|
+
{
|
|
3547
|
+
fillRule: "evenodd",
|
|
3548
|
+
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",
|
|
3549
|
+
clipRule: "evenodd"
|
|
3550
|
+
}
|
|
3551
|
+
)
|
|
3552
|
+
);
|
|
3553
|
+
}
|
|
3554
|
+
|
|
3555
|
+
// src/components/icons/LayersIcon.tsx
|
|
3556
|
+
var import_react46 = __toESM(require("react"));
|
|
3557
|
+
function LayersIcon({ className, ...props }) {
|
|
3558
|
+
return /* @__PURE__ */ import_react46.default.createElement(
|
|
3559
|
+
"svg",
|
|
3560
|
+
{
|
|
3561
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3562
|
+
viewBox: "0 0 20 20",
|
|
3563
|
+
fill: "currentColor",
|
|
3564
|
+
className,
|
|
3565
|
+
...props
|
|
3566
|
+
},
|
|
3567
|
+
/* @__PURE__ */ import_react46.default.createElement(
|
|
3568
|
+
"path",
|
|
3569
|
+
{
|
|
3570
|
+
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"
|
|
3571
|
+
}
|
|
3572
|
+
),
|
|
3573
|
+
/* @__PURE__ */ import_react46.default.createElement(
|
|
3574
|
+
"path",
|
|
3575
|
+
{
|
|
3576
|
+
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"
|
|
3577
|
+
}
|
|
3578
|
+
),
|
|
3579
|
+
/* @__PURE__ */ import_react46.default.createElement(
|
|
3580
|
+
"path",
|
|
3581
|
+
{
|
|
3582
|
+
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"
|
|
3583
|
+
}
|
|
3584
|
+
)
|
|
3585
|
+
);
|
|
3586
|
+
}
|
|
3587
|
+
|
|
3588
|
+
// src/components/icons/PlusIcon.tsx
|
|
3589
|
+
var import_react47 = __toESM(require("react"));
|
|
3590
|
+
function PlusIcon({ className, ...props }) {
|
|
3591
|
+
return /* @__PURE__ */ import_react47.default.createElement(
|
|
3592
|
+
"svg",
|
|
3593
|
+
{
|
|
3594
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3595
|
+
viewBox: "0 0 20 20",
|
|
3596
|
+
fill: "currentColor",
|
|
3597
|
+
className,
|
|
3598
|
+
...props
|
|
3599
|
+
},
|
|
3600
|
+
/* @__PURE__ */ import_react47.default.createElement(
|
|
3601
|
+
"path",
|
|
3602
|
+
{
|
|
3603
|
+
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"
|
|
3604
|
+
}
|
|
3605
|
+
)
|
|
3606
|
+
);
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3609
|
+
// src/components/icons/CheckSquareIcon.tsx
|
|
3610
|
+
var import_react48 = __toESM(require("react"));
|
|
3611
|
+
function CheckSquareIcon({ className, ...props }) {
|
|
3612
|
+
return /* @__PURE__ */ import_react48.default.createElement(
|
|
3613
|
+
"div",
|
|
3614
|
+
{
|
|
3615
|
+
className: cx(
|
|
3616
|
+
"relative w-4 h-4 flex-shrink-0 border-2 border-gold bg-gold/10",
|
|
3617
|
+
className
|
|
3618
|
+
),
|
|
3619
|
+
...props
|
|
3620
|
+
},
|
|
3621
|
+
/* @__PURE__ */ import_react48.default.createElement(
|
|
3622
|
+
"svg",
|
|
3623
|
+
{
|
|
3624
|
+
viewBox: "0 0 16 16",
|
|
3625
|
+
fill: "none",
|
|
3626
|
+
className: "absolute inset-0 w-full h-full p-0.5"
|
|
3627
|
+
},
|
|
3628
|
+
/* @__PURE__ */ import_react48.default.createElement(
|
|
3629
|
+
"path",
|
|
3630
|
+
{
|
|
3631
|
+
d: "M3 8l3 3 7-7",
|
|
3632
|
+
stroke: "currentColor",
|
|
3633
|
+
strokeWidth: "2",
|
|
3634
|
+
strokeLinecap: "round",
|
|
3635
|
+
strokeLinejoin: "round",
|
|
3636
|
+
className: "text-gold"
|
|
3637
|
+
}
|
|
3638
|
+
)
|
|
3639
|
+
)
|
|
3640
|
+
);
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3643
|
+
// src/components/icons/EmptySquareIcon.tsx
|
|
3644
|
+
var import_react49 = __toESM(require("react"));
|
|
3645
|
+
function EmptySquareIcon({ className, ...props }) {
|
|
3646
|
+
return /* @__PURE__ */ import_react49.default.createElement(
|
|
3647
|
+
"div",
|
|
3648
|
+
{
|
|
3649
|
+
className: cx(
|
|
3650
|
+
"w-4 h-4 flex-shrink-0 border-2 border-ash/60",
|
|
3651
|
+
className
|
|
3652
|
+
),
|
|
3653
|
+
...props
|
|
3654
|
+
}
|
|
3655
|
+
);
|
|
3656
|
+
}
|
|
3657
|
+
|
|
3658
|
+
// src/components/icons/CrossSquareIcon.tsx
|
|
3659
|
+
var import_react50 = __toESM(require("react"));
|
|
3660
|
+
function CrossSquareIcon({ className, variant = "cancelled", ...props }) {
|
|
3661
|
+
return /* @__PURE__ */ import_react50.default.createElement(
|
|
3662
|
+
"div",
|
|
3663
|
+
{
|
|
3664
|
+
className: cx(
|
|
3665
|
+
"relative w-4 h-4 flex-shrink-0 border-2",
|
|
3666
|
+
variant === "failed" ? "border-error/60 bg-error/5" : "border-ash/40 bg-ash/5",
|
|
3667
|
+
className
|
|
3668
|
+
),
|
|
3669
|
+
...props
|
|
3670
|
+
},
|
|
3671
|
+
/* @__PURE__ */ import_react50.default.createElement(
|
|
3672
|
+
"svg",
|
|
3673
|
+
{
|
|
3674
|
+
viewBox: "0 0 16 16",
|
|
3675
|
+
fill: "none",
|
|
3676
|
+
className: "absolute inset-0 w-full h-full p-0.5"
|
|
3677
|
+
},
|
|
3678
|
+
/* @__PURE__ */ import_react50.default.createElement(
|
|
3679
|
+
"path",
|
|
3680
|
+
{
|
|
3681
|
+
d: "M4 4l8 8M12 4l-8 8",
|
|
3682
|
+
stroke: "currentColor",
|
|
3683
|
+
strokeWidth: "2",
|
|
3684
|
+
strokeLinecap: "round",
|
|
3685
|
+
className: variant === "failed" ? "text-error/60" : "text-ash/40"
|
|
3686
|
+
}
|
|
3687
|
+
)
|
|
3688
|
+
)
|
|
3689
|
+
);
|
|
3690
|
+
}
|
|
3691
|
+
|
|
3692
|
+
// src/components/icons/SquareLoaderIcon.tsx
|
|
3693
|
+
var import_react51 = __toESM(require("react"));
|
|
3694
|
+
function SquareLoaderIcon({ className, ...props }) {
|
|
3695
|
+
return /* @__PURE__ */ import_react51.default.createElement("div", { className: cx("relative w-4 h-4 flex-shrink-0", className), ...props }, /* @__PURE__ */ import_react51.default.createElement(
|
|
3696
|
+
"svg",
|
|
3697
|
+
{
|
|
3698
|
+
viewBox: "0 0 16 16",
|
|
3699
|
+
className: "w-full h-full animate-snake-spin"
|
|
3700
|
+
},
|
|
3701
|
+
/* @__PURE__ */ import_react51.default.createElement(
|
|
3702
|
+
"rect",
|
|
3703
|
+
{
|
|
3704
|
+
x: "1",
|
|
3705
|
+
y: "1",
|
|
3706
|
+
width: "14",
|
|
3707
|
+
height: "14",
|
|
3708
|
+
fill: "none",
|
|
3709
|
+
stroke: "currentColor",
|
|
3710
|
+
strokeWidth: "2",
|
|
3711
|
+
className: "text-ash/40"
|
|
3712
|
+
}
|
|
3713
|
+
),
|
|
3714
|
+
/* @__PURE__ */ import_react51.default.createElement(
|
|
3715
|
+
"rect",
|
|
3716
|
+
{
|
|
3717
|
+
x: "1",
|
|
3718
|
+
y: "1",
|
|
3719
|
+
width: "14",
|
|
3720
|
+
height: "14",
|
|
3721
|
+
fill: "none",
|
|
3722
|
+
stroke: "currentColor",
|
|
3723
|
+
strokeWidth: "2",
|
|
3724
|
+
strokeDasharray: "14 42",
|
|
3725
|
+
strokeLinecap: "square",
|
|
3726
|
+
className: "text-gold animate-snake-travel"
|
|
3727
|
+
}
|
|
3728
|
+
)
|
|
3729
|
+
));
|
|
3730
|
+
}
|
|
3731
|
+
|
|
3732
|
+
// src/components/Message.tsx
|
|
3733
|
+
var import_react53 = __toESM(require("react"));
|
|
3432
3734
|
|
|
3433
3735
|
// src/components/MarkdownContent.tsx
|
|
3434
|
-
var
|
|
3736
|
+
var import_react52 = __toESM(require("react"));
|
|
3435
3737
|
var import_dompurify = __toESM(require("dompurify"));
|
|
3436
3738
|
var DEFAULT_SANITIZE_CONFIG = {
|
|
3437
3739
|
ALLOWED_TAGS: [
|
|
@@ -3501,7 +3803,7 @@ var DEFAULT_SANITIZE_CONFIG = {
|
|
|
3501
3803
|
ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto|tel):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i
|
|
3502
3804
|
};
|
|
3503
3805
|
function useDOMPurifySetup() {
|
|
3504
|
-
(0,
|
|
3806
|
+
(0, import_react52.useMemo)(() => {
|
|
3505
3807
|
import_dompurify.default.addHook("afterSanitizeAttributes", (node) => {
|
|
3506
3808
|
if (node.tagName === "A") {
|
|
3507
3809
|
node.setAttribute("target", "_blank");
|
|
@@ -3537,10 +3839,10 @@ function injectStreamingCursor(html, cursorClassName) {
|
|
|
3537
3839
|
target.insertAdjacentHTML("beforeend", cursorHtml);
|
|
3538
3840
|
return container.innerHTML;
|
|
3539
3841
|
}
|
|
3540
|
-
var MarkdownContent =
|
|
3842
|
+
var MarkdownContent = import_react52.default.forwardRef(
|
|
3541
3843
|
({ className, content, sanitizeConfig, isStreaming, cursorClassName, ...rest }, ref) => {
|
|
3542
3844
|
useDOMPurifySetup();
|
|
3543
|
-
const sanitizedHtml = (0,
|
|
3845
|
+
const sanitizedHtml = (0, import_react52.useMemo)(() => {
|
|
3544
3846
|
if (!content && !isStreaming) {
|
|
3545
3847
|
return "";
|
|
3546
3848
|
}
|
|
@@ -3551,7 +3853,7 @@ var MarkdownContent = import_react41.default.forwardRef(
|
|
|
3551
3853
|
}
|
|
3552
3854
|
return sanitized;
|
|
3553
3855
|
}, [content, sanitizeConfig, isStreaming, cursorClassName]);
|
|
3554
|
-
return /* @__PURE__ */
|
|
3856
|
+
return /* @__PURE__ */ import_react52.default.createElement(
|
|
3555
3857
|
"div",
|
|
3556
3858
|
{
|
|
3557
3859
|
ref,
|
|
@@ -3569,7 +3871,7 @@ var variantStyles2 = {
|
|
|
3569
3871
|
user: "bg-gold text-obsidian ml-auto",
|
|
3570
3872
|
assistant: "bg-charcoal border border-ash text-white mr-auto"
|
|
3571
3873
|
};
|
|
3572
|
-
var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */
|
|
3874
|
+
var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ import_react53.default.createElement(
|
|
3573
3875
|
"button",
|
|
3574
3876
|
{
|
|
3575
3877
|
type: "button",
|
|
@@ -3585,7 +3887,7 @@ var ActionButton = ({ onClick, label, children, className, disabled }) => /* @__
|
|
|
3585
3887
|
},
|
|
3586
3888
|
children
|
|
3587
3889
|
);
|
|
3588
|
-
var CopyIcon = () => /* @__PURE__ */
|
|
3890
|
+
var CopyIcon = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3589
3891
|
"svg",
|
|
3590
3892
|
{
|
|
3591
3893
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3597,10 +3899,10 @@ var CopyIcon = () => /* @__PURE__ */ import_react42.default.createElement(
|
|
|
3597
3899
|
strokeLinejoin: "round",
|
|
3598
3900
|
className: "w-3.5 h-3.5"
|
|
3599
3901
|
},
|
|
3600
|
-
/* @__PURE__ */
|
|
3601
|
-
/* @__PURE__ */
|
|
3902
|
+
/* @__PURE__ */ import_react53.default.createElement("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
|
|
3903
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
3602
3904
|
);
|
|
3603
|
-
var CheckIcon = () => /* @__PURE__ */
|
|
3905
|
+
var CheckIcon = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3604
3906
|
"svg",
|
|
3605
3907
|
{
|
|
3606
3908
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3612,9 +3914,9 @@ var CheckIcon = () => /* @__PURE__ */ import_react42.default.createElement(
|
|
|
3612
3914
|
strokeLinejoin: "round",
|
|
3613
3915
|
className: "w-3.5 h-3.5 text-success"
|
|
3614
3916
|
},
|
|
3615
|
-
/* @__PURE__ */
|
|
3917
|
+
/* @__PURE__ */ import_react53.default.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
3616
3918
|
);
|
|
3617
|
-
var PencilIcon = () => /* @__PURE__ */
|
|
3919
|
+
var PencilIcon = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3618
3920
|
"svg",
|
|
3619
3921
|
{
|
|
3620
3922
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3626,10 +3928,10 @@ var PencilIcon = () => /* @__PURE__ */ import_react42.default.createElement(
|
|
|
3626
3928
|
strokeLinejoin: "round",
|
|
3627
3929
|
className: "w-3.5 h-3.5"
|
|
3628
3930
|
},
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3931
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" }),
|
|
3932
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "m15 5 4 4" })
|
|
3631
3933
|
);
|
|
3632
|
-
var RetryIcon = () => /* @__PURE__ */
|
|
3934
|
+
var RetryIcon = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3633
3935
|
"svg",
|
|
3634
3936
|
{
|
|
3635
3937
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3641,12 +3943,12 @@ var RetryIcon = () => /* @__PURE__ */ import_react42.default.createElement(
|
|
|
3641
3943
|
strokeLinejoin: "round",
|
|
3642
3944
|
className: "w-3.5 h-3.5"
|
|
3643
3945
|
},
|
|
3644
|
-
/* @__PURE__ */
|
|
3645
|
-
/* @__PURE__ */
|
|
3646
|
-
/* @__PURE__ */
|
|
3647
|
-
/* @__PURE__ */
|
|
3946
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
3947
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M21 3v5h-5" }),
|
|
3948
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
3949
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M8 16H3v5" })
|
|
3648
3950
|
);
|
|
3649
|
-
var
|
|
3951
|
+
var ChevronLeftIcon2 = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3650
3952
|
"svg",
|
|
3651
3953
|
{
|
|
3652
3954
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3658,9 +3960,9 @@ var ChevronLeftIcon = () => /* @__PURE__ */ import_react42.default.createElement
|
|
|
3658
3960
|
strokeLinejoin: "round",
|
|
3659
3961
|
className: "w-3 h-3"
|
|
3660
3962
|
},
|
|
3661
|
-
/* @__PURE__ */
|
|
3963
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "m15 18-6-6 6-6" })
|
|
3662
3964
|
);
|
|
3663
|
-
var
|
|
3965
|
+
var ChevronRightIcon2 = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3664
3966
|
"svg",
|
|
3665
3967
|
{
|
|
3666
3968
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3672,9 +3974,9 @@ var ChevronRightIcon = () => /* @__PURE__ */ import_react42.default.createElemen
|
|
|
3672
3974
|
strokeLinejoin: "round",
|
|
3673
3975
|
className: "w-3 h-3"
|
|
3674
3976
|
},
|
|
3675
|
-
/* @__PURE__ */
|
|
3977
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "m9 18 6-6-6-6" })
|
|
3676
3978
|
);
|
|
3677
|
-
var GitBranchIcon = () => /* @__PURE__ */
|
|
3979
|
+
var GitBranchIcon = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3678
3980
|
"svg",
|
|
3679
3981
|
{
|
|
3680
3982
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3686,12 +3988,12 @@ var GitBranchIcon = () => /* @__PURE__ */ import_react42.default.createElement(
|
|
|
3686
3988
|
strokeLinejoin: "round",
|
|
3687
3989
|
className: "w-3 h-3 mr-0.5 text-silver/50"
|
|
3688
3990
|
},
|
|
3689
|
-
/* @__PURE__ */
|
|
3690
|
-
/* @__PURE__ */
|
|
3691
|
-
/* @__PURE__ */
|
|
3692
|
-
/* @__PURE__ */
|
|
3991
|
+
/* @__PURE__ */ import_react53.default.createElement("line", { x1: "6", x2: "6", y1: "3", y2: "15" }),
|
|
3992
|
+
/* @__PURE__ */ import_react53.default.createElement("circle", { cx: "18", cy: "6", r: "3" }),
|
|
3993
|
+
/* @__PURE__ */ import_react53.default.createElement("circle", { cx: "6", cy: "18", r: "3" }),
|
|
3994
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M18 9a9 9 0 0 1-9 9" })
|
|
3693
3995
|
);
|
|
3694
|
-
var XIcon = () => /* @__PURE__ */
|
|
3996
|
+
var XIcon = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3695
3997
|
"svg",
|
|
3696
3998
|
{
|
|
3697
3999
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3703,10 +4005,10 @@ var XIcon = () => /* @__PURE__ */ import_react42.default.createElement(
|
|
|
3703
4005
|
strokeLinejoin: "round",
|
|
3704
4006
|
className: "w-4 h-4"
|
|
3705
4007
|
},
|
|
3706
|
-
/* @__PURE__ */
|
|
3707
|
-
/* @__PURE__ */
|
|
4008
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M18 6 6 18" }),
|
|
4009
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "m6 6 12 12" })
|
|
3708
4010
|
);
|
|
3709
|
-
var SendIcon = () => /* @__PURE__ */
|
|
4011
|
+
var SendIcon = () => /* @__PURE__ */ import_react53.default.createElement(
|
|
3710
4012
|
"svg",
|
|
3711
4013
|
{
|
|
3712
4014
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3718,10 +4020,10 @@ var SendIcon = () => /* @__PURE__ */ import_react42.default.createElement(
|
|
|
3718
4020
|
strokeLinejoin: "round",
|
|
3719
4021
|
className: "w-4 h-4"
|
|
3720
4022
|
},
|
|
3721
|
-
/* @__PURE__ */
|
|
3722
|
-
/* @__PURE__ */
|
|
4023
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }),
|
|
4024
|
+
/* @__PURE__ */ import_react53.default.createElement("path", { d: "M22 2 11 13" })
|
|
3723
4025
|
);
|
|
3724
|
-
var Message =
|
|
4026
|
+
var Message = import_react53.default.forwardRef(
|
|
3725
4027
|
({
|
|
3726
4028
|
variant = "assistant",
|
|
3727
4029
|
className,
|
|
@@ -3733,13 +4035,13 @@ var Message = import_react42.default.forwardRef(
|
|
|
3733
4035
|
...rest
|
|
3734
4036
|
}, ref) => {
|
|
3735
4037
|
const isUser = variant === "user";
|
|
3736
|
-
const [copied, setCopied] = (0,
|
|
3737
|
-
const [isEditing, setIsEditing] = (0,
|
|
3738
|
-
const [editValue, setEditValue] = (0,
|
|
3739
|
-
const textareaRef = (0,
|
|
4038
|
+
const [copied, setCopied] = (0, import_react53.useState)(false);
|
|
4039
|
+
const [isEditing, setIsEditing] = (0, import_react53.useState)(false);
|
|
4040
|
+
const [editValue, setEditValue] = (0, import_react53.useState)(content);
|
|
4041
|
+
const textareaRef = (0, import_react53.useRef)(null);
|
|
3740
4042
|
const showBranchNav = branchInfo && branchInfo.total > 1;
|
|
3741
4043
|
const showActions = actions && !hideActions && !isStreaming;
|
|
3742
|
-
(0,
|
|
4044
|
+
(0, import_react53.useEffect)(() => {
|
|
3743
4045
|
if (isEditing && textareaRef.current) {
|
|
3744
4046
|
const textarea = textareaRef.current;
|
|
3745
4047
|
textarea.style.height = "auto";
|
|
@@ -3793,7 +4095,7 @@ var Message = import_react42.default.forwardRef(
|
|
|
3793
4095
|
textarea.style.height = "auto";
|
|
3794
4096
|
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
3795
4097
|
};
|
|
3796
|
-
return /* @__PURE__ */
|
|
4098
|
+
return /* @__PURE__ */ import_react53.default.createElement(
|
|
3797
4099
|
"div",
|
|
3798
4100
|
{
|
|
3799
4101
|
ref,
|
|
@@ -3804,7 +4106,7 @@ var Message = import_react42.default.forwardRef(
|
|
|
3804
4106
|
),
|
|
3805
4107
|
...rest
|
|
3806
4108
|
},
|
|
3807
|
-
isUser && isEditing ? /* @__PURE__ */
|
|
4109
|
+
isUser && isEditing ? /* @__PURE__ */ import_react53.default.createElement("div", { className: "w-full max-w-11/12" }, /* @__PURE__ */ import_react53.default.createElement("div", { className: "relative bg-gold" }, /* @__PURE__ */ import_react53.default.createElement(
|
|
3808
4110
|
"textarea",
|
|
3809
4111
|
{
|
|
3810
4112
|
ref: textareaRef,
|
|
@@ -3814,7 +4116,7 @@ var Message = import_react42.default.forwardRef(
|
|
|
3814
4116
|
className: "w-full bg-transparent text-obsidian px-3 py-2 pr-20 resize-none outline-none min-h-10 text-sm",
|
|
3815
4117
|
rows: 1
|
|
3816
4118
|
}
|
|
3817
|
-
), /* @__PURE__ */
|
|
4119
|
+
), /* @__PURE__ */ import_react53.default.createElement("div", { className: "absolute right-1 top-1/2 -translate-y-1/2 flex gap-0.5" }, /* @__PURE__ */ import_react53.default.createElement(
|
|
3818
4120
|
"button",
|
|
3819
4121
|
{
|
|
3820
4122
|
type: "button",
|
|
@@ -3822,8 +4124,8 @@ var Message = import_react42.default.forwardRef(
|
|
|
3822
4124
|
className: "p-1.5 text-obsidian/60 hover:text-obsidian transition-colors",
|
|
3823
4125
|
"aria-label": "Cancel edit"
|
|
3824
4126
|
},
|
|
3825
|
-
/* @__PURE__ */
|
|
3826
|
-
), /* @__PURE__ */
|
|
4127
|
+
/* @__PURE__ */ import_react53.default.createElement(XIcon, null)
|
|
4128
|
+
), /* @__PURE__ */ import_react53.default.createElement(
|
|
3827
4129
|
"button",
|
|
3828
4130
|
{
|
|
3829
4131
|
type: "button",
|
|
@@ -3832,8 +4134,8 @@ var Message = import_react42.default.forwardRef(
|
|
|
3832
4134
|
className: "p-1.5 text-obsidian/60 hover:text-obsidian transition-colors disabled:opacity-30",
|
|
3833
4135
|
"aria-label": "Submit edit"
|
|
3834
4136
|
},
|
|
3835
|
-
/* @__PURE__ */
|
|
3836
|
-
)))) : /* @__PURE__ */
|
|
4137
|
+
/* @__PURE__ */ import_react53.default.createElement(SendIcon, null)
|
|
4138
|
+
)))) : /* @__PURE__ */ import_react53.default.createElement(
|
|
3837
4139
|
"div",
|
|
3838
4140
|
{
|
|
3839
4141
|
className: cx(
|
|
@@ -3841,7 +4143,7 @@ var Message = import_react42.default.forwardRef(
|
|
|
3841
4143
|
variantStyles2[variant]
|
|
3842
4144
|
)
|
|
3843
4145
|
},
|
|
3844
|
-
/* @__PURE__ */
|
|
4146
|
+
/* @__PURE__ */ import_react53.default.createElement(
|
|
3845
4147
|
MarkdownContent,
|
|
3846
4148
|
{
|
|
3847
4149
|
content,
|
|
@@ -3851,17 +4153,17 @@ var Message = import_react42.default.forwardRef(
|
|
|
3851
4153
|
}
|
|
3852
4154
|
)
|
|
3853
4155
|
),
|
|
3854
|
-
showActions && !isEditing && /* @__PURE__ */
|
|
4156
|
+
showActions && !isEditing && /* @__PURE__ */ import_react53.default.createElement("div", { className: cx(
|
|
3855
4157
|
"flex items-center gap-0.5 mt-1",
|
|
3856
4158
|
isUser ? "mr-1" : "ml-1"
|
|
3857
|
-
) }, actions.showCopy !== false && /* @__PURE__ */
|
|
4159
|
+
) }, actions.showCopy !== false && /* @__PURE__ */ import_react53.default.createElement(
|
|
3858
4160
|
ActionButton,
|
|
3859
4161
|
{
|
|
3860
4162
|
onClick: handleCopy,
|
|
3861
4163
|
label: copied ? "Copied!" : "Copy message"
|
|
3862
4164
|
},
|
|
3863
|
-
copied ? /* @__PURE__ */
|
|
3864
|
-
), isUser && actions.onEdit && /* @__PURE__ */
|
|
4165
|
+
copied ? /* @__PURE__ */ import_react53.default.createElement(CheckIcon, null) : /* @__PURE__ */ import_react53.default.createElement(CopyIcon, null)
|
|
4166
|
+
), isUser && actions.onEdit && /* @__PURE__ */ import_react53.default.createElement(ActionButton, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ import_react53.default.createElement(PencilIcon, null)), !isUser && actions.onRetry && /* @__PURE__ */ import_react53.default.createElement(ActionButton, { onClick: actions.onRetry, label: "Regenerate response" }, /* @__PURE__ */ import_react53.default.createElement(RetryIcon, null)), showBranchNav && /* @__PURE__ */ import_react53.default.createElement(import_react53.default.Fragment, null, /* @__PURE__ */ import_react53.default.createElement("div", { className: "w-px h-4 bg-ash/40 mx-1" }), /* @__PURE__ */ import_react53.default.createElement("div", { className: "flex items-center gap-0.5 text-silver/70" }, /* @__PURE__ */ import_react53.default.createElement(GitBranchIcon, null), /* @__PURE__ */ import_react53.default.createElement(
|
|
3865
4167
|
"button",
|
|
3866
4168
|
{
|
|
3867
4169
|
type: "button",
|
|
@@ -3873,8 +4175,8 @@ var Message = import_react42.default.forwardRef(
|
|
|
3873
4175
|
),
|
|
3874
4176
|
"aria-label": "Previous branch"
|
|
3875
4177
|
},
|
|
3876
|
-
/* @__PURE__ */
|
|
3877
|
-
), /* @__PURE__ */
|
|
4178
|
+
/* @__PURE__ */ import_react53.default.createElement(ChevronLeftIcon2, null)
|
|
4179
|
+
), /* @__PURE__ */ import_react53.default.createElement("span", { className: "text-xs tabular-nums min-w-6 text-center" }, branchInfo.current, "/", branchInfo.total), /* @__PURE__ */ import_react53.default.createElement(
|
|
3878
4180
|
"button",
|
|
3879
4181
|
{
|
|
3880
4182
|
type: "button",
|
|
@@ -3886,7 +4188,7 @@ var Message = import_react42.default.forwardRef(
|
|
|
3886
4188
|
),
|
|
3887
4189
|
"aria-label": "Next branch"
|
|
3888
4190
|
},
|
|
3889
|
-
/* @__PURE__ */
|
|
4191
|
+
/* @__PURE__ */ import_react53.default.createElement(ChevronRightIcon2, null)
|
|
3890
4192
|
))))
|
|
3891
4193
|
);
|
|
3892
4194
|
}
|
|
@@ -3894,15 +4196,15 @@ var Message = import_react42.default.forwardRef(
|
|
|
3894
4196
|
Message.displayName = "Message";
|
|
3895
4197
|
|
|
3896
4198
|
// src/components/StreamingCursor.tsx
|
|
3897
|
-
var
|
|
3898
|
-
var StreamingCursor =
|
|
4199
|
+
var import_react54 = __toESM(require("react"));
|
|
4200
|
+
var StreamingCursor = import_react54.default.forwardRef(
|
|
3899
4201
|
({ className, variant = "line", ...rest }, ref) => {
|
|
3900
4202
|
const variantStyles3 = {
|
|
3901
4203
|
block: "w-2.5 h-cursor translate-y-cursor-offset",
|
|
3902
4204
|
line: "w-0.5 h-cursor translate-y-cursor-offset",
|
|
3903
4205
|
underscore: "w-2.5 h-0.5 self-end mb-0.5"
|
|
3904
4206
|
};
|
|
3905
|
-
return /* @__PURE__ */
|
|
4207
|
+
return /* @__PURE__ */ import_react54.default.createElement(
|
|
3906
4208
|
"span",
|
|
3907
4209
|
{
|
|
3908
4210
|
ref,
|
|
@@ -3920,18 +4222,18 @@ var StreamingCursor = import_react43.default.forwardRef(
|
|
|
3920
4222
|
StreamingCursor.displayName = "StreamingCursor";
|
|
3921
4223
|
|
|
3922
4224
|
// src/components/chat/ChatInterface.tsx
|
|
3923
|
-
var
|
|
4225
|
+
var import_react68 = __toESM(require("react"));
|
|
3924
4226
|
|
|
3925
4227
|
// src/components/chat/ChatView.tsx
|
|
3926
|
-
var
|
|
4228
|
+
var import_react58 = __toESM(require("react"));
|
|
3927
4229
|
|
|
3928
4230
|
// src/components/chat/hooks/useScrollAnchor.ts
|
|
3929
|
-
var
|
|
4231
|
+
var import_react55 = require("react");
|
|
3930
4232
|
function useScrollAnchor(options = {}) {
|
|
3931
4233
|
const { behavior = "smooth", block = "start" } = options;
|
|
3932
|
-
const containerRef = (0,
|
|
3933
|
-
const anchorRef = (0,
|
|
3934
|
-
const scrollToAnchor = (0,
|
|
4234
|
+
const containerRef = (0, import_react55.useRef)(null);
|
|
4235
|
+
const anchorRef = (0, import_react55.useRef)(null);
|
|
4236
|
+
const scrollToAnchor = (0, import_react55.useCallback)(() => {
|
|
3935
4237
|
const el = anchorRef.current;
|
|
3936
4238
|
if (!el) {
|
|
3937
4239
|
return;
|
|
@@ -3942,7 +4244,7 @@ function useScrollAnchor(options = {}) {
|
|
|
3942
4244
|
});
|
|
3943
4245
|
});
|
|
3944
4246
|
}, [behavior, block]);
|
|
3945
|
-
const scrollToBottom = (0,
|
|
4247
|
+
const scrollToBottom = (0, import_react55.useCallback)(() => {
|
|
3946
4248
|
const container = containerRef.current;
|
|
3947
4249
|
if (!container) {
|
|
3948
4250
|
return;
|
|
@@ -3953,7 +4255,7 @@ function useScrollAnchor(options = {}) {
|
|
|
3953
4255
|
container.scrollTop = container.scrollHeight;
|
|
3954
4256
|
}
|
|
3955
4257
|
}, [behavior]);
|
|
3956
|
-
const isScrolledToBottom = (0,
|
|
4258
|
+
const isScrolledToBottom = (0, import_react55.useCallback)(() => {
|
|
3957
4259
|
const container = containerRef.current;
|
|
3958
4260
|
if (!container) {
|
|
3959
4261
|
return true;
|
|
@@ -3972,15 +4274,15 @@ function useScrollAnchor(options = {}) {
|
|
|
3972
4274
|
}
|
|
3973
4275
|
|
|
3974
4276
|
// src/components/chat/hooks/useAdaptiveSpacer.ts
|
|
3975
|
-
var
|
|
4277
|
+
var import_react56 = require("react");
|
|
3976
4278
|
function useAdaptiveSpacer(options = {}) {
|
|
3977
4279
|
const { minHeight = 0, containerRef: externalContainerRef, anchorRef } = options;
|
|
3978
|
-
const internalContainerRef = (0,
|
|
4280
|
+
const internalContainerRef = (0, import_react56.useRef)(null);
|
|
3979
4281
|
const containerRef = externalContainerRef ?? internalContainerRef;
|
|
3980
|
-
const contentRef = (0,
|
|
3981
|
-
const spacerRef = (0,
|
|
3982
|
-
const [spacerHeight, setSpacerHeight] = (0,
|
|
3983
|
-
const recalculate = (0,
|
|
4282
|
+
const contentRef = (0, import_react56.useRef)(null);
|
|
4283
|
+
const spacerRef = (0, import_react56.useRef)(null);
|
|
4284
|
+
const [spacerHeight, setSpacerHeight] = (0, import_react56.useState)(0);
|
|
4285
|
+
const recalculate = (0, import_react56.useCallback)(() => {
|
|
3984
4286
|
const container = containerRef.current;
|
|
3985
4287
|
const content = contentRef.current;
|
|
3986
4288
|
if (!container || !content) {
|
|
@@ -4004,7 +4306,7 @@ function useAdaptiveSpacer(options = {}) {
|
|
|
4004
4306
|
}
|
|
4005
4307
|
setSpacerHeight(newSpacerHeight);
|
|
4006
4308
|
}, [minHeight, anchorRef]);
|
|
4007
|
-
(0,
|
|
4309
|
+
(0, import_react56.useEffect)(() => {
|
|
4008
4310
|
const container = containerRef.current;
|
|
4009
4311
|
const content = contentRef.current;
|
|
4010
4312
|
if (!container || !content) {
|
|
@@ -4039,7 +4341,7 @@ function useAdaptiveSpacer(options = {}) {
|
|
|
4039
4341
|
}
|
|
4040
4342
|
|
|
4041
4343
|
// src/components/chat/ThinkingIndicator.tsx
|
|
4042
|
-
var
|
|
4344
|
+
var import_react57 = __toESM(require("react"));
|
|
4043
4345
|
var THINKING_PHRASES = [
|
|
4044
4346
|
"Consulting the ancient tomes...",
|
|
4045
4347
|
"Parsing the ineffable...",
|
|
@@ -4055,7 +4357,7 @@ var THINKING_PHRASES = [
|
|
|
4055
4357
|
"Consulting my inner monologue...",
|
|
4056
4358
|
"Summoning the muse..."
|
|
4057
4359
|
];
|
|
4058
|
-
var ThinkingIndicator =
|
|
4360
|
+
var ThinkingIndicator = import_react57.default.forwardRef(
|
|
4059
4361
|
({
|
|
4060
4362
|
isVisible = true,
|
|
4061
4363
|
phraseInterval = 2500,
|
|
@@ -4063,11 +4365,11 @@ var ThinkingIndicator = import_react46.default.forwardRef(
|
|
|
4063
4365
|
className,
|
|
4064
4366
|
...rest
|
|
4065
4367
|
}, ref) => {
|
|
4066
|
-
const [currentIndex, setCurrentIndex] = (0,
|
|
4368
|
+
const [currentIndex, setCurrentIndex] = (0, import_react57.useState)(
|
|
4067
4369
|
() => Math.floor(Math.random() * phrases.length)
|
|
4068
4370
|
);
|
|
4069
|
-
const [isTransitioning, setIsTransitioning] = (0,
|
|
4070
|
-
(0,
|
|
4371
|
+
const [isTransitioning, setIsTransitioning] = (0, import_react57.useState)(false);
|
|
4372
|
+
(0, import_react57.useEffect)(() => {
|
|
4071
4373
|
if (!isVisible || phrases.length <= 1) {
|
|
4072
4374
|
return;
|
|
4073
4375
|
}
|
|
@@ -4083,7 +4385,7 @@ var ThinkingIndicator = import_react46.default.forwardRef(
|
|
|
4083
4385
|
if (!isVisible) {
|
|
4084
4386
|
return null;
|
|
4085
4387
|
}
|
|
4086
|
-
return /* @__PURE__ */
|
|
4388
|
+
return /* @__PURE__ */ import_react57.default.createElement(
|
|
4087
4389
|
"div",
|
|
4088
4390
|
{
|
|
4089
4391
|
ref,
|
|
@@ -4097,26 +4399,26 @@ var ThinkingIndicator = import_react46.default.forwardRef(
|
|
|
4097
4399
|
"aria-live": "polite",
|
|
4098
4400
|
...rest
|
|
4099
4401
|
},
|
|
4100
|
-
/* @__PURE__ */
|
|
4402
|
+
/* @__PURE__ */ import_react57.default.createElement("div", { className: "flex gap-1", "aria-hidden": "true" }, /* @__PURE__ */ import_react57.default.createElement(
|
|
4101
4403
|
"span",
|
|
4102
4404
|
{
|
|
4103
4405
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4104
4406
|
style: { animationDelay: "0ms" }
|
|
4105
4407
|
}
|
|
4106
|
-
), /* @__PURE__ */
|
|
4408
|
+
), /* @__PURE__ */ import_react57.default.createElement(
|
|
4107
4409
|
"span",
|
|
4108
4410
|
{
|
|
4109
4411
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4110
4412
|
style: { animationDelay: "150ms" }
|
|
4111
4413
|
}
|
|
4112
|
-
), /* @__PURE__ */
|
|
4414
|
+
), /* @__PURE__ */ import_react57.default.createElement(
|
|
4113
4415
|
"span",
|
|
4114
4416
|
{
|
|
4115
4417
|
className: "w-1.5 h-1.5 bg-gold/60 rounded-full animate-pulse",
|
|
4116
4418
|
style: { animationDelay: "300ms" }
|
|
4117
4419
|
}
|
|
4118
4420
|
)),
|
|
4119
|
-
/* @__PURE__ */
|
|
4421
|
+
/* @__PURE__ */ import_react57.default.createElement(
|
|
4120
4422
|
"span",
|
|
4121
4423
|
{
|
|
4122
4424
|
className: cx(
|
|
@@ -4132,7 +4434,7 @@ var ThinkingIndicator = import_react46.default.forwardRef(
|
|
|
4132
4434
|
ThinkingIndicator.displayName = "ThinkingIndicator";
|
|
4133
4435
|
|
|
4134
4436
|
// src/components/chat/ChatView.tsx
|
|
4135
|
-
var ChatView =
|
|
4437
|
+
var ChatView = import_react58.default.forwardRef(
|
|
4136
4438
|
({ messages, latestUserMessageIndex, isStreaming, isThinking, onScroll, className, ...rest }, ref) => {
|
|
4137
4439
|
const { containerRef, anchorRef, scrollToAnchor } = useScrollAnchor({
|
|
4138
4440
|
behavior: "smooth",
|
|
@@ -4142,7 +4444,7 @@ var ChatView = import_react47.default.forwardRef(
|
|
|
4142
4444
|
containerRef,
|
|
4143
4445
|
anchorRef
|
|
4144
4446
|
});
|
|
4145
|
-
(0,
|
|
4447
|
+
(0, import_react58.useEffect)(() => {
|
|
4146
4448
|
if (latestUserMessageIndex !== void 0 && latestUserMessageIndex >= 0) {
|
|
4147
4449
|
scrollToAnchor();
|
|
4148
4450
|
}
|
|
@@ -4154,7 +4456,7 @@ var ChatView = import_react47.default.forwardRef(
|
|
|
4154
4456
|
return found;
|
|
4155
4457
|
}, -1);
|
|
4156
4458
|
const showThinking = isThinking && messages.length > 0 && messages[messages.length - 1]?.variant === "user";
|
|
4157
|
-
return /* @__PURE__ */
|
|
4459
|
+
return /* @__PURE__ */ import_react58.default.createElement(
|
|
4158
4460
|
"div",
|
|
4159
4461
|
{
|
|
4160
4462
|
ref: (node) => {
|
|
@@ -4174,7 +4476,7 @@ var ChatView = import_react47.default.forwardRef(
|
|
|
4174
4476
|
),
|
|
4175
4477
|
...rest
|
|
4176
4478
|
},
|
|
4177
|
-
/* @__PURE__ */
|
|
4479
|
+
/* @__PURE__ */ import_react58.default.createElement("div", { ref: contentRef, className: "relative flex flex-col gap-3" }, messages.map(({
|
|
4178
4480
|
id,
|
|
4179
4481
|
variant,
|
|
4180
4482
|
className: messageClassName,
|
|
@@ -4187,14 +4489,14 @@ var ChatView = import_react47.default.forwardRef(
|
|
|
4187
4489
|
const isLastMessage = index === messages.length - 1;
|
|
4188
4490
|
const showStreaming = isLastMessage && isStreaming && variant === "assistant";
|
|
4189
4491
|
const isMessageStreaming = showStreaming || !!nodeIsStreaming;
|
|
4190
|
-
return /* @__PURE__ */
|
|
4492
|
+
return /* @__PURE__ */ import_react58.default.createElement(
|
|
4191
4493
|
"div",
|
|
4192
4494
|
{
|
|
4193
4495
|
key: id ?? `msg-${index}`,
|
|
4194
4496
|
ref: isAnchor ? anchorRef : void 0,
|
|
4195
4497
|
className: isAnchor ? "scroll-mt-4" : void 0
|
|
4196
4498
|
},
|
|
4197
|
-
/* @__PURE__ */
|
|
4499
|
+
/* @__PURE__ */ import_react58.default.createElement(
|
|
4198
4500
|
Message,
|
|
4199
4501
|
{
|
|
4200
4502
|
variant,
|
|
@@ -4207,8 +4509,8 @@ var ChatView = import_react47.default.forwardRef(
|
|
|
4207
4509
|
}
|
|
4208
4510
|
)
|
|
4209
4511
|
);
|
|
4210
|
-
}), showThinking && /* @__PURE__ */
|
|
4211
|
-
/* @__PURE__ */
|
|
4512
|
+
}), showThinking && /* @__PURE__ */ import_react58.default.createElement(ThinkingIndicator, { isVisible: true })),
|
|
4513
|
+
/* @__PURE__ */ import_react58.default.createElement(
|
|
4212
4514
|
"div",
|
|
4213
4515
|
{
|
|
4214
4516
|
ref: spacerRef,
|
|
@@ -4223,7 +4525,7 @@ var ChatView = import_react47.default.forwardRef(
|
|
|
4223
4525
|
ChatView.displayName = "ChatView";
|
|
4224
4526
|
|
|
4225
4527
|
// src/components/chat/ChatInput.tsx
|
|
4226
|
-
var
|
|
4528
|
+
var import_react59 = __toESM(require("react"));
|
|
4227
4529
|
var import_lucide_react11 = require("lucide-react");
|
|
4228
4530
|
|
|
4229
4531
|
// src/components/chat/types.ts
|
|
@@ -4392,7 +4694,7 @@ function isBranchPoint(tree, nodeId) {
|
|
|
4392
4694
|
}
|
|
4393
4695
|
|
|
4394
4696
|
// src/components/chat/ChatInput.tsx
|
|
4395
|
-
var ChatInput =
|
|
4697
|
+
var ChatInput = import_react59.default.forwardRef(
|
|
4396
4698
|
({
|
|
4397
4699
|
position = "bottom",
|
|
4398
4700
|
placeholder = "Send a message...",
|
|
@@ -4409,13 +4711,13 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4409
4711
|
className,
|
|
4410
4712
|
...rest
|
|
4411
4713
|
}, ref) => {
|
|
4412
|
-
const [value, setValue] = (0,
|
|
4413
|
-
const [localAttachments, setLocalAttachments] = (0,
|
|
4414
|
-
const [isDragOver, setIsDragOver] = (0,
|
|
4415
|
-
const textareaRef = (0,
|
|
4416
|
-
const fileInputRef = (0,
|
|
4714
|
+
const [value, setValue] = (0, import_react59.useState)("");
|
|
4715
|
+
const [localAttachments, setLocalAttachments] = (0, import_react59.useState)([]);
|
|
4716
|
+
const [isDragOver, setIsDragOver] = (0, import_react59.useState)(false);
|
|
4717
|
+
const textareaRef = (0, import_react59.useRef)(null);
|
|
4718
|
+
const fileInputRef = (0, import_react59.useRef)(null);
|
|
4417
4719
|
const attachments = controlledAttachments ?? localAttachments;
|
|
4418
|
-
const setAttachments = (0,
|
|
4720
|
+
const setAttachments = (0, import_react59.useCallback)(
|
|
4419
4721
|
(newAttachments) => {
|
|
4420
4722
|
if (onAttachmentsChange) {
|
|
4421
4723
|
if (typeof newAttachments === "function") {
|
|
@@ -4429,7 +4731,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4429
4731
|
},
|
|
4430
4732
|
[attachments, onAttachmentsChange]
|
|
4431
4733
|
);
|
|
4432
|
-
const handleSubmit = (0,
|
|
4734
|
+
const handleSubmit = (0, import_react59.useCallback)(() => {
|
|
4433
4735
|
const trimmed = value.trim();
|
|
4434
4736
|
if (!trimmed || disabled || isStreaming) {
|
|
4435
4737
|
return;
|
|
@@ -4441,7 +4743,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4441
4743
|
textareaRef.current.style.height = "auto";
|
|
4442
4744
|
}
|
|
4443
4745
|
}, [value, disabled, isStreaming, onSubmit, attachments, setAttachments]);
|
|
4444
|
-
const handleKeyDown = (0,
|
|
4746
|
+
const handleKeyDown = (0, import_react59.useCallback)(
|
|
4445
4747
|
(e) => {
|
|
4446
4748
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
4447
4749
|
e.preventDefault();
|
|
@@ -4450,18 +4752,18 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4450
4752
|
},
|
|
4451
4753
|
[handleSubmit]
|
|
4452
4754
|
);
|
|
4453
|
-
const handleChange = (0,
|
|
4755
|
+
const handleChange = (0, import_react59.useCallback)((e) => {
|
|
4454
4756
|
setValue(e.target.value);
|
|
4455
4757
|
const textarea = e.target;
|
|
4456
4758
|
textarea.style.height = "auto";
|
|
4457
4759
|
textarea.style.height = `${Math.min(textarea.scrollHeight, 200)}px`;
|
|
4458
4760
|
}, []);
|
|
4459
|
-
(0,
|
|
4761
|
+
(0, import_react59.useEffect)(() => {
|
|
4460
4762
|
if (!disabled && !isStreaming && textareaRef.current) {
|
|
4461
4763
|
textareaRef.current.focus();
|
|
4462
4764
|
}
|
|
4463
4765
|
}, [disabled, isStreaming]);
|
|
4464
|
-
const addFiles = (0,
|
|
4766
|
+
const addFiles = (0, import_react59.useCallback)(
|
|
4465
4767
|
(files) => {
|
|
4466
4768
|
const newAttachments = Array.from(files).map((file) => ({
|
|
4467
4769
|
id: generateId(),
|
|
@@ -4473,7 +4775,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4473
4775
|
},
|
|
4474
4776
|
[setAttachments]
|
|
4475
4777
|
);
|
|
4476
|
-
const handleFileSelect = (0,
|
|
4778
|
+
const handleFileSelect = (0, import_react59.useCallback)(
|
|
4477
4779
|
(e) => {
|
|
4478
4780
|
const files = e.target.files;
|
|
4479
4781
|
if (files && files.length > 0) {
|
|
@@ -4483,7 +4785,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4483
4785
|
},
|
|
4484
4786
|
[addFiles]
|
|
4485
4787
|
);
|
|
4486
|
-
const handleRemoveAttachment = (0,
|
|
4788
|
+
const handleRemoveAttachment = (0, import_react59.useCallback)(
|
|
4487
4789
|
(id) => {
|
|
4488
4790
|
setAttachments((prev) => {
|
|
4489
4791
|
const attachment = prev.find((a) => a.id === id);
|
|
@@ -4495,23 +4797,23 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4495
4797
|
},
|
|
4496
4798
|
[setAttachments]
|
|
4497
4799
|
);
|
|
4498
|
-
const handleDragEnter = (0,
|
|
4800
|
+
const handleDragEnter = (0, import_react59.useCallback)((e) => {
|
|
4499
4801
|
e.preventDefault();
|
|
4500
4802
|
e.stopPropagation();
|
|
4501
4803
|
setIsDragOver(true);
|
|
4502
4804
|
}, []);
|
|
4503
|
-
const handleDragLeave = (0,
|
|
4805
|
+
const handleDragLeave = (0, import_react59.useCallback)((e) => {
|
|
4504
4806
|
e.preventDefault();
|
|
4505
4807
|
e.stopPropagation();
|
|
4506
4808
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
4507
4809
|
setIsDragOver(false);
|
|
4508
4810
|
}
|
|
4509
4811
|
}, []);
|
|
4510
|
-
const handleDragOver = (0,
|
|
4812
|
+
const handleDragOver = (0, import_react59.useCallback)((e) => {
|
|
4511
4813
|
e.preventDefault();
|
|
4512
4814
|
e.stopPropagation();
|
|
4513
4815
|
}, []);
|
|
4514
|
-
const handleDrop = (0,
|
|
4816
|
+
const handleDrop = (0, import_react59.useCallback)(
|
|
4515
4817
|
(e) => {
|
|
4516
4818
|
e.preventDefault();
|
|
4517
4819
|
e.stopPropagation();
|
|
@@ -4526,7 +4828,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4526
4828
|
const isCentered = position === "centered";
|
|
4527
4829
|
const hasAttachments = attachments.length > 0;
|
|
4528
4830
|
const canSubmit = value.trim() && !disabled && !isStreaming;
|
|
4529
|
-
return /* @__PURE__ */
|
|
4831
|
+
return /* @__PURE__ */ import_react59.default.createElement(
|
|
4530
4832
|
"div",
|
|
4531
4833
|
{
|
|
4532
4834
|
ref,
|
|
@@ -4538,8 +4840,8 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4538
4840
|
),
|
|
4539
4841
|
...rest
|
|
4540
4842
|
},
|
|
4541
|
-
isCentered && helperText && /* @__PURE__ */
|
|
4542
|
-
/* @__PURE__ */
|
|
4843
|
+
isCentered && helperText && /* @__PURE__ */ import_react59.default.createElement("p", { className: "text-silver text-sm mb-4 text-center" }, helperText),
|
|
4844
|
+
/* @__PURE__ */ import_react59.default.createElement(
|
|
4543
4845
|
"div",
|
|
4544
4846
|
{
|
|
4545
4847
|
className: cx(
|
|
@@ -4554,7 +4856,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4554
4856
|
onDragOver: showAttachmentButton ? handleDragOver : void 0,
|
|
4555
4857
|
onDrop: showAttachmentButton ? handleDrop : void 0
|
|
4556
4858
|
},
|
|
4557
|
-
hasAttachments && /* @__PURE__ */
|
|
4859
|
+
hasAttachments && /* @__PURE__ */ import_react59.default.createElement("div", { className: "px-3 pt-3 pb-1" }, /* @__PURE__ */ import_react59.default.createElement(
|
|
4558
4860
|
AttachmentPreview,
|
|
4559
4861
|
{
|
|
4560
4862
|
attachments,
|
|
@@ -4562,14 +4864,14 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4562
4864
|
removable: !isStreaming
|
|
4563
4865
|
}
|
|
4564
4866
|
)),
|
|
4565
|
-
isDragOver && /* @__PURE__ */
|
|
4867
|
+
isDragOver && /* @__PURE__ */ import_react59.default.createElement(
|
|
4566
4868
|
"div",
|
|
4567
4869
|
{
|
|
4568
4870
|
className: "absolute inset-0 bg-gold/10 flex items-center justify-center z-10 pointer-events-none"
|
|
4569
4871
|
},
|
|
4570
|
-
/* @__PURE__ */
|
|
4872
|
+
/* @__PURE__ */ import_react59.default.createElement("span", { className: "text-gold text-sm font-medium" }, "Drop files here")
|
|
4571
4873
|
),
|
|
4572
|
-
/* @__PURE__ */
|
|
4874
|
+
/* @__PURE__ */ import_react59.default.createElement("div", { className: "flex items-end" }, showAttachmentButton && /* @__PURE__ */ import_react59.default.createElement(import_react59.default.Fragment, null, /* @__PURE__ */ import_react59.default.createElement(
|
|
4573
4875
|
"button",
|
|
4574
4876
|
{
|
|
4575
4877
|
type: "button",
|
|
@@ -4581,8 +4883,8 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4581
4883
|
),
|
|
4582
4884
|
"aria-label": "Attach file"
|
|
4583
4885
|
},
|
|
4584
|
-
/* @__PURE__ */
|
|
4585
|
-
), /* @__PURE__ */
|
|
4886
|
+
/* @__PURE__ */ import_react59.default.createElement(import_lucide_react11.Paperclip, { className: "w-5 h-5" })
|
|
4887
|
+
), /* @__PURE__ */ import_react59.default.createElement(
|
|
4586
4888
|
"input",
|
|
4587
4889
|
{
|
|
4588
4890
|
ref: fileInputRef,
|
|
@@ -4593,7 +4895,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4593
4895
|
className: "hidden",
|
|
4594
4896
|
"aria-hidden": "true"
|
|
4595
4897
|
}
|
|
4596
|
-
)), /* @__PURE__ */
|
|
4898
|
+
)), /* @__PURE__ */ import_react59.default.createElement(
|
|
4597
4899
|
"textarea",
|
|
4598
4900
|
{
|
|
4599
4901
|
ref: textareaRef,
|
|
@@ -4611,7 +4913,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4611
4913
|
),
|
|
4612
4914
|
style: { maxHeight: 200 }
|
|
4613
4915
|
}
|
|
4614
|
-
), isStreaming ? /* @__PURE__ */
|
|
4916
|
+
), isStreaming ? /* @__PURE__ */ import_react59.default.createElement(
|
|
4615
4917
|
"button",
|
|
4616
4918
|
{
|
|
4617
4919
|
type: "button",
|
|
@@ -4622,8 +4924,8 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4622
4924
|
),
|
|
4623
4925
|
"aria-label": "Stop generation"
|
|
4624
4926
|
},
|
|
4625
|
-
/* @__PURE__ */
|
|
4626
|
-
) : /* @__PURE__ */
|
|
4927
|
+
/* @__PURE__ */ import_react59.default.createElement(import_lucide_react11.Square, { className: "w-5 h-5 fill-current" })
|
|
4928
|
+
) : /* @__PURE__ */ import_react59.default.createElement(
|
|
4627
4929
|
"button",
|
|
4628
4930
|
{
|
|
4629
4931
|
type: "button",
|
|
@@ -4636,7 +4938,7 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4636
4938
|
),
|
|
4637
4939
|
"aria-label": "Send message"
|
|
4638
4940
|
},
|
|
4639
|
-
/* @__PURE__ */
|
|
4941
|
+
/* @__PURE__ */ import_react59.default.createElement(import_lucide_react11.Send, { className: "w-5 h-5" })
|
|
4640
4942
|
))
|
|
4641
4943
|
)
|
|
4642
4944
|
);
|
|
@@ -4645,9 +4947,9 @@ var ChatInput = import_react48.default.forwardRef(
|
|
|
4645
4947
|
ChatInput.displayName = "ChatInput";
|
|
4646
4948
|
|
|
4647
4949
|
// src/components/chat/ConversationSidebar.tsx
|
|
4648
|
-
var
|
|
4649
|
-
function
|
|
4650
|
-
return /* @__PURE__ */
|
|
4950
|
+
var import_react60 = __toESM(require("react"));
|
|
4951
|
+
function HistoryIcon2({ className }) {
|
|
4952
|
+
return /* @__PURE__ */ import_react60.default.createElement(
|
|
4651
4953
|
"svg",
|
|
4652
4954
|
{
|
|
4653
4955
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4655,7 +4957,7 @@ function HistoryIcon({ className }) {
|
|
|
4655
4957
|
fill: "currentColor",
|
|
4656
4958
|
className
|
|
4657
4959
|
},
|
|
4658
|
-
/* @__PURE__ */
|
|
4960
|
+
/* @__PURE__ */ import_react60.default.createElement(
|
|
4659
4961
|
"path",
|
|
4660
4962
|
{
|
|
4661
4963
|
fillRule: "evenodd",
|
|
@@ -4665,8 +4967,8 @@ function HistoryIcon({ className }) {
|
|
|
4665
4967
|
)
|
|
4666
4968
|
);
|
|
4667
4969
|
}
|
|
4668
|
-
function
|
|
4669
|
-
return /* @__PURE__ */
|
|
4970
|
+
function ChevronLeftIcon3({ className }) {
|
|
4971
|
+
return /* @__PURE__ */ import_react60.default.createElement(
|
|
4670
4972
|
"svg",
|
|
4671
4973
|
{
|
|
4672
4974
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4674,7 +4976,7 @@ function ChevronLeftIcon2({ className }) {
|
|
|
4674
4976
|
fill: "currentColor",
|
|
4675
4977
|
className
|
|
4676
4978
|
},
|
|
4677
|
-
/* @__PURE__ */
|
|
4979
|
+
/* @__PURE__ */ import_react60.default.createElement(
|
|
4678
4980
|
"path",
|
|
4679
4981
|
{
|
|
4680
4982
|
fillRule: "evenodd",
|
|
@@ -4684,7 +4986,7 @@ function ChevronLeftIcon2({ className }) {
|
|
|
4684
4986
|
)
|
|
4685
4987
|
);
|
|
4686
4988
|
}
|
|
4687
|
-
var ConversationSidebar =
|
|
4989
|
+
var ConversationSidebar = import_react60.default.forwardRef(
|
|
4688
4990
|
({
|
|
4689
4991
|
conversations,
|
|
4690
4992
|
isCollapsed = false,
|
|
@@ -4697,7 +4999,7 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4697
4999
|
...rest
|
|
4698
5000
|
}, ref) => {
|
|
4699
5001
|
if (isCollapsed) {
|
|
4700
|
-
return /* @__PURE__ */
|
|
5002
|
+
return /* @__PURE__ */ import_react60.default.createElement(
|
|
4701
5003
|
"div",
|
|
4702
5004
|
{
|
|
4703
5005
|
ref,
|
|
@@ -4708,7 +5010,7 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4708
5010
|
),
|
|
4709
5011
|
...rest
|
|
4710
5012
|
},
|
|
4711
|
-
/* @__PURE__ */
|
|
5013
|
+
/* @__PURE__ */ import_react60.default.createElement(
|
|
4712
5014
|
"button",
|
|
4713
5015
|
{
|
|
4714
5016
|
onClick: onToggleCollapse,
|
|
@@ -4719,11 +5021,11 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4719
5021
|
),
|
|
4720
5022
|
"aria-label": "Expand sidebar"
|
|
4721
5023
|
},
|
|
4722
|
-
/* @__PURE__ */
|
|
5024
|
+
/* @__PURE__ */ import_react60.default.createElement(HistoryIcon2, { className: "w-5 h-5" })
|
|
4723
5025
|
)
|
|
4724
5026
|
);
|
|
4725
5027
|
}
|
|
4726
|
-
return /* @__PURE__ */
|
|
5028
|
+
return /* @__PURE__ */ import_react60.default.createElement(
|
|
4727
5029
|
"div",
|
|
4728
5030
|
{
|
|
4729
5031
|
ref,
|
|
@@ -4734,10 +5036,10 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4734
5036
|
"flex-shrink-0",
|
|
4735
5037
|
className
|
|
4736
5038
|
),
|
|
4737
|
-
style: width ? { width
|
|
5039
|
+
style: width ? { width } : void 0,
|
|
4738
5040
|
...rest
|
|
4739
5041
|
},
|
|
4740
|
-
/* @__PURE__ */
|
|
5042
|
+
/* @__PURE__ */ import_react60.default.createElement(
|
|
4741
5043
|
"div",
|
|
4742
5044
|
{
|
|
4743
5045
|
onMouseDown: onResizeStart,
|
|
@@ -4750,7 +5052,7 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4750
5052
|
)
|
|
4751
5053
|
}
|
|
4752
5054
|
),
|
|
4753
|
-
/* @__PURE__ */
|
|
5055
|
+
/* @__PURE__ */ import_react60.default.createElement("div", { className: "p-3 border-b border-ash/40 flex-shrink-0 flex items-center gap-2" }, /* @__PURE__ */ import_react60.default.createElement(
|
|
4754
5056
|
"button",
|
|
4755
5057
|
{
|
|
4756
5058
|
onClick: onToggleCollapse,
|
|
@@ -4761,8 +5063,8 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4761
5063
|
),
|
|
4762
5064
|
"aria-label": "Collapse sidebar"
|
|
4763
5065
|
},
|
|
4764
|
-
/* @__PURE__ */
|
|
4765
|
-
), /* @__PURE__ */
|
|
5066
|
+
/* @__PURE__ */ import_react60.default.createElement(ChevronLeftIcon3, { className: "w-5 h-5" })
|
|
5067
|
+
), /* @__PURE__ */ import_react60.default.createElement(
|
|
4766
5068
|
"button",
|
|
4767
5069
|
{
|
|
4768
5070
|
onClick: onNewChat,
|
|
@@ -4774,7 +5076,7 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4774
5076
|
"transition-colors duration-200"
|
|
4775
5077
|
)
|
|
4776
5078
|
},
|
|
4777
|
-
/* @__PURE__ */
|
|
5079
|
+
/* @__PURE__ */ import_react60.default.createElement(
|
|
4778
5080
|
"svg",
|
|
4779
5081
|
{
|
|
4780
5082
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4782,16 +5084,16 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4782
5084
|
fill: "currentColor",
|
|
4783
5085
|
className: "w-4 h-4"
|
|
4784
5086
|
},
|
|
4785
|
-
/* @__PURE__ */
|
|
5087
|
+
/* @__PURE__ */ import_react60.default.createElement(
|
|
4786
5088
|
"path",
|
|
4787
5089
|
{
|
|
4788
5090
|
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"
|
|
4789
5091
|
}
|
|
4790
5092
|
)
|
|
4791
5093
|
),
|
|
4792
|
-
/* @__PURE__ */
|
|
5094
|
+
/* @__PURE__ */ import_react60.default.createElement("span", { className: "text-sm font-medium" }, "New Chat")
|
|
4793
5095
|
)),
|
|
4794
|
-
/* @__PURE__ */
|
|
5096
|
+
/* @__PURE__ */ import_react60.default.createElement("div", { className: "flex-1 overflow-y-auto py-2" }, conversations.length === 0 ? /* @__PURE__ */ import_react60.default.createElement("p", { className: "px-4 py-2 text-sm text-silver/60" }, "No conversations yet") : /* @__PURE__ */ import_react60.default.createElement("div", { className: "space-y-1 px-2" }, conversations.map((conversation) => /* @__PURE__ */ import_react60.default.createElement(
|
|
4795
5097
|
"button",
|
|
4796
5098
|
{
|
|
4797
5099
|
key: conversation.id,
|
|
@@ -4802,16 +5104,16 @@ var ConversationSidebar = import_react49.default.forwardRef(
|
|
|
4802
5104
|
conversation.isActive ? "bg-ash/40 text-white" : "text-silver hover:bg-ash/20 hover:text-white"
|
|
4803
5105
|
)
|
|
4804
5106
|
},
|
|
4805
|
-
/* @__PURE__ */
|
|
4806
|
-
conversation.preview && /* @__PURE__ */
|
|
4807
|
-
conversation.timestamp && /* @__PURE__ */
|
|
5107
|
+
/* @__PURE__ */ import_react60.default.createElement("p", { className: "text-sm font-medium truncate" }, conversation.title),
|
|
5108
|
+
conversation.preview && /* @__PURE__ */ import_react60.default.createElement("p", { className: "text-xs text-silver/60 truncate mt-0.5" }, conversation.preview),
|
|
5109
|
+
conversation.timestamp && /* @__PURE__ */ import_react60.default.createElement("p", { className: "text-xs text-silver/40 mt-1" }, conversation.timestamp)
|
|
4808
5110
|
))))
|
|
4809
5111
|
);
|
|
4810
5112
|
}
|
|
4811
5113
|
);
|
|
4812
5114
|
ConversationSidebar.displayName = "ConversationSidebar";
|
|
4813
|
-
var CollapsedSidebarToggle =
|
|
4814
|
-
return /* @__PURE__ */
|
|
5115
|
+
var CollapsedSidebarToggle = import_react60.default.forwardRef(({ onExpand, className, ...rest }, ref) => {
|
|
5116
|
+
return /* @__PURE__ */ import_react60.default.createElement(
|
|
4815
5117
|
"button",
|
|
4816
5118
|
{
|
|
4817
5119
|
ref,
|
|
@@ -4826,16 +5128,16 @@ var CollapsedSidebarToggle = import_react49.default.forwardRef(({ onExpand, clas
|
|
|
4826
5128
|
"aria-label": "Expand sidebar",
|
|
4827
5129
|
...rest
|
|
4828
5130
|
},
|
|
4829
|
-
/* @__PURE__ */
|
|
5131
|
+
/* @__PURE__ */ import_react60.default.createElement(HistoryIcon2, { className: "w-5 h-5" })
|
|
4830
5132
|
);
|
|
4831
5133
|
});
|
|
4832
5134
|
CollapsedSidebarToggle.displayName = "CollapsedSidebarToggle";
|
|
4833
5135
|
|
|
4834
5136
|
// src/components/chat/ArtifactsPanel.tsx
|
|
4835
|
-
var
|
|
5137
|
+
var import_react65 = __toESM(require("react"));
|
|
4836
5138
|
|
|
4837
5139
|
// src/components/ImageCard.tsx
|
|
4838
|
-
var
|
|
5140
|
+
var import_react61 = __toESM(require("react"));
|
|
4839
5141
|
var ASPECT_RATIO_PRESETS = {
|
|
4840
5142
|
landscape: "3 / 2",
|
|
4841
5143
|
portrait: "2 / 3",
|
|
@@ -4847,7 +5149,7 @@ function resolveAspectRatio(ratio) {
|
|
|
4847
5149
|
}
|
|
4848
5150
|
return ratio.replace("/", " / ");
|
|
4849
5151
|
}
|
|
4850
|
-
var ImageCard =
|
|
5152
|
+
var ImageCard = import_react61.default.forwardRef(
|
|
4851
5153
|
({
|
|
4852
5154
|
src,
|
|
4853
5155
|
alt,
|
|
@@ -4864,7 +5166,7 @@ var ImageCard = import_react50.default.forwardRef(
|
|
|
4864
5166
|
}, ref) => {
|
|
4865
5167
|
const hasAspectRatio = aspectRatio !== void 0;
|
|
4866
5168
|
const isContain = objectFit === "contain";
|
|
4867
|
-
return /* @__PURE__ */
|
|
5169
|
+
return /* @__PURE__ */ import_react61.default.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-fit", className), ...props }, /* @__PURE__ */ import_react61.default.createElement(
|
|
4868
5170
|
"div",
|
|
4869
5171
|
{
|
|
4870
5172
|
className: cx(
|
|
@@ -4874,7 +5176,7 @@ var ImageCard = import_react50.default.forwardRef(
|
|
|
4874
5176
|
),
|
|
4875
5177
|
style: hasAspectRatio ? { aspectRatio: resolveAspectRatio(aspectRatio) } : void 0
|
|
4876
5178
|
},
|
|
4877
|
-
/* @__PURE__ */
|
|
5179
|
+
/* @__PURE__ */ import_react61.default.createElement(
|
|
4878
5180
|
"img",
|
|
4879
5181
|
{
|
|
4880
5182
|
src,
|
|
@@ -4887,20 +5189,20 @@ var ImageCard = import_react50.default.forwardRef(
|
|
|
4887
5189
|
)
|
|
4888
5190
|
}
|
|
4889
5191
|
),
|
|
4890
|
-
overlay && /* @__PURE__ */
|
|
5192
|
+
overlay && /* @__PURE__ */ import_react61.default.createElement(
|
|
4891
5193
|
"div",
|
|
4892
5194
|
{
|
|
4893
5195
|
className: "absolute inset-0 bg-obsidian/80 opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-center justify-center"
|
|
4894
5196
|
},
|
|
4895
5197
|
overlay
|
|
4896
5198
|
)
|
|
4897
|
-
), (title || subtitle || children) && /* @__PURE__ */
|
|
5199
|
+
), (title || subtitle || children) && /* @__PURE__ */ import_react61.default.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ import_react61.default.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ import_react61.default.createElement("p", { className: "text-sm text-silver leading-normal" }, subtitle), children));
|
|
4898
5200
|
}
|
|
4899
5201
|
);
|
|
4900
5202
|
ImageCard.displayName = "ImageCard";
|
|
4901
5203
|
|
|
4902
5204
|
// src/components/VideoCard.tsx
|
|
4903
|
-
var
|
|
5205
|
+
var import_react62 = __toESM(require("react"));
|
|
4904
5206
|
var import_react_player2 = __toESM(require("react-player"));
|
|
4905
5207
|
var ASPECT_RATIO_PRESETS2 = {
|
|
4906
5208
|
video: "16 / 9",
|
|
@@ -4913,7 +5215,7 @@ function resolveAspectRatio2(ratio) {
|
|
|
4913
5215
|
}
|
|
4914
5216
|
return ratio.replace("/", " / ");
|
|
4915
5217
|
}
|
|
4916
|
-
var VideoCard =
|
|
5218
|
+
var VideoCard = import_react62.default.forwardRef(
|
|
4917
5219
|
({
|
|
4918
5220
|
src,
|
|
4919
5221
|
title,
|
|
@@ -4933,7 +5235,7 @@ var VideoCard = import_react51.default.forwardRef(
|
|
|
4933
5235
|
...props
|
|
4934
5236
|
}, ref) => {
|
|
4935
5237
|
const hasAspectRatio = aspectRatio !== void 0;
|
|
4936
|
-
return /* @__PURE__ */
|
|
5238
|
+
return /* @__PURE__ */ import_react62.default.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ import_react62.default.createElement(
|
|
4937
5239
|
"div",
|
|
4938
5240
|
{
|
|
4939
5241
|
className: cx(
|
|
@@ -4942,7 +5244,7 @@ var VideoCard = import_react51.default.forwardRef(
|
|
|
4942
5244
|
),
|
|
4943
5245
|
style: { aspectRatio: resolveAspectRatio2(aspectRatio) }
|
|
4944
5246
|
},
|
|
4945
|
-
/* @__PURE__ */
|
|
5247
|
+
/* @__PURE__ */ import_react62.default.createElement(
|
|
4946
5248
|
import_react_player2.default,
|
|
4947
5249
|
{
|
|
4948
5250
|
src,
|
|
@@ -4958,7 +5260,7 @@ var VideoCard = import_react51.default.forwardRef(
|
|
|
4958
5260
|
...playerProps
|
|
4959
5261
|
}
|
|
4960
5262
|
)
|
|
4961
|
-
), (title || subtitle || children) && /* @__PURE__ */
|
|
5263
|
+
), (title || subtitle || children) && /* @__PURE__ */ import_react62.default.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ import_react62.default.createElement("h4", { className: "text-lg font-semibold leading-tight" }, title), subtitle && /* @__PURE__ */ import_react62.default.createElement(
|
|
4962
5264
|
"p",
|
|
4963
5265
|
{
|
|
4964
5266
|
className: "text-sm text-silver leading-normal mt-1"
|
|
@@ -4969,68 +5271,235 @@ var VideoCard = import_react51.default.forwardRef(
|
|
|
4969
5271
|
);
|
|
4970
5272
|
VideoCard.displayName = "VideoCard";
|
|
4971
5273
|
|
|
4972
|
-
// src/components/
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
5274
|
+
// src/components/AudioCard.tsx
|
|
5275
|
+
var import_react63 = __toESM(require("react"));
|
|
5276
|
+
var import_react_player3 = __toESM(require("react-player"));
|
|
5277
|
+
var import_lucide_react12 = require("lucide-react");
|
|
5278
|
+
var AudioCard = import_react63.default.forwardRef(
|
|
5279
|
+
({
|
|
5280
|
+
src,
|
|
5281
|
+
title,
|
|
5282
|
+
subtitle,
|
|
5283
|
+
playing = false,
|
|
5284
|
+
controls = true,
|
|
5285
|
+
volume,
|
|
5286
|
+
muted = false,
|
|
5287
|
+
loop = false,
|
|
5288
|
+
mediaClassName,
|
|
5289
|
+
contentClassName,
|
|
5290
|
+
className,
|
|
5291
|
+
children,
|
|
5292
|
+
playerProps,
|
|
5293
|
+
...props
|
|
5294
|
+
}, ref) => {
|
|
5295
|
+
return /* @__PURE__ */ import_react63.default.createElement(Card, { ref, className: cx("p-0 overflow-hidden group w-full", className), ...props }, /* @__PURE__ */ import_react63.default.createElement(
|
|
5296
|
+
"div",
|
|
4984
5297
|
{
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
5298
|
+
className: cx(
|
|
5299
|
+
"relative bg-obsidian py-8 flex flex-col items-center justify-center border-b border-ash",
|
|
5300
|
+
mediaClassName
|
|
5301
|
+
)
|
|
5302
|
+
},
|
|
5303
|
+
/* @__PURE__ */ import_react63.default.createElement("div", { className: "mb-4 text-gold" }, /* @__PURE__ */ import_react63.default.createElement(import_lucide_react12.Music, { size: 48 })),
|
|
5304
|
+
/* @__PURE__ */ import_react63.default.createElement("div", { className: "w-full px-4" }, /* @__PURE__ */ import_react63.default.createElement(
|
|
5305
|
+
import_react_player3.default,
|
|
5306
|
+
{
|
|
5307
|
+
src,
|
|
5308
|
+
playing,
|
|
5309
|
+
controls,
|
|
5310
|
+
volume,
|
|
5311
|
+
muted,
|
|
5312
|
+
loop,
|
|
5313
|
+
width: "100%",
|
|
5314
|
+
height: "40px",
|
|
5315
|
+
style: { backgroundColor: "transparent" },
|
|
5316
|
+
config: {
|
|
5317
|
+
file: {
|
|
5318
|
+
forceAudio: true,
|
|
5319
|
+
attributes: {
|
|
5320
|
+
style: { width: "100%", height: "40px" }
|
|
5321
|
+
}
|
|
5322
|
+
}
|
|
5323
|
+
},
|
|
5324
|
+
...playerProps
|
|
5325
|
+
}
|
|
5326
|
+
))
|
|
5327
|
+
), (title || subtitle || children) && /* @__PURE__ */ import_react63.default.createElement("div", { className: cx("px-4 py-4", contentClassName) }, title && /* @__PURE__ */ import_react63.default.createElement(
|
|
5328
|
+
"h4",
|
|
4990
5329
|
{
|
|
4991
|
-
|
|
4992
|
-
}
|
|
4993
|
-
|
|
4994
|
-
/* @__PURE__ */
|
|
4995
|
-
"
|
|
5330
|
+
className: "text-lg font-semibold leading-tight"
|
|
5331
|
+
},
|
|
5332
|
+
title
|
|
5333
|
+
), subtitle && /* @__PURE__ */ import_react63.default.createElement(
|
|
5334
|
+
"p",
|
|
4996
5335
|
{
|
|
4997
|
-
|
|
4998
|
-
}
|
|
4999
|
-
|
|
5000
|
-
|
|
5336
|
+
className: "text-sm text-silver leading-normal mt-1"
|
|
5337
|
+
},
|
|
5338
|
+
subtitle
|
|
5339
|
+
), children));
|
|
5340
|
+
}
|
|
5341
|
+
);
|
|
5342
|
+
AudioCard.displayName = "AudioCard";
|
|
5343
|
+
|
|
5344
|
+
// src/components/ScriptCard.tsx
|
|
5345
|
+
var import_react64 = __toESM(require("react"));
|
|
5346
|
+
function ScriptElementRenderer({ element }) {
|
|
5347
|
+
switch (element.type) {
|
|
5348
|
+
case "scene-heading":
|
|
5349
|
+
return /* @__PURE__ */ import_react64.default.createElement("p", { className: "mt-4 mb-2 font-bold uppercase text-gold text-xs tracking-wide" }, element.content);
|
|
5350
|
+
case "action":
|
|
5351
|
+
return /* @__PURE__ */ import_react64.default.createElement("p", { className: "my-2 text-silver text-xs leading-relaxed" }, element.content);
|
|
5352
|
+
case "character":
|
|
5353
|
+
return /* @__PURE__ */ import_react64.default.createElement("p", { className: "mt-4 mb-0.5 ml-8 font-bold text-white text-xs uppercase tracking-wide" }, element.content);
|
|
5354
|
+
case "parenthetical":
|
|
5355
|
+
return /* @__PURE__ */ import_react64.default.createElement("p", { className: "ml-6 text-silver/70 text-xs italic" }, "(", element.content, ")");
|
|
5356
|
+
case "dialogue":
|
|
5357
|
+
return /* @__PURE__ */ import_react64.default.createElement("p", { className: "ml-4 mr-8 text-silver text-xs leading-relaxed" }, element.content);
|
|
5358
|
+
case "transition":
|
|
5359
|
+
return /* @__PURE__ */ import_react64.default.createElement("p", { className: "mt-4 mb-2 text-right font-bold uppercase text-gold/80 text-xs tracking-wide" }, element.content);
|
|
5360
|
+
case "title":
|
|
5361
|
+
return /* @__PURE__ */ import_react64.default.createElement("p", { className: "mt-6 mb-2 text-center font-bold text-gold text-sm" }, element.content);
|
|
5362
|
+
case "subtitle":
|
|
5363
|
+
return /* @__PURE__ */ import_react64.default.createElement("p", { className: "text-center italic text-gold/70 text-xs" }, element.content);
|
|
5364
|
+
default:
|
|
5365
|
+
return null;
|
|
5366
|
+
}
|
|
5001
5367
|
}
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5007
|
-
viewBox: "0 0 20 20",
|
|
5008
|
-
fill: "currentColor",
|
|
5009
|
-
className
|
|
5010
|
-
},
|
|
5011
|
-
/* @__PURE__ */ import_react52.default.createElement(
|
|
5012
|
-
"path",
|
|
5368
|
+
var ScriptCard = import_react64.default.forwardRef(
|
|
5369
|
+
({ title, subtitle, elements, maxHeight = "16rem", className, style, ...rest }, ref) => {
|
|
5370
|
+
return /* @__PURE__ */ import_react64.default.createElement(
|
|
5371
|
+
"div",
|
|
5013
5372
|
{
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
}
|
|
5021
|
-
|
|
5373
|
+
ref,
|
|
5374
|
+
className: cx(
|
|
5375
|
+
"bg-charcoal border border-ash/40",
|
|
5376
|
+
className
|
|
5377
|
+
),
|
|
5378
|
+
...rest
|
|
5379
|
+
},
|
|
5380
|
+
(title || subtitle) && /* @__PURE__ */ import_react64.default.createElement("div", { className: "px-4 py-3 border-b border-ash/40" }, title && /* @__PURE__ */ import_react64.default.createElement("h4", { className: "text-sm font-heading text-gold" }, title), subtitle && /* @__PURE__ */ import_react64.default.createElement("p", { className: "text-xs text-silver/60 mt-0.5" }, subtitle)),
|
|
5381
|
+
/* @__PURE__ */ import_react64.default.createElement(
|
|
5382
|
+
"div",
|
|
5383
|
+
{
|
|
5384
|
+
className: "px-4 py-3 font-mono overflow-y-auto",
|
|
5385
|
+
style: { maxHeight, ...style }
|
|
5386
|
+
},
|
|
5387
|
+
elements.map((element, index) => /* @__PURE__ */ import_react64.default.createElement(ScriptElementRenderer, { key: index, element }))
|
|
5388
|
+
)
|
|
5389
|
+
);
|
|
5390
|
+
}
|
|
5391
|
+
);
|
|
5392
|
+
ScriptCard.displayName = "ScriptCard";
|
|
5393
|
+
|
|
5394
|
+
// src/components/chat/ArtifactsPanel.tsx
|
|
5395
|
+
function ArtifactSkeleton({ type, fullWidth }) {
|
|
5396
|
+
const wrapperClass = fullWidth ? "col-span-full" : "";
|
|
5022
5397
|
if (type === "image") {
|
|
5023
|
-
return /* @__PURE__ */
|
|
5398
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "w-full h-48" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-4 w-1/2" })));
|
|
5024
5399
|
}
|
|
5025
5400
|
if (type === "video") {
|
|
5026
|
-
return /* @__PURE__ */
|
|
5401
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "w-full aspect-video" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-4 w-1/2" })));
|
|
5402
|
+
}
|
|
5403
|
+
if (type === "audio") {
|
|
5404
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: cx("overflow-hidden", wrapperClass) }, /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "w-full h-32" }), /* @__PURE__ */ import_react65.default.createElement("div", { className: "p-4 bg-charcoal border border-ash/40 border-t-0" }, /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-5 w-3/4 mb-2" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-4 w-1/2" })));
|
|
5405
|
+
}
|
|
5406
|
+
if (type === "html") {
|
|
5407
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: cx("p-4 bg-charcoal border border-ash/40 space-y-2", wrapperClass) }, /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-5 w-1/3 mb-4" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-3 w-2/3" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-3 w-full" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-3 w-3/4" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-3 w-full" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-3 w-1/2" }));
|
|
5027
5408
|
}
|
|
5028
|
-
return /* @__PURE__ */
|
|
5409
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: cx("p-4 bg-charcoal border border-ash/40 space-y-2", wrapperClass) }, /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-5 w-1/2" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-4 w-full" }), /* @__PURE__ */ import_react65.default.createElement(Skeleton, { className: "h-4 w-3/4" }));
|
|
5029
5410
|
}
|
|
5030
|
-
function
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5411
|
+
function ArtifactModal({
|
|
5412
|
+
artifact,
|
|
5413
|
+
onClose
|
|
5414
|
+
}) {
|
|
5415
|
+
(0, import_react65.useEffect)(() => {
|
|
5416
|
+
const handleKeyDown = (e) => {
|
|
5417
|
+
if (e.key === "Escape") {
|
|
5418
|
+
onClose();
|
|
5419
|
+
}
|
|
5420
|
+
};
|
|
5421
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
5422
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
5423
|
+
}, [onClose]);
|
|
5424
|
+
const handleBackdropClick = (0, import_react65.useCallback)((e) => {
|
|
5425
|
+
if (e.target === e.currentTarget) {
|
|
5426
|
+
onClose();
|
|
5427
|
+
}
|
|
5428
|
+
}, [onClose]);
|
|
5429
|
+
return /* @__PURE__ */ import_react65.default.createElement(
|
|
5430
|
+
"div",
|
|
5431
|
+
{
|
|
5432
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-void/90 backdrop-blur-sm animate-fade-in",
|
|
5433
|
+
onClick: handleBackdropClick
|
|
5434
|
+
},
|
|
5435
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5436
|
+
"div",
|
|
5437
|
+
{
|
|
5438
|
+
className: "relative w-11/12 h-5/6 max-w-6xl bg-charcoal border border-ash/40 flex flex-col overflow-hidden"
|
|
5439
|
+
},
|
|
5440
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5441
|
+
"div",
|
|
5442
|
+
{
|
|
5443
|
+
className: "flex items-center justify-between p-4 border-b border-ash/40 shrink-0"
|
|
5444
|
+
},
|
|
5445
|
+
/* @__PURE__ */ import_react65.default.createElement("div", null, artifact.title && /* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm font-semibold text-white" }, artifact.title), artifact.subtitle && /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-silver" }, artifact.subtitle)),
|
|
5446
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5447
|
+
"button",
|
|
5448
|
+
{
|
|
5449
|
+
onClick: onClose,
|
|
5450
|
+
className: "p-2 text-silver hover:text-white hover:bg-ash/20 transition-colors",
|
|
5451
|
+
"aria-label": "Close modal"
|
|
5452
|
+
},
|
|
5453
|
+
/* @__PURE__ */ import_react65.default.createElement(CloseIcon, { className: "w-5 h-5" })
|
|
5454
|
+
)
|
|
5455
|
+
),
|
|
5456
|
+
/* @__PURE__ */ import_react65.default.createElement("div", { className: "flex-1 overflow-auto p-4" }, artifact.type === "image" && /* @__PURE__ */ import_react65.default.createElement(
|
|
5457
|
+
"img",
|
|
5458
|
+
{
|
|
5459
|
+
src: artifact.src,
|
|
5460
|
+
alt: artifact.alt || "Artifact image",
|
|
5461
|
+
className: "max-w-full max-h-full object-contain mx-auto"
|
|
5462
|
+
}
|
|
5463
|
+
), artifact.type === "video" && /* @__PURE__ */ import_react65.default.createElement(
|
|
5464
|
+
VideoCard,
|
|
5465
|
+
{
|
|
5466
|
+
src: artifact.src || "",
|
|
5467
|
+
aspectRatio: "video",
|
|
5468
|
+
controls: true,
|
|
5469
|
+
className: "max-w-full max-h-full mx-auto"
|
|
5470
|
+
}
|
|
5471
|
+
), artifact.type === "audio" && /* @__PURE__ */ import_react65.default.createElement(
|
|
5472
|
+
AudioCard,
|
|
5473
|
+
{
|
|
5474
|
+
src: artifact.src || "",
|
|
5475
|
+
controls: true,
|
|
5476
|
+
className: "max-w-xl mx-auto"
|
|
5477
|
+
}
|
|
5478
|
+
), artifact.type === "text" && /* @__PURE__ */ import_react65.default.createElement(
|
|
5479
|
+
MarkdownContent,
|
|
5480
|
+
{
|
|
5481
|
+
content: artifact.content || "",
|
|
5482
|
+
className: "prose-sm prose-invert max-w-none"
|
|
5483
|
+
}
|
|
5484
|
+
), artifact.type === "html" && artifact.scriptElements && /* @__PURE__ */ import_react65.default.createElement(
|
|
5485
|
+
ScriptCard,
|
|
5486
|
+
{
|
|
5487
|
+
elements: artifact.scriptElements,
|
|
5488
|
+
maxHeight: "100%",
|
|
5489
|
+
className: "max-w-3xl mx-auto border-0"
|
|
5490
|
+
}
|
|
5491
|
+
))
|
|
5492
|
+
)
|
|
5493
|
+
);
|
|
5494
|
+
}
|
|
5495
|
+
function ArtifactRenderer({
|
|
5496
|
+
artifact,
|
|
5497
|
+
isLoading,
|
|
5498
|
+
onExpand
|
|
5499
|
+
}) {
|
|
5500
|
+
const [imageLoaded, setImageLoaded] = (0, import_react65.useState)(false);
|
|
5501
|
+
const [minDelayPassed, setMinDelayPassed] = (0, import_react65.useState)(false);
|
|
5502
|
+
(0, import_react65.useEffect)(() => {
|
|
5034
5503
|
setImageLoaded(false);
|
|
5035
5504
|
setMinDelayPassed(false);
|
|
5036
5505
|
const timer = setTimeout(() => {
|
|
@@ -5038,76 +5507,146 @@ function ArtifactRenderer({ artifact, isLoading }) {
|
|
|
5038
5507
|
}, 800);
|
|
5039
5508
|
return () => clearTimeout(timer);
|
|
5040
5509
|
}, [artifact.src, artifact.id]);
|
|
5510
|
+
const fullWidthClass = artifact.fullWidth ? "col-span-full" : "";
|
|
5041
5511
|
if (isLoading || artifact.isPending) {
|
|
5042
|
-
return /* @__PURE__ */
|
|
5512
|
+
return /* @__PURE__ */ import_react65.default.createElement(ArtifactSkeleton, { type: artifact.type, fullWidth: artifact.fullWidth });
|
|
5043
5513
|
}
|
|
5044
|
-
const showContent = imageLoaded && minDelayPassed;
|
|
5514
|
+
const showContent = artifact.type !== "image" || imageLoaded && minDelayPassed;
|
|
5515
|
+
const expandButton = onExpand && /* @__PURE__ */ import_react65.default.createElement(
|
|
5516
|
+
"button",
|
|
5517
|
+
{
|
|
5518
|
+
onClick: (e) => {
|
|
5519
|
+
e.stopPropagation();
|
|
5520
|
+
onExpand();
|
|
5521
|
+
},
|
|
5522
|
+
className: cx(
|
|
5523
|
+
"absolute top-2 right-2 z-10 p-1.5",
|
|
5524
|
+
"bg-obsidian/80 text-silver hover:text-white hover:bg-obsidian",
|
|
5525
|
+
"opacity-0 group-hover:opacity-100 transition-opacity"
|
|
5526
|
+
),
|
|
5527
|
+
"aria-label": "Expand artifact"
|
|
5528
|
+
},
|
|
5529
|
+
/* @__PURE__ */ import_react65.default.createElement(ExpandIcon, { className: "w-4 h-4" })
|
|
5530
|
+
);
|
|
5045
5531
|
switch (artifact.type) {
|
|
5046
5532
|
case "image":
|
|
5047
|
-
return /* @__PURE__ */
|
|
5048
|
-
|
|
5533
|
+
return /* @__PURE__ */ import_react65.default.createElement(
|
|
5534
|
+
"div",
|
|
5535
|
+
{
|
|
5536
|
+
className: cx("relative group cursor-pointer", fullWidthClass),
|
|
5537
|
+
onClick: onExpand
|
|
5538
|
+
},
|
|
5539
|
+
!showContent && /* @__PURE__ */ import_react65.default.createElement(ArtifactSkeleton, { type: "image" }),
|
|
5540
|
+
expandButton,
|
|
5541
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5542
|
+
ImageCard,
|
|
5543
|
+
{
|
|
5544
|
+
src: artifact.src || "",
|
|
5545
|
+
alt: artifact.alt || "Artifact image",
|
|
5546
|
+
title: artifact.title,
|
|
5547
|
+
subtitle: artifact.subtitle,
|
|
5548
|
+
aspectRatio: "landscape",
|
|
5549
|
+
className: cx(
|
|
5550
|
+
"w-full transition-opacity duration-300",
|
|
5551
|
+
showContent ? "opacity-100" : "opacity-0 absolute inset-0"
|
|
5552
|
+
),
|
|
5553
|
+
onLoad: () => setImageLoaded(true)
|
|
5554
|
+
}
|
|
5555
|
+
)
|
|
5556
|
+
);
|
|
5557
|
+
case "video":
|
|
5558
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: cx("relative group", fullWidthClass) }, expandButton, /* @__PURE__ */ import_react65.default.createElement(
|
|
5559
|
+
VideoCard,
|
|
5049
5560
|
{
|
|
5050
5561
|
src: artifact.src || "",
|
|
5051
|
-
alt: artifact.alt || "Artifact image",
|
|
5052
5562
|
title: artifact.title,
|
|
5053
5563
|
subtitle: artifact.subtitle,
|
|
5054
|
-
aspectRatio: "
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
showContent ? "opacity-100" : "opacity-0 absolute inset-0"
|
|
5058
|
-
),
|
|
5059
|
-
onLoad: () => setImageLoaded(true)
|
|
5564
|
+
aspectRatio: "video",
|
|
5565
|
+
controls: true,
|
|
5566
|
+
className: "w-full"
|
|
5060
5567
|
}
|
|
5061
5568
|
));
|
|
5062
|
-
case "
|
|
5063
|
-
return /* @__PURE__ */
|
|
5064
|
-
|
|
5569
|
+
case "audio":
|
|
5570
|
+
return /* @__PURE__ */ import_react65.default.createElement("div", { className: cx("relative group", fullWidthClass) }, expandButton, /* @__PURE__ */ import_react65.default.createElement(
|
|
5571
|
+
AudioCard,
|
|
5065
5572
|
{
|
|
5066
5573
|
src: artifact.src || "",
|
|
5067
5574
|
title: artifact.title,
|
|
5068
5575
|
subtitle: artifact.subtitle,
|
|
5069
|
-
aspectRatio: "video",
|
|
5070
5576
|
controls: true,
|
|
5071
5577
|
className: "w-full"
|
|
5072
5578
|
}
|
|
5579
|
+
));
|
|
5580
|
+
case "html":
|
|
5581
|
+
return /* @__PURE__ */ import_react65.default.createElement(
|
|
5582
|
+
"div",
|
|
5583
|
+
{
|
|
5584
|
+
className: cx("relative group cursor-pointer", fullWidthClass),
|
|
5585
|
+
onClick: onExpand
|
|
5586
|
+
},
|
|
5587
|
+
expandButton,
|
|
5588
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5589
|
+
ScriptCard,
|
|
5590
|
+
{
|
|
5591
|
+
title: artifact.title,
|
|
5592
|
+
subtitle: artifact.subtitle,
|
|
5593
|
+
elements: artifact.scriptElements || [],
|
|
5594
|
+
maxHeight: "16rem",
|
|
5595
|
+
className: "w-full"
|
|
5596
|
+
}
|
|
5597
|
+
)
|
|
5073
5598
|
);
|
|
5074
5599
|
case "text":
|
|
5075
|
-
return /* @__PURE__ */
|
|
5076
|
-
|
|
5600
|
+
return /* @__PURE__ */ import_react65.default.createElement(
|
|
5601
|
+
"div",
|
|
5077
5602
|
{
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5603
|
+
className: cx(
|
|
5604
|
+
"relative group cursor-pointer p-4 bg-charcoal border border-ash/40",
|
|
5605
|
+
fullWidthClass
|
|
5606
|
+
),
|
|
5607
|
+
onClick: onExpand
|
|
5608
|
+
},
|
|
5609
|
+
expandButton,
|
|
5610
|
+
artifact.title && /* @__PURE__ */ import_react65.default.createElement("h4", { className: "text-sm font-semibold text-white mb-2" }, artifact.title),
|
|
5611
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5612
|
+
MarkdownContent,
|
|
5613
|
+
{
|
|
5614
|
+
content: artifact.content || "",
|
|
5615
|
+
className: "prose-sm prose-invert max-h-48 overflow-y-auto"
|
|
5616
|
+
}
|
|
5617
|
+
)
|
|
5618
|
+
);
|
|
5082
5619
|
default:
|
|
5083
5620
|
return null;
|
|
5084
5621
|
}
|
|
5085
5622
|
}
|
|
5086
|
-
var ArtifactsPanel =
|
|
5623
|
+
var ArtifactsPanel = import_react65.default.forwardRef(
|
|
5087
5624
|
({
|
|
5088
5625
|
artifacts,
|
|
5089
5626
|
isOpen = false,
|
|
5090
5627
|
onClose,
|
|
5091
5628
|
isLoading = false,
|
|
5092
5629
|
width,
|
|
5630
|
+
widthPercent,
|
|
5093
5631
|
onResizeStart,
|
|
5094
5632
|
className,
|
|
5095
5633
|
...rest
|
|
5096
5634
|
}, ref) => {
|
|
5097
|
-
const
|
|
5635
|
+
const [expandedArtifact, setExpandedArtifact] = (0, import_react65.useState)(null);
|
|
5636
|
+
const columns = widthPercent && widthPercent > 55 ? 3 : widthPercent && widthPercent > 35 ? 2 : 1;
|
|
5098
5637
|
if (!isOpen) {
|
|
5099
|
-
return /* @__PURE__ */
|
|
5638
|
+
return /* @__PURE__ */ import_react65.default.createElement(
|
|
5100
5639
|
"div",
|
|
5101
5640
|
{
|
|
5102
5641
|
ref,
|
|
5103
5642
|
className: cx(
|
|
5104
5643
|
"h-full bg-charcoal/80 border-l border-ash/40 flex flex-col items-center py-3",
|
|
5105
|
-
"w-12
|
|
5644
|
+
"w-12 shrink-0",
|
|
5106
5645
|
className
|
|
5107
5646
|
),
|
|
5108
5647
|
...rest
|
|
5109
5648
|
},
|
|
5110
|
-
/* @__PURE__ */
|
|
5649
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5111
5650
|
"button",
|
|
5112
5651
|
{
|
|
5113
5652
|
onClick: onClose,
|
|
@@ -5119,8 +5658,8 @@ var ArtifactsPanel = import_react52.default.forwardRef(
|
|
|
5119
5658
|
),
|
|
5120
5659
|
"aria-label": "Expand artifacts panel"
|
|
5121
5660
|
},
|
|
5122
|
-
/* @__PURE__ */
|
|
5123
|
-
artifacts.length > 0 && /* @__PURE__ */
|
|
5661
|
+
/* @__PURE__ */ import_react65.default.createElement(LayersIcon, { className: "w-5 h-5" }),
|
|
5662
|
+
artifacts.length > 0 && /* @__PURE__ */ import_react65.default.createElement(
|
|
5124
5663
|
"span",
|
|
5125
5664
|
{
|
|
5126
5665
|
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"
|
|
@@ -5130,7 +5669,7 @@ var ArtifactsPanel = import_react52.default.forwardRef(
|
|
|
5130
5669
|
)
|
|
5131
5670
|
);
|
|
5132
5671
|
}
|
|
5133
|
-
return /* @__PURE__ */
|
|
5672
|
+
return /* @__PURE__ */ import_react65.default.createElement(import_react65.default.Fragment, null, /* @__PURE__ */ import_react65.default.createElement(
|
|
5134
5673
|
"div",
|
|
5135
5674
|
{
|
|
5136
5675
|
ref,
|
|
@@ -5138,13 +5677,13 @@ var ArtifactsPanel = import_react52.default.forwardRef(
|
|
|
5138
5677
|
className: cx(
|
|
5139
5678
|
"h-full bg-charcoal/50 border-l border-ash/40 flex flex-col relative",
|
|
5140
5679
|
!width && "w-96",
|
|
5141
|
-
"
|
|
5680
|
+
"shrink-0",
|
|
5142
5681
|
className
|
|
5143
5682
|
),
|
|
5144
|
-
style: width ? { width
|
|
5683
|
+
style: width ? { width } : void 0,
|
|
5145
5684
|
...rest
|
|
5146
5685
|
},
|
|
5147
|
-
/* @__PURE__ */
|
|
5686
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5148
5687
|
"div",
|
|
5149
5688
|
{
|
|
5150
5689
|
onMouseDown: onResizeStart,
|
|
@@ -5157,13 +5696,13 @@ var ArtifactsPanel = import_react52.default.forwardRef(
|
|
|
5157
5696
|
)
|
|
5158
5697
|
}
|
|
5159
5698
|
),
|
|
5160
|
-
/* @__PURE__ */
|
|
5699
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5161
5700
|
"div",
|
|
5162
5701
|
{
|
|
5163
|
-
className: "flex items-center justify-between p-4 border-b border-ash/40
|
|
5702
|
+
className: "flex items-center justify-between p-4 border-b border-ash/40 shrink-0"
|
|
5164
5703
|
},
|
|
5165
|
-
/* @__PURE__ */
|
|
5166
|
-
/* @__PURE__ */
|
|
5704
|
+
/* @__PURE__ */ import_react65.default.createElement("h3", { className: "text-sm font-semibold text-white" }, "Artifacts"),
|
|
5705
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5167
5706
|
"button",
|
|
5168
5707
|
{
|
|
5169
5708
|
onClick: onClose,
|
|
@@ -5174,10 +5713,10 @@ var ArtifactsPanel = import_react52.default.forwardRef(
|
|
|
5174
5713
|
),
|
|
5175
5714
|
"aria-label": "Collapse artifacts panel"
|
|
5176
5715
|
},
|
|
5177
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ import_react65.default.createElement(ChevronRightIcon, { className: "w-5 h-5" })
|
|
5178
5717
|
)
|
|
5179
5718
|
),
|
|
5180
|
-
/* @__PURE__ */
|
|
5719
|
+
/* @__PURE__ */ import_react65.default.createElement(
|
|
5181
5720
|
"div",
|
|
5182
5721
|
{
|
|
5183
5722
|
"data-testid": "artifacts-grid",
|
|
@@ -5188,21 +5727,28 @@ var ArtifactsPanel = import_react52.default.forwardRef(
|
|
|
5188
5727
|
columns === 3 && "grid-cols-3"
|
|
5189
5728
|
)
|
|
5190
5729
|
},
|
|
5191
|
-
artifacts.length === 0 && !isLoading ? /* @__PURE__ */
|
|
5730
|
+
artifacts.length === 0 && !isLoading ? /* @__PURE__ */ import_react65.default.createElement("p", { className: "text-xs text-silver/60 text-center py-8" }, "No artifacts to display") : artifacts.map((artifact) => /* @__PURE__ */ import_react65.default.createElement(
|
|
5192
5731
|
ArtifactRenderer,
|
|
5193
5732
|
{
|
|
5194
5733
|
key: artifact.id,
|
|
5195
5734
|
artifact,
|
|
5196
|
-
isLoading
|
|
5735
|
+
isLoading,
|
|
5736
|
+
onExpand: () => setExpandedArtifact(artifact)
|
|
5197
5737
|
}
|
|
5198
5738
|
))
|
|
5199
5739
|
)
|
|
5200
|
-
)
|
|
5740
|
+
), expandedArtifact && /* @__PURE__ */ import_react65.default.createElement(
|
|
5741
|
+
ArtifactModal,
|
|
5742
|
+
{
|
|
5743
|
+
artifact: expandedArtifact,
|
|
5744
|
+
onClose: () => setExpandedArtifact(null)
|
|
5745
|
+
}
|
|
5746
|
+
));
|
|
5201
5747
|
}
|
|
5202
5748
|
);
|
|
5203
5749
|
ArtifactsPanel.displayName = "ArtifactsPanel";
|
|
5204
|
-
var ArtifactsPanelToggle =
|
|
5205
|
-
return /* @__PURE__ */
|
|
5750
|
+
var ArtifactsPanelToggle = import_react65.default.forwardRef(({ artifactCount = 0, onExpand, className, ...rest }, ref) => {
|
|
5751
|
+
return /* @__PURE__ */ import_react65.default.createElement(
|
|
5206
5752
|
"button",
|
|
5207
5753
|
{
|
|
5208
5754
|
ref,
|
|
@@ -5219,8 +5765,8 @@ var ArtifactsPanelToggle = import_react52.default.forwardRef(({ artifactCount =
|
|
|
5219
5765
|
"aria-label": "Expand artifacts panel",
|
|
5220
5766
|
...rest
|
|
5221
5767
|
},
|
|
5222
|
-
/* @__PURE__ */
|
|
5223
|
-
artifactCount > 0 && /* @__PURE__ */
|
|
5768
|
+
/* @__PURE__ */ import_react65.default.createElement(LayersIcon, { className: "w-5 h-5" }),
|
|
5769
|
+
artifactCount > 0 && /* @__PURE__ */ import_react65.default.createElement(
|
|
5224
5770
|
"span",
|
|
5225
5771
|
{
|
|
5226
5772
|
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"
|
|
@@ -5231,42 +5777,143 @@ var ArtifactsPanelToggle = import_react52.default.forwardRef(({ artifactCount =
|
|
|
5231
5777
|
});
|
|
5232
5778
|
ArtifactsPanelToggle.displayName = "ArtifactsPanelToggle";
|
|
5233
5779
|
|
|
5780
|
+
// src/components/chat/TodosList.tsx
|
|
5781
|
+
var import_react66 = __toESM(require("react"));
|
|
5782
|
+
function TaskIcon({ status }) {
|
|
5783
|
+
switch (status) {
|
|
5784
|
+
case "done":
|
|
5785
|
+
return /* @__PURE__ */ import_react66.default.createElement(CheckSquareIcon, null);
|
|
5786
|
+
case "in_progress":
|
|
5787
|
+
return /* @__PURE__ */ import_react66.default.createElement(SquareLoaderIcon, null);
|
|
5788
|
+
case "cancelled":
|
|
5789
|
+
return /* @__PURE__ */ import_react66.default.createElement(CrossSquareIcon, { variant: "cancelled" });
|
|
5790
|
+
case "failed":
|
|
5791
|
+
return /* @__PURE__ */ import_react66.default.createElement(CrossSquareIcon, { variant: "failed" });
|
|
5792
|
+
case "pending":
|
|
5793
|
+
default:
|
|
5794
|
+
return /* @__PURE__ */ import_react66.default.createElement(EmptySquareIcon, null);
|
|
5795
|
+
}
|
|
5796
|
+
}
|
|
5797
|
+
function sortTasks(tasks) {
|
|
5798
|
+
const normal = [];
|
|
5799
|
+
const bottomItems = [];
|
|
5800
|
+
for (const task of tasks) {
|
|
5801
|
+
if (task.status === "cancelled" || task.status === "failed") {
|
|
5802
|
+
bottomItems.push(task);
|
|
5803
|
+
} else {
|
|
5804
|
+
normal.push(task);
|
|
5805
|
+
}
|
|
5806
|
+
}
|
|
5807
|
+
return [...normal, ...bottomItems];
|
|
5808
|
+
}
|
|
5809
|
+
function TaskItem({ task, depth = 0 }) {
|
|
5810
|
+
const isTerminal = task.status === "done" || task.status === "cancelled" || task.status === "failed";
|
|
5811
|
+
const isSubtle = task.status === "cancelled" || task.status === "failed";
|
|
5812
|
+
const showSubtasks = (task.status === "in_progress" || task.status === "done") && task.subtasks && task.subtasks.length > 0;
|
|
5813
|
+
const sortedSubtasks = showSubtasks ? sortTasks(task.subtasks) : [];
|
|
5814
|
+
return /* @__PURE__ */ import_react66.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ import_react66.default.createElement(
|
|
5815
|
+
"div",
|
|
5816
|
+
{
|
|
5817
|
+
className: cx(
|
|
5818
|
+
"flex items-center gap-2 py-1",
|
|
5819
|
+
depth > 0 && "pl-6"
|
|
5820
|
+
)
|
|
5821
|
+
},
|
|
5822
|
+
/* @__PURE__ */ import_react66.default.createElement(TaskIcon, { status: task.status }),
|
|
5823
|
+
/* @__PURE__ */ import_react66.default.createElement(
|
|
5824
|
+
"span",
|
|
5825
|
+
{
|
|
5826
|
+
className: cx(
|
|
5827
|
+
"text-xs leading-tight transition-colors",
|
|
5828
|
+
isTerminal && "line-through",
|
|
5829
|
+
isSubtle ? "text-silver/50" : "text-silver",
|
|
5830
|
+
task.status === "in_progress" && "text-white",
|
|
5831
|
+
task.status === "done" && "text-silver/70"
|
|
5832
|
+
)
|
|
5833
|
+
},
|
|
5834
|
+
task.label,
|
|
5835
|
+
task.status === "cancelled" && /* @__PURE__ */ import_react66.default.createElement("span", { className: "text-silver/40 ml-1" }, "(cancelled)"),
|
|
5836
|
+
task.status === "failed" && /* @__PURE__ */ import_react66.default.createElement("span", { className: "text-error/60 ml-1" }, "(failed)")
|
|
5837
|
+
)
|
|
5838
|
+
), showSubtasks && /* @__PURE__ */ import_react66.default.createElement("div", { className: "flex flex-col" }, sortedSubtasks.map((subtask) => /* @__PURE__ */ import_react66.default.createElement(TaskItem, { key: subtask.id, task: subtask, depth: depth + 1 }))));
|
|
5839
|
+
}
|
|
5840
|
+
var TodosList = import_react66.default.forwardRef(
|
|
5841
|
+
({ tasks, title = "Tasks", className, ...rest }, ref) => {
|
|
5842
|
+
const sortedTasks = (0, import_react66.useMemo)(() => sortTasks(tasks), [tasks]);
|
|
5843
|
+
const countCompleted = (taskList) => {
|
|
5844
|
+
let count = 0;
|
|
5845
|
+
for (const task of taskList) {
|
|
5846
|
+
if (task.status === "done") count++;
|
|
5847
|
+
if (task.subtasks) count += countCompleted(task.subtasks);
|
|
5848
|
+
}
|
|
5849
|
+
return count;
|
|
5850
|
+
};
|
|
5851
|
+
const countTotal = (taskList) => {
|
|
5852
|
+
let count = taskList.length;
|
|
5853
|
+
for (const task of taskList) {
|
|
5854
|
+
if (task.subtasks) count += countTotal(task.subtasks);
|
|
5855
|
+
}
|
|
5856
|
+
return count;
|
|
5857
|
+
};
|
|
5858
|
+
if (tasks.length === 0) {
|
|
5859
|
+
return null;
|
|
5860
|
+
}
|
|
5861
|
+
return /* @__PURE__ */ import_react66.default.createElement(
|
|
5862
|
+
"div",
|
|
5863
|
+
{
|
|
5864
|
+
ref,
|
|
5865
|
+
className: cx(
|
|
5866
|
+
"flex flex-col bg-charcoal/30 border-l border-ash/40",
|
|
5867
|
+
"overflow-hidden",
|
|
5868
|
+
className
|
|
5869
|
+
),
|
|
5870
|
+
style: { maxHeight: "25vh" },
|
|
5871
|
+
...rest
|
|
5872
|
+
},
|
|
5873
|
+
/* @__PURE__ */ import_react66.default.createElement("div", { className: "flex items-center justify-between px-4 py-2 border-b border-ash/40 flex-shrink-0" }, /* @__PURE__ */ import_react66.default.createElement("h4", { className: "text-xs font-medium text-white" }, title), /* @__PURE__ */ import_react66.default.createElement("span", { className: "text-xs text-silver/60" }, countCompleted(tasks), "/", countTotal(tasks))),
|
|
5874
|
+
/* @__PURE__ */ import_react66.default.createElement("div", { className: "flex-1 overflow-y-auto px-4 py-2" }, sortedTasks.map((task) => /* @__PURE__ */ import_react66.default.createElement(TaskItem, { key: task.id, task })))
|
|
5875
|
+
);
|
|
5876
|
+
}
|
|
5877
|
+
);
|
|
5878
|
+
TodosList.displayName = "TodosList";
|
|
5879
|
+
|
|
5234
5880
|
// src/components/chat/hooks/useResizable.ts
|
|
5235
|
-
var
|
|
5881
|
+
var import_react67 = require("react");
|
|
5236
5882
|
function useResizable({
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5883
|
+
initialWidthPercent,
|
|
5884
|
+
minWidthPercent,
|
|
5885
|
+
maxWidthPercent,
|
|
5240
5886
|
direction
|
|
5241
5887
|
}) {
|
|
5242
|
-
const [
|
|
5243
|
-
const [isResizing, setIsResizing] = (0,
|
|
5244
|
-
const lastX = (0,
|
|
5245
|
-
const startResizing = (0,
|
|
5888
|
+
const [widthPercent, setWidthPercent] = (0, import_react67.useState)(initialWidthPercent);
|
|
5889
|
+
const [isResizing, setIsResizing] = (0, import_react67.useState)(false);
|
|
5890
|
+
const lastX = (0, import_react67.useRef)(null);
|
|
5891
|
+
const startResizing = (0, import_react67.useCallback)((e) => {
|
|
5246
5892
|
e.preventDefault();
|
|
5247
5893
|
setIsResizing(true);
|
|
5248
5894
|
lastX.current = e.clientX;
|
|
5249
5895
|
}, []);
|
|
5250
|
-
const stopResizing = (0,
|
|
5896
|
+
const stopResizing = (0, import_react67.useCallback)(() => {
|
|
5251
5897
|
setIsResizing(false);
|
|
5252
5898
|
lastX.current = null;
|
|
5253
5899
|
}, []);
|
|
5254
|
-
const resize = (0,
|
|
5900
|
+
const resize = (0, import_react67.useCallback)(
|
|
5255
5901
|
(e) => {
|
|
5256
5902
|
if (!isResizing || lastX.current === null) {
|
|
5257
5903
|
return;
|
|
5258
5904
|
}
|
|
5259
5905
|
const deltaX = e.clientX - lastX.current;
|
|
5260
5906
|
const factor = direction === "right" ? 1 : -1;
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5907
|
+
const deltaPercent = deltaX / window.innerWidth * 100;
|
|
5908
|
+
setWidthPercent((prevPercent) => {
|
|
5909
|
+
const newPercent = prevPercent + deltaPercent * factor;
|
|
5910
|
+
return Math.min(Math.max(newPercent, minWidthPercent), maxWidthPercent);
|
|
5264
5911
|
});
|
|
5265
5912
|
lastX.current = e.clientX;
|
|
5266
5913
|
},
|
|
5267
|
-
[isResizing, direction,
|
|
5914
|
+
[isResizing, direction, minWidthPercent, maxWidthPercent]
|
|
5268
5915
|
);
|
|
5269
|
-
(0,
|
|
5916
|
+
(0, import_react67.useEffect)(() => {
|
|
5270
5917
|
if (isResizing) {
|
|
5271
5918
|
window.addEventListener("mousemove", resize);
|
|
5272
5919
|
window.addEventListener("mouseup", stopResizing);
|
|
@@ -5285,11 +5932,12 @@ function useResizable({
|
|
|
5285
5932
|
document.body.style.userSelect = "";
|
|
5286
5933
|
};
|
|
5287
5934
|
}, [isResizing, resize, stopResizing]);
|
|
5288
|
-
|
|
5935
|
+
const width = `${widthPercent}vw`;
|
|
5936
|
+
return { width, widthPercent, isResizing, startResizing };
|
|
5289
5937
|
}
|
|
5290
5938
|
|
|
5291
5939
|
// src/components/chat/ChatInterface.tsx
|
|
5292
|
-
var ChatInterface =
|
|
5940
|
+
var ChatInterface = import_react68.default.forwardRef(
|
|
5293
5941
|
({
|
|
5294
5942
|
messages = [],
|
|
5295
5943
|
conversationTree,
|
|
@@ -5314,35 +5962,36 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5314
5962
|
artifacts = [],
|
|
5315
5963
|
isArtifactsPanelOpen,
|
|
5316
5964
|
onArtifactsPanelOpenChange,
|
|
5965
|
+
tasks = [],
|
|
5966
|
+
tasksTitle,
|
|
5317
5967
|
className,
|
|
5318
5968
|
...rest
|
|
5319
5969
|
}, ref) => {
|
|
5320
|
-
const [sidebarCollapsed, setSidebarCollapsed] = (0,
|
|
5321
|
-
const [internalPanelOpen, setInternalPanelOpen] = (0,
|
|
5970
|
+
const [sidebarCollapsed, setSidebarCollapsed] = (0, import_react68.useState)(initialSidebarCollapsed);
|
|
5971
|
+
const [internalPanelOpen, setInternalPanelOpen] = (0, import_react68.useState)(false);
|
|
5322
5972
|
const {
|
|
5323
5973
|
width: sidebarWidth,
|
|
5324
5974
|
startResizing: startResizingSidebar
|
|
5325
5975
|
} = useResizable({
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
maxWidth: 500,
|
|
5976
|
+
initialWidthPercent: 15,
|
|
5977
|
+
minWidthPercent: 12,
|
|
5978
|
+
maxWidthPercent: 25,
|
|
5330
5979
|
direction: "right"
|
|
5331
5980
|
});
|
|
5332
5981
|
const {
|
|
5333
5982
|
width: artifactsWidth,
|
|
5983
|
+
widthPercent: artifactsWidthPercent,
|
|
5334
5984
|
startResizing: startResizingArtifacts
|
|
5335
5985
|
} = useResizable({
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
maxWidth: 1200,
|
|
5986
|
+
initialWidthPercent: 50,
|
|
5987
|
+
minWidthPercent: 25,
|
|
5988
|
+
maxWidthPercent: 70,
|
|
5340
5989
|
direction: "left"
|
|
5341
5990
|
});
|
|
5342
5991
|
const isPanelControlled = isArtifactsPanelOpen !== void 0;
|
|
5343
5992
|
const artifactsPanelOpen = isPanelControlled ? isArtifactsPanelOpen : internalPanelOpen;
|
|
5344
5993
|
const isTreeMode = !!conversationTree;
|
|
5345
|
-
const effectiveMessages = (0,
|
|
5994
|
+
const effectiveMessages = (0, import_react68.useMemo)(() => {
|
|
5346
5995
|
if (isTreeMode && conversationTree) {
|
|
5347
5996
|
const pathNodes = getActivePathMessages(conversationTree);
|
|
5348
5997
|
return pathNodes.map((node) => ({
|
|
@@ -5354,7 +6003,7 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5354
6003
|
}
|
|
5355
6004
|
return messages;
|
|
5356
6005
|
}, [isTreeMode, conversationTree, messages]);
|
|
5357
|
-
const latestUserMessageIndex = (0,
|
|
6006
|
+
const latestUserMessageIndex = (0, import_react68.useMemo)(() => {
|
|
5358
6007
|
for (let i = effectiveMessages.length - 1; i >= 0; i--) {
|
|
5359
6008
|
if (effectiveMessages[i].variant === "user") {
|
|
5360
6009
|
return i;
|
|
@@ -5362,15 +6011,15 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5362
6011
|
}
|
|
5363
6012
|
return -1;
|
|
5364
6013
|
}, [effectiveMessages]);
|
|
5365
|
-
const hasPendingArtifact = (0,
|
|
6014
|
+
const hasPendingArtifact = (0, import_react68.useMemo)(() => {
|
|
5366
6015
|
return artifacts.some((a) => a.isPending);
|
|
5367
6016
|
}, [artifacts]);
|
|
5368
|
-
|
|
6017
|
+
import_react68.default.useEffect(() => {
|
|
5369
6018
|
if (!isPanelControlled && artifacts.length > 0) {
|
|
5370
6019
|
setInternalPanelOpen(true);
|
|
5371
6020
|
}
|
|
5372
6021
|
}, [artifacts.length, isPanelControlled]);
|
|
5373
|
-
const handleBranchSwitch = (0,
|
|
6022
|
+
const handleBranchSwitch = (0, import_react68.useCallback)(
|
|
5374
6023
|
(nodeId, direction) => {
|
|
5375
6024
|
if (!isTreeMode || !conversationTree || !onTreeChange) {
|
|
5376
6025
|
return;
|
|
@@ -5380,7 +6029,7 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5380
6029
|
},
|
|
5381
6030
|
[isTreeMode, conversationTree, onTreeChange]
|
|
5382
6031
|
);
|
|
5383
|
-
const displayMessages = (0,
|
|
6032
|
+
const displayMessages = (0, import_react68.useMemo)(() => {
|
|
5384
6033
|
return effectiveMessages.map((msg) => {
|
|
5385
6034
|
let branchInfo = void 0;
|
|
5386
6035
|
if (isTreeMode && conversationTree) {
|
|
@@ -5414,16 +6063,16 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5414
6063
|
onRetryMessage,
|
|
5415
6064
|
handleBranchSwitch
|
|
5416
6065
|
]);
|
|
5417
|
-
const handleSubmit = (0,
|
|
6066
|
+
const handleSubmit = (0, import_react68.useCallback)(
|
|
5418
6067
|
(message, attachments) => {
|
|
5419
6068
|
onMessageSubmit?.(message, attachments);
|
|
5420
6069
|
},
|
|
5421
6070
|
[onMessageSubmit]
|
|
5422
6071
|
);
|
|
5423
|
-
const toggleSidebar = (0,
|
|
6072
|
+
const toggleSidebar = (0, import_react68.useCallback)(() => {
|
|
5424
6073
|
setSidebarCollapsed((prev) => !prev);
|
|
5425
6074
|
}, []);
|
|
5426
|
-
const toggleArtifactsPanel = (0,
|
|
6075
|
+
const toggleArtifactsPanel = (0, import_react68.useCallback)(() => {
|
|
5427
6076
|
if (isPanelControlled) {
|
|
5428
6077
|
onArtifactsPanelOpenChange?.(!artifactsPanelOpen);
|
|
5429
6078
|
} else {
|
|
@@ -5431,14 +6080,14 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5431
6080
|
}
|
|
5432
6081
|
}, [isPanelControlled, artifactsPanelOpen, onArtifactsPanelOpenChange]);
|
|
5433
6082
|
const isEmpty = effectiveMessages.length === 0;
|
|
5434
|
-
return /* @__PURE__ */
|
|
6083
|
+
return /* @__PURE__ */ import_react68.default.createElement(
|
|
5435
6084
|
"div",
|
|
5436
6085
|
{
|
|
5437
6086
|
ref,
|
|
5438
6087
|
className: cx("flex h-full w-full bg-obsidian overflow-hidden", className),
|
|
5439
6088
|
...rest
|
|
5440
6089
|
},
|
|
5441
|
-
/* @__PURE__ */
|
|
6090
|
+
/* @__PURE__ */ import_react68.default.createElement(
|
|
5442
6091
|
ConversationSidebar,
|
|
5443
6092
|
{
|
|
5444
6093
|
conversations,
|
|
@@ -5450,16 +6099,16 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5450
6099
|
onResizeStart: startResizingSidebar
|
|
5451
6100
|
}
|
|
5452
6101
|
),
|
|
5453
|
-
/* @__PURE__ */
|
|
6102
|
+
/* @__PURE__ */ import_react68.default.createElement("div", { className: "flex-1 flex flex-col min-w-0 relative" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: cx(
|
|
5454
6103
|
"flex-1 flex flex-col min-h-0 relative",
|
|
5455
6104
|
isEmpty ? "justify-center" : "justify-start"
|
|
5456
|
-
) }, /* @__PURE__ */
|
|
6105
|
+
) }, /* @__PURE__ */ import_react68.default.createElement("div", { className: cx(
|
|
5457
6106
|
"transition-all duration-500 ease-in-out",
|
|
5458
6107
|
isEmpty ? "flex-1" : "flex-zero"
|
|
5459
|
-
) }), /* @__PURE__ */
|
|
6108
|
+
) }), /* @__PURE__ */ import_react68.default.createElement("div", { className: cx(
|
|
5460
6109
|
"transition-all duration-500 ease-in-out overflow-hidden flex flex-col",
|
|
5461
6110
|
isEmpty ? "flex-zero opacity-0" : "flex-1 opacity-100"
|
|
5462
|
-
) }, /* @__PURE__ */
|
|
6111
|
+
) }, /* @__PURE__ */ import_react68.default.createElement(
|
|
5463
6112
|
ChatView,
|
|
5464
6113
|
{
|
|
5465
6114
|
messages: displayMessages,
|
|
@@ -5468,10 +6117,10 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5468
6117
|
isThinking,
|
|
5469
6118
|
className: "flex-1"
|
|
5470
6119
|
}
|
|
5471
|
-
)), /* @__PURE__ */
|
|
6120
|
+
)), /* @__PURE__ */ import_react68.default.createElement("div", { className: cx(
|
|
5472
6121
|
"transition-all duration-500 ease-in-out z-10 w-full",
|
|
5473
6122
|
isEmpty ? "p-4" : "shrink-0 p-4 border-t border-ash/40 bg-obsidian"
|
|
5474
|
-
) }, isEmpty && emptyState ? /* @__PURE__ */
|
|
6123
|
+
) }, isEmpty && emptyState ? /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex justify-center" }, emptyState) : /* @__PURE__ */ import_react68.default.createElement(
|
|
5475
6124
|
ChatInput,
|
|
5476
6125
|
{
|
|
5477
6126
|
position: isEmpty ? "centered" : "bottom",
|
|
@@ -5485,11 +6134,11 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5485
6134
|
attachments: propsAttachments,
|
|
5486
6135
|
onAttachmentsChange
|
|
5487
6136
|
}
|
|
5488
|
-
)), /* @__PURE__ */
|
|
6137
|
+
)), /* @__PURE__ */ import_react68.default.createElement("div", { className: cx(
|
|
5489
6138
|
"transition-all duration-500 ease-in-out",
|
|
5490
6139
|
isEmpty ? "flex-1" : "flex-zero"
|
|
5491
6140
|
) }))),
|
|
5492
|
-
/* @__PURE__ */
|
|
6141
|
+
/* @__PURE__ */ import_react68.default.createElement("div", { className: "h-full flex flex-col flex-shrink-0" }, /* @__PURE__ */ import_react68.default.createElement("div", { className: "flex-1 min-h-0" }, /* @__PURE__ */ import_react68.default.createElement(
|
|
5493
6142
|
ArtifactsPanel,
|
|
5494
6143
|
{
|
|
5495
6144
|
artifacts,
|
|
@@ -5497,18 +6146,27 @@ var ChatInterface = import_react54.default.forwardRef(
|
|
|
5497
6146
|
onClose: toggleArtifactsPanel,
|
|
5498
6147
|
isLoading: isStreaming && hasPendingArtifact,
|
|
5499
6148
|
width: artifactsWidth,
|
|
5500
|
-
|
|
6149
|
+
widthPercent: artifactsWidthPercent,
|
|
6150
|
+
onResizeStart: startResizingArtifacts,
|
|
6151
|
+
className: "h-full"
|
|
5501
6152
|
}
|
|
5502
|
-
)
|
|
6153
|
+
)), tasks.length > 0 && artifactsPanelOpen && /* @__PURE__ */ import_react68.default.createElement(
|
|
6154
|
+
TodosList,
|
|
6155
|
+
{
|
|
6156
|
+
tasks,
|
|
6157
|
+
title: tasksTitle,
|
|
6158
|
+
style: { width: artifactsWidth }
|
|
6159
|
+
}
|
|
6160
|
+
))
|
|
5503
6161
|
);
|
|
5504
6162
|
}
|
|
5505
6163
|
);
|
|
5506
6164
|
ChatInterface.displayName = "ChatInterface";
|
|
5507
6165
|
|
|
5508
6166
|
// src/components/chat/MessageActions.tsx
|
|
5509
|
-
var
|
|
5510
|
-
var
|
|
5511
|
-
var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */
|
|
6167
|
+
var import_react69 = __toESM(require("react"));
|
|
6168
|
+
var import_lucide_react13 = require("lucide-react");
|
|
6169
|
+
var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @__PURE__ */ import_react69.default.createElement(
|
|
5512
6170
|
"button",
|
|
5513
6171
|
{
|
|
5514
6172
|
type: "button",
|
|
@@ -5524,7 +6182,7 @@ var ActionButton2 = ({ onClick, label, children, className, disabled }) => /* @_
|
|
|
5524
6182
|
},
|
|
5525
6183
|
children
|
|
5526
6184
|
);
|
|
5527
|
-
var MessageActions =
|
|
6185
|
+
var MessageActions = import_react69.default.forwardRef(
|
|
5528
6186
|
({
|
|
5529
6187
|
variant,
|
|
5530
6188
|
content,
|
|
@@ -5536,12 +6194,12 @@ var MessageActions = import_react55.default.forwardRef(
|
|
|
5536
6194
|
className,
|
|
5537
6195
|
...rest
|
|
5538
6196
|
}, ref) => {
|
|
5539
|
-
const [localIsEditing, setLocalIsEditing] = (0,
|
|
5540
|
-
const [localEditValue, setLocalEditValue] = (0,
|
|
5541
|
-
const [copied, setCopied] = (0,
|
|
6197
|
+
const [localIsEditing, setLocalIsEditing] = (0, import_react69.useState)(false);
|
|
6198
|
+
const [localEditValue, setLocalEditValue] = (0, import_react69.useState)(content);
|
|
6199
|
+
const [copied, setCopied] = (0, import_react69.useState)(false);
|
|
5542
6200
|
const isEditing = controlledIsEditing ?? localIsEditing;
|
|
5543
6201
|
const editValue = controlledEditValue ?? localEditValue;
|
|
5544
|
-
const setIsEditing = (0,
|
|
6202
|
+
const setIsEditing = (0, import_react69.useCallback)(
|
|
5545
6203
|
(value) => {
|
|
5546
6204
|
if (onEditingChange) {
|
|
5547
6205
|
onEditingChange(value);
|
|
@@ -5551,10 +6209,10 @@ var MessageActions = import_react55.default.forwardRef(
|
|
|
5551
6209
|
},
|
|
5552
6210
|
[onEditingChange]
|
|
5553
6211
|
);
|
|
5554
|
-
const setEditValue = (0,
|
|
6212
|
+
const setEditValue = (0, import_react69.useCallback)((value) => {
|
|
5555
6213
|
setLocalEditValue(value);
|
|
5556
6214
|
}, []);
|
|
5557
|
-
const handleCopy = (0,
|
|
6215
|
+
const handleCopy = (0, import_react69.useCallback)(async () => {
|
|
5558
6216
|
try {
|
|
5559
6217
|
await navigator.clipboard.writeText(content);
|
|
5560
6218
|
setCopied(true);
|
|
@@ -5570,22 +6228,22 @@ var MessageActions = import_react55.default.forwardRef(
|
|
|
5570
6228
|
setTimeout(() => setCopied(false), 2e3);
|
|
5571
6229
|
}
|
|
5572
6230
|
}, [content]);
|
|
5573
|
-
const handleStartEdit = (0,
|
|
6231
|
+
const handleStartEdit = (0, import_react69.useCallback)(() => {
|
|
5574
6232
|
setLocalEditValue(content);
|
|
5575
6233
|
setIsEditing(true);
|
|
5576
6234
|
}, [content, setIsEditing]);
|
|
5577
|
-
const handleCancelEdit = (0,
|
|
6235
|
+
const handleCancelEdit = (0, import_react69.useCallback)(() => {
|
|
5578
6236
|
setIsEditing(false);
|
|
5579
6237
|
setLocalEditValue(content);
|
|
5580
6238
|
}, [content, setIsEditing]);
|
|
5581
|
-
const handleSubmitEdit = (0,
|
|
6239
|
+
const handleSubmitEdit = (0, import_react69.useCallback)(() => {
|
|
5582
6240
|
const trimmed = editValue.trim();
|
|
5583
6241
|
if (trimmed && trimmed !== content) {
|
|
5584
6242
|
onEdit?.(trimmed);
|
|
5585
6243
|
}
|
|
5586
6244
|
setIsEditing(false);
|
|
5587
6245
|
}, [editValue, content, onEdit, setIsEditing]);
|
|
5588
|
-
const handleEditKeyDown = (0,
|
|
6246
|
+
const handleEditKeyDown = (0, import_react69.useCallback)(
|
|
5589
6247
|
(e) => {
|
|
5590
6248
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
5591
6249
|
e.preventDefault();
|
|
@@ -5598,19 +6256,19 @@ var MessageActions = import_react55.default.forwardRef(
|
|
|
5598
6256
|
);
|
|
5599
6257
|
const isUser = variant === "user";
|
|
5600
6258
|
if (isUser && isEditing) {
|
|
5601
|
-
return /* @__PURE__ */
|
|
6259
|
+
return /* @__PURE__ */ import_react69.default.createElement(
|
|
5602
6260
|
"div",
|
|
5603
6261
|
{
|
|
5604
6262
|
ref,
|
|
5605
6263
|
className: cx("mt-2", className),
|
|
5606
6264
|
...rest
|
|
5607
6265
|
},
|
|
5608
|
-
/* @__PURE__ */
|
|
6266
|
+
/* @__PURE__ */ import_react69.default.createElement(
|
|
5609
6267
|
"div",
|
|
5610
6268
|
{
|
|
5611
6269
|
className: "relative bg-charcoal border border-ash/60 focus-within:border-gold/60 focus-within:ring-1 focus-within:ring-gold/20"
|
|
5612
6270
|
},
|
|
5613
|
-
/* @__PURE__ */
|
|
6271
|
+
/* @__PURE__ */ import_react69.default.createElement(
|
|
5614
6272
|
"textarea",
|
|
5615
6273
|
{
|
|
5616
6274
|
value: editValue,
|
|
@@ -5621,15 +6279,15 @@ var MessageActions = import_react55.default.forwardRef(
|
|
|
5621
6279
|
rows: 2
|
|
5622
6280
|
}
|
|
5623
6281
|
),
|
|
5624
|
-
/* @__PURE__ */
|
|
6282
|
+
/* @__PURE__ */ import_react69.default.createElement("div", { className: "absolute right-2 bottom-2 flex gap-1" }, /* @__PURE__ */ import_react69.default.createElement(
|
|
5625
6283
|
ActionButton2,
|
|
5626
6284
|
{
|
|
5627
6285
|
onClick: handleCancelEdit,
|
|
5628
6286
|
label: "Cancel edit",
|
|
5629
6287
|
className: "text-silver/60 hover:text-error"
|
|
5630
6288
|
},
|
|
5631
|
-
/* @__PURE__ */
|
|
5632
|
-
), /* @__PURE__ */
|
|
6289
|
+
/* @__PURE__ */ import_react69.default.createElement(import_lucide_react13.X, { className: "w-4 h-4" })
|
|
6290
|
+
), /* @__PURE__ */ import_react69.default.createElement(
|
|
5633
6291
|
ActionButton2,
|
|
5634
6292
|
{
|
|
5635
6293
|
onClick: handleSubmitEdit,
|
|
@@ -5637,13 +6295,13 @@ var MessageActions = import_react55.default.forwardRef(
|
|
|
5637
6295
|
className: "text-silver/60 hover:text-gold",
|
|
5638
6296
|
disabled: !editValue.trim() || editValue.trim() === content
|
|
5639
6297
|
},
|
|
5640
|
-
/* @__PURE__ */
|
|
6298
|
+
/* @__PURE__ */ import_react69.default.createElement(import_lucide_react13.Send, { className: "w-4 h-4" })
|
|
5641
6299
|
))
|
|
5642
6300
|
),
|
|
5643
|
-
/* @__PURE__ */
|
|
6301
|
+
/* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-silver/50 mt-1" }, "Press Enter to submit, Esc to cancel. This will create a new branch.")
|
|
5644
6302
|
);
|
|
5645
6303
|
}
|
|
5646
|
-
return /* @__PURE__ */
|
|
6304
|
+
return /* @__PURE__ */ import_react69.default.createElement(
|
|
5647
6305
|
"div",
|
|
5648
6306
|
{
|
|
5649
6307
|
ref,
|
|
@@ -5654,18 +6312,18 @@ var MessageActions = import_react55.default.forwardRef(
|
|
|
5654
6312
|
),
|
|
5655
6313
|
...rest
|
|
5656
6314
|
},
|
|
5657
|
-
/* @__PURE__ */
|
|
5658
|
-
isUser && onEdit && /* @__PURE__ */
|
|
5659
|
-
!isUser && onRetry && /* @__PURE__ */
|
|
6315
|
+
/* @__PURE__ */ import_react69.default.createElement(ActionButton2, { onClick: handleCopy, label: copied ? "Copied!" : "Copy message" }, copied ? /* @__PURE__ */ import_react69.default.createElement(import_lucide_react13.Check, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ import_react69.default.createElement(import_lucide_react13.Copy, { className: "w-3.5 h-3.5" })),
|
|
6316
|
+
isUser && onEdit && /* @__PURE__ */ import_react69.default.createElement(ActionButton2, { onClick: handleStartEdit, label: "Edit message" }, /* @__PURE__ */ import_react69.default.createElement(import_lucide_react13.Pencil, { className: "w-3.5 h-3.5" })),
|
|
6317
|
+
!isUser && onRetry && /* @__PURE__ */ import_react69.default.createElement(ActionButton2, { onClick: onRetry, label: "Regenerate response" }, /* @__PURE__ */ import_react69.default.createElement(import_lucide_react13.RotateCcw, { className: "w-3.5 h-3.5" }))
|
|
5660
6318
|
);
|
|
5661
6319
|
}
|
|
5662
6320
|
);
|
|
5663
6321
|
MessageActions.displayName = "MessageActions";
|
|
5664
6322
|
|
|
5665
6323
|
// src/components/chat/BranchNavigator.tsx
|
|
5666
|
-
var
|
|
5667
|
-
var
|
|
5668
|
-
var BranchNavigator =
|
|
6324
|
+
var import_react70 = __toESM(require("react"));
|
|
6325
|
+
var import_lucide_react14 = require("lucide-react");
|
|
6326
|
+
var BranchNavigator = import_react70.default.forwardRef(
|
|
5669
6327
|
({
|
|
5670
6328
|
current,
|
|
5671
6329
|
total,
|
|
@@ -5684,7 +6342,7 @@ var BranchNavigator = import_react56.default.forwardRef(
|
|
|
5684
6342
|
const buttonSize = size === "sm" ? "p-0.5" : "p-1";
|
|
5685
6343
|
const iconSize = size === "sm" ? "w-3 h-3" : "w-4 h-4";
|
|
5686
6344
|
const textSize = size === "sm" ? "text-xs" : "text-sm";
|
|
5687
|
-
return /* @__PURE__ */
|
|
6345
|
+
return /* @__PURE__ */ import_react70.default.createElement(
|
|
5688
6346
|
"div",
|
|
5689
6347
|
{
|
|
5690
6348
|
ref,
|
|
@@ -5696,8 +6354,8 @@ var BranchNavigator = import_react56.default.forwardRef(
|
|
|
5696
6354
|
"aria-label": "Branch navigation",
|
|
5697
6355
|
...rest
|
|
5698
6356
|
},
|
|
5699
|
-
showIcon && /* @__PURE__ */
|
|
5700
|
-
/* @__PURE__ */
|
|
6357
|
+
showIcon && /* @__PURE__ */ import_react70.default.createElement(import_lucide_react14.GitBranch, { className: cx(iconSize, "mr-0.5 text-silver/50"), "aria-hidden": "true" }),
|
|
6358
|
+
/* @__PURE__ */ import_react70.default.createElement(
|
|
5701
6359
|
"button",
|
|
5702
6360
|
{
|
|
5703
6361
|
type: "button",
|
|
@@ -5710,10 +6368,10 @@ var BranchNavigator = import_react56.default.forwardRef(
|
|
|
5710
6368
|
),
|
|
5711
6369
|
"aria-label": "Previous branch"
|
|
5712
6370
|
},
|
|
5713
|
-
/* @__PURE__ */
|
|
6371
|
+
/* @__PURE__ */ import_react70.default.createElement(import_lucide_react14.ChevronLeft, { className: iconSize })
|
|
5714
6372
|
),
|
|
5715
|
-
/* @__PURE__ */
|
|
5716
|
-
/* @__PURE__ */
|
|
6373
|
+
/* @__PURE__ */ import_react70.default.createElement("span", { className: cx(textSize, "tabular-nums min-w-6 text-center") }, current, "/", total),
|
|
6374
|
+
/* @__PURE__ */ import_react70.default.createElement(
|
|
5717
6375
|
"button",
|
|
5718
6376
|
{
|
|
5719
6377
|
type: "button",
|
|
@@ -5726,7 +6384,7 @@ var BranchNavigator = import_react56.default.forwardRef(
|
|
|
5726
6384
|
),
|
|
5727
6385
|
"aria-label": "Next branch"
|
|
5728
6386
|
},
|
|
5729
|
-
/* @__PURE__ */
|
|
6387
|
+
/* @__PURE__ */ import_react70.default.createElement(import_lucide_react14.ChevronRight, { className: iconSize })
|
|
5730
6388
|
)
|
|
5731
6389
|
);
|
|
5732
6390
|
}
|
|
@@ -5734,13 +6392,13 @@ var BranchNavigator = import_react56.default.forwardRef(
|
|
|
5734
6392
|
BranchNavigator.displayName = "BranchNavigator";
|
|
5735
6393
|
|
|
5736
6394
|
// src/components/chat/hooks/useArtifacts.ts
|
|
5737
|
-
var
|
|
6395
|
+
var import_react71 = require("react");
|
|
5738
6396
|
function useArtifacts() {
|
|
5739
|
-
const [artifacts, setArtifacts] = (0,
|
|
5740
|
-
const scheduleArtifact = (0,
|
|
6397
|
+
const [artifacts, setArtifacts] = (0, import_react71.useState)([]);
|
|
6398
|
+
const scheduleArtifact = (0, import_react71.useCallback)((artifact) => {
|
|
5741
6399
|
setArtifacts((prev) => [...prev, { ...artifact, isPending: true }]);
|
|
5742
6400
|
}, []);
|
|
5743
|
-
const showArtifact = (0,
|
|
6401
|
+
const showArtifact = (0, import_react71.useCallback)(
|
|
5744
6402
|
(artifactId, updates) => {
|
|
5745
6403
|
setArtifacts((prev) => {
|
|
5746
6404
|
const existingIndex = prev.findIndex((a) => a.id === artifactId);
|
|
@@ -5755,26 +6413,26 @@ function useArtifacts() {
|
|
|
5755
6413
|
},
|
|
5756
6414
|
[]
|
|
5757
6415
|
);
|
|
5758
|
-
const removeArtifact = (0,
|
|
6416
|
+
const removeArtifact = (0, import_react71.useCallback)((artifactId) => {
|
|
5759
6417
|
setArtifacts((prev) => prev.filter((a) => a.id !== artifactId));
|
|
5760
6418
|
}, []);
|
|
5761
|
-
const clearArtifacts = (0,
|
|
6419
|
+
const clearArtifacts = (0, import_react71.useCallback)(() => {
|
|
5762
6420
|
setArtifacts([]);
|
|
5763
6421
|
}, []);
|
|
5764
6422
|
return { artifacts, scheduleArtifact, showArtifact, removeArtifact, clearArtifacts };
|
|
5765
6423
|
}
|
|
5766
6424
|
|
|
5767
6425
|
// src/components/BrandIcon.tsx
|
|
5768
|
-
var
|
|
6426
|
+
var import_react72 = __toESM(require("react"));
|
|
5769
6427
|
var sizeMap2 = {
|
|
5770
6428
|
sm: "h-8 w-8 text-sm",
|
|
5771
6429
|
md: "h-12 w-12 text-base",
|
|
5772
6430
|
lg: "h-16 w-16 text-lg"
|
|
5773
6431
|
};
|
|
5774
|
-
var BrandIcon =
|
|
6432
|
+
var BrandIcon = import_react72.default.forwardRef(
|
|
5775
6433
|
({ size = "md", variant = "solid", children, className, ...rest }, ref) => {
|
|
5776
6434
|
const variantClasses = variant === "solid" ? "bg-gold text-obsidian border-2 border-gold" : "bg-transparent text-gold border-2 border-gold";
|
|
5777
|
-
return /* @__PURE__ */
|
|
6435
|
+
return /* @__PURE__ */ import_react72.default.createElement(
|
|
5778
6436
|
"div",
|
|
5779
6437
|
{
|
|
5780
6438
|
ref,
|
|
@@ -5793,17 +6451,17 @@ var BrandIcon = import_react58.default.forwardRef(
|
|
|
5793
6451
|
BrandIcon.displayName = "BrandIcon";
|
|
5794
6452
|
|
|
5795
6453
|
// src/components/ColorSwatch.tsx
|
|
5796
|
-
var
|
|
5797
|
-
var ColorSwatch =
|
|
6454
|
+
var import_react73 = __toESM(require("react"));
|
|
6455
|
+
var ColorSwatch = import_react73.default.forwardRef(
|
|
5798
6456
|
({ color, label, className, ...rest }, ref) => {
|
|
5799
|
-
return /* @__PURE__ */
|
|
6457
|
+
return /* @__PURE__ */ import_react73.default.createElement(
|
|
5800
6458
|
"div",
|
|
5801
6459
|
{
|
|
5802
6460
|
ref,
|
|
5803
6461
|
className: cx("flex flex-col items-center gap-2", className),
|
|
5804
6462
|
...rest
|
|
5805
6463
|
},
|
|
5806
|
-
/* @__PURE__ */
|
|
6464
|
+
/* @__PURE__ */ import_react73.default.createElement(
|
|
5807
6465
|
"div",
|
|
5808
6466
|
{
|
|
5809
6467
|
className: "h-16 w-16 border-2 border-ash rounded-none shadow-sm",
|
|
@@ -5811,22 +6469,22 @@ var ColorSwatch = import_react59.default.forwardRef(
|
|
|
5811
6469
|
"aria-label": label || color
|
|
5812
6470
|
}
|
|
5813
6471
|
),
|
|
5814
|
-
label && /* @__PURE__ */
|
|
6472
|
+
label && /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-xs text-silver font-medium" }, label)
|
|
5815
6473
|
);
|
|
5816
6474
|
}
|
|
5817
6475
|
);
|
|
5818
6476
|
ColorSwatch.displayName = "ColorSwatch";
|
|
5819
6477
|
|
|
5820
6478
|
// src/components/SectionHeading.tsx
|
|
5821
|
-
var
|
|
6479
|
+
var import_react74 = __toESM(require("react"));
|
|
5822
6480
|
var levelStyles = {
|
|
5823
6481
|
h2: "text-2xl mb-4",
|
|
5824
6482
|
h3: "text-xl mb-3"
|
|
5825
6483
|
};
|
|
5826
|
-
var SectionHeading =
|
|
6484
|
+
var SectionHeading = import_react74.default.forwardRef(
|
|
5827
6485
|
({ level = "h2", children, className, ...rest }, ref) => {
|
|
5828
6486
|
const Component = level;
|
|
5829
|
-
return /* @__PURE__ */
|
|
6487
|
+
return /* @__PURE__ */ import_react74.default.createElement(
|
|
5830
6488
|
Component,
|
|
5831
6489
|
{
|
|
5832
6490
|
ref,
|
|
@@ -5856,6 +6514,7 @@ var version = "2.0.0";
|
|
|
5856
6514
|
ArtifactsPanel,
|
|
5857
6515
|
ArtifactsPanelToggle,
|
|
5858
6516
|
AttachmentPreview,
|
|
6517
|
+
AudioCard,
|
|
5859
6518
|
Avatar,
|
|
5860
6519
|
Badge,
|
|
5861
6520
|
BranchNavigator,
|
|
@@ -5868,17 +6527,25 @@ var version = "2.0.0";
|
|
|
5868
6527
|
ChatInput,
|
|
5869
6528
|
ChatInterface,
|
|
5870
6529
|
ChatView,
|
|
6530
|
+
CheckSquareIcon,
|
|
5871
6531
|
Checkbox,
|
|
6532
|
+
ChevronLeftIcon,
|
|
6533
|
+
ChevronRightIcon,
|
|
6534
|
+
CloseIcon,
|
|
5872
6535
|
Col,
|
|
5873
6536
|
CollapsedSidebarToggle,
|
|
5874
6537
|
ColorSwatch,
|
|
5875
6538
|
ConfirmDialog,
|
|
5876
6539
|
Container,
|
|
5877
6540
|
ConversationSidebar,
|
|
6541
|
+
CrossSquareIcon,
|
|
5878
6542
|
Divider,
|
|
5879
6543
|
Drawer,
|
|
6544
|
+
EmptySquareIcon,
|
|
6545
|
+
ExpandIcon,
|
|
5880
6546
|
FileChip,
|
|
5881
6547
|
HelperText,
|
|
6548
|
+
HistoryIcon,
|
|
5882
6549
|
ImageCard,
|
|
5883
6550
|
Input,
|
|
5884
6551
|
InputGroup,
|
|
@@ -5888,6 +6555,7 @@ var version = "2.0.0";
|
|
|
5888
6555
|
InputRightElement,
|
|
5889
6556
|
InputWrapper,
|
|
5890
6557
|
Label,
|
|
6558
|
+
LayersIcon,
|
|
5891
6559
|
List,
|
|
5892
6560
|
ListItem,
|
|
5893
6561
|
ListItemText,
|
|
@@ -5909,16 +6577,19 @@ var version = "2.0.0";
|
|
|
5909
6577
|
NavbarItem,
|
|
5910
6578
|
NavbarLink,
|
|
5911
6579
|
Pagination,
|
|
6580
|
+
PlusIcon,
|
|
5912
6581
|
Popover,
|
|
5913
6582
|
Progress,
|
|
5914
6583
|
PromptDialog,
|
|
5915
6584
|
Radio,
|
|
5916
6585
|
Row,
|
|
6586
|
+
ScriptCard,
|
|
5917
6587
|
SectionHeading,
|
|
5918
6588
|
Select,
|
|
5919
6589
|
Skeleton,
|
|
5920
6590
|
Slider,
|
|
5921
6591
|
Spinner,
|
|
6592
|
+
SquareLoaderIcon,
|
|
5922
6593
|
Stack,
|
|
5923
6594
|
Stepper,
|
|
5924
6595
|
StreamingCursor,
|
|
@@ -5938,6 +6609,7 @@ var version = "2.0.0";
|
|
|
5938
6609
|
Textarea,
|
|
5939
6610
|
ThinkingIndicator,
|
|
5940
6611
|
ToastProvider,
|
|
6612
|
+
TodosList,
|
|
5941
6613
|
Tooltip,
|
|
5942
6614
|
VideoCard,
|
|
5943
6615
|
addMessageToTree,
|