@apteva/apteva-kit 0.1.40 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +240 -205
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +240 -205
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -700,14 +700,14 @@ Widgets: @ui:type[{props}]. Types: ${widgets.join(", ")}. Add "meta" at root (no
|
|
|
700
700
|
var _jsxruntime = require('react/jsx-runtime');
|
|
701
701
|
function Card({ widget, onAction }) {
|
|
702
702
|
const { title, description, image, footer } = widget.props;
|
|
703
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-
|
|
703
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden", children: [
|
|
704
704
|
image && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: image, alt: title, className: "w-full h-48 object-cover" }),
|
|
705
705
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4", children: [
|
|
706
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "!text-lg font-semibold !text-
|
|
707
|
-
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-
|
|
706
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "!text-lg font-semibold !text-neutral-900 dark:!text-white", children: title }),
|
|
707
|
+
description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-neutral-600 dark:!text-neutral-400 mt-2", children: description })
|
|
708
708
|
] }),
|
|
709
|
-
(footer || widget.actions && widget.actions.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border-t border-
|
|
710
|
-
footer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm !text-
|
|
709
|
+
(footer || widget.actions && widget.actions.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center", children: [
|
|
710
|
+
footer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm !text-neutral-600 dark:!text-neutral-400", children: footer }),
|
|
711
711
|
widget.actions && widget.actions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex gap-2", children: widget.actions.map((action, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
712
712
|
"button",
|
|
713
713
|
{
|
|
@@ -730,17 +730,17 @@ function Card({ widget, onAction }) {
|
|
|
730
730
|
|
|
731
731
|
function List({ widget, onAction }) {
|
|
732
732
|
const { items } = widget.props;
|
|
733
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border border-
|
|
733
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden", children: items.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
734
734
|
"div",
|
|
735
735
|
{
|
|
736
|
-
className: `flex items-center p-4 transition-colors ${index !== items.length - 1 ? "border-b border-
|
|
736
|
+
className: `flex items-center p-4 transition-colors ${index !== items.length - 1 ? "border-b border-neutral-200 dark:border-neutral-700" : ""} ${!item.backgroundColor ? "hover:bg-neutral-50 dark:hover:bg-neutral-800" : ""}`,
|
|
737
737
|
style: item.backgroundColor ? { backgroundColor: item.backgroundColor } : void 0,
|
|
738
738
|
children: [
|
|
739
739
|
item.image && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: item.image, alt: item.title, className: "w-16 h-16 rounded object-cover" }),
|
|
740
740
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex-1 ${item.image ? "ml-4" : ""}`, children: [
|
|
741
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-semibold !text-
|
|
742
|
-
item.subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-sm !text-
|
|
743
|
-
item.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-xs !text-
|
|
741
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-semibold !text-neutral-900 dark:!text-white", children: item.title }),
|
|
742
|
+
item.subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-sm !text-neutral-600 dark:!text-neutral-400", children: item.subtitle }),
|
|
743
|
+
item.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1", children: item.description })
|
|
744
744
|
] }),
|
|
745
745
|
widget.actions && widget.actions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex gap-2", children: widget.actions.map((action, idx) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
746
746
|
"button",
|
|
@@ -768,7 +768,7 @@ function Button({ widget, onAction }) {
|
|
|
768
768
|
const { label, variant = "primary", disabled = false } = widget.props;
|
|
769
769
|
const variantClasses = {
|
|
770
770
|
primary: "bg-blue-500 !text-white hover:bg-blue-600",
|
|
771
|
-
secondary: "bg-
|
|
771
|
+
secondary: "bg-neutral-500 !text-white hover:bg-neutral-600",
|
|
772
772
|
outline: "border-2 border-blue-500 !text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900",
|
|
773
773
|
ghost: "!text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900"
|
|
774
774
|
};
|
|
@@ -796,8 +796,8 @@ function ButtonGroup({ widget, onAction }) {
|
|
|
796
796
|
const { layout = "horizontal", buttons } = widget.props;
|
|
797
797
|
const variantClasses = {
|
|
798
798
|
primary: "bg-blue-500 !text-white hover:bg-blue-600",
|
|
799
|
-
secondary: "bg-
|
|
800
|
-
outline: "border border-
|
|
799
|
+
secondary: "bg-neutral-200 dark:bg-neutral-700 !text-neutral-800 dark:!text-neutral-200 hover:bg-neutral-300 dark:hover:bg-neutral-600",
|
|
800
|
+
outline: "border border-neutral-300 dark:border-neutral-600 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800"
|
|
801
801
|
};
|
|
802
802
|
const getActionForButton = (buttonId) => {
|
|
803
803
|
return _optionalChain([widget, 'access', _7 => _7.actions, 'optionalAccess', _8 => _8.find, 'call', _9 => _9((action) => _optionalChain([action, 'access', _10 => _10.payload, 'optionalAccess', _11 => _11.buttonId]) === buttonId)]) || _optionalChain([widget, 'access', _12 => _12.actions, 'optionalAccess', _13 => _13[0]]);
|
|
@@ -851,13 +851,13 @@ function Table({ widget, onAction }) {
|
|
|
851
851
|
return "text-left";
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border border-
|
|
855
|
-
caption && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "caption", { className: "px-4 py-2 text-sm text-
|
|
856
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "bg-
|
|
854
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full", children: [
|
|
855
|
+
caption && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "caption", { className: "px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400 text-left bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700", children: caption }),
|
|
856
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700", children: columns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
857
857
|
"th",
|
|
858
858
|
{
|
|
859
859
|
className: cn(
|
|
860
|
-
"font-semibold text-
|
|
860
|
+
"font-semibold text-neutral-900 dark:text-white",
|
|
861
861
|
compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm",
|
|
862
862
|
getAlignment(column.align)
|
|
863
863
|
),
|
|
@@ -871,9 +871,9 @@ function Table({ widget, onAction }) {
|
|
|
871
871
|
"tr",
|
|
872
872
|
{
|
|
873
873
|
className: cn(
|
|
874
|
-
"border-b border-
|
|
875
|
-
"transition-colors hover:bg-
|
|
876
|
-
striped && rowIndex % 2 === 1 && "bg-
|
|
874
|
+
"border-b border-neutral-200 dark:border-neutral-700 last:border-b-0",
|
|
875
|
+
"transition-colors hover:bg-neutral-50 dark:hover:bg-neutral-800",
|
|
876
|
+
striped && rowIndex % 2 === 1 && "bg-neutral-50/50 dark:bg-neutral-800/50"
|
|
877
877
|
),
|
|
878
878
|
onClick: () => {
|
|
879
879
|
if (widget.actions && widget.actions.length > 0) {
|
|
@@ -890,7 +890,7 @@ function Table({ widget, onAction }) {
|
|
|
890
890
|
"td",
|
|
891
891
|
{
|
|
892
892
|
className: cn(
|
|
893
|
-
"text-
|
|
893
|
+
"text-neutral-700 dark:text-neutral-300",
|
|
894
894
|
compact ? "px-3 py-2 text-xs" : "px-4 py-3 text-sm",
|
|
895
895
|
getAlignment(column.align)
|
|
896
896
|
),
|
|
@@ -905,7 +905,7 @@ function Table({ widget, onAction }) {
|
|
|
905
905
|
"td",
|
|
906
906
|
{
|
|
907
907
|
colSpan: columns.length,
|
|
908
|
-
className: "px-4 py-8 text-center text-sm text-
|
|
908
|
+
className: "px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",
|
|
909
909
|
children: "No data available"
|
|
910
910
|
}
|
|
911
911
|
) })
|
|
@@ -972,71 +972,71 @@ function Widgets({
|
|
|
972
972
|
function WidgetSkeleton({ type, className }) {
|
|
973
973
|
switch (type) {
|
|
974
974
|
case "card":
|
|
975
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
976
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-
|
|
977
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
978
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
975
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden", className), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4 space-y-3", children: [
|
|
976
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4" }),
|
|
977
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full" }),
|
|
978
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6" })
|
|
979
979
|
] }) });
|
|
980
980
|
case "list":
|
|
981
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse space-y-2", className), children: [1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 p-3 rounded-lg border border-
|
|
982
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-10 h-10 bg-
|
|
981
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse space-y-2", className), children: [1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800", children: [
|
|
982
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0" }),
|
|
983
983
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 space-y-2", children: [
|
|
984
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
985
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-2 bg-
|
|
984
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2" }),
|
|
985
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4" })
|
|
986
986
|
] })
|
|
987
987
|
] }, i)) });
|
|
988
988
|
case "button_group":
|
|
989
989
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse flex gap-2", className), children: [
|
|
990
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-
|
|
991
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-
|
|
992
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-
|
|
990
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20" }),
|
|
991
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20" }),
|
|
992
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20" })
|
|
993
993
|
] });
|
|
994
994
|
case "form":
|
|
995
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
996
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-
|
|
995
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4", className), children: [
|
|
996
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3" }),
|
|
997
997
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
|
|
998
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-10 bg-
|
|
999
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-10 bg-
|
|
998
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-10 bg-neutral-200 dark:bg-neutral-700 rounded" }),
|
|
999
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-10 bg-neutral-200 dark:bg-neutral-700 rounded" })
|
|
1000
1000
|
] }),
|
|
1001
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-
|
|
1001
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24" })
|
|
1002
1002
|
] });
|
|
1003
1003
|
case "chart":
|
|
1004
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
1005
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-
|
|
1004
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4", className), children: [
|
|
1005
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4" }),
|
|
1006
1006
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-end gap-2 h-32", children: [
|
|
1007
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1008
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1009
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1010
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1011
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-
|
|
1007
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2" }),
|
|
1008
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4" }),
|
|
1009
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3" }),
|
|
1010
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full" }),
|
|
1011
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3" })
|
|
1012
1012
|
] })
|
|
1013
1013
|
] });
|
|
1014
1014
|
case "image":
|
|
1015
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aspect-video bg-
|
|
1015
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg" }) });
|
|
1016
1016
|
case "gallery":
|
|
1017
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse grid grid-cols-3 gap-2", className), children: [1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aspect-square bg-
|
|
1017
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse grid grid-cols-3 gap-2", className), children: [1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg" }, i)) });
|
|
1018
1018
|
case "map":
|
|
1019
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-48 bg-
|
|
1019
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("animate-pulse", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "w-8 h-8 text-neutral-400 dark:text-neutral-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: [
|
|
1020
1020
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }),
|
|
1021
1021
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" })
|
|
1022
1022
|
] }) }) });
|
|
1023
1023
|
case "table":
|
|
1024
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
1025
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex bg-
|
|
1026
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1027
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1024
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden", className), children: [
|
|
1025
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700", children: [
|
|
1026
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16" }) }),
|
|
1027
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20" }) }),
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14" }) })
|
|
1029
1029
|
] }),
|
|
1030
|
-
[1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex border-b border-
|
|
1031
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1032
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1033
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1030
|
+
[1, 2, 3].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0", children: [
|
|
1031
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24" }) }),
|
|
1032
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16" }) }),
|
|
1033
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 px-4 py-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20" }) })
|
|
1034
1034
|
] }, i))
|
|
1035
1035
|
] });
|
|
1036
1036
|
default:
|
|
1037
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-
|
|
1038
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-
|
|
1039
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-
|
|
1037
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4", className), children: [
|
|
1038
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2" }),
|
|
1039
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full" })
|
|
1040
1040
|
] });
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
@@ -1351,6 +1351,45 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
return renderTextContent(message.content);
|
|
1353
1353
|
};
|
|
1354
|
+
const renderTextSegmentWithWidgets = (text, keyPrefix) => {
|
|
1355
|
+
if (!enableWidgets) {
|
|
1356
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-bubble apteva-message-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-content-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MarkdownContent, { content: text }) }) }, keyPrefix);
|
|
1357
|
+
}
|
|
1358
|
+
const parsed = parseWidgetsFromText(text);
|
|
1359
|
+
const elements = [];
|
|
1360
|
+
let textBuffer = "";
|
|
1361
|
+
parsed.segments.forEach((seg, idx) => {
|
|
1362
|
+
if (seg.type === "text" && seg.content) {
|
|
1363
|
+
textBuffer += seg.content;
|
|
1364
|
+
} else if (seg.type === "widget" && seg.widget) {
|
|
1365
|
+
if (textBuffer.trim()) {
|
|
1366
|
+
elements.push(
|
|
1367
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-bubble apteva-message-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-content-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MarkdownContent, { content: textBuffer }) }) }, `${keyPrefix}-text-${idx}`)
|
|
1368
|
+
);
|
|
1369
|
+
textBuffer = "";
|
|
1370
|
+
}
|
|
1371
|
+
elements.push(
|
|
1372
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-widget-standalone", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WidgetRenderer, { widget: seg.widget, onAction }) }, `${keyPrefix}-widget-${idx}`)
|
|
1373
|
+
);
|
|
1374
|
+
} else if (seg.type === "widget_pending" && seg.pendingType) {
|
|
1375
|
+
if (textBuffer.trim()) {
|
|
1376
|
+
elements.push(
|
|
1377
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-bubble apteva-message-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-content-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MarkdownContent, { content: textBuffer }) }) }, `${keyPrefix}-text-${idx}`)
|
|
1378
|
+
);
|
|
1379
|
+
textBuffer = "";
|
|
1380
|
+
}
|
|
1381
|
+
elements.push(
|
|
1382
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-widget-standalone", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WidgetSkeleton, { type: seg.pendingType }) }, `${keyPrefix}-pending-${idx}`)
|
|
1383
|
+
);
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
if (textBuffer.trim()) {
|
|
1387
|
+
elements.push(
|
|
1388
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-bubble apteva-message-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-content-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MarkdownContent, { content: textBuffer }) }) }, `${keyPrefix}-text-final`)
|
|
1389
|
+
);
|
|
1390
|
+
}
|
|
1391
|
+
return elements;
|
|
1392
|
+
};
|
|
1354
1393
|
const renderSegmentedContent = () => {
|
|
1355
1394
|
if (!contentSegments || contentSegments.length === 0) {
|
|
1356
1395
|
return null;
|
|
@@ -1358,16 +1397,12 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
|
|
|
1358
1397
|
const elements = [];
|
|
1359
1398
|
contentSegments.forEach((segment, index) => {
|
|
1360
1399
|
if (segment.type === "text" && segment.content) {
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
},
|
|
1368
|
-
`text-${index}`
|
|
1369
|
-
)
|
|
1370
|
-
);
|
|
1400
|
+
const textElements = renderTextSegmentWithWidgets(segment.content, `seg-${index}`);
|
|
1401
|
+
if (Array.isArray(textElements)) {
|
|
1402
|
+
elements.push(...textElements);
|
|
1403
|
+
} else {
|
|
1404
|
+
elements.push(textElements);
|
|
1405
|
+
}
|
|
1371
1406
|
} else if (segment.type === "tool") {
|
|
1372
1407
|
elements.push(
|
|
1373
1408
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-tool-call-standalone", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1439,7 +1474,7 @@ function WelcomeScreen({
|
|
|
1439
1474
|
const hasPrompts = normalizedPrompts.length > 0;
|
|
1440
1475
|
const hasHeader = title || subtitle || icon;
|
|
1441
1476
|
if (!hasHeader && !hasPrompts) {
|
|
1442
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center h-full !text-
|
|
1477
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center space-y-2", children: [
|
|
1443
1478
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DefaultIcon, {}) }),
|
|
1444
1479
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: "No messages yet. Start a conversation!" })
|
|
1445
1480
|
] }) });
|
|
@@ -1447,8 +1482,8 @@ function WelcomeScreen({
|
|
|
1447
1482
|
if (variant === "minimal") {
|
|
1448
1483
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col h-full px-4 py-4", children: [
|
|
1449
1484
|
hasHeader && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
|
|
1450
|
-
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-lg font-semibold !text-
|
|
1451
|
-
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm !text-
|
|
1485
|
+
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-lg font-semibold !text-neutral-900 dark:!text-white", children: title }),
|
|
1486
|
+
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm !text-neutral-500 dark:!text-neutral-400 mt-1", children: subtitle })
|
|
1452
1487
|
] }),
|
|
1453
1488
|
hasPrompts && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 space-y-2", children: normalizedPrompts.map((prompt, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1454
1489
|
"button",
|
|
@@ -1456,18 +1491,18 @@ function WelcomeScreen({
|
|
|
1456
1491
|
onClick: () => onPromptClick(prompt.text),
|
|
1457
1492
|
className: cn(
|
|
1458
1493
|
"w-full text-left px-4 py-3 rounded-xl",
|
|
1459
|
-
"bg-
|
|
1460
|
-
"border border-
|
|
1461
|
-
"hover:bg-
|
|
1462
|
-
"hover:border-
|
|
1494
|
+
"bg-neutral-50 dark:bg-neutral-800/50",
|
|
1495
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
1496
|
+
"hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
1497
|
+
"hover:border-neutral-300 dark:hover:border-neutral-600",
|
|
1463
1498
|
"transition-all duration-200",
|
|
1464
1499
|
"group"
|
|
1465
1500
|
),
|
|
1466
1501
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
1467
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 !text-
|
|
1502
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 !text-neutral-400 dark:!text-neutral-500 group-hover:!text-blue-500 dark:group-hover:!text-blue-400 transition-colors", children: prompt.icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ArrowIcon, {}) }),
|
|
1468
1503
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
1469
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-
|
|
1470
|
-
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-
|
|
1504
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-neutral-900 dark:!text-white truncate", children: prompt.text }),
|
|
1505
|
+
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate", children: prompt.description })
|
|
1471
1506
|
] })
|
|
1472
1507
|
] })
|
|
1473
1508
|
},
|
|
@@ -1477,9 +1512,9 @@ function WelcomeScreen({
|
|
|
1477
1512
|
}
|
|
1478
1513
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8", children: [
|
|
1479
1514
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center mb-6 sm:mb-8 max-w-md", children: [
|
|
1480
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 !text-
|
|
1481
|
-
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-xl sm:text-2xl font-semibold !text-
|
|
1482
|
-
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm sm:text-base !text-
|
|
1515
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center", children: icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DefaultIcon, {}) }),
|
|
1516
|
+
title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2", children: title }),
|
|
1517
|
+
subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400", children: subtitle })
|
|
1483
1518
|
] }),
|
|
1484
1519
|
hasPrompts && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full max-w-2xl", children: [
|
|
1485
1520
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "sm:hidden space-y-2", children: normalizedPrompts.map((prompt, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1488,9 +1523,9 @@ function WelcomeScreen({
|
|
|
1488
1523
|
onClick: () => onPromptClick(prompt.text),
|
|
1489
1524
|
className: cn(
|
|
1490
1525
|
"w-full text-left px-4 py-3 rounded-xl",
|
|
1491
|
-
"bg-white dark:bg-
|
|
1492
|
-
"border border-
|
|
1493
|
-
"hover:bg-
|
|
1526
|
+
"bg-white dark:bg-neutral-800",
|
|
1527
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
1528
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
1494
1529
|
"hover:border-blue-300 dark:hover:border-blue-600",
|
|
1495
1530
|
"active:scale-[0.98]",
|
|
1496
1531
|
"transition-all duration-200",
|
|
@@ -1498,15 +1533,15 @@ function WelcomeScreen({
|
|
|
1498
1533
|
"group"
|
|
1499
1534
|
),
|
|
1500
1535
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
1501
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 w-8 h-8 rounded-lg bg-
|
|
1536
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 w-8 h-8 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors", children: prompt.icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ArrowIcon, {}) }),
|
|
1502
1537
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
1503
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-
|
|
1504
|
-
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-
|
|
1538
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-neutral-900 dark:!text-white", children: prompt.text }),
|
|
1539
|
+
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1", children: prompt.description })
|
|
1505
1540
|
] }),
|
|
1506
1541
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1507
1542
|
"svg",
|
|
1508
1543
|
{
|
|
1509
|
-
className: "w-4 h-4 !text-
|
|
1544
|
+
className: "w-4 h-4 !text-neutral-400 group-hover:!text-blue-500 transition-colors flex-shrink-0",
|
|
1510
1545
|
fill: "none",
|
|
1511
1546
|
stroke: "currentColor",
|
|
1512
1547
|
viewBox: "0 0 24 24",
|
|
@@ -1531,9 +1566,9 @@ function WelcomeScreen({
|
|
|
1531
1566
|
onClick: () => onPromptClick(prompt.text),
|
|
1532
1567
|
className: cn(
|
|
1533
1568
|
"text-left p-4 rounded-xl",
|
|
1534
|
-
"bg-white dark:bg-
|
|
1535
|
-
"border border-
|
|
1536
|
-
"hover:bg-
|
|
1569
|
+
"bg-white dark:bg-neutral-800",
|
|
1570
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
1571
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
1537
1572
|
"hover:border-blue-300 dark:hover:border-blue-600",
|
|
1538
1573
|
"hover:shadow-md",
|
|
1539
1574
|
"active:scale-[0.98]",
|
|
@@ -1541,10 +1576,10 @@ function WelcomeScreen({
|
|
|
1541
1576
|
"group"
|
|
1542
1577
|
),
|
|
1543
1578
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-3", children: [
|
|
1544
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 w-9 h-9 rounded-lg bg-
|
|
1579
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-shrink-0 w-9 h-9 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors", children: prompt.icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ArrowIcon, {}) }),
|
|
1545
1580
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
1546
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-
|
|
1547
|
-
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-
|
|
1581
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm font-medium !text-neutral-900 dark:!text-white leading-snug", children: prompt.text }),
|
|
1582
|
+
prompt.description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2", children: prompt.description })
|
|
1548
1583
|
] })
|
|
1549
1584
|
] })
|
|
1550
1585
|
},
|
|
@@ -1679,18 +1714,18 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1679
1714
|
pendingFiles.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-2 flex flex-wrap gap-2", children: pendingFiles.map((pf, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1680
1715
|
"div",
|
|
1681
1716
|
{
|
|
1682
|
-
className: "relative group flex items-center gap-2 px-3 py-2 bg-
|
|
1717
|
+
className: "relative group flex items-center gap-2 px-3 py-2 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg",
|
|
1683
1718
|
children: [
|
|
1684
|
-
pf.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: pf.preview, alt: pf.file.name, className: "w-8 h-8 object-cover rounded" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 flex items-center justify-center bg-
|
|
1719
|
+
pf.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: pf.preview, alt: pf.file.name, className: "w-8 h-8 object-cover rounded" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 flex items-center justify-center bg-neutral-200 dark:bg-neutral-700 rounded !text-neutral-500 dark:!text-neutral-400", children: getFileIcon(pf.file.type) }),
|
|
1685
1720
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col min-w-0", children: [
|
|
1686
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs font-medium !text-
|
|
1687
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs !text-
|
|
1721
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]", children: pf.file.name }),
|
|
1722
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs !text-neutral-500 dark:!text-neutral-400", children: formatFileSize(pf.file.size) })
|
|
1688
1723
|
] }),
|
|
1689
1724
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1690
1725
|
"button",
|
|
1691
1726
|
{
|
|
1692
1727
|
onClick: () => removeFile(index),
|
|
1693
|
-
className: "absolute -top-1.5 -right-1.5 w-5 h-5 bg-
|
|
1728
|
+
className: "absolute -top-1.5 -right-1.5 w-5 h-5 bg-neutral-500 hover:bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1694
1729
|
title: "Remove file",
|
|
1695
1730
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3 h-3", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
1696
1731
|
}
|
|
@@ -1699,14 +1734,14 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1699
1734
|
},
|
|
1700
1735
|
index
|
|
1701
1736
|
)) }),
|
|
1702
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-composer relative border-2 border-
|
|
1737
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-composer relative border-2 border-neutral-300 dark:border-neutral-700 bg-white dark:bg-neutral-900 transition-all duration-300 flex items-center px-3 py-2 gap-3", children: [
|
|
1703
1738
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex-shrink-0", children: [
|
|
1704
1739
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1705
1740
|
"button",
|
|
1706
1741
|
{
|
|
1707
1742
|
ref: menuButtonRef,
|
|
1708
1743
|
onClick: () => setShowMenu(!showMenu),
|
|
1709
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-
|
|
1744
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
1710
1745
|
title: "More options",
|
|
1711
1746
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10 5v10M5 10h10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1712
1747
|
}
|
|
@@ -1716,7 +1751,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1716
1751
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1717
1752
|
"div",
|
|
1718
1753
|
{
|
|
1719
|
-
className: "fixed bg-
|
|
1754
|
+
className: "fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",
|
|
1720
1755
|
style: {
|
|
1721
1756
|
left: _nullishCoalesce(_optionalChain([menuButtonRef, 'access', _24 => _24.current, 'optionalAccess', _25 => _25.getBoundingClientRect, 'call', _26 => _26(), 'access', _27 => _27.left]), () => ( 0)),
|
|
1722
1757
|
top: (_nullishCoalesce(_optionalChain([menuButtonRef, 'access', _28 => _28.current, 'optionalAccess', _29 => _29.getBoundingClientRect, 'call', _30 => _30(), 'access', _31 => _31.bottom]), () => ( 0))) + 8
|
|
@@ -1729,7 +1764,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1729
1764
|
_optionalChain([fileInputRef, 'access', _32 => _32.current, 'optionalAccess', _33 => _33.click, 'call', _34 => _34()]);
|
|
1730
1765
|
setShowMenu(false);
|
|
1731
1766
|
},
|
|
1732
|
-
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-
|
|
1767
|
+
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",
|
|
1733
1768
|
children: [
|
|
1734
1769
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(2, 3)" }) }),
|
|
1735
1770
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Add photos & files" })
|
|
@@ -1743,7 +1778,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1743
1778
|
onSwitchMode();
|
|
1744
1779
|
setShowMenu(false);
|
|
1745
1780
|
},
|
|
1746
|
-
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-
|
|
1781
|
+
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",
|
|
1747
1782
|
children: [
|
|
1748
1783
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4.5 h-4.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }),
|
|
1749
1784
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Switch to command mode" })
|
|
@@ -1764,7 +1799,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1764
1799
|
onKeyDown: handleKeyDown,
|
|
1765
1800
|
placeholder,
|
|
1766
1801
|
disabled,
|
|
1767
|
-
className: "flex-1 resize-none bg-transparent border-none focus:outline-none !text-
|
|
1802
|
+
className: "flex-1 resize-none bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 py-1 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1768
1803
|
rows: 1,
|
|
1769
1804
|
style: { maxHeight: "120px" }
|
|
1770
1805
|
}
|
|
@@ -1782,7 +1817,7 @@ function Composer({ onSendMessage, placeholder = "Type a message...", disabled =
|
|
|
1782
1817
|
{
|
|
1783
1818
|
onClick: handleSend,
|
|
1784
1819
|
disabled: !text.trim() && pendingFiles.length === 0 || disabled,
|
|
1785
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0 border border-
|
|
1820
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0 border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-700 disabled:opacity-30 disabled:cursor-not-allowed !text-lg",
|
|
1786
1821
|
title: "Send message",
|
|
1787
1822
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 3L8 13M8 3L4 7M8 3L12 7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1788
1823
|
}
|
|
@@ -1933,8 +1968,8 @@ function CommandComposer({
|
|
|
1933
1968
|
"div",
|
|
1934
1969
|
{
|
|
1935
1970
|
className: cn(
|
|
1936
|
-
"apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-
|
|
1937
|
-
state === "idle" && "border-
|
|
1971
|
+
"apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-neutral-900 transition-all duration-200",
|
|
1972
|
+
state === "idle" && "border-neutral-200 dark:border-neutral-700",
|
|
1938
1973
|
state === "loading" && "border-blue-400 dark:border-blue-500",
|
|
1939
1974
|
state === "plan-pending" && "border-amber-400 dark:border-amber-500",
|
|
1940
1975
|
state === "success" && "border-green-400 dark:border-green-500",
|
|
@@ -1948,7 +1983,7 @@ function CommandComposer({
|
|
|
1948
1983
|
{
|
|
1949
1984
|
ref: menuButtonRef,
|
|
1950
1985
|
onClick: () => setShowMenu(!showMenu),
|
|
1951
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-
|
|
1986
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-500 dark:!text-neutral-400 hover:!text-neutral-700 dark:hover:!text-neutral-200 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
1952
1987
|
title: "More options",
|
|
1953
1988
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10 5v10M5 10h10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1954
1989
|
}
|
|
@@ -1958,7 +1993,7 @@ function CommandComposer({
|
|
|
1958
1993
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1959
1994
|
"div",
|
|
1960
1995
|
{
|
|
1961
|
-
className: "fixed bg-
|
|
1996
|
+
className: "fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",
|
|
1962
1997
|
style: {
|
|
1963
1998
|
left: _nullishCoalesce(_optionalChain([menuButtonRef, 'access', _39 => _39.current, 'optionalAccess', _40 => _40.getBoundingClientRect, 'call', _41 => _41(), 'access', _42 => _42.left]), () => ( 0)),
|
|
1964
1999
|
top: (_nullishCoalesce(_optionalChain([menuButtonRef, 'access', _43 => _43.current, 'optionalAccess', _44 => _44.getBoundingClientRect, 'call', _45 => _45(), 'access', _46 => _46.bottom]), () => ( 0))) + 8
|
|
@@ -1971,7 +2006,7 @@ function CommandComposer({
|
|
|
1971
2006
|
_optionalChain([fileInputRef, 'access', _47 => _47.current, 'optionalAccess', _48 => _48.click, 'call', _49 => _49()]);
|
|
1972
2007
|
setShowMenu(false);
|
|
1973
2008
|
},
|
|
1974
|
-
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-
|
|
2009
|
+
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",
|
|
1975
2010
|
children: [
|
|
1976
2011
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(2, 3)" }) }),
|
|
1977
2012
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Add photos & files" })
|
|
@@ -1985,7 +2020,7 @@ function CommandComposer({
|
|
|
1985
2020
|
onExpand();
|
|
1986
2021
|
setShowMenu(false);
|
|
1987
2022
|
},
|
|
1988
|
-
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-
|
|
2023
|
+
className: "w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",
|
|
1989
2024
|
children: [
|
|
1990
2025
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4.5 h-4.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }),
|
|
1991
2026
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "!text-sm font-medium", children: "Expand to chat" })
|
|
@@ -2003,10 +2038,10 @@ function CommandComposer({
|
|
|
2003
2038
|
pendingFiles.length > 0 && state === "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-1 flex-shrink-0", children: pendingFiles.map((pf, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2004
2039
|
"div",
|
|
2005
2040
|
{
|
|
2006
|
-
className: "relative group flex items-center justify-center w-6 h-6 bg-
|
|
2041
|
+
className: "relative group flex items-center justify-center w-6 h-6 bg-neutral-100 dark:bg-neutral-800 rounded overflow-hidden",
|
|
2007
2042
|
title: pf.file.name,
|
|
2008
2043
|
children: [
|
|
2009
|
-
pf.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: pf.preview, alt: pf.file.name, className: "w-6 h-6 object-cover" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs !text-
|
|
2044
|
+
pf.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: pf.preview, alt: pf.file.name, className: "w-6 h-6 object-cover" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-xs !text-neutral-500 dark:!text-neutral-400", children: getFileIcon(pf.file.type) }),
|
|
2010
2045
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2011
2046
|
"button",
|
|
2012
2047
|
{
|
|
@@ -2032,7 +2067,7 @@ function CommandComposer({
|
|
|
2032
2067
|
rows: 1,
|
|
2033
2068
|
className: cn(
|
|
2034
2069
|
"flex-1 resize-none bg-transparent border-none focus:outline-none",
|
|
2035
|
-
"!text-
|
|
2070
|
+
"!text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500",
|
|
2036
2071
|
"text-sm leading-relaxed py-1",
|
|
2037
2072
|
"disabled:opacity-50"
|
|
2038
2073
|
),
|
|
@@ -2043,15 +2078,15 @@ function CommandComposer({
|
|
|
2043
2078
|
{
|
|
2044
2079
|
className: cn(
|
|
2045
2080
|
"flex-1 text-sm py-1 truncate flex items-center gap-2",
|
|
2046
|
-
state === "loading" && !isToolCall && "!text-
|
|
2081
|
+
state === "loading" && !isToolCall && "!text-neutral-600 dark:!text-neutral-400",
|
|
2047
2082
|
state === "loading" && isToolCall && "!text-blue-600 dark:!text-blue-400",
|
|
2048
|
-
state === "success" && "!text-
|
|
2083
|
+
state === "success" && "!text-neutral-900 dark:!text-neutral-100",
|
|
2049
2084
|
state === "error" && "!text-red-600 dark:!text-red-400",
|
|
2050
2085
|
state === "plan-pending" && "!text-amber-700 dark:!text-amber-300"
|
|
2051
2086
|
),
|
|
2052
2087
|
children: isToolCall ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2053
2088
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-mono", children: displayContent }),
|
|
2054
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-
|
|
2089
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-neutral-400 dark:text-neutral-500", children: "Running..." })
|
|
2055
2090
|
] }) : displayContent
|
|
2056
2091
|
}
|
|
2057
2092
|
),
|
|
@@ -2068,7 +2103,7 @@ function CommandComposer({
|
|
|
2068
2103
|
"button",
|
|
2069
2104
|
{
|
|
2070
2105
|
onClick: onReject,
|
|
2071
|
-
className: "px-2 py-1 bg-
|
|
2106
|
+
className: "px-2 py-1 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-xs font-medium",
|
|
2072
2107
|
children: "Modify"
|
|
2073
2108
|
}
|
|
2074
2109
|
)
|
|
@@ -2086,7 +2121,7 @@ function CommandComposer({
|
|
|
2086
2121
|
"button",
|
|
2087
2122
|
{
|
|
2088
2123
|
onClick: handleNewCommand,
|
|
2089
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center !text-
|
|
2124
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center !text-neutral-400 hover:!text-neutral-600 dark:hover:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors",
|
|
2090
2125
|
title: "New command",
|
|
2091
2126
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
2092
2127
|
}
|
|
@@ -2098,9 +2133,9 @@ function CommandComposer({
|
|
|
2098
2133
|
disabled: !input.trim() && pendingFiles.length === 0 || disabled,
|
|
2099
2134
|
className: cn(
|
|
2100
2135
|
"w-8 h-8 rounded-lg flex items-center justify-center transition-all",
|
|
2101
|
-
"border border-
|
|
2136
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
2102
2137
|
"disabled:opacity-30 disabled:cursor-not-allowed",
|
|
2103
|
-
input.trim() || pendingFiles.length > 0 ? "bg-
|
|
2138
|
+
input.trim() || pendingFiles.length > 0 ? "bg-neutral-900 dark:bg-white !text-white dark:!text-neutral-900 border-neutral-900 dark:border-white" : "bg-white dark:bg-neutral-800 !text-neutral-400"
|
|
2104
2139
|
),
|
|
2105
2140
|
title: "Execute command",
|
|
2106
2141
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 12h14M12 5l7 7-7 7" }) })
|
|
@@ -3396,9 +3431,9 @@ ${planToExecute}`;
|
|
|
3396
3431
|
"div",
|
|
3397
3432
|
{
|
|
3398
3433
|
className: cn(
|
|
3399
|
-
"relative border-2 rounded-xl bg-white dark:bg-
|
|
3434
|
+
"relative border-2 rounded-xl bg-white dark:bg-neutral-900 transition-all duration-300 flex flex-col",
|
|
3400
3435
|
state === "loading" && "animate-pulse-border",
|
|
3401
|
-
state === "idle" && "border-
|
|
3436
|
+
state === "idle" && "border-neutral-300 dark:border-neutral-700",
|
|
3402
3437
|
state === "loading" && "border-blue-500",
|
|
3403
3438
|
state === "plan-pending" && "border-blue-400",
|
|
3404
3439
|
state === "success" && "border-green-500",
|
|
@@ -3421,7 +3456,7 @@ ${planToExecute}`;
|
|
|
3421
3456
|
}
|
|
3422
3457
|
},
|
|
3423
3458
|
placeholder,
|
|
3424
|
-
className: "flex-1 w-full resize-none bg-transparent border-none focus:outline-none !text-
|
|
3459
|
+
className: "flex-1 w-full resize-none bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500",
|
|
3425
3460
|
rows: 6
|
|
3426
3461
|
}
|
|
3427
3462
|
),
|
|
@@ -3431,11 +3466,11 @@ ${planToExecute}`;
|
|
|
3431
3466
|
{
|
|
3432
3467
|
src: file.preview,
|
|
3433
3468
|
alt: file.name,
|
|
3434
|
-
className: "w-20 h-20 object-cover rounded-lg border-2 border-
|
|
3469
|
+
className: "w-20 h-20 object-cover rounded-lg border-2 border-neutral-300 dark:border-neutral-600"
|
|
3435
3470
|
}
|
|
3436
|
-
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-20 h-20 flex flex-col items-center justify-center rounded-lg border-2 border-
|
|
3437
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-8 h-8 text-
|
|
3438
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[8px] text-
|
|
3471
|
+
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-20 h-20 flex flex-col items-center justify-center rounded-lg border-2 border-neutral-300 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800", children: [
|
|
3472
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-8 h-8 text-neutral-500 dark:text-neutral-400", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fillRule: "evenodd", d: "M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z", clipRule: "evenodd" }) }),
|
|
3473
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-[8px] text-neutral-500 dark:text-neutral-400 mt-1 px-1 truncate max-w-full", children: file.name.length > 12 ? file.name.slice(0, 12) + "..." : file.name })
|
|
3439
3474
|
] }),
|
|
3440
3475
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3441
3476
|
"button",
|
|
@@ -3454,7 +3489,7 @@ ${planToExecute}`;
|
|
|
3454
3489
|
"button",
|
|
3455
3490
|
{
|
|
3456
3491
|
onClick: () => _optionalChain([fileInputRef, 'access', _103 => _103.current, 'optionalAccess', _104 => _104.click, 'call', _105 => _105()]),
|
|
3457
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 !text-
|
|
3492
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 !text-neutral-500 dark:!text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
3458
3493
|
title: "Attach file",
|
|
3459
3494
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8.4 2.8L4.4 6.8C3.736 7.464 3.736 8.536 4.4 9.2C5.064 9.864 6.136 9.864 6.8 9.2L11.6 4.4C12.704 3.296 12.704 1.504 11.6 0.4C10.496 -0.704 8.704 -0.704 7.6 0.4L2.8 5.2C1.256 6.744 1.256 9.256 2.8 10.8C4.344 12.344 6.856 12.344 8.4 10.8L12.4 6.8", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(1.6, 2.4)" }) })
|
|
3460
3495
|
}
|
|
@@ -3465,8 +3500,8 @@ ${planToExecute}`;
|
|
|
3465
3500
|
{
|
|
3466
3501
|
onClick: () => setShowSettingsMenu(!showSettingsMenu),
|
|
3467
3502
|
className: cn(
|
|
3468
|
-
"w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 hover:bg-
|
|
3469
|
-
internalPlanMode ? "!text-blue-600 dark:!text-blue-400" : "!text-
|
|
3503
|
+
"w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
3504
|
+
internalPlanMode ? "!text-blue-600 dark:!text-blue-400" : "!text-neutral-500 dark:!text-neutral-500"
|
|
3470
3505
|
),
|
|
3471
3506
|
title: "Settings",
|
|
3472
3507
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -3482,12 +3517,12 @@ ${planToExecute}`;
|
|
|
3482
3517
|
] })
|
|
3483
3518
|
}
|
|
3484
3519
|
),
|
|
3485
|
-
showSettingsMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute top-10 left-0 z-50 w-56 bg-white dark:bg-
|
|
3520
|
+
showSettingsMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute top-10 left-0 z-50 w-56 bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-lg p-2.5 settings-menu-container", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "flex items-center justify-between cursor-pointer group", children: [
|
|
3486
3521
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
3487
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3.5 h-3.5 text-
|
|
3522
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" }) }),
|
|
3488
3523
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
3489
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs font-medium text-
|
|
3490
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-[10px] text-
|
|
3524
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs font-medium text-neutral-700 dark:text-neutral-300", children: "Plan Mode" }),
|
|
3525
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: "Review first" })
|
|
3491
3526
|
] })
|
|
3492
3527
|
] }),
|
|
3493
3528
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3499,7 +3534,7 @@ ${planToExecute}`;
|
|
|
3499
3534
|
},
|
|
3500
3535
|
className: cn(
|
|
3501
3536
|
"relative inline-flex h-4 w-8 items-center rounded-full transition-colors",
|
|
3502
|
-
internalPlanMode ? "bg-blue-600" : "bg-
|
|
3537
|
+
internalPlanMode ? "bg-blue-600" : "bg-neutral-300 dark:bg-neutral-600"
|
|
3503
3538
|
),
|
|
3504
3539
|
type: "button",
|
|
3505
3540
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3522,9 +3557,9 @@ ${planToExecute}`;
|
|
|
3522
3557
|
{
|
|
3523
3558
|
src: file.preview,
|
|
3524
3559
|
alt: file.name,
|
|
3525
|
-
className: "w-8 h-8 object-cover rounded border border-
|
|
3560
|
+
className: "w-8 h-8 object-cover rounded border border-neutral-300 dark:border-neutral-600"
|
|
3526
3561
|
}
|
|
3527
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 flex items-center justify-center rounded border border-
|
|
3562
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-8 h-8 flex items-center justify-center rounded border border-neutral-300 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800", title: file.name, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4 text-neutral-500 dark:text-neutral-400", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fillRule: "evenodd", d: "M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z", clipRule: "evenodd" }) }) }),
|
|
3528
3563
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3529
3564
|
"button",
|
|
3530
3565
|
{
|
|
@@ -3548,7 +3583,7 @@ ${planToExecute}`;
|
|
|
3548
3583
|
}
|
|
3549
3584
|
},
|
|
3550
3585
|
placeholder,
|
|
3551
|
-
className: "flex-1 bg-transparent border-none focus:outline-none !text-
|
|
3586
|
+
className: "flex-1 bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 py-1"
|
|
3552
3587
|
}
|
|
3553
3588
|
),
|
|
3554
3589
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3558,13 +3593,13 @@ ${planToExecute}`;
|
|
|
3558
3593
|
disabled: !command.trim(),
|
|
3559
3594
|
className: cn(
|
|
3560
3595
|
"w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0",
|
|
3561
|
-
"border border-
|
|
3562
|
-
"bg-white dark:bg-
|
|
3563
|
-
"!text-
|
|
3564
|
-
"hover:bg-
|
|
3596
|
+
"border border-neutral-300 dark:border-neutral-600",
|
|
3597
|
+
"bg-white dark:bg-neutral-800",
|
|
3598
|
+
"!text-neutral-700 dark:!text-neutral-300",
|
|
3599
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
3565
3600
|
"disabled:opacity-30 disabled:cursor-not-allowed",
|
|
3566
3601
|
"!text-lg",
|
|
3567
|
-
!command.trim() && "border-
|
|
3602
|
+
!command.trim() && "border-neutral-200 dark:border-neutral-700 !text-neutral-400 dark:!text-neutral-600"
|
|
3568
3603
|
),
|
|
3569
3604
|
title: "Execute",
|
|
3570
3605
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 3L8 13M8 3L4 7M8 3L12 7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
@@ -3572,17 +3607,17 @@ ${planToExecute}`;
|
|
|
3572
3607
|
)
|
|
3573
3608
|
] }),
|
|
3574
3609
|
state === "loading" && !isCompact && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col items-center justify-center space-y-4 py-8", children: [
|
|
3575
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-6 h-6 border-2 border-
|
|
3576
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-
|
|
3610
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-6 h-6 border-2 border-neutral-300 border-t-blue-500 rounded-full animate-spin" }),
|
|
3611
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-neutral-600 dark:text-neutral-400 text-sm text-center max-w-md", children: enableStreaming && streamedContent ? streamedContent : loadingText }),
|
|
3577
3612
|
showProgress && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full max-w-sm", children: [
|
|
3578
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full bg-
|
|
3613
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full bg-neutral-200 dark:bg-neutral-700 rounded-full h-1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3579
3614
|
"div",
|
|
3580
3615
|
{
|
|
3581
3616
|
className: "bg-blue-500 h-1.5 rounded-full transition-all duration-300",
|
|
3582
3617
|
style: { width: `${progress}%` }
|
|
3583
3618
|
}
|
|
3584
3619
|
) }),
|
|
3585
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-xs text-
|
|
3620
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-xs text-neutral-500 mt-2 text-center", children: [
|
|
3586
3621
|
progress,
|
|
3587
3622
|
"%"
|
|
3588
3623
|
] })
|
|
@@ -3590,8 +3625,8 @@ ${planToExecute}`;
|
|
|
3590
3625
|
] }),
|
|
3591
3626
|
state === "loading" && isCompact && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3592
3627
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex items-center gap-3 py-1", children: [
|
|
3593
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-4 h-4 border-2 border-
|
|
3594
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-
|
|
3628
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-4 h-4 border-2 border-neutral-300 border-t-blue-500 rounded-full animate-spin" }),
|
|
3629
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-neutral-600 dark:text-neutral-400 text-sm truncate", children: enableStreaming && streamedContent ? streamedContent : loadingText })
|
|
3595
3630
|
] }),
|
|
3596
3631
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3597
3632
|
"button",
|
|
@@ -3599,9 +3634,9 @@ ${planToExecute}`;
|
|
|
3599
3634
|
disabled: true,
|
|
3600
3635
|
className: cn(
|
|
3601
3636
|
"w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0",
|
|
3602
|
-
"border border-
|
|
3603
|
-
"bg-white dark:bg-
|
|
3604
|
-
"!text-
|
|
3637
|
+
"border border-neutral-200 dark:border-neutral-700",
|
|
3638
|
+
"bg-white dark:bg-neutral-800",
|
|
3639
|
+
"!text-neutral-400 dark:!text-neutral-600",
|
|
3605
3640
|
"!text-lg",
|
|
3606
3641
|
"opacity-30 cursor-not-allowed"
|
|
3607
3642
|
),
|
|
@@ -3630,7 +3665,7 @@ ${planToExecute}`;
|
|
|
3630
3665
|
"button",
|
|
3631
3666
|
{
|
|
3632
3667
|
onClick: rejectPlan,
|
|
3633
|
-
className: "flex-1 px-4 py-2 bg-
|
|
3668
|
+
className: "flex-1 px-4 py-2 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-sm font-medium",
|
|
3634
3669
|
children: "Modify"
|
|
3635
3670
|
}
|
|
3636
3671
|
)
|
|
@@ -3661,7 +3696,7 @@ ${planToExecute}`;
|
|
|
3661
3696
|
"button",
|
|
3662
3697
|
{
|
|
3663
3698
|
onClick: rejectPlan,
|
|
3664
|
-
className: "px-3 py-1.5 bg-
|
|
3699
|
+
className: "px-3 py-1.5 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-xs font-medium",
|
|
3665
3700
|
children: "Modify"
|
|
3666
3701
|
}
|
|
3667
3702
|
)
|
|
@@ -3687,7 +3722,7 @@ ${planToExecute}`;
|
|
|
3687
3722
|
}
|
|
3688
3723
|
},
|
|
3689
3724
|
placeholder,
|
|
3690
|
-
className: "flex-1 w-full resize-none bg-transparent border-none focus:outline-none text-
|
|
3725
|
+
className: "flex-1 w-full resize-none bg-transparent border-none focus:outline-none text-neutral-900 dark:text-white placeholder-neutral-400",
|
|
3691
3726
|
rows: 4
|
|
3692
3727
|
}
|
|
3693
3728
|
)
|
|
@@ -3700,7 +3735,7 @@ ${planToExecute}`;
|
|
|
3700
3735
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-green-700 dark:text-green-300 text-sm", children: "Command executed successfully" })
|
|
3701
3736
|
] })
|
|
3702
3737
|
] }),
|
|
3703
|
-
_optionalChain([result, 'access', _107 => _107.data, 'optionalAccess', _108 => _108.summary]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-
|
|
3738
|
+
_optionalChain([result, 'access', _107 => _107.data, 'optionalAccess', _108 => _108.summary]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-neutral-700 dark:text-neutral-300 text-sm leading-relaxed whitespace-pre-line", children: result.data.summary }),
|
|
3704
3739
|
result.widgets && result.widgets.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-3", children: result.widgets.map((widget) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3705
3740
|
WidgetRenderer,
|
|
3706
3741
|
{
|
|
@@ -3734,10 +3769,10 @@ ${planToExecute}`;
|
|
|
3734
3769
|
},
|
|
3735
3770
|
className: cn(
|
|
3736
3771
|
"w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0",
|
|
3737
|
-
"border border-
|
|
3738
|
-
"bg-white dark:bg-
|
|
3739
|
-
"!text-
|
|
3740
|
-
"hover:bg-
|
|
3772
|
+
"border border-neutral-300 dark:border-neutral-600",
|
|
3773
|
+
"bg-white dark:bg-neutral-800",
|
|
3774
|
+
"!text-neutral-700 dark:!text-neutral-300",
|
|
3775
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
3741
3776
|
"!text-lg"
|
|
3742
3777
|
),
|
|
3743
3778
|
title: "New command",
|
|
@@ -3752,7 +3787,7 @@ ${planToExecute}`;
|
|
|
3752
3787
|
"button",
|
|
3753
3788
|
{
|
|
3754
3789
|
onClick: () => _optionalChain([fileInputRef, 'access', _109 => _109.current, 'optionalAccess', _110 => _110.click, 'call', _111 => _111()]),
|
|
3755
|
-
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 !text-
|
|
3790
|
+
className: "w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 !text-neutral-500 dark:!text-neutral-500 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
3756
3791
|
title: "Attach file",
|
|
3757
3792
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8.4 2.8L4.4 6.8C3.736 7.464 3.736 8.536 4.4 9.2C5.064 9.864 6.136 9.864 6.8 9.2L11.6 4.4C12.704 3.296 12.704 1.504 11.6 0.4C10.496 -0.704 8.704 -0.704 7.6 0.4L2.8 5.2C1.256 6.744 1.256 9.256 2.8 10.8C4.344 12.344 6.856 12.344 8.4 10.8L12.4 6.8", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round", transform: "translate(1.6, 2.4)" }) })
|
|
3758
3793
|
}
|
|
@@ -3763,8 +3798,8 @@ ${planToExecute}`;
|
|
|
3763
3798
|
{
|
|
3764
3799
|
onClick: () => setShowSettingsMenu(!showSettingsMenu),
|
|
3765
3800
|
className: cn(
|
|
3766
|
-
"w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 hover:bg-
|
|
3767
|
-
internalPlanMode ? "!text-blue-600 dark:!text-blue-400" : "!text-
|
|
3801
|
+
"w-8 h-8 rounded-lg flex items-center justify-center transition-all flex-shrink-0 hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
3802
|
+
internalPlanMode ? "!text-blue-600 dark:!text-blue-400" : "!text-neutral-500 dark:!text-neutral-500"
|
|
3768
3803
|
),
|
|
3769
3804
|
title: "Settings",
|
|
3770
3805
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -3780,12 +3815,12 @@ ${planToExecute}`;
|
|
|
3780
3815
|
] })
|
|
3781
3816
|
}
|
|
3782
3817
|
),
|
|
3783
|
-
showSettingsMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute top-10 left-0 z-50 w-64 bg-white dark:bg-
|
|
3818
|
+
showSettingsMenu && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "absolute top-10 left-0 z-50 w-64 bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg shadow-lg p-3 settings-menu-container", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "label", { className: "flex items-center justify-between cursor-pointer group", children: [
|
|
3784
3819
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
3785
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4 text-
|
|
3820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4 text-neutral-500 dark:text-neutral-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" }) }),
|
|
3786
3821
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
3787
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm font-medium text-
|
|
3788
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs text-
|
|
3822
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm font-medium text-neutral-700 dark:text-neutral-300", children: "Plan Mode" }),
|
|
3823
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs text-neutral-500 dark:text-neutral-400", children: "Review before executing" })
|
|
3789
3824
|
] })
|
|
3790
3825
|
] }),
|
|
3791
3826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3797,7 +3832,7 @@ ${planToExecute}`;
|
|
|
3797
3832
|
},
|
|
3798
3833
|
className: cn(
|
|
3799
3834
|
"relative inline-flex h-5 w-9 items-center rounded-full transition-colors",
|
|
3800
|
-
internalPlanMode ? "bg-blue-600" : "bg-
|
|
3835
|
+
internalPlanMode ? "bg-blue-600" : "bg-neutral-300 dark:bg-neutral-600"
|
|
3801
3836
|
),
|
|
3802
3837
|
type: "button",
|
|
3803
3838
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3820,7 +3855,7 @@ ${planToExecute}`;
|
|
|
3820
3855
|
"button",
|
|
3821
3856
|
{
|
|
3822
3857
|
onClick: resetCommand,
|
|
3823
|
-
className: "px-3 py-1.5 text-sm text-
|
|
3858
|
+
className: "px-3 py-1.5 text-sm text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-white transition-colors",
|
|
3824
3859
|
children: "Reset"
|
|
3825
3860
|
}
|
|
3826
3861
|
),
|
|
@@ -3831,13 +3866,13 @@ ${planToExecute}`;
|
|
|
3831
3866
|
disabled: !command.trim(),
|
|
3832
3867
|
className: cn(
|
|
3833
3868
|
"w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all",
|
|
3834
|
-
"border border-
|
|
3835
|
-
"bg-white dark:bg-
|
|
3836
|
-
"!text-
|
|
3837
|
-
"hover:bg-
|
|
3869
|
+
"border border-neutral-300 dark:border-neutral-600",
|
|
3870
|
+
"bg-white dark:bg-neutral-800",
|
|
3871
|
+
"!text-neutral-700 dark:!text-neutral-300",
|
|
3872
|
+
"hover:bg-neutral-50 dark:hover:bg-neutral-700",
|
|
3838
3873
|
"disabled:opacity-30 disabled:cursor-not-allowed",
|
|
3839
3874
|
"!text-lg",
|
|
3840
|
-
!command.trim() && "border-
|
|
3875
|
+
!command.trim() && "border-neutral-200 dark:border-neutral-700 !text-neutral-400 dark:!text-neutral-600"
|
|
3841
3876
|
),
|
|
3842
3877
|
title: state === "error" ? "Retry" : "Execute",
|
|
3843
3878
|
children: state === "error" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M13 8C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 8C3 5.23858 5.23858 3 8 3C9.65685 3 11.1257 3.82818 12 5.09091M12 3V5.09091M12 5.09091H9.81818", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M8 3L8 13M8 3L4 7M8 3L12 7", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
@@ -3845,28 +3880,28 @@ ${planToExecute}`;
|
|
|
3845
3880
|
)
|
|
3846
3881
|
] })
|
|
3847
3882
|
] }),
|
|
3848
|
-
showPlanDetails && isCompact && state === "plan-pending" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4", onClick: () => setShowPlanDetails(false), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-white dark:bg-
|
|
3849
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between p-6 border-b border-
|
|
3883
|
+
showPlanDetails && isCompact && state === "plan-pending" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4", onClick: () => setShowPlanDetails(false), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-white dark:bg-neutral-900 rounded-2xl shadow-2xl max-w-2xl w-full max-h-[80vh] overflow-hidden", onClick: (e) => e.stopPropagation(), children: [
|
|
3884
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between p-6 border-b border-neutral-200 dark:border-neutral-700", children: [
|
|
3850
3885
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
|
|
3851
3886
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-6 h-6 text-blue-600 dark:text-blue-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" }) }),
|
|
3852
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-xl font-semibold text-
|
|
3887
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-xl font-semibold text-neutral-900 dark:text-white", children: "Proposed Execution Plan" })
|
|
3853
3888
|
] }),
|
|
3854
3889
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3855
3890
|
"button",
|
|
3856
3891
|
{
|
|
3857
3892
|
onClick: () => setShowPlanDetails(false),
|
|
3858
|
-
className: "text-
|
|
3893
|
+
className: "text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-300 transition-colors",
|
|
3859
3894
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-6 h-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
|
3860
3895
|
}
|
|
3861
3896
|
)
|
|
3862
3897
|
] }),
|
|
3863
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-6 overflow-y-auto max-h-[calc(80vh-180px)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "prose prose-sm dark:prose-invert max-w-none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-
|
|
3864
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end gap-3 p-6 border-t border-
|
|
3898
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-6 overflow-y-auto max-h-[calc(80vh-180px)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "prose prose-sm dark:prose-invert max-w-none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-neutral-700 dark:text-neutral-300 whitespace-pre-line leading-relaxed", children: plan }) }) }),
|
|
3899
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end gap-3 p-6 border-t border-neutral-200 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-800/50", children: [
|
|
3865
3900
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3866
3901
|
"button",
|
|
3867
3902
|
{
|
|
3868
3903
|
onClick: rejectPlan,
|
|
3869
|
-
className: "px-6 py-2.5 bg-
|
|
3904
|
+
className: "px-6 py-2.5 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors font-medium",
|
|
3870
3905
|
children: "Modify Command"
|
|
3871
3906
|
}
|
|
3872
3907
|
),
|
|
@@ -3987,7 +4022,7 @@ function Prompt({
|
|
|
3987
4022
|
onBlur: handleBlur,
|
|
3988
4023
|
placeholder,
|
|
3989
4024
|
disabled: isLoading,
|
|
3990
|
-
className: "flex-1 px-4 py-2 border border-
|
|
4025
|
+
className: "flex-1 px-4 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-apteva-500 dark:bg-neutral-800 dark:border-neutral-600 dark:text-white"
|
|
3991
4026
|
}
|
|
3992
4027
|
),
|
|
3993
4028
|
submitOn === "button" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4000,7 +4035,7 @@ function Prompt({
|
|
|
4000
4035
|
}
|
|
4001
4036
|
)
|
|
4002
4037
|
] }),
|
|
4003
|
-
maxLength && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-xs text-
|
|
4038
|
+
maxLength && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-xs text-neutral-500", children: [
|
|
4004
4039
|
value.length,
|
|
4005
4040
|
" / ",
|
|
4006
4041
|
maxLength,
|
|
@@ -4010,12 +4045,12 @@ function Prompt({
|
|
|
4010
4045
|
"button",
|
|
4011
4046
|
{
|
|
4012
4047
|
onClick: () => setValue(suggestion),
|
|
4013
|
-
className: "px-3 py-1 text-sm bg-
|
|
4048
|
+
className: "px-3 py-1 text-sm bg-neutral-100 hover:bg-neutral-200 text-neutral-700 rounded-full transition-colors",
|
|
4014
4049
|
children: suggestion
|
|
4015
4050
|
},
|
|
4016
4051
|
idx
|
|
4017
4052
|
)) }),
|
|
4018
|
-
isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-sm text-
|
|
4053
|
+
isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-sm text-neutral-500", children: [
|
|
4019
4054
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-4 h-4 border-2 border-apteva-500 border-t-transparent rounded-full animate-spin" }),
|
|
4020
4055
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "AI is processing your request..." })
|
|
4021
4056
|
] })
|
|
@@ -4100,8 +4135,8 @@ function Stream({
|
|
|
4100
4135
|
};
|
|
4101
4136
|
const variantClasses = {
|
|
4102
4137
|
prose: "prose prose-sm max-w-none dark:prose-invert",
|
|
4103
|
-
code: "font-mono text-sm bg-
|
|
4104
|
-
plain: "text-
|
|
4138
|
+
code: "font-mono text-sm bg-neutral-900 text-green-400 p-4 rounded-lg",
|
|
4139
|
+
plain: "text-neutral-900 dark:text-neutral-100"
|
|
4105
4140
|
};
|
|
4106
4141
|
if (!isStreaming && !isComplete) {
|
|
4107
4142
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("p-4", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4134,9 +4169,9 @@ function ThreadItem({ thread, isActive = false, onSelect, onDelete }) {
|
|
|
4134
4169
|
onClick: onSelect,
|
|
4135
4170
|
children: [
|
|
4136
4171
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0", children: [
|
|
4137
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-semibold text-
|
|
4138
|
-
thread.preview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-
|
|
4139
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mt-1 text-xs text-
|
|
4172
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-semibold text-neutral-900 dark:text-white truncate", children: thread.title }),
|
|
4173
|
+
thread.preview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-neutral-600 dark:text-neutral-400 truncate", children: thread.preview }),
|
|
4174
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 mt-1 text-xs text-neutral-500", children: [
|
|
4140
4175
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
4141
4176
|
thread.messageCount,
|
|
4142
4177
|
" messages"
|
|
@@ -4152,7 +4187,7 @@ function ThreadItem({ thread, isActive = false, onSelect, onDelete }) {
|
|
|
4152
4187
|
e.stopPropagation();
|
|
4153
4188
|
onDelete();
|
|
4154
4189
|
},
|
|
4155
|
-
className: "p-2 text-
|
|
4190
|
+
className: "p-2 text-neutral-400 hover:text-red-500 hover:bg-red-50 rounded transition-colors",
|
|
4156
4191
|
title: "Delete thread",
|
|
4157
4192
|
children: "\u{1F5D1}\uFE0F"
|
|
4158
4193
|
}
|
|
@@ -4190,19 +4225,19 @@ function ThreadList({
|
|
|
4190
4225
|
);
|
|
4191
4226
|
const groupedThreads = groupBy === "date" ? groupThreadsByDate(filteredThreads) : { All: filteredThreads };
|
|
4192
4227
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col h-full", children: [
|
|
4193
|
-
showSearch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3 border-b border-
|
|
4228
|
+
showSearch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3 border-b border-neutral-200 dark:border-neutral-700", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4194
4229
|
"input",
|
|
4195
4230
|
{
|
|
4196
4231
|
type: "text",
|
|
4197
4232
|
placeholder: "Search conversations...",
|
|
4198
4233
|
value: searchQuery,
|
|
4199
4234
|
onChange: (e) => setSearchQuery(e.target.value),
|
|
4200
|
-
className: "w-full px-3 py-2 text-sm border border-
|
|
4235
|
+
className: "w-full px-3 py-2 text-sm border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-apteva-500 dark:bg-neutral-800 dark:border-neutral-600 dark:text-white"
|
|
4201
4236
|
}
|
|
4202
4237
|
) }),
|
|
4203
4238
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 overflow-y-auto", children: [
|
|
4204
4239
|
Object.entries(groupedThreads).map(([group, groupThreads]) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
4205
|
-
groupBy !== "none" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-3 py-2 text-xs font-semibold text-
|
|
4240
|
+
groupBy !== "none" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "px-3 py-2 text-xs font-semibold text-neutral-500 uppercase", children: group }),
|
|
4206
4241
|
groupThreads.map((thread) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4207
4242
|
ThreadItem,
|
|
4208
4243
|
{
|
|
@@ -4214,7 +4249,7 @@ function ThreadList({
|
|
|
4214
4249
|
thread.id
|
|
4215
4250
|
))
|
|
4216
4251
|
] }, group)),
|
|
4217
|
-
filteredThreads.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-8 text-center text-
|
|
4252
|
+
filteredThreads.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-8 text-center text-neutral-500", children: [
|
|
4218
4253
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-10 h-10 mx-auto mb-2 opacity-50", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }),
|
|
4219
4254
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { children: "No conversations found" })
|
|
4220
4255
|
] })
|
|
@@ -4262,9 +4297,9 @@ function Threads({
|
|
|
4262
4297
|
className
|
|
4263
4298
|
}) {
|
|
4264
4299
|
const variantClasses = {
|
|
4265
|
-
sidebar: "h-full border-r border-
|
|
4266
|
-
dropdown: "absolute top-full left-0 right-0 mt-2 bg-white dark:bg-
|
|
4267
|
-
tabs: "flex gap-2 border-b border-
|
|
4300
|
+
sidebar: "h-full border-r border-neutral-200 dark:border-neutral-700 bg-white dark:bg-neutral-900",
|
|
4301
|
+
dropdown: "absolute top-full left-0 right-0 mt-2 bg-white dark:bg-neutral-800 rounded-lg shadow-lg border border-neutral-200 dark:border-neutral-700 max-h-96 overflow-hidden",
|
|
4302
|
+
tabs: "flex gap-2 border-b border-neutral-200 dark:border-neutral-700 overflow-x-auto"
|
|
4268
4303
|
};
|
|
4269
4304
|
if (variant === "tabs") {
|
|
4270
4305
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn(variantClasses[variant], className), children: [
|
|
@@ -4274,7 +4309,7 @@ function Threads({
|
|
|
4274
4309
|
onClick: () => _optionalChain([onThreadSelect, 'optionalCall', _130 => _130(thread.id)]),
|
|
4275
4310
|
className: cn(
|
|
4276
4311
|
"px-4 py-2 whitespace-nowrap font-medium transition-colors",
|
|
4277
|
-
thread.id === currentThreadId ? "border-b-2 border-apteva-500 text-apteva-500" : "text-
|
|
4312
|
+
thread.id === currentThreadId ? "border-b-2 border-apteva-500 text-apteva-500" : "text-neutral-600 hover:text-neutral-900"
|
|
4278
4313
|
),
|
|
4279
4314
|
children: thread.title
|
|
4280
4315
|
},
|
|
@@ -4284,14 +4319,14 @@ function Threads({
|
|
|
4284
4319
|
"button",
|
|
4285
4320
|
{
|
|
4286
4321
|
onClick: onNewThread,
|
|
4287
|
-
className: "px-4 py-2 text-
|
|
4322
|
+
className: "px-4 py-2 text-neutral-600 hover:text-apteva-500 transition-colors font-medium",
|
|
4288
4323
|
children: "+ New"
|
|
4289
4324
|
}
|
|
4290
4325
|
)
|
|
4291
4326
|
] });
|
|
4292
4327
|
}
|
|
4293
4328
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn(variantClasses[variant], "flex flex-col", className), children: [
|
|
4294
|
-
showNewButton && onNewThread && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3 border-b border-
|
|
4329
|
+
showNewButton && onNewThread && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-3 border-b border-neutral-200 dark:border-neutral-700", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4295
4330
|
"button",
|
|
4296
4331
|
{
|
|
4297
4332
|
onClick: onNewThread,
|