@designa8/vibedesign-v6 1.10.6 → 1.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +172 -271
- package/dist/index.js +172 -271
- package/dist/styles.css +15 -54
- package/package.json +1 -1
- package/src/atoms/ChatScreen/ChatScreen.tsx +205 -263
- package/src/atoms/ChatScreen/preview.tsx +39 -210
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1043,287 +1043,189 @@ PromptInputBar.displayName = "PromptInputBar";
|
|
|
1043
1043
|
|
|
1044
1044
|
// virtual-pkg:src/atoms/ChatScreen/ChatScreen.tsx
|
|
1045
1045
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1046
|
-
var ChatEmptyIllustration = () => (
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
"
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
"
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
"
|
|
1069
|
-
{
|
|
1070
|
-
|
|
1071
|
-
style: { width:
|
|
1072
|
-
children: [
|
|
1073
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col", style: { width: 32, gap: 6 }, children: [
|
|
1074
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1075
|
-
"span",
|
|
1076
|
-
{
|
|
1077
|
-
className: "rounded-full bg-on-primary",
|
|
1078
|
-
style: { height: 6, width: "100%" }
|
|
1079
|
-
}
|
|
1080
|
-
),
|
|
1081
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1082
|
-
"span",
|
|
1083
|
-
{
|
|
1084
|
-
className: "rounded-full bg-on-primary",
|
|
1085
|
-
style: { height: 6, width: "66%" }
|
|
1086
|
-
}
|
|
1087
|
-
)
|
|
1088
|
-
] }),
|
|
1046
|
+
var ChatEmptyIllustration = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1047
|
+
"div",
|
|
1048
|
+
{
|
|
1049
|
+
className: "relative flex-shrink-0",
|
|
1050
|
+
"aria-hidden": "true",
|
|
1051
|
+
style: { width: 112 },
|
|
1052
|
+
children: [
|
|
1053
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1054
|
+
"svg",
|
|
1055
|
+
{
|
|
1056
|
+
viewBox: "0 0 160 140",
|
|
1057
|
+
width: "112",
|
|
1058
|
+
height: "98",
|
|
1059
|
+
className: "text-primary",
|
|
1060
|
+
fill: "currentColor",
|
|
1061
|
+
style: { opacity: 0.15, display: "block" },
|
|
1062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M78 8c28-6 52 10 58 34 6 24-6 44-4 62 2 16-14 30-36 32-26 2-48-8-62-28-12-18-22-42-10-58C36 30 52 14 78 8z" })
|
|
1063
|
+
}
|
|
1064
|
+
),
|
|
1065
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1066
|
+
"div",
|
|
1067
|
+
{
|
|
1068
|
+
className: "relative flex items-center justify-center rounded-full bg-primary shadow-sm",
|
|
1069
|
+
style: { width: 64, height: 64 },
|
|
1070
|
+
children: [
|
|
1071
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col", style: { width: 32, gap: 6 }, children: [
|
|
1089
1072
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1090
1073
|
"span",
|
|
1091
1074
|
{
|
|
1092
|
-
className: "
|
|
1093
|
-
style: {
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
}
|
|
1075
|
+
className: "rounded-full bg-on-primary",
|
|
1076
|
+
style: { height: 6, width: "100%" }
|
|
1077
|
+
}
|
|
1078
|
+
),
|
|
1079
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1080
|
+
"span",
|
|
1081
|
+
{
|
|
1082
|
+
className: "rounded-full bg-on-primary",
|
|
1083
|
+
style: { height: 6, width: "66%" }
|
|
1101
1084
|
}
|
|
1102
1085
|
)
|
|
1103
|
-
]
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
"aria-hidden": "true",
|
|
1128
|
-
style: { right: 12, top: 32 },
|
|
1129
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" })
|
|
1130
|
-
}
|
|
1131
|
-
),
|
|
1132
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1133
|
-
"svg",
|
|
1134
|
-
{
|
|
1135
|
-
viewBox: "0 0 24 24",
|
|
1136
|
-
width: "8",
|
|
1137
|
-
height: "8",
|
|
1138
|
-
className: "absolute text-primary",
|
|
1139
|
-
fill: "currentColor",
|
|
1140
|
-
"aria-hidden": "true",
|
|
1141
|
-
style: { left: 24, bottom: 24 },
|
|
1142
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" })
|
|
1143
|
-
}
|
|
1144
|
-
),
|
|
1145
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1146
|
-
"svg",
|
|
1147
|
-
{
|
|
1148
|
-
viewBox: "0 0 24 24",
|
|
1149
|
-
width: "14",
|
|
1150
|
-
height: "14",
|
|
1151
|
-
className: "absolute text-primary",
|
|
1152
|
-
fill: "currentColor",
|
|
1153
|
-
"aria-hidden": "true",
|
|
1154
|
-
style: { right: 8, bottom: 32 },
|
|
1155
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" })
|
|
1156
|
-
}
|
|
1157
|
-
)
|
|
1158
|
-
]
|
|
1159
|
-
}
|
|
1160
|
-
)
|
|
1086
|
+
] }),
|
|
1087
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1088
|
+
"span",
|
|
1089
|
+
{
|
|
1090
|
+
className: "absolute bg-primary",
|
|
1091
|
+
style: {
|
|
1092
|
+
width: 12,
|
|
1093
|
+
height: 12,
|
|
1094
|
+
bottom: -2,
|
|
1095
|
+
right: 8,
|
|
1096
|
+
transform: "rotate(45deg)",
|
|
1097
|
+
borderRadius: 2
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
)
|
|
1101
|
+
]
|
|
1102
|
+
}
|
|
1103
|
+
) }),
|
|
1104
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", width: "12", height: "12", className: "absolute text-primary", fill: "currentColor", "aria-hidden": "true", style: { left: 8, top: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" }) }),
|
|
1105
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", width: "10", height: "10", className: "absolute text-primary", fill: "currentColor", "aria-hidden": "true", style: { right: 12, top: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" }) }),
|
|
1106
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", width: "8", height: "8", className: "absolute text-primary", fill: "currentColor", "aria-hidden": "true", style: { left: 24, bottom: 24 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" }) }),
|
|
1107
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", width: "14", height: "14", className: "absolute text-primary", fill: "currentColor", "aria-hidden": "true", style: { right: 8, bottom: 32 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 0l1.5 8.5L22 12l-8.5 1.5L12 22l-1.5-8.5L2 12l8.5-1.5L12 0z" }) })
|
|
1108
|
+
]
|
|
1109
|
+
}
|
|
1161
1110
|
);
|
|
1162
1111
|
var ChatEmptyStateContent = ({
|
|
1163
1112
|
title,
|
|
1164
1113
|
description
|
|
1165
|
-
}) => (
|
|
1166
|
-
|
|
1167
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex
|
|
1168
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1169
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
1170
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "text-heading-sm font-weight-heading-sm text-ink", children: title }),
|
|
1171
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-body-sm text-muted", style: { maxWidth: "24rem" }, children: description })
|
|
1172
|
-
] })
|
|
1114
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center px-lg", style: { gap: 24 }, children: [
|
|
1115
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChatEmptyIllustration, {}),
|
|
1116
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex min-w-0 flex-col gap-xs", children: [
|
|
1117
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "text-heading-sm font-weight-heading-sm text-ink", children: title }),
|
|
1118
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-body-sm text-muted", style: { maxWidth: "24rem" }, children: description })
|
|
1173
1119
|
] })
|
|
1174
|
-
);
|
|
1175
|
-
var
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
stroke: "currentColor",
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
className: "size-4 text-muted flex-shrink-0 transition-transform duration-200",
|
|
1186
|
-
style: { transform: expanded ? "rotate(180deg)" : "rotate(0deg)" },
|
|
1187
|
-
"aria-hidden": "true",
|
|
1188
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
|
1120
|
+
] });
|
|
1121
|
+
var TimelineKindIcon = ({
|
|
1122
|
+
kind,
|
|
1123
|
+
status
|
|
1124
|
+
}) => {
|
|
1125
|
+
const colorClass = status === "error" ? "text-semantic-error" : status === "running" ? "text-primary" : "text-semantic-success";
|
|
1126
|
+
if (kind === "thinking") {
|
|
1127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: [
|
|
1128
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1129
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 8v4l2 2" })
|
|
1130
|
+
] });
|
|
1189
1131
|
}
|
|
1190
|
-
)
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
);
|
|
1214
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mt-md rounded-xl border border-hairline bg-canvas shadow-sm overflow-hidden", children: [
|
|
1215
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-start gap-sm px-lg py-md border-b border-hairline-soft", children: [
|
|
1216
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1217
|
-
"svg",
|
|
1132
|
+
if (kind === "read") {
|
|
1133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: [
|
|
1134
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" }),
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" })
|
|
1136
|
+
] });
|
|
1137
|
+
}
|
|
1138
|
+
if (kind === "write") {
|
|
1139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: [
|
|
1140
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
1142
|
+
] });
|
|
1143
|
+
}
|
|
1144
|
+
if (kind === "verify") {
|
|
1145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polyline", { points: "20 6 9 17 4 12" }) });
|
|
1146
|
+
}
|
|
1147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: colorClass, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }) });
|
|
1148
|
+
};
|
|
1149
|
+
var TimelineRow = ({ item, isLast }) => {
|
|
1150
|
+
const borderColor = item.status === "error" ? "border-semantic-error" : item.status === "running" ? "border-primary" : "border-semantic-success";
|
|
1151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex gap-sm", children: [
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col items-center", style: { width: 20 }, children: [
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1154
|
+
"div",
|
|
1218
1155
|
{
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
className: "size-4 text-primary flex-shrink-0 mt-xs",
|
|
1227
|
-
"aria-hidden": "true",
|
|
1228
|
-
children: [
|
|
1229
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "8", y1: "6", x2: "21", y2: "6" }),
|
|
1230
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "8", y1: "12", x2: "21", y2: "12" }),
|
|
1231
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "8", y1: "18", x2: "21", y2: "18" }),
|
|
1232
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "3", y1: "6", x2: "3.01", y2: "6" }),
|
|
1233
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "3", y1: "12", x2: "3.01", y2: "12" }),
|
|
1234
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "3", y1: "18", x2: "3.01", y2: "18" })
|
|
1235
|
-
]
|
|
1156
|
+
className: [
|
|
1157
|
+
"flex items-center justify-center rounded-full flex-shrink-0 border",
|
|
1158
|
+
borderColor,
|
|
1159
|
+
"bg-canvas"
|
|
1160
|
+
].join(" "),
|
|
1161
|
+
style: { width: 20, height: 20 },
|
|
1162
|
+
children: item.status === "running" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", width: "10", height: "10", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", className: "text-primary animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TimelineKindIcon, { kind: item.kind, status: item.status })
|
|
1236
1163
|
}
|
|
1237
1164
|
),
|
|
1238
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
1239
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1240
|
-
"span",
|
|
1241
|
-
{
|
|
1242
|
-
ref: titleRef,
|
|
1243
|
-
className: "text-body-sm font-weight-heading-sm text-primary flex-1 min-w-0",
|
|
1244
|
-
style: titleExpanded ? void 0 : {
|
|
1245
|
-
display: "-webkit-box",
|
|
1246
|
-
WebkitLineClamp: 2,
|
|
1247
|
-
WebkitBoxOrient: "vertical",
|
|
1248
|
-
overflow: "hidden"
|
|
1249
|
-
},
|
|
1250
|
-
children: plan.title
|
|
1251
|
-
}
|
|
1252
|
-
),
|
|
1253
|
-
isOverflowing && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1254
|
-
Button,
|
|
1255
|
-
{
|
|
1256
|
-
variant: "ghost",
|
|
1257
|
-
size: "sm",
|
|
1258
|
-
type: "button",
|
|
1259
|
-
onClick: () => setTitleExpanded((prev) => !prev),
|
|
1260
|
-
"aria-label": titleExpanded ? "Collapse plan title" : "Expand plan title",
|
|
1261
|
-
className: "flex-shrink-0 !p-xxs !rounded-xs",
|
|
1262
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChevronIcon2, { expanded: titleExpanded })
|
|
1263
|
-
}
|
|
1264
|
-
)
|
|
1265
|
-
] })
|
|
1165
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 w-px bg-hairline-soft", style: { minHeight: 8 } })
|
|
1266
1166
|
] }),
|
|
1267
|
-
|
|
1268
|
-
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col min-w-0 pb-sm", children: [
|
|
1168
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1169
|
+
"span",
|
|
1170
|
+
{
|
|
1171
|
+
className: [
|
|
1172
|
+
"text-body-sm",
|
|
1173
|
+
item.status === "error" ? "text-semantic-error" : item.status === "running" ? "text-ink font-weight-heading-sm" : "text-muted"
|
|
1174
|
+
].join(" "),
|
|
1175
|
+
children: item.label
|
|
1176
|
+
}
|
|
1177
|
+
),
|
|
1178
|
+
item.detail && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-caption text-muted-soft mt-xxs", children: item.detail })
|
|
1179
|
+
] })
|
|
1180
|
+
] });
|
|
1181
|
+
};
|
|
1182
|
+
var TimelineBlock = ({ items }) => {
|
|
1183
|
+
const [expanded, setExpanded] = import_react5.default.useState(false);
|
|
1184
|
+
if (items.length === 0) return null;
|
|
1185
|
+
const latestItem = items[items.length - 1];
|
|
1186
|
+
const hasMore = items.length > 1;
|
|
1187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "mt-md rounded-xl border border-hairline bg-canvas overflow-hidden", children: [
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1189
|
+
Button,
|
|
1269
1190
|
{
|
|
1270
|
-
|
|
1191
|
+
variant: "ghost",
|
|
1192
|
+
size: "sm",
|
|
1193
|
+
type: "button",
|
|
1194
|
+
onClick: () => setExpanded((prev) => !prev),
|
|
1195
|
+
"aria-expanded": expanded,
|
|
1196
|
+
"aria-label": expanded ? "Collapse agent steps" : "Expand agent steps",
|
|
1197
|
+
className: "w-full flex items-center gap-sm !px-md !py-sm !text-left !justify-start !rounded-none",
|
|
1271
1198
|
children: [
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
"
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1283
|
-
viewBox: "0 0 24 24",
|
|
1284
|
-
fill: "none",
|
|
1285
|
-
stroke: "currentColor",
|
|
1286
|
-
strokeWidth: "2.5",
|
|
1287
|
-
strokeLinecap: "round",
|
|
1288
|
-
strokeLinejoin: "round",
|
|
1289
|
-
className: "size-4 text-semantic-success",
|
|
1290
|
-
"aria-hidden": "true",
|
|
1291
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
1292
|
-
}
|
|
1293
|
-
) }),
|
|
1294
|
-
task.status === "failed" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "flex-shrink-0", "aria-label": "Failed", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "flex-shrink-0 flex items-center justify-center", style: { width: 20, height: 20 }, children: latestItem.status === "running" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", width: "12", height: "12", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", className: "text-primary animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TimelineKindIcon, { kind: latestItem.kind, status: latestItem.status }) }),
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "flex-1 min-w-0 text-body-sm text-muted truncate", children: [
|
|
1201
|
+
latestItem.label,
|
|
1202
|
+
hasMore && !expanded && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "ml-xs text-caption text-muted-soft", children: [
|
|
1203
|
+
"(+",
|
|
1204
|
+
items.length - 1,
|
|
1205
|
+
" more)"
|
|
1206
|
+
] })
|
|
1207
|
+
] }),
|
|
1208
|
+
hasMore && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1295
1209
|
"svg",
|
|
1296
1210
|
{
|
|
1297
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1298
1211
|
viewBox: "0 0 24 24",
|
|
1212
|
+
width: "14",
|
|
1213
|
+
height: "14",
|
|
1299
1214
|
fill: "none",
|
|
1300
1215
|
stroke: "currentColor",
|
|
1301
|
-
strokeWidth: "2
|
|
1216
|
+
strokeWidth: "2",
|
|
1302
1217
|
strokeLinecap: "round",
|
|
1303
1218
|
strokeLinejoin: "round",
|
|
1304
|
-
className: "
|
|
1219
|
+
className: "text-muted flex-shrink-0 transition-transform duration-200",
|
|
1220
|
+
style: { transform: expanded ? "rotate(180deg)" : "rotate(0deg)" },
|
|
1305
1221
|
"aria-hidden": "true",
|
|
1306
|
-
children:
|
|
1307
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1308
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1309
|
-
]
|
|
1310
|
-
}
|
|
1311
|
-
) }),
|
|
1312
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1313
|
-
"span",
|
|
1314
|
-
{
|
|
1315
|
-
className: [
|
|
1316
|
-
"text-body-sm",
|
|
1317
|
-
task.status === "in_progress" ? "font-weight-heading-sm text-ink" : task.status === "done" ? "line-through text-muted" : task.status === "failed" ? "text-semantic-error" : "text-ink"
|
|
1318
|
-
].filter(Boolean).join(" "),
|
|
1319
|
-
children: task.label
|
|
1222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
|
1320
1223
|
}
|
|
1321
|
-
)
|
|
1322
|
-
task.status === "in_progress" && task.currentTool && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "ml-auto text-caption text-muted flex-shrink-0", children: task.currentTool })
|
|
1224
|
+
)
|
|
1323
1225
|
]
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
)) })
|
|
1226
|
+
}
|
|
1227
|
+
),
|
|
1228
|
+
expanded && hasMore && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "px-md pb-sm pt-xs border-t border-hairline-soft", children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TimelineRow, { item, isLast: idx === items.length - 1 }, item.id)) })
|
|
1327
1229
|
] });
|
|
1328
1230
|
};
|
|
1329
1231
|
var AIAvatar = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -1365,7 +1267,7 @@ var AiMessage = ({ message }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("
|
|
|
1365
1267
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-body-sm text-primary", children: message.currentToolLabel ?? "Working\u2026" })
|
|
1366
1268
|
] }),
|
|
1367
1269
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-body-sm text-body leading-relaxed", children: message.content }),
|
|
1368
|
-
message.
|
|
1270
|
+
message.timeline && message.timeline.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TimelineBlock, { items: message.timeline }),
|
|
1369
1271
|
message.postContent && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-body-sm text-body leading-relaxed mt-md", children: message.postContent })
|
|
1370
1272
|
] })
|
|
1371
1273
|
] });
|
|
@@ -1394,29 +1296,28 @@ var ChatScreen = import_react5.default.forwardRef(
|
|
|
1394
1296
|
{
|
|
1395
1297
|
id: "1",
|
|
1396
1298
|
role: "user",
|
|
1397
|
-
content: "Build a `PromptInputBar` Molecule that reproduces the Lovable-style prompt bar
|
|
1299
|
+
content: "Build a `PromptInputBar` Molecule that reproduces the Lovable-style prompt bar.",
|
|
1398
1300
|
userInitials: "DU"
|
|
1399
1301
|
},
|
|
1400
1302
|
{
|
|
1401
1303
|
id: "2",
|
|
1402
1304
|
role: "ai",
|
|
1403
|
-
content: "I'll build the `PromptInputBar` Molecule
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
{ id: "p5", label: "Create stories and tests" }
|
|
1412
|
-
]
|
|
1413
|
-
},
|
|
1414
|
-
postContent: "The plan above outlines all the steps. Let me start building the component now."
|
|
1305
|
+
content: "I'll build the `PromptInputBar` Molecule now. Here's what the agent is doing:",
|
|
1306
|
+
timeline: [
|
|
1307
|
+
{ id: "t1", kind: "thinking", label: "Planning component structure", status: "done" },
|
|
1308
|
+
{ id: "t2", kind: "read", label: "Reading design tokens", detail: "colors, spacing, typography", status: "done" },
|
|
1309
|
+
{ id: "t3", kind: "write", label: "Writing PromptInputBar.tsx", status: "done" },
|
|
1310
|
+
{ id: "t4", kind: "verify", label: "Verifying atom", status: "running" }
|
|
1311
|
+
],
|
|
1312
|
+
postContent: "The component is being verified \u2014 it will be ready shortly."
|
|
1415
1313
|
},
|
|
1416
1314
|
{
|
|
1417
1315
|
id: "3",
|
|
1418
1316
|
role: "ai",
|
|
1419
|
-
content: "
|
|
1317
|
+
content: "Done! The `PromptInputBar` atom has been created and verified.",
|
|
1318
|
+
timeline: [
|
|
1319
|
+
{ id: "t5", kind: "verify", label: "Atom verified successfully", status: "done" }
|
|
1320
|
+
]
|
|
1420
1321
|
}
|
|
1421
1322
|
];
|
|
1422
1323
|
const [messages, setMessages] = import_react5.default.useState(
|
|
@@ -1529,7 +1430,7 @@ var DeleteIcon = () => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
|
1529
1430
|
]
|
|
1530
1431
|
}
|
|
1531
1432
|
);
|
|
1532
|
-
var
|
|
1433
|
+
var ChevronIcon2 = ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1533
1434
|
"svg",
|
|
1534
1435
|
{
|
|
1535
1436
|
"aria-hidden": "true",
|
|
@@ -1623,7 +1524,7 @@ var WorkspaceMenu = import_react6.default.forwardRef(
|
|
|
1623
1524
|
style: { minWidth: "200px" },
|
|
1624
1525
|
children: [
|
|
1625
1526
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "flex-1 text-left truncate text-body-sm font-weight-heading-sm", children: workspaceName }),
|
|
1626
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChevronIcon2, { open })
|
|
1627
1528
|
]
|
|
1628
1529
|
}
|
|
1629
1530
|
),
|