pxengine 0.1.43 → 0.1.45
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/config/tailwind-preset.js +155 -0
- package/dist/index.cjs +274 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +278 -86
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +1316 -1312
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -35870,13 +35870,14 @@ var TikTokIcon2 = ({ className }) => /* @__PURE__ */ jsx113(Video, { className }
|
|
|
35870
35870
|
var CreatorGridCard = ({
|
|
35871
35871
|
bannerSrc,
|
|
35872
35872
|
avatarSrc,
|
|
35873
|
-
name,
|
|
35874
|
-
handle,
|
|
35875
|
-
metrics,
|
|
35876
|
-
platforms,
|
|
35873
|
+
name = "",
|
|
35874
|
+
handle = "",
|
|
35875
|
+
metrics = [],
|
|
35876
|
+
platforms = [],
|
|
35877
35877
|
className
|
|
35878
35878
|
}) => {
|
|
35879
35879
|
const getIcon = (p) => {
|
|
35880
|
+
if (typeof p !== "string") return null;
|
|
35880
35881
|
switch (p.toLowerCase()) {
|
|
35881
35882
|
case "instagram":
|
|
35882
35883
|
return Instagram;
|
|
@@ -35890,6 +35891,9 @@ var CreatorGridCard = ({
|
|
|
35890
35891
|
return null;
|
|
35891
35892
|
}
|
|
35892
35893
|
};
|
|
35894
|
+
const safePlatforms = Array.isArray(platforms) ? platforms : [];
|
|
35895
|
+
const safeMetrics = Array.isArray(metrics) ? metrics : [];
|
|
35896
|
+
const displayName = typeof name === "string" ? name : String(name || "");
|
|
35893
35897
|
return /* @__PURE__ */ jsxs72(
|
|
35894
35898
|
Card,
|
|
35895
35899
|
{
|
|
@@ -35903,7 +35907,7 @@ var CreatorGridCard = ({
|
|
|
35903
35907
|
"img",
|
|
35904
35908
|
{
|
|
35905
35909
|
src: bannerSrc,
|
|
35906
|
-
alt:
|
|
35910
|
+
alt: displayName,
|
|
35907
35911
|
className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"
|
|
35908
35912
|
}
|
|
35909
35913
|
) : /* @__PURE__ */ jsx113("div", { className: "h-full w-full bg-gradient-to-br from-purple-500 to-indigo-600" }),
|
|
@@ -35911,17 +35915,17 @@ var CreatorGridCard = ({
|
|
|
35911
35915
|
] }),
|
|
35912
35916
|
/* @__PURE__ */ jsxs72(CardContent, { className: "relative pt-0 px-5 pb-6", children: [
|
|
35913
35917
|
/* @__PURE__ */ jsx113("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ jsxs72(Avatar, { className: "h-20 w-20 border-4 border-[var(--card-background)] shadow-lg ring-2 ring-purple-100/20", children: [
|
|
35914
|
-
/* @__PURE__ */ jsx113(AvatarImage, { src: avatarSrc, alt:
|
|
35915
|
-
/* @__PURE__ */ jsx113(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children:
|
|
35918
|
+
/* @__PURE__ */ jsx113(AvatarImage, { src: avatarSrc, alt: displayName }),
|
|
35919
|
+
/* @__PURE__ */ jsx113(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children: displayName.charAt(0) || "?" })
|
|
35916
35920
|
] }) }),
|
|
35917
35921
|
/* @__PURE__ */ jsxs72("div", { className: "mt-12 flex flex-col gap-1", children: [
|
|
35918
|
-
/* @__PURE__ */ jsx113("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children:
|
|
35922
|
+
/* @__PURE__ */ jsx113("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children: displayName }),
|
|
35919
35923
|
/* @__PURE__ */ jsxs72("p", { className: "text-sm text-[var(--foreground)]/60 font-medium", children: [
|
|
35920
35924
|
"@",
|
|
35921
35925
|
handle
|
|
35922
35926
|
] })
|
|
35923
35927
|
] }),
|
|
35924
|
-
/* @__PURE__ */ jsx113("div", { className: "mt-4 flex gap-2", children:
|
|
35928
|
+
/* @__PURE__ */ jsx113("div", { className: "mt-4 flex gap-2", children: safePlatforms.map((p, i) => {
|
|
35925
35929
|
const Icon3 = getIcon(p);
|
|
35926
35930
|
return Icon3 ? /* @__PURE__ */ jsx113(
|
|
35927
35931
|
"div",
|
|
@@ -35929,10 +35933,10 @@ var CreatorGridCard = ({
|
|
|
35929
35933
|
className: "p-1.5 rounded-lg bg-[var(--foreground)]/5 text-[var(--foreground)]/60 hover:text-purple-500 hover:bg-purple-500/10 transition-colors",
|
|
35930
35934
|
children: /* @__PURE__ */ jsx113(Icon3, { className: "h-4 w-4" })
|
|
35931
35935
|
},
|
|
35932
|
-
p
|
|
35936
|
+
typeof p === "string" ? p : i
|
|
35933
35937
|
) : null;
|
|
35934
35938
|
}) }),
|
|
35935
|
-
/* @__PURE__ */ jsx113("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children:
|
|
35939
|
+
/* @__PURE__ */ jsx113("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children: safeMetrics.map((m, i) => /* @__PURE__ */ jsxs72("div", { className: "flex flex-col", children: [
|
|
35936
35940
|
/* @__PURE__ */ jsx113("span", { className: "text-[10px] font-bold uppercase tracking-wider text-[var(--foreground)]/40", children: m.label }),
|
|
35937
35941
|
/* @__PURE__ */ jsx113("span", { className: "text-sm font-bold text-[var(--primary-color)]", children: m.value })
|
|
35938
35942
|
] }, i)) })
|
|
@@ -37128,8 +37132,11 @@ function CreatorWidgetInner({
|
|
|
37128
37132
|
}
|
|
37129
37133
|
var CreatorWidget = memo(CreatorWidgetInner);
|
|
37130
37134
|
|
|
37131
|
-
// src/molecules/
|
|
37135
|
+
// src/molecules/workstream-builder/ToolListCard/ToolListCard.tsx
|
|
37132
37136
|
import { jsx as jsx127, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
37137
|
+
var FONT_STYLE = {
|
|
37138
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37139
|
+
};
|
|
37133
37140
|
var ICON_MAP = {
|
|
37134
37141
|
Search,
|
|
37135
37142
|
Database,
|
|
@@ -37166,6 +37173,17 @@ var CATEGORY_FALLBACK = {
|
|
|
37166
37173
|
security: Shield,
|
|
37167
37174
|
general: Zap
|
|
37168
37175
|
};
|
|
37176
|
+
var CATEGORY_HEADER_BG = {
|
|
37177
|
+
search: "bg-blue-500/[0.04]",
|
|
37178
|
+
data: "bg-emerald-500/[0.04]",
|
|
37179
|
+
knowledge: "bg-purple-500/[0.04]",
|
|
37180
|
+
web: "bg-cyan-500/[0.04]",
|
|
37181
|
+
content: "bg-pink-500/[0.04]",
|
|
37182
|
+
ui: "bg-violet-500/[0.04]",
|
|
37183
|
+
analytics: "bg-orange-500/[0.04]",
|
|
37184
|
+
integration: "bg-amber-500/[0.04]",
|
|
37185
|
+
general: "bg-[var(--foreground)]/[0.02]"
|
|
37186
|
+
};
|
|
37169
37187
|
function resolveIcon(tool) {
|
|
37170
37188
|
if (tool.icon && ICON_MAP[tool.icon]) return ICON_MAP[tool.icon];
|
|
37171
37189
|
if (tool.category && CATEGORY_FALLBACK[tool.category.toLowerCase()])
|
|
@@ -37193,6 +37211,7 @@ var ToolListCard = ({
|
|
|
37193
37211
|
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
37194
37212
|
className
|
|
37195
37213
|
),
|
|
37214
|
+
style: FONT_STYLE,
|
|
37196
37215
|
children: [
|
|
37197
37216
|
/* @__PURE__ */ jsxs85("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
|
|
37198
37217
|
/* @__PURE__ */ jsx127("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx127(Wrench, { className: "w-3.5 h-3.5 text-interactive" }) }),
|
|
@@ -37201,8 +37220,9 @@ var ToolListCard = ({
|
|
|
37201
37220
|
] }),
|
|
37202
37221
|
/* @__PURE__ */ jsx127("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
|
|
37203
37222
|
const CatIcon = resolveCategoryIcon(cat);
|
|
37223
|
+
const headerBg = CATEGORY_HEADER_BG[cat.toLowerCase()] || CATEGORY_HEADER_BG.general;
|
|
37204
37224
|
return /* @__PURE__ */ jsxs85("div", { className: "px-4 py-3", children: [
|
|
37205
|
-
/* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-2 mb-2.5", children: [
|
|
37225
|
+
/* @__PURE__ */ jsxs85("div", { className: cn("flex items-center gap-2 mb-2.5 -mx-4 px-4 py-1.5", headerBg), children: [
|
|
37206
37226
|
/* @__PURE__ */ jsx127(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
|
|
37207
37227
|
/* @__PURE__ */ jsx127("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
|
|
37208
37228
|
/* @__PURE__ */ jsx127("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
|
|
@@ -37234,9 +37254,12 @@ var ToolListCard = ({
|
|
|
37234
37254
|
);
|
|
37235
37255
|
};
|
|
37236
37256
|
|
|
37237
|
-
// src/molecules/
|
|
37257
|
+
// src/molecules/workstream-builder/AgentCard/AgentCard.tsx
|
|
37238
37258
|
import { useState as useState13, useCallback as useCallback6 } from "react";
|
|
37239
37259
|
import { Fragment as Fragment6, jsx as jsx128, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
37260
|
+
var FONT_STYLE2 = {
|
|
37261
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37262
|
+
};
|
|
37240
37263
|
var AgentCard = ({
|
|
37241
37264
|
agent,
|
|
37242
37265
|
editable = true,
|
|
@@ -37294,6 +37317,7 @@ var AgentCard = ({
|
|
|
37294
37317
|
"flex items-center gap-3 py-1",
|
|
37295
37318
|
className
|
|
37296
37319
|
),
|
|
37320
|
+
style: FONT_STYLE2,
|
|
37297
37321
|
children: [
|
|
37298
37322
|
/* @__PURE__ */ jsxs86(Avatar, { className: "h-8 w-8 shrink-0", children: [
|
|
37299
37323
|
/* @__PURE__ */ jsx128(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
|
|
@@ -37302,14 +37326,20 @@ var AgentCard = ({
|
|
|
37302
37326
|
/* @__PURE__ */ jsxs86("div", { className: "flex-1 min-w-0", children: [
|
|
37303
37327
|
/* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-2", children: [
|
|
37304
37328
|
/* @__PURE__ */ jsx128("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
|
|
37305
|
-
/* @__PURE__ */
|
|
37329
|
+
/* @__PURE__ */ jsxs86(
|
|
37306
37330
|
"span",
|
|
37307
37331
|
{
|
|
37308
37332
|
className: cn(
|
|
37309
|
-
"text-[10px] px-1.5 py-0.5 rounded-full font-medium",
|
|
37333
|
+
"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full font-medium",
|
|
37310
37334
|
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37311
37335
|
),
|
|
37312
|
-
children:
|
|
37336
|
+
children: [
|
|
37337
|
+
/* @__PURE__ */ jsx128("span", { className: cn(
|
|
37338
|
+
"w-1.5 h-1.5 rounded-full",
|
|
37339
|
+
agent.enabled ? "bg-emerald-500" : "bg-red-500"
|
|
37340
|
+
) }),
|
|
37341
|
+
agent.enabled ? "Active" : "Disabled"
|
|
37342
|
+
]
|
|
37313
37343
|
}
|
|
37314
37344
|
)
|
|
37315
37345
|
] }),
|
|
@@ -37326,8 +37356,9 @@ var AgentCard = ({
|
|
|
37326
37356
|
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
|
|
37327
37357
|
className
|
|
37328
37358
|
),
|
|
37359
|
+
style: FONT_STYLE2,
|
|
37329
37360
|
children: [
|
|
37330
|
-
/* @__PURE__ */ jsxs86("div", { className: "flex items-start gap-4 px-5 py-4", children: [
|
|
37361
|
+
/* @__PURE__ */ jsxs86("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
|
|
37331
37362
|
/* @__PURE__ */ jsxs86(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
|
|
37332
37363
|
/* @__PURE__ */ jsx128(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
|
|
37333
37364
|
/* @__PURE__ */ jsx128(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
|
|
@@ -37346,14 +37377,20 @@ var AgentCard = ({
|
|
|
37346
37377
|
}
|
|
37347
37378
|
) : /* @__PURE__ */ jsx128("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
|
|
37348
37379
|
/* @__PURE__ */ jsx128("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: agent.name }),
|
|
37349
|
-
/* @__PURE__ */
|
|
37380
|
+
/* @__PURE__ */ jsxs86(
|
|
37350
37381
|
"span",
|
|
37351
37382
|
{
|
|
37352
37383
|
className: cn(
|
|
37353
|
-
"text-[10px] px-
|
|
37384
|
+
"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
|
|
37354
37385
|
agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37355
37386
|
),
|
|
37356
|
-
children:
|
|
37387
|
+
children: [
|
|
37388
|
+
/* @__PURE__ */ jsx128("span", { className: cn(
|
|
37389
|
+
"w-1.5 h-1.5 rounded-full",
|
|
37390
|
+
agent.enabled ? "bg-emerald-500" : "bg-red-500"
|
|
37391
|
+
) }),
|
|
37392
|
+
agent.enabled ? "Active" : "Disabled"
|
|
37393
|
+
]
|
|
37357
37394
|
}
|
|
37358
37395
|
)
|
|
37359
37396
|
] }),
|
|
@@ -37436,8 +37473,11 @@ var AgentCard = ({
|
|
|
37436
37473
|
);
|
|
37437
37474
|
};
|
|
37438
37475
|
|
|
37439
|
-
// src/molecules/
|
|
37476
|
+
// src/molecules/workstream-builder/AgentDataTable/AgentDataTable.tsx
|
|
37440
37477
|
import { jsx as jsx129, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
37478
|
+
var FONT_STYLE3 = {
|
|
37479
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37480
|
+
};
|
|
37441
37481
|
var AgentDataTable = ({
|
|
37442
37482
|
headers,
|
|
37443
37483
|
rows,
|
|
@@ -37449,19 +37489,14 @@ var AgentDataTable = ({
|
|
|
37449
37489
|
"span",
|
|
37450
37490
|
{
|
|
37451
37491
|
className: cn(
|
|
37452
|
-
"inline-flex items-center gap-1 text-[11px] font-medium px-2 py-0.5 rounded-full",
|
|
37492
|
+
"inline-flex items-center gap-1.5 text-[11px] font-medium px-2 py-0.5 rounded-full",
|
|
37453
37493
|
value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37454
37494
|
),
|
|
37455
37495
|
children: [
|
|
37456
|
-
/* @__PURE__ */ jsx129(
|
|
37457
|
-
"
|
|
37458
|
-
{
|
|
37459
|
-
|
|
37460
|
-
"w-1.5 h-1.5 rounded-full",
|
|
37461
|
-
value ? "bg-emerald-500" : "bg-red-500"
|
|
37462
|
-
)
|
|
37463
|
-
}
|
|
37464
|
-
),
|
|
37496
|
+
value ? /* @__PURE__ */ jsx129("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx129("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxs87("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
37497
|
+
/* @__PURE__ */ jsx129("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
37498
|
+
/* @__PURE__ */ jsx129("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
37499
|
+
] }),
|
|
37465
37500
|
value ? "Yes" : "No"
|
|
37466
37501
|
]
|
|
37467
37502
|
}
|
|
@@ -37476,6 +37511,7 @@ var AgentDataTable = ({
|
|
|
37476
37511
|
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
|
|
37477
37512
|
className
|
|
37478
37513
|
),
|
|
37514
|
+
style: FONT_STYLE3,
|
|
37479
37515
|
children: /* @__PURE__ */ jsx129("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs87("table", { className: "w-full text-xs", children: [
|
|
37480
37516
|
/* @__PURE__ */ jsx129("thead", { children: /* @__PURE__ */ jsx129("tr", { className: "border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: headers.map((header) => /* @__PURE__ */ jsx129(
|
|
37481
37517
|
"th",
|
|
@@ -37488,7 +37524,10 @@ var AgentDataTable = ({
|
|
|
37488
37524
|
/* @__PURE__ */ jsx129("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ jsx129(
|
|
37489
37525
|
"tr",
|
|
37490
37526
|
{
|
|
37491
|
-
className:
|
|
37527
|
+
className: cn(
|
|
37528
|
+
"border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.03] transition-colors",
|
|
37529
|
+
rowIdx % 2 === 1 && "bg-[var(--foreground)]/[0.015]"
|
|
37530
|
+
),
|
|
37492
37531
|
children: row.map((cell, cellIdx) => /* @__PURE__ */ jsx129(
|
|
37493
37532
|
"td",
|
|
37494
37533
|
{
|
|
@@ -37505,9 +37544,12 @@ var AgentDataTable = ({
|
|
|
37505
37544
|
);
|
|
37506
37545
|
};
|
|
37507
37546
|
|
|
37508
|
-
// src/molecules/
|
|
37547
|
+
// src/molecules/workstream-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
|
|
37509
37548
|
import { useState as useState14 } from "react";
|
|
37510
37549
|
import { jsx as jsx130, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
37550
|
+
var FONT_STYLE4 = {
|
|
37551
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37552
|
+
};
|
|
37511
37553
|
var WorkflowVisualizer = ({
|
|
37512
37554
|
steps,
|
|
37513
37555
|
className
|
|
@@ -37522,6 +37564,7 @@ var WorkflowVisualizer = ({
|
|
|
37522
37564
|
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
37523
37565
|
className
|
|
37524
37566
|
),
|
|
37567
|
+
style: FONT_STYLE4,
|
|
37525
37568
|
children: [
|
|
37526
37569
|
/* @__PURE__ */ jsxs88("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
|
|
37527
37570
|
/* @__PURE__ */ jsx130("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx130(
|
|
@@ -37557,8 +37600,8 @@ var WorkflowVisualizer = ({
|
|
|
37557
37600
|
"div",
|
|
37558
37601
|
{
|
|
37559
37602
|
className: cn(
|
|
37560
|
-
"flex-1 mb-3 rounded-lg border border-[var(--border-color)] transition-
|
|
37561
|
-
isExpanded ? "bg-[var(--foreground)]/[0.02]" : "hover:bg-[var(--foreground)]/[0.02]"
|
|
37603
|
+
"flex-1 mb-3 rounded-lg border border-[var(--border-color)] transition-all",
|
|
37604
|
+
isExpanded ? "bg-[var(--foreground)]/[0.02] shadow-sm" : "hover:bg-[var(--foreground)]/[0.02] hover:shadow-sm hover:-translate-y-0.5"
|
|
37562
37605
|
),
|
|
37563
37606
|
children: [
|
|
37564
37607
|
/* @__PURE__ */ jsxs88(
|
|
@@ -37611,8 +37654,8 @@ var WorkflowVisualizer = ({
|
|
|
37611
37654
|
tool
|
|
37612
37655
|
))
|
|
37613
37656
|
] }),
|
|
37614
|
-
step.on_failure && /* @__PURE__ */ jsxs88("div", { className: "flex items-start gap-2 text-xs bg-[#ef4444]/[0.06] border border-[#ef4444]/10 rounded-md px-2.5 py-2 whitespace-normal", children: [
|
|
37615
|
-
/* @__PURE__ */ jsx130("span", { className: "shrink-0 text-[10px] font-semibold text-[#ef4444]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
|
|
37657
|
+
step.on_failure && /* @__PURE__ */ jsxs88("div", { className: "flex items-start gap-2 text-xs bg-[var(--redBackground,_#ef4444)]/[0.06] border border-[var(--redText,_#ef4444)]/10 rounded-md px-2.5 py-2 whitespace-normal", children: [
|
|
37658
|
+
/* @__PURE__ */ jsx130("span", { className: "shrink-0 text-[10px] font-semibold text-[var(--redText,_#ef4444)]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
|
|
37616
37659
|
/* @__PURE__ */ jsx130("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
|
|
37617
37660
|
] })
|
|
37618
37661
|
] })
|
|
@@ -37626,9 +37669,12 @@ var WorkflowVisualizer = ({
|
|
|
37626
37669
|
);
|
|
37627
37670
|
};
|
|
37628
37671
|
|
|
37629
|
-
// src/molecules/
|
|
37630
|
-
import { useState as useState15 } from "react";
|
|
37672
|
+
// src/molecules/workstream-builder/InstructionPreview/InstructionPreview.tsx
|
|
37673
|
+
import { useState as useState15, useCallback as useCallback7 } from "react";
|
|
37631
37674
|
import { jsx as jsx131, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
37675
|
+
var FONT_STYLE5 = {
|
|
37676
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37677
|
+
};
|
|
37632
37678
|
var InstructionPreview = ({
|
|
37633
37679
|
agent_name,
|
|
37634
37680
|
description,
|
|
@@ -37638,9 +37684,28 @@ var InstructionPreview = ({
|
|
|
37638
37684
|
className
|
|
37639
37685
|
}) => {
|
|
37640
37686
|
const [isExpanded, setIsExpanded] = useState15(false);
|
|
37687
|
+
const [copied, setCopied] = useState15(false);
|
|
37641
37688
|
const previewLength = 300;
|
|
37642
37689
|
const isLong = instruction.length > previewLength;
|
|
37643
37690
|
const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
|
|
37691
|
+
const handleCopy = useCallback7(async () => {
|
|
37692
|
+
try {
|
|
37693
|
+
await navigator.clipboard.writeText(instruction);
|
|
37694
|
+
setCopied(true);
|
|
37695
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
37696
|
+
} catch {
|
|
37697
|
+
const textarea = document.createElement("textarea");
|
|
37698
|
+
textarea.value = instruction;
|
|
37699
|
+
textarea.style.position = "fixed";
|
|
37700
|
+
textarea.style.opacity = "0";
|
|
37701
|
+
document.body.appendChild(textarea);
|
|
37702
|
+
textarea.select();
|
|
37703
|
+
document.execCommand("copy");
|
|
37704
|
+
document.body.removeChild(textarea);
|
|
37705
|
+
setCopied(true);
|
|
37706
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
37707
|
+
}
|
|
37708
|
+
}, [instruction]);
|
|
37644
37709
|
return /* @__PURE__ */ jsxs89(
|
|
37645
37710
|
"div",
|
|
37646
37711
|
{
|
|
@@ -37648,6 +37713,7 @@ var InstructionPreview = ({
|
|
|
37648
37713
|
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
37649
37714
|
className
|
|
37650
37715
|
),
|
|
37716
|
+
style: FONT_STYLE5,
|
|
37651
37717
|
children: [
|
|
37652
37718
|
/* @__PURE__ */ jsx131("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-2.5", children: [
|
|
37653
37719
|
/* @__PURE__ */ jsx131("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsxs89(
|
|
@@ -37678,14 +37744,39 @@ var InstructionPreview = ({
|
|
|
37678
37744
|
] }) }),
|
|
37679
37745
|
/* @__PURE__ */ jsxs89("div", { className: "px-4 py-3 space-y-3", children: [
|
|
37680
37746
|
/* @__PURE__ */ jsxs89("div", { children: [
|
|
37681
|
-
/* @__PURE__ */
|
|
37747
|
+
/* @__PURE__ */ jsxs89("div", { className: "flex items-center justify-between mb-1.5", children: [
|
|
37748
|
+
/* @__PURE__ */ jsx131("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider", children: "Instruction" }),
|
|
37749
|
+
/* @__PURE__ */ jsx131(
|
|
37750
|
+
"button",
|
|
37751
|
+
{
|
|
37752
|
+
onClick: handleCopy,
|
|
37753
|
+
className: "text-[10px] px-2 py-0.5 rounded-md text-interactive hover:bg-interactive/10 transition-colors font-medium",
|
|
37754
|
+
children: copied ? "Copied!" : "Copy"
|
|
37755
|
+
}
|
|
37756
|
+
)
|
|
37757
|
+
] }),
|
|
37682
37758
|
/* @__PURE__ */ jsx131("div", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-pre-wrap font-mono bg-[var(--foreground)]/[0.02] border border-[var(--border-color)] rounded-lg p-3", children: displayText }),
|
|
37683
|
-
isLong && /* @__PURE__ */
|
|
37759
|
+
isLong && /* @__PURE__ */ jsxs89(
|
|
37684
37760
|
"button",
|
|
37685
37761
|
{
|
|
37686
37762
|
onClick: () => setIsExpanded(!isExpanded),
|
|
37687
|
-
className: "text-[11px] text-interactive hover:underline mt-1",
|
|
37688
|
-
children:
|
|
37763
|
+
className: "inline-flex items-center gap-1 text-[11px] text-interactive hover:underline mt-1",
|
|
37764
|
+
children: [
|
|
37765
|
+
/* @__PURE__ */ jsx131(
|
|
37766
|
+
"svg",
|
|
37767
|
+
{
|
|
37768
|
+
width: "12",
|
|
37769
|
+
height: "12",
|
|
37770
|
+
viewBox: "0 0 24 24",
|
|
37771
|
+
fill: "none",
|
|
37772
|
+
stroke: "currentColor",
|
|
37773
|
+
strokeWidth: "2",
|
|
37774
|
+
className: cn("transition-transform", isExpanded && "rotate-180"),
|
|
37775
|
+
children: /* @__PURE__ */ jsx131("polyline", { points: "6 9 12 15 18 9" })
|
|
37776
|
+
}
|
|
37777
|
+
),
|
|
37778
|
+
isExpanded ? "Show less" : "Show full instruction"
|
|
37779
|
+
]
|
|
37689
37780
|
}
|
|
37690
37781
|
)
|
|
37691
37782
|
] }),
|
|
@@ -37713,9 +37804,12 @@ var InstructionPreview = ({
|
|
|
37713
37804
|
);
|
|
37714
37805
|
};
|
|
37715
37806
|
|
|
37716
|
-
// src/molecules/
|
|
37807
|
+
// src/molecules/workstream-builder/UIComponentSelector/UIComponentSelector.tsx
|
|
37717
37808
|
import { useState as useState16 } from "react";
|
|
37718
37809
|
import { jsx as jsx132, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
37810
|
+
var FONT_STYLE6 = {
|
|
37811
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37812
|
+
};
|
|
37719
37813
|
function UIComponentSelector({
|
|
37720
37814
|
components,
|
|
37721
37815
|
onSelect,
|
|
@@ -37723,7 +37817,10 @@ function UIComponentSelector({
|
|
|
37723
37817
|
className,
|
|
37724
37818
|
isLatestMessage = true
|
|
37725
37819
|
}) {
|
|
37726
|
-
const [selected, setSelected] = useState16(
|
|
37820
|
+
const [selected, setSelected] = useState16(() => {
|
|
37821
|
+
const recommended = components.filter((c) => c.recommended).map((c) => c.name);
|
|
37822
|
+
return new Set(recommended);
|
|
37823
|
+
});
|
|
37727
37824
|
const [submitted, setSubmitted] = useState16(false);
|
|
37728
37825
|
const grouped = components.reduce(
|
|
37729
37826
|
(acc, comp) => {
|
|
@@ -37752,26 +37849,52 @@ function UIComponentSelector({
|
|
|
37752
37849
|
"div",
|
|
37753
37850
|
{
|
|
37754
37851
|
className: cn(
|
|
37755
|
-
"rounded-xl border border-border bg-card overflow-hidden",
|
|
37852
|
+
"rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
|
|
37756
37853
|
className
|
|
37757
37854
|
),
|
|
37855
|
+
style: FONT_STYLE6,
|
|
37758
37856
|
children: [
|
|
37759
|
-
/* @__PURE__ */ jsxs90("div", { className: "px-4 py-3 border-b border-border bg-
|
|
37760
|
-
/* @__PURE__ */ jsx132("h3", { className: "text-sm font-semibold text-foreground", children: "Select UI Components" }),
|
|
37761
|
-
/* @__PURE__ */ jsx132("p", { className: "text-xs text-
|
|
37857
|
+
/* @__PURE__ */ jsxs90("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
|
|
37858
|
+
/* @__PURE__ */ jsx132("h3", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Select UI Components" }),
|
|
37859
|
+
/* @__PURE__ */ jsx132("p", { className: "text-xs text-[var(--foreground)]/50 mt-0.5", children: "Choose which visual components this agent can use in its responses." })
|
|
37762
37860
|
] }),
|
|
37763
37861
|
/* @__PURE__ */ jsx132("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ jsxs90("div", { children: [
|
|
37764
|
-
/* @__PURE__ */ jsx132("h4", { className: "text-xs font-medium text-
|
|
37862
|
+
/* @__PURE__ */ jsx132("h4", { className: "text-xs font-medium text-[var(--foreground)]/50 uppercase tracking-wider mb-2", children: category }),
|
|
37765
37863
|
/* @__PURE__ */ jsx132("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ jsxs90(
|
|
37766
37864
|
"label",
|
|
37767
37865
|
{
|
|
37768
37866
|
className: cn(
|
|
37769
37867
|
"flex items-start gap-3 px-3 py-2 rounded-lg cursor-pointer transition-colors",
|
|
37770
|
-
submitted || !isLatestMessage ? "cursor-default opacity-70" : "hover:bg-
|
|
37868
|
+
submitted || !isLatestMessage ? "cursor-default opacity-70" : "hover:bg-[var(--foreground)]/[0.03]",
|
|
37771
37869
|
selected.has(comp.name) && !submitted && "bg-interactive/5 border border-interactive/20",
|
|
37772
37870
|
selected.has(comp.name) && submitted && "bg-interactive/5"
|
|
37773
37871
|
),
|
|
37774
37872
|
children: [
|
|
37873
|
+
/* @__PURE__ */ jsx132(
|
|
37874
|
+
"div",
|
|
37875
|
+
{
|
|
37876
|
+
className: cn(
|
|
37877
|
+
"mt-0.5 w-4 h-4 rounded border flex items-center justify-center shrink-0 transition-colors",
|
|
37878
|
+
selected.has(comp.name) ? "bg-interactive border-interactive" : "border-[var(--foreground)]/20"
|
|
37879
|
+
),
|
|
37880
|
+
onClick: (e) => {
|
|
37881
|
+
e.preventDefault();
|
|
37882
|
+
toggle(comp.name);
|
|
37883
|
+
},
|
|
37884
|
+
children: selected.has(comp.name) && /* @__PURE__ */ jsx132(
|
|
37885
|
+
"svg",
|
|
37886
|
+
{
|
|
37887
|
+
width: "10",
|
|
37888
|
+
height: "10",
|
|
37889
|
+
viewBox: "0 0 24 24",
|
|
37890
|
+
fill: "none",
|
|
37891
|
+
stroke: "white",
|
|
37892
|
+
strokeWidth: "3",
|
|
37893
|
+
children: /* @__PURE__ */ jsx132("polyline", { points: "20 6 9 17 4 12" })
|
|
37894
|
+
}
|
|
37895
|
+
)
|
|
37896
|
+
}
|
|
37897
|
+
),
|
|
37775
37898
|
/* @__PURE__ */ jsx132(
|
|
37776
37899
|
"input",
|
|
37777
37900
|
{
|
|
@@ -37779,12 +37902,13 @@ function UIComponentSelector({
|
|
|
37779
37902
|
checked: selected.has(comp.name),
|
|
37780
37903
|
onChange: () => toggle(comp.name),
|
|
37781
37904
|
disabled: submitted || !isLatestMessage,
|
|
37782
|
-
className: "
|
|
37905
|
+
className: "sr-only"
|
|
37783
37906
|
}
|
|
37784
37907
|
),
|
|
37785
37908
|
/* @__PURE__ */ jsxs90("div", { className: "flex-1 min-w-0", children: [
|
|
37786
37909
|
/* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-1", children: [
|
|
37787
|
-
/* @__PURE__ */ jsx132("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
|
|
37910
|
+
/* @__PURE__ */ jsx132("span", { className: "text-sm font-medium text-[var(--foreground)]", children: comp.display_name }),
|
|
37911
|
+
comp.recommended && /* @__PURE__ */ jsx132("span", { className: "px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20", children: "Recommended" }),
|
|
37788
37912
|
onPreview && /* @__PURE__ */ jsx132(
|
|
37789
37913
|
"button",
|
|
37790
37914
|
{
|
|
@@ -37794,7 +37918,7 @@ function UIComponentSelector({
|
|
|
37794
37918
|
e.stopPropagation();
|
|
37795
37919
|
onPreview(comp.name);
|
|
37796
37920
|
},
|
|
37797
|
-
className: "shrink-0 p-0.5 rounded hover:bg-
|
|
37921
|
+
className: "shrink-0 p-0.5 rounded hover:bg-[var(--foreground)]/10 transition-colors",
|
|
37798
37922
|
title: `Preview ${comp.display_name}`,
|
|
37799
37923
|
children: /* @__PURE__ */ jsxs90(
|
|
37800
37924
|
"svg",
|
|
@@ -37807,7 +37931,7 @@ function UIComponentSelector({
|
|
|
37807
37931
|
strokeWidth: "2",
|
|
37808
37932
|
strokeLinecap: "round",
|
|
37809
37933
|
strokeLinejoin: "round",
|
|
37810
|
-
className: "text-
|
|
37934
|
+
className: "text-[var(--foreground)]/40 hover:text-interactive",
|
|
37811
37935
|
children: [
|
|
37812
37936
|
/* @__PURE__ */ jsx132("circle", { cx: "12", cy: "12", r: "10" }),
|
|
37813
37937
|
/* @__PURE__ */ jsx132("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
@@ -37818,15 +37942,15 @@ function UIComponentSelector({
|
|
|
37818
37942
|
}
|
|
37819
37943
|
)
|
|
37820
37944
|
] }),
|
|
37821
|
-
/* @__PURE__ */ jsx132("span", { className: "ml-0 text-xs text-
|
|
37945
|
+
/* @__PURE__ */ jsx132("span", { className: "ml-0 text-xs text-[var(--foreground)]/50", children: comp.description })
|
|
37822
37946
|
] })
|
|
37823
37947
|
]
|
|
37824
37948
|
},
|
|
37825
37949
|
comp.name
|
|
37826
37950
|
)) })
|
|
37827
37951
|
] }, category)) }),
|
|
37828
|
-
!submitted && isLatestMessage && /* @__PURE__ */ jsxs90("div", { className: "px-4 py-3 border-t border-border flex items-center justify-between", children: [
|
|
37829
|
-
/* @__PURE__ */ jsxs90("span", { className: "text-xs text-
|
|
37952
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsxs90("div", { className: "px-4 py-3 border-t border-[var(--border-color)] flex items-center justify-between", children: [
|
|
37953
|
+
/* @__PURE__ */ jsxs90("span", { className: "text-xs text-[var(--foreground)]/50", children: [
|
|
37830
37954
|
selected.size,
|
|
37831
37955
|
" selected"
|
|
37832
37956
|
] }),
|
|
@@ -37844,8 +37968,11 @@ function UIComponentSelector({
|
|
|
37844
37968
|
);
|
|
37845
37969
|
}
|
|
37846
37970
|
|
|
37847
|
-
// src/molecules/
|
|
37971
|
+
// src/molecules/workstream-builder/MultiAgentCard/MultiAgentCard.tsx
|
|
37848
37972
|
import { jsx as jsx133, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
37973
|
+
var FONT_STYLE7 = {
|
|
37974
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37975
|
+
};
|
|
37849
37976
|
var MultiAgentCard = ({
|
|
37850
37977
|
name,
|
|
37851
37978
|
display_name,
|
|
@@ -37862,22 +37989,29 @@ var MultiAgentCard = ({
|
|
|
37862
37989
|
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
37863
37990
|
className
|
|
37864
37991
|
),
|
|
37992
|
+
style: FONT_STYLE7,
|
|
37865
37993
|
children: [
|
|
37866
|
-
/* @__PURE__ */ jsxs91("div", { className: "flex items-start gap-4 px-5 py-4", children: [
|
|
37994
|
+
/* @__PURE__ */ jsxs91("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
|
|
37867
37995
|
/* @__PURE__ */ jsx133("div", { className: "h-12 w-12 shrink-0 rounded-full border-2 border-interactive/20 overflow-hidden bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx133("img", { src: avatarUrl, alt: display_name, className: "h-full w-full" }) }),
|
|
37868
37996
|
/* @__PURE__ */ jsxs91("div", { className: "flex-1 min-w-0", children: [
|
|
37869
37997
|
/* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-2", children: [
|
|
37870
37998
|
/* @__PURE__ */ jsx133("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
|
|
37871
37999
|
/* @__PURE__ */ jsx133("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: name }),
|
|
37872
|
-
/* @__PURE__ */ jsx133("span", { className: "text-[10px] px-
|
|
37873
|
-
/* @__PURE__ */
|
|
38000
|
+
/* @__PURE__ */ jsx133("span", { className: "text-[10px] px-2 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
|
|
38001
|
+
/* @__PURE__ */ jsxs91(
|
|
37874
38002
|
"span",
|
|
37875
38003
|
{
|
|
37876
38004
|
className: cn(
|
|
37877
|
-
"text-[10px] px-
|
|
38005
|
+
"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
|
|
37878
38006
|
enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37879
38007
|
),
|
|
37880
|
-
children:
|
|
38008
|
+
children: [
|
|
38009
|
+
/* @__PURE__ */ jsx133("span", { className: cn(
|
|
38010
|
+
"w-1.5 h-1.5 rounded-full",
|
|
38011
|
+
enabled ? "bg-emerald-500" : "bg-red-500"
|
|
38012
|
+
) }),
|
|
38013
|
+
enabled ? "Active" : "Disabled"
|
|
38014
|
+
]
|
|
37881
38015
|
}
|
|
37882
38016
|
)
|
|
37883
38017
|
] }),
|
|
@@ -37902,12 +38036,12 @@ var MultiAgentCard = ({
|
|
|
37902
38036
|
children: idx + 1
|
|
37903
38037
|
}
|
|
37904
38038
|
),
|
|
37905
|
-
idx < stages.length - 1 && /* @__PURE__ */ jsx133("div", { className: "w-px flex-1
|
|
38039
|
+
idx < stages.length - 1 && /* @__PURE__ */ jsx133("div", { className: "w-px flex-1 min-h-[16px] border-l border-dashed border-interactive/30" })
|
|
37906
38040
|
] }),
|
|
37907
38041
|
/* @__PURE__ */ jsxs91("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
|
|
37908
38042
|
/* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-2", children: [
|
|
37909
38043
|
/* @__PURE__ */ jsx133("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
|
|
37910
|
-
/* @__PURE__ */ jsx133("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30", children: stage.agent_name })
|
|
38044
|
+
/* @__PURE__ */ jsx133("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30 bg-[var(--foreground)]/[0.04] px-1.5 py-0.5 rounded", children: stage.agent_name })
|
|
37911
38045
|
] }),
|
|
37912
38046
|
/* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
|
|
37913
38047
|
stage.tools && stage.tools.length > 0 && /* @__PURE__ */ jsxs91("span", { children: [
|
|
@@ -37929,8 +38063,11 @@ var MultiAgentCard = ({
|
|
|
37929
38063
|
);
|
|
37930
38064
|
};
|
|
37931
38065
|
|
|
37932
|
-
// src/molecules/
|
|
38066
|
+
// src/molecules/workstream-builder/MultiAgentPlan/MultiAgentPlan.tsx
|
|
37933
38067
|
import { jsx as jsx134, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
38068
|
+
var FONT_STYLE8 = {
|
|
38069
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
38070
|
+
};
|
|
37934
38071
|
var MultiAgentPlan = ({
|
|
37935
38072
|
stages = [],
|
|
37936
38073
|
className
|
|
@@ -37942,8 +38079,9 @@ var MultiAgentPlan = ({
|
|
|
37942
38079
|
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
37943
38080
|
className
|
|
37944
38081
|
),
|
|
38082
|
+
style: FONT_STYLE8,
|
|
37945
38083
|
children: [
|
|
37946
|
-
/* @__PURE__ */ jsx134("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: /* @__PURE__ */ jsxs92("div", { className: "flex items-center gap-2", children: [
|
|
38084
|
+
/* @__PURE__ */ jsx134("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: /* @__PURE__ */ jsxs92("div", { className: "flex items-center gap-2", children: [
|
|
37947
38085
|
/* @__PURE__ */ jsx134("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ jsx134(
|
|
37948
38086
|
"svg",
|
|
37949
38087
|
{
|
|
@@ -37963,7 +38101,7 @@ var MultiAgentPlan = ({
|
|
|
37963
38101
|
/* @__PURE__ */ jsx134("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsx134("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ jsxs92("div", { className: "flex items-stretch min-w-0", children: [
|
|
37964
38102
|
/* @__PURE__ */ jsxs92("div", { className: "flex flex-col items-center mr-3 w-6", children: [
|
|
37965
38103
|
/* @__PURE__ */ jsx134("div", { className: "w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold shrink-0 bg-interactive/10 text-interactive border border-interactive/30", children: idx + 1 }),
|
|
37966
|
-
idx < stages.length - 1 && /* @__PURE__ */ jsx134("div", { className: "w-px flex-1
|
|
38104
|
+
idx < stages.length - 1 && /* @__PURE__ */ jsx134("div", { className: "w-px flex-1 min-h-[12px] border-l border-dashed border-interactive/30" })
|
|
37967
38105
|
] }),
|
|
37968
38106
|
/* @__PURE__ */ jsxs92("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
|
|
37969
38107
|
/* @__PURE__ */ jsx134("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
|
|
@@ -37990,9 +38128,12 @@ var MultiAgentPlan = ({
|
|
|
37990
38128
|
);
|
|
37991
38129
|
};
|
|
37992
38130
|
|
|
37993
|
-
// src/molecules/
|
|
37994
|
-
import { useState as useState17, useCallback as
|
|
38131
|
+
// src/molecules/workstream-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
|
|
38132
|
+
import { useState as useState17, useCallback as useCallback8 } from "react";
|
|
37995
38133
|
import { jsx as jsx135, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
38134
|
+
var FONT_STYLE9 = {
|
|
38135
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
38136
|
+
};
|
|
37996
38137
|
var MultiAgentUISelector = ({
|
|
37997
38138
|
stages = [],
|
|
37998
38139
|
components = [],
|
|
@@ -38005,8 +38146,10 @@ var MultiAgentUISelector = ({
|
|
|
38005
38146
|
const [selections, setSelections] = useState17(
|
|
38006
38147
|
() => {
|
|
38007
38148
|
const init = {};
|
|
38149
|
+
const recommendedNames = components.filter((c) => c.recommended).map((c) => c.name);
|
|
38008
38150
|
for (const stage of stages) {
|
|
38009
|
-
|
|
38151
|
+
const stageRecs = stage.recommended_components?.length ? stage.recommended_components : recommendedNames;
|
|
38152
|
+
init[stage.id] = new Set(stageRecs);
|
|
38010
38153
|
}
|
|
38011
38154
|
return init;
|
|
38012
38155
|
}
|
|
@@ -38018,7 +38161,7 @@ var MultiAgentUISelector = ({
|
|
|
38018
38161
|
acc[cat].push(comp);
|
|
38019
38162
|
return acc;
|
|
38020
38163
|
}, {});
|
|
38021
|
-
const toggleComponent =
|
|
38164
|
+
const toggleComponent = useCallback8(
|
|
38022
38165
|
(stageId, compName) => {
|
|
38023
38166
|
if (submitted || !isLatestMessage) return;
|
|
38024
38167
|
setSelections((prev) => {
|
|
@@ -38035,7 +38178,29 @@ var MultiAgentUISelector = ({
|
|
|
38035
38178
|
},
|
|
38036
38179
|
[submitted]
|
|
38037
38180
|
);
|
|
38038
|
-
const
|
|
38181
|
+
const selectAll = useCallback8(
|
|
38182
|
+
(stageId) => {
|
|
38183
|
+
if (submitted || !isLatestMessage) return;
|
|
38184
|
+
setSelections((prev) => {
|
|
38185
|
+
const updated = { ...prev };
|
|
38186
|
+
updated[stageId] = new Set(components.map((c) => c.name));
|
|
38187
|
+
return updated;
|
|
38188
|
+
});
|
|
38189
|
+
},
|
|
38190
|
+
[submitted, isLatestMessage, components]
|
|
38191
|
+
);
|
|
38192
|
+
const clearAll = useCallback8(
|
|
38193
|
+
(stageId) => {
|
|
38194
|
+
if (submitted || !isLatestMessage) return;
|
|
38195
|
+
setSelections((prev) => {
|
|
38196
|
+
const updated = { ...prev };
|
|
38197
|
+
updated[stageId] = /* @__PURE__ */ new Set();
|
|
38198
|
+
return updated;
|
|
38199
|
+
});
|
|
38200
|
+
},
|
|
38201
|
+
[submitted, isLatestMessage]
|
|
38202
|
+
);
|
|
38203
|
+
const handleContinue = useCallback8(() => {
|
|
38039
38204
|
setSubmitted(true);
|
|
38040
38205
|
if (onSelect) {
|
|
38041
38206
|
const result = {};
|
|
@@ -38053,6 +38218,7 @@ var MultiAgentUISelector = ({
|
|
|
38053
38218
|
"text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden shadow-sm",
|
|
38054
38219
|
className
|
|
38055
38220
|
),
|
|
38221
|
+
style: FONT_STYLE9,
|
|
38056
38222
|
children: [
|
|
38057
38223
|
/* @__PURE__ */ jsx135("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: /* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-2", children: [
|
|
38058
38224
|
/* @__PURE__ */ jsx135("div", { className: "w-4 h-4 rounded bg-interactive/20 flex items-center justify-center", children: /* @__PURE__ */ jsxs93(
|
|
@@ -38075,25 +38241,46 @@ var MultiAgentUISelector = ({
|
|
|
38075
38241
|
) }),
|
|
38076
38242
|
/* @__PURE__ */ jsx135("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "UI Components per Stage" })
|
|
38077
38243
|
] }) }),
|
|
38078
|
-
/* @__PURE__ */ jsx135("div", { className: "flex border-b border-[var(--border-color)] px-4", children: stages.map((stage) => /* @__PURE__ */ jsx135(
|
|
38244
|
+
/* @__PURE__ */ jsx135("div", { className: "flex gap-1 border-b border-[var(--border-color)] px-4 py-2 bg-[var(--foreground)]/[0.01]", children: stages.map((stage) => /* @__PURE__ */ jsx135(
|
|
38079
38245
|
"button",
|
|
38080
38246
|
{
|
|
38081
38247
|
onClick: () => setActiveStageId(stage.id),
|
|
38082
38248
|
className: cn(
|
|
38083
|
-
"px-3 py-
|
|
38084
|
-
activeStageId === stage.id ? "
|
|
38249
|
+
"px-3 py-1.5 text-[11px] font-medium rounded-full transition-colors",
|
|
38250
|
+
activeStageId === stage.id ? "bg-interactive text-white" : "text-[var(--foreground)]/50 hover:text-[var(--foreground)] hover:bg-[var(--foreground)]/[0.05]"
|
|
38085
38251
|
),
|
|
38086
38252
|
children: stage.name
|
|
38087
38253
|
},
|
|
38088
38254
|
stage.id
|
|
38089
38255
|
)) }),
|
|
38090
38256
|
/* @__PURE__ */ jsxs93("div", { className: "px-4 py-3", children: [
|
|
38091
|
-
activeStage && /* @__PURE__ */ jsxs93("
|
|
38092
|
-
"
|
|
38093
|
-
|
|
38094
|
-
|
|
38095
|
-
|
|
38096
|
-
|
|
38257
|
+
activeStage && /* @__PURE__ */ jsxs93("div", { className: "flex items-center justify-between mb-3", children: [
|
|
38258
|
+
/* @__PURE__ */ jsxs93("p", { className: "text-[10px] text-[var(--foreground)]/40", children: [
|
|
38259
|
+
"Select components for ",
|
|
38260
|
+
/* @__PURE__ */ jsx135("strong", { children: activeStage.name }),
|
|
38261
|
+
" (",
|
|
38262
|
+
activeStage.agent_name,
|
|
38263
|
+
")"
|
|
38264
|
+
] }),
|
|
38265
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-2", children: [
|
|
38266
|
+
/* @__PURE__ */ jsx135(
|
|
38267
|
+
"button",
|
|
38268
|
+
{
|
|
38269
|
+
onClick: () => selectAll(activeStageId),
|
|
38270
|
+
className: "text-[10px] text-interactive hover:underline font-medium",
|
|
38271
|
+
children: "Select All"
|
|
38272
|
+
}
|
|
38273
|
+
),
|
|
38274
|
+
/* @__PURE__ */ jsx135("span", { className: "text-[var(--foreground)]/20", children: "|" }),
|
|
38275
|
+
/* @__PURE__ */ jsx135(
|
|
38276
|
+
"button",
|
|
38277
|
+
{
|
|
38278
|
+
onClick: () => clearAll(activeStageId),
|
|
38279
|
+
className: "text-[10px] text-[var(--foreground)]/40 hover:text-[var(--foreground)]/60 font-medium",
|
|
38280
|
+
children: "Clear"
|
|
38281
|
+
}
|
|
38282
|
+
)
|
|
38283
|
+
] })
|
|
38097
38284
|
] }),
|
|
38098
38285
|
Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ jsxs93("div", { className: "mb-3", children: [
|
|
38099
38286
|
/* @__PURE__ */ jsx135("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-1.5", children: category }),
|
|
@@ -38140,6 +38327,7 @@ var MultiAgentUISelector = ({
|
|
|
38140
38327
|
}
|
|
38141
38328
|
),
|
|
38142
38329
|
/* @__PURE__ */ jsx135("span", { className: "font-medium text-[var(--foreground)]", children: comp.display_name }),
|
|
38330
|
+
comp.recommended && /* @__PURE__ */ jsx135("span", { className: "px-1 py-px text-[8px] font-semibold uppercase tracking-wider rounded-full bg-emerald-500/10 text-emerald-600 border border-emerald-500/20 leading-tight", children: "Rec" }),
|
|
38143
38331
|
onPreview && /* @__PURE__ */ jsx135(
|
|
38144
38332
|
"button",
|
|
38145
38333
|
{
|
|
@@ -38194,8 +38382,11 @@ var MultiAgentUISelector = ({
|
|
|
38194
38382
|
);
|
|
38195
38383
|
};
|
|
38196
38384
|
|
|
38197
|
-
// src/molecules/
|
|
38385
|
+
// src/molecules/workstream-builder/StageIndicator/StageIndicator.tsx
|
|
38198
38386
|
import { jsx as jsx136, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
38387
|
+
var FONT_STYLE10 = {
|
|
38388
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
38389
|
+
};
|
|
38199
38390
|
var StageIndicator = ({
|
|
38200
38391
|
stage_name,
|
|
38201
38392
|
agent_name,
|
|
@@ -38208,6 +38399,7 @@ var StageIndicator = ({
|
|
|
38208
38399
|
"flex items-center gap-3 my-4",
|
|
38209
38400
|
className
|
|
38210
38401
|
),
|
|
38402
|
+
style: { ...FONT_STYLE10, animation: "fadeIn 0.3s ease-out" },
|
|
38211
38403
|
children: [
|
|
38212
38404
|
/* @__PURE__ */ jsx136("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
|
|
38213
38405
|
/* @__PURE__ */ jsxs94("div", { className: "flex items-center gap-1.5 px-3 py-1 rounded-full bg-violet-500/10 border border-violet-500/20", children: [
|
|
@@ -40053,7 +40245,7 @@ var normalizeProps = (props) => {
|
|
|
40053
40245
|
normalized[key] = value;
|
|
40054
40246
|
return;
|
|
40055
40247
|
}
|
|
40056
|
-
if (
|
|
40248
|
+
if (key === "type" || key === "component") {
|
|
40057
40249
|
return;
|
|
40058
40250
|
}
|
|
40059
40251
|
if (value === "true") {
|