pxengine 0.1.42 → 0.1.44
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.cjs +291 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +295 -107
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +1270 -1260
- package/package.json +1 -1
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
|
] }),
|
|
@@ -37367,7 +37404,7 @@ var AgentCard = ({
|
|
|
37367
37404
|
rows: 2,
|
|
37368
37405
|
placeholder: "Describe this agent..."
|
|
37369
37406
|
}
|
|
37370
|
-
) : /* @__PURE__ */ jsx128("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed", children: agent.description }) }),
|
|
37407
|
+
) : /* @__PURE__ */ jsx128("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-normal", children: agent.description }) }),
|
|
37371
37408
|
isEditing && /* @__PURE__ */ jsxs86("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
37372
37409
|
/* @__PURE__ */ jsx128("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
|
|
37373
37410
|
/* @__PURE__ */ jsx128(
|
|
@@ -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,14 +37544,19 @@ 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
|
|
37514
37556
|
}) => {
|
|
37515
|
-
const [expandedStep, setExpandedStep] = useState14(
|
|
37557
|
+
const [expandedStep, setExpandedStep] = useState14(
|
|
37558
|
+
steps[0]?.id || null
|
|
37559
|
+
);
|
|
37516
37560
|
return /* @__PURE__ */ jsxs88(
|
|
37517
37561
|
"div",
|
|
37518
37562
|
{
|
|
@@ -37520,6 +37564,7 @@ var WorkflowVisualizer = ({
|
|
|
37520
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",
|
|
37521
37565
|
className
|
|
37522
37566
|
),
|
|
37567
|
+
style: FONT_STYLE4,
|
|
37523
37568
|
children: [
|
|
37524
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: [
|
|
37525
37570
|
/* @__PURE__ */ jsx130("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx130(
|
|
@@ -37555,23 +37600,17 @@ var WorkflowVisualizer = ({
|
|
|
37555
37600
|
"div",
|
|
37556
37601
|
{
|
|
37557
37602
|
className: cn(
|
|
37558
|
-
"flex-1 mb-3 rounded-lg border border-[var(--border-color)] transition-
|
|
37559
|
-
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"
|
|
37560
37605
|
),
|
|
37561
37606
|
children: [
|
|
37562
37607
|
/* @__PURE__ */ jsxs88(
|
|
37563
37608
|
"button",
|
|
37564
37609
|
{
|
|
37565
37610
|
onClick: () => setExpandedStep(isExpanded ? null : step.id),
|
|
37566
|
-
className: "w-full text-left px-3 py-2.5 flex items-center gap-2",
|
|
37611
|
+
className: "w-full text-left px-3 py-2.5 flex items-center gap-2 whitespace-normal",
|
|
37567
37612
|
children: [
|
|
37568
|
-
/* @__PURE__ */
|
|
37569
|
-
/* @__PURE__ */ jsx130("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }),
|
|
37570
|
-
step.description && !isExpanded && /* @__PURE__ */ jsxs88("span", { className: "text-xs text-[var(--foreground)]/40 ml-2", children: [
|
|
37571
|
-
"\u2014 ",
|
|
37572
|
-
step.description
|
|
37573
|
-
] })
|
|
37574
|
-
] }),
|
|
37613
|
+
/* @__PURE__ */ jsx130("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx130("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }) }),
|
|
37575
37614
|
/* @__PURE__ */ jsx130(
|
|
37576
37615
|
"svg",
|
|
37577
37616
|
{
|
|
@@ -37592,7 +37631,7 @@ var WorkflowVisualizer = ({
|
|
|
37592
37631
|
}
|
|
37593
37632
|
),
|
|
37594
37633
|
isExpanded && /* @__PURE__ */ jsxs88("div", { className: "px-3 pb-3 space-y-2.5", children: [
|
|
37595
|
-
step.description && /* @__PURE__ */ jsx130("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed", children: step.description }),
|
|
37634
|
+
step.description && /* @__PURE__ */ jsx130("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed whitespace-normal", children: step.description }),
|
|
37596
37635
|
step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ jsx130("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ jsxs88(
|
|
37597
37636
|
"div",
|
|
37598
37637
|
{
|
|
@@ -37615,8 +37654,8 @@ var WorkflowVisualizer = ({
|
|
|
37615
37654
|
tool
|
|
37616
37655
|
))
|
|
37617
37656
|
] }),
|
|
37618
|
-
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", children: [
|
|
37619
|
-
/* @__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:" }),
|
|
37620
37659
|
/* @__PURE__ */ jsx130("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
|
|
37621
37660
|
] })
|
|
37622
37661
|
] })
|
|
@@ -37630,9 +37669,12 @@ var WorkflowVisualizer = ({
|
|
|
37630
37669
|
);
|
|
37631
37670
|
};
|
|
37632
37671
|
|
|
37633
|
-
// src/molecules/
|
|
37634
|
-
import { useState as useState15 } from "react";
|
|
37672
|
+
// src/molecules/workstream-builder/InstructionPreview/InstructionPreview.tsx
|
|
37673
|
+
import { useState as useState15, useCallback as useCallback7 } from "react";
|
|
37635
37674
|
import { jsx as jsx131, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
37675
|
+
var FONT_STYLE5 = {
|
|
37676
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37677
|
+
};
|
|
37636
37678
|
var InstructionPreview = ({
|
|
37637
37679
|
agent_name,
|
|
37638
37680
|
description,
|
|
@@ -37642,9 +37684,28 @@ var InstructionPreview = ({
|
|
|
37642
37684
|
className
|
|
37643
37685
|
}) => {
|
|
37644
37686
|
const [isExpanded, setIsExpanded] = useState15(false);
|
|
37687
|
+
const [copied, setCopied] = useState15(false);
|
|
37645
37688
|
const previewLength = 300;
|
|
37646
37689
|
const isLong = instruction.length > previewLength;
|
|
37647
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]);
|
|
37648
37709
|
return /* @__PURE__ */ jsxs89(
|
|
37649
37710
|
"div",
|
|
37650
37711
|
{
|
|
@@ -37652,6 +37713,7 @@ var InstructionPreview = ({
|
|
|
37652
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",
|
|
37653
37714
|
className
|
|
37654
37715
|
),
|
|
37716
|
+
style: FONT_STYLE5,
|
|
37655
37717
|
children: [
|
|
37656
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: [
|
|
37657
37719
|
/* @__PURE__ */ jsx131("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsxs89(
|
|
@@ -37677,19 +37739,44 @@ var InstructionPreview = ({
|
|
|
37677
37739
|
) }),
|
|
37678
37740
|
/* @__PURE__ */ jsxs89("div", { className: "flex-1 min-w-0", children: [
|
|
37679
37741
|
/* @__PURE__ */ jsx131("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
|
|
37680
|
-
description && /* @__PURE__ */ jsx131("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5", children: description })
|
|
37742
|
+
description && /* @__PURE__ */ jsx131("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5 whitespace-normal", children: description })
|
|
37681
37743
|
] })
|
|
37682
37744
|
] }) }),
|
|
37683
37745
|
/* @__PURE__ */ jsxs89("div", { className: "px-4 py-3 space-y-3", children: [
|
|
37684
37746
|
/* @__PURE__ */ jsxs89("div", { children: [
|
|
37685
|
-
/* @__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
|
+
] }),
|
|
37686
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 }),
|
|
37687
|
-
isLong && /* @__PURE__ */
|
|
37759
|
+
isLong && /* @__PURE__ */ jsxs89(
|
|
37688
37760
|
"button",
|
|
37689
37761
|
{
|
|
37690
37762
|
onClick: () => setIsExpanded(!isExpanded),
|
|
37691
|
-
className: "text-[11px] text-interactive hover:underline mt-1",
|
|
37692
|
-
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
|
+
]
|
|
37693
37780
|
}
|
|
37694
37781
|
)
|
|
37695
37782
|
] }),
|
|
@@ -37717,16 +37804,23 @@ var InstructionPreview = ({
|
|
|
37717
37804
|
);
|
|
37718
37805
|
};
|
|
37719
37806
|
|
|
37720
|
-
// src/molecules/
|
|
37807
|
+
// src/molecules/workstream-builder/UIComponentSelector/UIComponentSelector.tsx
|
|
37721
37808
|
import { useState as useState16 } from "react";
|
|
37722
37809
|
import { jsx as jsx132, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
37810
|
+
var FONT_STYLE6 = {
|
|
37811
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37812
|
+
};
|
|
37723
37813
|
function UIComponentSelector({
|
|
37724
37814
|
components,
|
|
37725
37815
|
onSelect,
|
|
37726
37816
|
onPreview,
|
|
37727
|
-
className
|
|
37817
|
+
className,
|
|
37818
|
+
isLatestMessage = true
|
|
37728
37819
|
}) {
|
|
37729
|
-
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
|
+
});
|
|
37730
37824
|
const [submitted, setSubmitted] = useState16(false);
|
|
37731
37825
|
const grouped = components.reduce(
|
|
37732
37826
|
(acc, comp) => {
|
|
@@ -37738,7 +37832,7 @@ function UIComponentSelector({
|
|
|
37738
37832
|
{}
|
|
37739
37833
|
);
|
|
37740
37834
|
const toggle = (name) => {
|
|
37741
|
-
if (submitted) return;
|
|
37835
|
+
if (submitted || !isLatestMessage) return;
|
|
37742
37836
|
setSelected((prev) => {
|
|
37743
37837
|
const next = new Set(prev);
|
|
37744
37838
|
if (next.has(name)) next.delete(name);
|
|
@@ -37755,39 +37849,66 @@ function UIComponentSelector({
|
|
|
37755
37849
|
"div",
|
|
37756
37850
|
{
|
|
37757
37851
|
className: cn(
|
|
37758
|
-
"rounded-xl border border-border bg-card overflow-hidden",
|
|
37852
|
+
"rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
|
|
37759
37853
|
className
|
|
37760
37854
|
),
|
|
37855
|
+
style: FONT_STYLE6,
|
|
37761
37856
|
children: [
|
|
37762
|
-
/* @__PURE__ */ jsxs90("div", { className: "px-4 py-3 border-b border-border bg-
|
|
37763
|
-
/* @__PURE__ */ jsx132("h3", { className: "text-sm font-semibold text-foreground", children: "Select UI Components" }),
|
|
37764
|
-
/* @__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." })
|
|
37765
37860
|
] }),
|
|
37766
37861
|
/* @__PURE__ */ jsx132("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ jsxs90("div", { children: [
|
|
37767
|
-
/* @__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 }),
|
|
37768
37863
|
/* @__PURE__ */ jsx132("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ jsxs90(
|
|
37769
37864
|
"label",
|
|
37770
37865
|
{
|
|
37771
37866
|
className: cn(
|
|
37772
37867
|
"flex items-start gap-3 px-3 py-2 rounded-lg cursor-pointer transition-colors",
|
|
37773
|
-
submitted ? "cursor-default opacity-70" : "hover:bg-
|
|
37868
|
+
submitted || !isLatestMessage ? "cursor-default opacity-70" : "hover:bg-[var(--foreground)]/[0.03]",
|
|
37774
37869
|
selected.has(comp.name) && !submitted && "bg-interactive/5 border border-interactive/20",
|
|
37775
37870
|
selected.has(comp.name) && submitted && "bg-interactive/5"
|
|
37776
37871
|
),
|
|
37777
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
|
+
),
|
|
37778
37898
|
/* @__PURE__ */ jsx132(
|
|
37779
37899
|
"input",
|
|
37780
37900
|
{
|
|
37781
37901
|
type: "checkbox",
|
|
37782
37902
|
checked: selected.has(comp.name),
|
|
37783
37903
|
onChange: () => toggle(comp.name),
|
|
37784
|
-
disabled: submitted,
|
|
37785
|
-
className: "
|
|
37904
|
+
disabled: submitted || !isLatestMessage,
|
|
37905
|
+
className: "sr-only"
|
|
37786
37906
|
}
|
|
37787
37907
|
),
|
|
37788
37908
|
/* @__PURE__ */ jsxs90("div", { className: "flex-1 min-w-0", children: [
|
|
37789
37909
|
/* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-1", children: [
|
|
37790
|
-
/* @__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" }),
|
|
37791
37912
|
onPreview && /* @__PURE__ */ jsx132(
|
|
37792
37913
|
"button",
|
|
37793
37914
|
{
|
|
@@ -37797,7 +37918,7 @@ function UIComponentSelector({
|
|
|
37797
37918
|
e.stopPropagation();
|
|
37798
37919
|
onPreview(comp.name);
|
|
37799
37920
|
},
|
|
37800
|
-
className: "shrink-0 p-0.5 rounded hover:bg-
|
|
37921
|
+
className: "shrink-0 p-0.5 rounded hover:bg-[var(--foreground)]/10 transition-colors",
|
|
37801
37922
|
title: `Preview ${comp.display_name}`,
|
|
37802
37923
|
children: /* @__PURE__ */ jsxs90(
|
|
37803
37924
|
"svg",
|
|
@@ -37810,7 +37931,7 @@ function UIComponentSelector({
|
|
|
37810
37931
|
strokeWidth: "2",
|
|
37811
37932
|
strokeLinecap: "round",
|
|
37812
37933
|
strokeLinejoin: "round",
|
|
37813
|
-
className: "text-
|
|
37934
|
+
className: "text-[var(--foreground)]/40 hover:text-interactive",
|
|
37814
37935
|
children: [
|
|
37815
37936
|
/* @__PURE__ */ jsx132("circle", { cx: "12", cy: "12", r: "10" }),
|
|
37816
37937
|
/* @__PURE__ */ jsx132("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
@@ -37821,15 +37942,15 @@ function UIComponentSelector({
|
|
|
37821
37942
|
}
|
|
37822
37943
|
)
|
|
37823
37944
|
] }),
|
|
37824
|
-
/* @__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 })
|
|
37825
37946
|
] })
|
|
37826
37947
|
]
|
|
37827
37948
|
},
|
|
37828
37949
|
comp.name
|
|
37829
37950
|
)) })
|
|
37830
37951
|
] }, category)) }),
|
|
37831
|
-
!submitted && /* @__PURE__ */ jsxs90("div", { className: "px-4 py-3 border-t border-border flex items-center justify-between", children: [
|
|
37832
|
-
/* @__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: [
|
|
37833
37954
|
selected.size,
|
|
37834
37955
|
" selected"
|
|
37835
37956
|
] }),
|
|
@@ -37847,8 +37968,11 @@ function UIComponentSelector({
|
|
|
37847
37968
|
);
|
|
37848
37969
|
}
|
|
37849
37970
|
|
|
37850
|
-
// src/molecules/
|
|
37971
|
+
// src/molecules/workstream-builder/MultiAgentCard/MultiAgentCard.tsx
|
|
37851
37972
|
import { jsx as jsx133, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
37973
|
+
var FONT_STYLE7 = {
|
|
37974
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
37975
|
+
};
|
|
37852
37976
|
var MultiAgentCard = ({
|
|
37853
37977
|
name,
|
|
37854
37978
|
display_name,
|
|
@@ -37865,22 +37989,29 @@ var MultiAgentCard = ({
|
|
|
37865
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",
|
|
37866
37990
|
className
|
|
37867
37991
|
),
|
|
37992
|
+
style: FONT_STYLE7,
|
|
37868
37993
|
children: [
|
|
37869
|
-
/* @__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: [
|
|
37870
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" }) }),
|
|
37871
37996
|
/* @__PURE__ */ jsxs91("div", { className: "flex-1 min-w-0", children: [
|
|
37872
37997
|
/* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-2", children: [
|
|
37873
37998
|
/* @__PURE__ */ jsx133("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
|
|
37874
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 }),
|
|
37875
|
-
/* @__PURE__ */ jsx133("span", { className: "text-[10px] px-
|
|
37876
|
-
/* @__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(
|
|
37877
38002
|
"span",
|
|
37878
38003
|
{
|
|
37879
38004
|
className: cn(
|
|
37880
|
-
"text-[10px] px-
|
|
38005
|
+
"inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
|
|
37881
38006
|
enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
|
|
37882
38007
|
),
|
|
37883
|
-
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
|
+
]
|
|
37884
38015
|
}
|
|
37885
38016
|
)
|
|
37886
38017
|
] }),
|
|
@@ -37905,12 +38036,12 @@ var MultiAgentCard = ({
|
|
|
37905
38036
|
children: idx + 1
|
|
37906
38037
|
}
|
|
37907
38038
|
),
|
|
37908
|
-
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" })
|
|
37909
38040
|
] }),
|
|
37910
38041
|
/* @__PURE__ */ jsxs91("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
|
|
37911
38042
|
/* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-2", children: [
|
|
37912
38043
|
/* @__PURE__ */ jsx133("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
|
|
37913
|
-
/* @__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 })
|
|
37914
38045
|
] }),
|
|
37915
38046
|
/* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
|
|
37916
38047
|
stage.tools && stage.tools.length > 0 && /* @__PURE__ */ jsxs91("span", { children: [
|
|
@@ -37932,8 +38063,11 @@ var MultiAgentCard = ({
|
|
|
37932
38063
|
);
|
|
37933
38064
|
};
|
|
37934
38065
|
|
|
37935
|
-
// src/molecules/
|
|
38066
|
+
// src/molecules/workstream-builder/MultiAgentPlan/MultiAgentPlan.tsx
|
|
37936
38067
|
import { jsx as jsx134, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
38068
|
+
var FONT_STYLE8 = {
|
|
38069
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
38070
|
+
};
|
|
37937
38071
|
var MultiAgentPlan = ({
|
|
37938
38072
|
stages = [],
|
|
37939
38073
|
className
|
|
@@ -37945,8 +38079,9 @@ var MultiAgentPlan = ({
|
|
|
37945
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",
|
|
37946
38080
|
className
|
|
37947
38081
|
),
|
|
38082
|
+
style: FONT_STYLE8,
|
|
37948
38083
|
children: [
|
|
37949
|
-
/* @__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: [
|
|
37950
38085
|
/* @__PURE__ */ jsx134("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ jsx134(
|
|
37951
38086
|
"svg",
|
|
37952
38087
|
{
|
|
@@ -37966,7 +38101,7 @@ var MultiAgentPlan = ({
|
|
|
37966
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: [
|
|
37967
38102
|
/* @__PURE__ */ jsxs92("div", { className: "flex flex-col items-center mr-3 w-6", children: [
|
|
37968
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 }),
|
|
37969
|
-
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" })
|
|
37970
38105
|
] }),
|
|
37971
38106
|
/* @__PURE__ */ jsxs92("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
|
|
37972
38107
|
/* @__PURE__ */ jsx134("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
|
|
@@ -37993,22 +38128,28 @@ var MultiAgentPlan = ({
|
|
|
37993
38128
|
);
|
|
37994
38129
|
};
|
|
37995
38130
|
|
|
37996
|
-
// src/molecules/
|
|
37997
|
-
import { useState as useState17, useCallback as
|
|
38131
|
+
// src/molecules/workstream-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
|
|
38132
|
+
import { useState as useState17, useCallback as useCallback8 } from "react";
|
|
37998
38133
|
import { jsx as jsx135, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
38134
|
+
var FONT_STYLE9 = {
|
|
38135
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
38136
|
+
};
|
|
37999
38137
|
var MultiAgentUISelector = ({
|
|
38000
38138
|
stages = [],
|
|
38001
38139
|
components = [],
|
|
38002
38140
|
onSelect,
|
|
38003
38141
|
onPreview,
|
|
38004
|
-
className
|
|
38142
|
+
className,
|
|
38143
|
+
isLatestMessage = true
|
|
38005
38144
|
}) => {
|
|
38006
38145
|
const [activeStageId, setActiveStageId] = useState17(stages[0]?.id || "");
|
|
38007
38146
|
const [selections, setSelections] = useState17(
|
|
38008
38147
|
() => {
|
|
38009
38148
|
const init = {};
|
|
38149
|
+
const recommendedNames = components.filter((c) => c.recommended).map((c) => c.name);
|
|
38010
38150
|
for (const stage of stages) {
|
|
38011
|
-
|
|
38151
|
+
const stageRecs = stage.recommended_components?.length ? stage.recommended_components : recommendedNames;
|
|
38152
|
+
init[stage.id] = new Set(stageRecs);
|
|
38012
38153
|
}
|
|
38013
38154
|
return init;
|
|
38014
38155
|
}
|
|
@@ -38020,9 +38161,9 @@ var MultiAgentUISelector = ({
|
|
|
38020
38161
|
acc[cat].push(comp);
|
|
38021
38162
|
return acc;
|
|
38022
38163
|
}, {});
|
|
38023
|
-
const toggleComponent =
|
|
38164
|
+
const toggleComponent = useCallback8(
|
|
38024
38165
|
(stageId, compName) => {
|
|
38025
|
-
if (submitted) return;
|
|
38166
|
+
if (submitted || !isLatestMessage) return;
|
|
38026
38167
|
setSelections((prev) => {
|
|
38027
38168
|
const updated = { ...prev };
|
|
38028
38169
|
const set = new Set(updated[stageId] || []);
|
|
@@ -38037,7 +38178,29 @@ var MultiAgentUISelector = ({
|
|
|
38037
38178
|
},
|
|
38038
38179
|
[submitted]
|
|
38039
38180
|
);
|
|
38040
|
-
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(() => {
|
|
38041
38204
|
setSubmitted(true);
|
|
38042
38205
|
if (onSelect) {
|
|
38043
38206
|
const result = {};
|
|
@@ -38055,6 +38218,7 @@ var MultiAgentUISelector = ({
|
|
|
38055
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",
|
|
38056
38219
|
className
|
|
38057
38220
|
),
|
|
38221
|
+
style: FONT_STYLE9,
|
|
38058
38222
|
children: [
|
|
38059
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: [
|
|
38060
38224
|
/* @__PURE__ */ jsx135("div", { className: "w-4 h-4 rounded bg-interactive/20 flex items-center justify-center", children: /* @__PURE__ */ jsxs93(
|
|
@@ -38077,27 +38241,46 @@ var MultiAgentUISelector = ({
|
|
|
38077
38241
|
) }),
|
|
38078
38242
|
/* @__PURE__ */ jsx135("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "UI Components per Stage" })
|
|
38079
38243
|
] }) }),
|
|
38080
|
-
/* @__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(
|
|
38081
38245
|
"button",
|
|
38082
38246
|
{
|
|
38083
38247
|
onClick: () => setActiveStageId(stage.id),
|
|
38084
|
-
disabled: submitted,
|
|
38085
38248
|
className: cn(
|
|
38086
|
-
"px-3 py-
|
|
38087
|
-
activeStageId === stage.id ? "
|
|
38088
|
-
submitted && "opacity-60 cursor-default"
|
|
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]"
|
|
38089
38251
|
),
|
|
38090
38252
|
children: stage.name
|
|
38091
38253
|
},
|
|
38092
38254
|
stage.id
|
|
38093
38255
|
)) }),
|
|
38094
38256
|
/* @__PURE__ */ jsxs93("div", { className: "px-4 py-3", children: [
|
|
38095
|
-
activeStage && /* @__PURE__ */ jsxs93("
|
|
38096
|
-
"
|
|
38097
|
-
|
|
38098
|
-
|
|
38099
|
-
|
|
38100
|
-
|
|
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
|
+
] })
|
|
38101
38284
|
] }),
|
|
38102
38285
|
Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ jsxs93("div", { className: "mb-3", children: [
|
|
38103
38286
|
/* @__PURE__ */ jsx135("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-1.5", children: category }),
|
|
@@ -38118,7 +38301,7 @@ var MultiAgentUISelector = ({
|
|
|
38118
38301
|
className: cn(
|
|
38119
38302
|
"text-left p-2.5 rounded-lg border text-[11px] transition-all overflow-hidden cursor-pointer",
|
|
38120
38303
|
isSelected ? "border-interactive bg-interactive/5" : "border-[var(--border-color)] hover:border-interactive/50",
|
|
38121
|
-
submitted && "opacity-60 cursor-default
|
|
38304
|
+
(submitted || !isLatestMessage) && "opacity-60 cursor-default"
|
|
38122
38305
|
),
|
|
38123
38306
|
children: [
|
|
38124
38307
|
/* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-1.5", children: [
|
|
@@ -38144,6 +38327,7 @@ var MultiAgentUISelector = ({
|
|
|
38144
38327
|
}
|
|
38145
38328
|
),
|
|
38146
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" }),
|
|
38147
38331
|
onPreview && /* @__PURE__ */ jsx135(
|
|
38148
38332
|
"button",
|
|
38149
38333
|
{
|
|
@@ -38184,7 +38368,7 @@ var MultiAgentUISelector = ({
|
|
|
38184
38368
|
}) })
|
|
38185
38369
|
] }, category))
|
|
38186
38370
|
] }),
|
|
38187
|
-
!submitted && /* @__PURE__ */ jsx135("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsx135(
|
|
38371
|
+
!submitted && isLatestMessage && /* @__PURE__ */ jsx135("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsx135(
|
|
38188
38372
|
"button",
|
|
38189
38373
|
{
|
|
38190
38374
|
onClick: handleContinue,
|
|
@@ -38198,8 +38382,11 @@ var MultiAgentUISelector = ({
|
|
|
38198
38382
|
);
|
|
38199
38383
|
};
|
|
38200
38384
|
|
|
38201
|
-
// src/molecules/
|
|
38385
|
+
// src/molecules/workstream-builder/StageIndicator/StageIndicator.tsx
|
|
38202
38386
|
import { jsx as jsx136, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
38387
|
+
var FONT_STYLE10 = {
|
|
38388
|
+
fontFamily: "Inter, system-ui, sans-serif"
|
|
38389
|
+
};
|
|
38203
38390
|
var StageIndicator = ({
|
|
38204
38391
|
stage_name,
|
|
38205
38392
|
agent_name,
|
|
@@ -38212,6 +38399,7 @@ var StageIndicator = ({
|
|
|
38212
38399
|
"flex items-center gap-3 my-4",
|
|
38213
38400
|
className
|
|
38214
38401
|
),
|
|
38402
|
+
style: { ...FONT_STYLE10, animation: "fadeIn 0.3s ease-out" },
|
|
38215
38403
|
children: [
|
|
38216
38404
|
/* @__PURE__ */ jsx136("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
|
|
38217
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: [
|
|
@@ -40057,7 +40245,7 @@ var normalizeProps = (props) => {
|
|
|
40057
40245
|
normalized[key] = value;
|
|
40058
40246
|
return;
|
|
40059
40247
|
}
|
|
40060
|
-
if (
|
|
40248
|
+
if (key === "type" || key === "component") {
|
|
40061
40249
|
return;
|
|
40062
40250
|
}
|
|
40063
40251
|
if (value === "true") {
|