pxengine 0.1.43 → 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 CHANGED
@@ -36156,13 +36156,14 @@ var TikTokIcon2 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime113.j
36156
36156
  var CreatorGridCard = ({
36157
36157
  bannerSrc,
36158
36158
  avatarSrc,
36159
- name,
36160
- handle,
36161
- metrics,
36162
- platforms,
36159
+ name = "",
36160
+ handle = "",
36161
+ metrics = [],
36162
+ platforms = [],
36163
36163
  className
36164
36164
  }) => {
36165
36165
  const getIcon = (p) => {
36166
+ if (typeof p !== "string") return null;
36166
36167
  switch (p.toLowerCase()) {
36167
36168
  case "instagram":
36168
36169
  return Instagram;
@@ -36176,6 +36177,9 @@ var CreatorGridCard = ({
36176
36177
  return null;
36177
36178
  }
36178
36179
  };
36180
+ const safePlatforms = Array.isArray(platforms) ? platforms : [];
36181
+ const safeMetrics = Array.isArray(metrics) ? metrics : [];
36182
+ const displayName = typeof name === "string" ? name : String(name || "");
36179
36183
  return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
36180
36184
  Card,
36181
36185
  {
@@ -36189,7 +36193,7 @@ var CreatorGridCard = ({
36189
36193
  "img",
36190
36194
  {
36191
36195
  src: bannerSrc,
36192
- alt: name,
36196
+ alt: displayName,
36193
36197
  className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"
36194
36198
  }
36195
36199
  ) : /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "h-full w-full bg-gradient-to-br from-purple-500 to-indigo-600" }),
@@ -36197,17 +36201,17 @@ var CreatorGridCard = ({
36197
36201
  ] }),
36198
36202
  /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(CardContent, { className: "relative pt-0 px-5 pb-6", children: [
36199
36203
  /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "absolute -top-10 left-5", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(Avatar, { className: "h-20 w-20 border-4 border-[var(--card-background)] shadow-lg ring-2 ring-purple-100/20", children: [
36200
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(AvatarImage, { src: avatarSrc, alt: name }),
36201
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children: name.charAt(0) })
36204
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(AvatarImage, { src: avatarSrc, alt: displayName }),
36205
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(AvatarFallback, { className: "bg-purple-500/10 text-purple-500 font-bold text-xl", children: displayName.charAt(0) || "?" })
36202
36206
  ] }) }),
36203
36207
  /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "mt-12 flex flex-col gap-1", children: [
36204
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children: name }),
36208
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("h3", { className: "text-xl font-bold text-[var(--foreground)] truncate", children: displayName }),
36205
36209
  /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("p", { className: "text-sm text-[var(--foreground)]/60 font-medium", children: [
36206
36210
  "@",
36207
36211
  handle
36208
36212
  ] })
36209
36213
  ] }),
36210
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "mt-4 flex gap-2", children: platforms.map((p) => {
36214
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "mt-4 flex gap-2", children: safePlatforms.map((p, i) => {
36211
36215
  const Icon3 = getIcon(p);
36212
36216
  return Icon3 ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
36213
36217
  "div",
@@ -36215,10 +36219,10 @@ var CreatorGridCard = ({
36215
36219
  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",
36216
36220
  children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Icon3, { className: "h-4 w-4" })
36217
36221
  },
36218
- p
36222
+ typeof p === "string" ? p : i
36219
36223
  ) : null;
36220
36224
  }) }),
36221
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children: metrics.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex flex-col", children: [
36225
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "mt-6 grid grid-cols-2 gap-4 border-t border-[var(--border-color)] pt-4", children: safeMetrics.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex flex-col", children: [
36222
36226
  /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "text-[10px] font-bold uppercase tracking-wider text-[var(--foreground)]/40", children: m.label }),
36223
36227
  /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "text-sm font-bold text-[var(--primary-color)]", children: m.value })
36224
36228
  ] }, i)) })
@@ -37414,8 +37418,11 @@ function CreatorWidgetInner({
37414
37418
  }
37415
37419
  var CreatorWidget = (0, import_react68.memo)(CreatorWidgetInner);
37416
37420
 
37417
- // src/molecules/agent-builder/ToolListCard/ToolListCard.tsx
37421
+ // src/molecules/workstream-builder/ToolListCard/ToolListCard.tsx
37418
37422
  var import_jsx_runtime127 = require("react/jsx-runtime");
37423
+ var FONT_STYLE = {
37424
+ fontFamily: "Inter, system-ui, sans-serif"
37425
+ };
37419
37426
  var ICON_MAP = {
37420
37427
  Search,
37421
37428
  Database,
@@ -37452,6 +37459,17 @@ var CATEGORY_FALLBACK = {
37452
37459
  security: Shield,
37453
37460
  general: Zap
37454
37461
  };
37462
+ var CATEGORY_HEADER_BG = {
37463
+ search: "bg-blue-500/[0.04]",
37464
+ data: "bg-emerald-500/[0.04]",
37465
+ knowledge: "bg-purple-500/[0.04]",
37466
+ web: "bg-cyan-500/[0.04]",
37467
+ content: "bg-pink-500/[0.04]",
37468
+ ui: "bg-violet-500/[0.04]",
37469
+ analytics: "bg-orange-500/[0.04]",
37470
+ integration: "bg-amber-500/[0.04]",
37471
+ general: "bg-[var(--foreground)]/[0.02]"
37472
+ };
37455
37473
  function resolveIcon(tool) {
37456
37474
  if (tool.icon && ICON_MAP[tool.icon]) return ICON_MAP[tool.icon];
37457
37475
  if (tool.category && CATEGORY_FALLBACK[tool.category.toLowerCase()])
@@ -37479,6 +37497,7 @@ var ToolListCard = ({
37479
37497
  "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",
37480
37498
  className
37481
37499
  ),
37500
+ style: FONT_STYLE,
37482
37501
  children: [
37483
37502
  /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
37484
37503
  /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Wrench, { className: "w-3.5 h-3.5 text-interactive" }) }),
@@ -37487,8 +37506,9 @@ var ToolListCard = ({
37487
37506
  ] }),
37488
37507
  /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
37489
37508
  const CatIcon = resolveCategoryIcon(cat);
37509
+ const headerBg = CATEGORY_HEADER_BG[cat.toLowerCase()] || CATEGORY_HEADER_BG.general;
37490
37510
  return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "px-4 py-3", children: [
37491
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex items-center gap-2 mb-2.5", children: [
37511
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: cn("flex items-center gap-2 mb-2.5 -mx-4 px-4 py-1.5", headerBg), children: [
37492
37512
  /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
37493
37513
  /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
37494
37514
  /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
@@ -37520,9 +37540,12 @@ var ToolListCard = ({
37520
37540
  );
37521
37541
  };
37522
37542
 
37523
- // src/molecules/agent-builder/AgentCard/AgentCard.tsx
37543
+ // src/molecules/workstream-builder/AgentCard/AgentCard.tsx
37524
37544
  var import_react69 = require("react");
37525
37545
  var import_jsx_runtime128 = require("react/jsx-runtime");
37546
+ var FONT_STYLE2 = {
37547
+ fontFamily: "Inter, system-ui, sans-serif"
37548
+ };
37526
37549
  var AgentCard = ({
37527
37550
  agent,
37528
37551
  editable = true,
@@ -37580,6 +37603,7 @@ var AgentCard = ({
37580
37603
  "flex items-center gap-3 py-1",
37581
37604
  className
37582
37605
  ),
37606
+ style: FONT_STYLE2,
37583
37607
  children: [
37584
37608
  /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Avatar, { className: "h-8 w-8 shrink-0", children: [
37585
37609
  /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
@@ -37588,14 +37612,20 @@ var AgentCard = ({
37588
37612
  /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex-1 min-w-0", children: [
37589
37613
  /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-2", children: [
37590
37614
  /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
37591
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
37615
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
37592
37616
  "span",
37593
37617
  {
37594
37618
  className: cn(
37595
- "text-[10px] px-1.5 py-0.5 rounded-full font-medium",
37619
+ "inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full font-medium",
37596
37620
  agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
37597
37621
  ),
37598
- children: agent.enabled ? "Active" : "Disabled"
37622
+ children: [
37623
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: cn(
37624
+ "w-1.5 h-1.5 rounded-full",
37625
+ agent.enabled ? "bg-emerald-500" : "bg-red-500"
37626
+ ) }),
37627
+ agent.enabled ? "Active" : "Disabled"
37628
+ ]
37599
37629
  }
37600
37630
  )
37601
37631
  ] }),
@@ -37612,8 +37642,9 @@ var AgentCard = ({
37612
37642
  "text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
37613
37643
  className
37614
37644
  ),
37645
+ style: FONT_STYLE2,
37615
37646
  children: [
37616
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4", children: [
37647
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
37617
37648
  /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
37618
37649
  /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
37619
37650
  /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
@@ -37632,14 +37663,20 @@ var AgentCard = ({
37632
37663
  }
37633
37664
  ) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
37634
37665
  /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("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 }),
37635
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
37666
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
37636
37667
  "span",
37637
37668
  {
37638
37669
  className: cn(
37639
- "text-[10px] px-1.5 py-0.5 rounded-full font-medium",
37670
+ "inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
37640
37671
  agent.enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
37641
37672
  ),
37642
- children: agent.enabled ? "Active" : "Disabled"
37673
+ children: [
37674
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: cn(
37675
+ "w-1.5 h-1.5 rounded-full",
37676
+ agent.enabled ? "bg-emerald-500" : "bg-red-500"
37677
+ ) }),
37678
+ agent.enabled ? "Active" : "Disabled"
37679
+ ]
37643
37680
  }
37644
37681
  )
37645
37682
  ] }),
@@ -37722,8 +37759,11 @@ var AgentCard = ({
37722
37759
  );
37723
37760
  };
37724
37761
 
37725
- // src/molecules/agent-builder/AgentDataTable/AgentDataTable.tsx
37762
+ // src/molecules/workstream-builder/AgentDataTable/AgentDataTable.tsx
37726
37763
  var import_jsx_runtime129 = require("react/jsx-runtime");
37764
+ var FONT_STYLE3 = {
37765
+ fontFamily: "Inter, system-ui, sans-serif"
37766
+ };
37727
37767
  var AgentDataTable = ({
37728
37768
  headers,
37729
37769
  rows,
@@ -37735,19 +37775,14 @@ var AgentDataTable = ({
37735
37775
  "span",
37736
37776
  {
37737
37777
  className: cn(
37738
- "inline-flex items-center gap-1 text-[11px] font-medium px-2 py-0.5 rounded-full",
37778
+ "inline-flex items-center gap-1.5 text-[11px] font-medium px-2 py-0.5 rounded-full",
37739
37779
  value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
37740
37780
  ),
37741
37781
  children: [
37742
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
37743
- "span",
37744
- {
37745
- className: cn(
37746
- "w-1.5 h-1.5 rounded-full",
37747
- value ? "bg-emerald-500" : "bg-red-500"
37748
- )
37749
- }
37750
- ),
37782
+ value ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
37783
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
37784
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
37785
+ ] }),
37751
37786
  value ? "Yes" : "No"
37752
37787
  ]
37753
37788
  }
@@ -37762,6 +37797,7 @@ var AgentDataTable = ({
37762
37797
  "text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
37763
37798
  className
37764
37799
  ),
37800
+ style: FONT_STYLE3,
37765
37801
  children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("table", { className: "w-full text-xs", children: [
37766
37802
  /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tr", { className: "border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
37767
37803
  "th",
@@ -37774,7 +37810,10 @@ var AgentDataTable = ({
37774
37810
  /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
37775
37811
  "tr",
37776
37812
  {
37777
- className: "border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.02] transition-colors",
37813
+ className: cn(
37814
+ "border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.03] transition-colors",
37815
+ rowIdx % 2 === 1 && "bg-[var(--foreground)]/[0.015]"
37816
+ ),
37778
37817
  children: row.map((cell, cellIdx) => /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
37779
37818
  "td",
37780
37819
  {
@@ -37791,9 +37830,12 @@ var AgentDataTable = ({
37791
37830
  );
37792
37831
  };
37793
37832
 
37794
- // src/molecules/agent-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
37833
+ // src/molecules/workstream-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
37795
37834
  var import_react70 = require("react");
37796
37835
  var import_jsx_runtime130 = require("react/jsx-runtime");
37836
+ var FONT_STYLE4 = {
37837
+ fontFamily: "Inter, system-ui, sans-serif"
37838
+ };
37797
37839
  var WorkflowVisualizer = ({
37798
37840
  steps,
37799
37841
  className
@@ -37808,6 +37850,7 @@ var WorkflowVisualizer = ({
37808
37850
  "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",
37809
37851
  className
37810
37852
  ),
37853
+ style: FONT_STYLE4,
37811
37854
  children: [
37812
37855
  /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
37813
37856
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
@@ -37843,8 +37886,8 @@ var WorkflowVisualizer = ({
37843
37886
  "div",
37844
37887
  {
37845
37888
  className: cn(
37846
- "flex-1 mb-3 rounded-lg border border-[var(--border-color)] transition-colors",
37847
- isExpanded ? "bg-[var(--foreground)]/[0.02]" : "hover:bg-[var(--foreground)]/[0.02]"
37889
+ "flex-1 mb-3 rounded-lg border border-[var(--border-color)] transition-all",
37890
+ isExpanded ? "bg-[var(--foreground)]/[0.02] shadow-sm" : "hover:bg-[var(--foreground)]/[0.02] hover:shadow-sm hover:-translate-y-0.5"
37848
37891
  ),
37849
37892
  children: [
37850
37893
  /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
@@ -37897,8 +37940,8 @@ var WorkflowVisualizer = ({
37897
37940
  tool
37898
37941
  ))
37899
37942
  ] }),
37900
- step.on_failure && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("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: [
37901
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "shrink-0 text-[10px] font-semibold text-[#ef4444]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
37943
+ step.on_failure && /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("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: [
37944
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "shrink-0 text-[10px] font-semibold text-[var(--redText,_#ef4444)]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
37902
37945
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
37903
37946
  ] })
37904
37947
  ] })
@@ -37912,9 +37955,12 @@ var WorkflowVisualizer = ({
37912
37955
  );
37913
37956
  };
37914
37957
 
37915
- // src/molecules/agent-builder/InstructionPreview/InstructionPreview.tsx
37958
+ // src/molecules/workstream-builder/InstructionPreview/InstructionPreview.tsx
37916
37959
  var import_react71 = require("react");
37917
37960
  var import_jsx_runtime131 = require("react/jsx-runtime");
37961
+ var FONT_STYLE5 = {
37962
+ fontFamily: "Inter, system-ui, sans-serif"
37963
+ };
37918
37964
  var InstructionPreview = ({
37919
37965
  agent_name,
37920
37966
  description,
@@ -37924,9 +37970,28 @@ var InstructionPreview = ({
37924
37970
  className
37925
37971
  }) => {
37926
37972
  const [isExpanded, setIsExpanded] = (0, import_react71.useState)(false);
37973
+ const [copied, setCopied] = (0, import_react71.useState)(false);
37927
37974
  const previewLength = 300;
37928
37975
  const isLong = instruction.length > previewLength;
37929
37976
  const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
37977
+ const handleCopy = (0, import_react71.useCallback)(async () => {
37978
+ try {
37979
+ await navigator.clipboard.writeText(instruction);
37980
+ setCopied(true);
37981
+ setTimeout(() => setCopied(false), 2e3);
37982
+ } catch {
37983
+ const textarea = document.createElement("textarea");
37984
+ textarea.value = instruction;
37985
+ textarea.style.position = "fixed";
37986
+ textarea.style.opacity = "0";
37987
+ document.body.appendChild(textarea);
37988
+ textarea.select();
37989
+ document.execCommand("copy");
37990
+ document.body.removeChild(textarea);
37991
+ setCopied(true);
37992
+ setTimeout(() => setCopied(false), 2e3);
37993
+ }
37994
+ }, [instruction]);
37930
37995
  return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
37931
37996
  "div",
37932
37997
  {
@@ -37934,6 +37999,7 @@ var InstructionPreview = ({
37934
37999
  "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",
37935
38000
  className
37936
38001
  ),
38002
+ style: FONT_STYLE5,
37937
38003
  children: [
37938
38004
  /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex items-center gap-2.5", children: [
37939
38005
  /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
@@ -37964,14 +38030,39 @@ var InstructionPreview = ({
37964
38030
  ] }) }),
37965
38031
  /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "px-4 py-3 space-y-3", children: [
37966
38032
  /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { children: [
37967
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Instruction" }),
38033
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex items-center justify-between mb-1.5", children: [
38034
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider", children: "Instruction" }),
38035
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38036
+ "button",
38037
+ {
38038
+ onClick: handleCopy,
38039
+ className: "text-[10px] px-2 py-0.5 rounded-md text-interactive hover:bg-interactive/10 transition-colors font-medium",
38040
+ children: copied ? "Copied!" : "Copy"
38041
+ }
38042
+ )
38043
+ ] }),
37968
38044
  /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("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 }),
37969
- isLong && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38045
+ isLong && /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
37970
38046
  "button",
37971
38047
  {
37972
38048
  onClick: () => setIsExpanded(!isExpanded),
37973
- className: "text-[11px] text-interactive hover:underline mt-1",
37974
- children: isExpanded ? "Show less" : "Show full instruction"
38049
+ className: "inline-flex items-center gap-1 text-[11px] text-interactive hover:underline mt-1",
38050
+ children: [
38051
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
38052
+ "svg",
38053
+ {
38054
+ width: "12",
38055
+ height: "12",
38056
+ viewBox: "0 0 24 24",
38057
+ fill: "none",
38058
+ stroke: "currentColor",
38059
+ strokeWidth: "2",
38060
+ className: cn("transition-transform", isExpanded && "rotate-180"),
38061
+ children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("polyline", { points: "6 9 12 15 18 9" })
38062
+ }
38063
+ ),
38064
+ isExpanded ? "Show less" : "Show full instruction"
38065
+ ]
37975
38066
  }
37976
38067
  )
37977
38068
  ] }),
@@ -37999,9 +38090,12 @@ var InstructionPreview = ({
37999
38090
  );
38000
38091
  };
38001
38092
 
38002
- // src/molecules/agent-builder/UIComponentSelector/UIComponentSelector.tsx
38093
+ // src/molecules/workstream-builder/UIComponentSelector/UIComponentSelector.tsx
38003
38094
  var import_react72 = require("react");
38004
38095
  var import_jsx_runtime132 = require("react/jsx-runtime");
38096
+ var FONT_STYLE6 = {
38097
+ fontFamily: "Inter, system-ui, sans-serif"
38098
+ };
38005
38099
  function UIComponentSelector({
38006
38100
  components,
38007
38101
  onSelect,
@@ -38009,7 +38103,10 @@ function UIComponentSelector({
38009
38103
  className,
38010
38104
  isLatestMessage = true
38011
38105
  }) {
38012
- const [selected, setSelected] = (0, import_react72.useState)(/* @__PURE__ */ new Set());
38106
+ const [selected, setSelected] = (0, import_react72.useState)(() => {
38107
+ const recommended = components.filter((c) => c.recommended).map((c) => c.name);
38108
+ return new Set(recommended);
38109
+ });
38013
38110
  const [submitted, setSubmitted] = (0, import_react72.useState)(false);
38014
38111
  const grouped = components.reduce(
38015
38112
  (acc, comp) => {
@@ -38038,26 +38135,52 @@ function UIComponentSelector({
38038
38135
  "div",
38039
38136
  {
38040
38137
  className: cn(
38041
- "rounded-xl border border-border bg-card overflow-hidden",
38138
+ "rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
38042
38139
  className
38043
38140
  ),
38141
+ style: FONT_STYLE6,
38044
38142
  children: [
38045
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "px-4 py-3 border-b border-border bg-muted/50", children: [
38046
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h3", { className: "text-sm font-semibold text-foreground", children: "Select UI Components" }),
38047
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5", children: "Choose which visual components this agent can use in its responses." })
38143
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
38144
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h3", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Select UI Components" }),
38145
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("p", { className: "text-xs text-[var(--foreground)]/50 mt-0.5", children: "Choose which visual components this agent can use in its responses." })
38048
38146
  ] }),
38049
38147
  /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { children: [
38050
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h4", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2", children: category }),
38148
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h4", { className: "text-xs font-medium text-[var(--foreground)]/50 uppercase tracking-wider mb-2", children: category }),
38051
38149
  /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
38052
38150
  "label",
38053
38151
  {
38054
38152
  className: cn(
38055
38153
  "flex items-start gap-3 px-3 py-2 rounded-lg cursor-pointer transition-colors",
38056
- submitted || !isLatestMessage ? "cursor-default opacity-70" : "hover:bg-muted/50",
38154
+ submitted || !isLatestMessage ? "cursor-default opacity-70" : "hover:bg-[var(--foreground)]/[0.03]",
38057
38155
  selected.has(comp.name) && !submitted && "bg-interactive/5 border border-interactive/20",
38058
38156
  selected.has(comp.name) && submitted && "bg-interactive/5"
38059
38157
  ),
38060
38158
  children: [
38159
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38160
+ "div",
38161
+ {
38162
+ className: cn(
38163
+ "mt-0.5 w-4 h-4 rounded border flex items-center justify-center shrink-0 transition-colors",
38164
+ selected.has(comp.name) ? "bg-interactive border-interactive" : "border-[var(--foreground)]/20"
38165
+ ),
38166
+ onClick: (e) => {
38167
+ e.preventDefault();
38168
+ toggle(comp.name);
38169
+ },
38170
+ children: selected.has(comp.name) && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38171
+ "svg",
38172
+ {
38173
+ width: "10",
38174
+ height: "10",
38175
+ viewBox: "0 0 24 24",
38176
+ fill: "none",
38177
+ stroke: "white",
38178
+ strokeWidth: "3",
38179
+ children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("polyline", { points: "20 6 9 17 4 12" })
38180
+ }
38181
+ )
38182
+ }
38183
+ ),
38061
38184
  /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38062
38185
  "input",
38063
38186
  {
@@ -38065,12 +38188,13 @@ function UIComponentSelector({
38065
38188
  checked: selected.has(comp.name),
38066
38189
  onChange: () => toggle(comp.name),
38067
38190
  disabled: submitted || !isLatestMessage,
38068
- className: "mt-0.5 h-4 w-4 rounded border-border text-interactive focus:ring-interactive/50 disabled:opacity-50"
38191
+ className: "sr-only"
38069
38192
  }
38070
38193
  ),
38071
38194
  /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex-1 min-w-0", children: [
38072
38195
  /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-center gap-1", children: [
38073
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
38196
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-sm font-medium text-[var(--foreground)]", children: comp.display_name }),
38197
+ comp.recommended && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("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" }),
38074
38198
  onPreview && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
38075
38199
  "button",
38076
38200
  {
@@ -38080,7 +38204,7 @@ function UIComponentSelector({
38080
38204
  e.stopPropagation();
38081
38205
  onPreview(comp.name);
38082
38206
  },
38083
- className: "shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
38207
+ className: "shrink-0 p-0.5 rounded hover:bg-[var(--foreground)]/10 transition-colors",
38084
38208
  title: `Preview ${comp.display_name}`,
38085
38209
  children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
38086
38210
  "svg",
@@ -38093,7 +38217,7 @@ function UIComponentSelector({
38093
38217
  strokeWidth: "2",
38094
38218
  strokeLinecap: "round",
38095
38219
  strokeLinejoin: "round",
38096
- className: "text-muted-foreground hover:text-primary",
38220
+ className: "text-[var(--foreground)]/40 hover:text-interactive",
38097
38221
  children: [
38098
38222
  /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
38099
38223
  /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
@@ -38104,15 +38228,15 @@ function UIComponentSelector({
38104
38228
  }
38105
38229
  )
38106
38230
  ] }),
38107
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
38231
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "ml-0 text-xs text-[var(--foreground)]/50", children: comp.description })
38108
38232
  ] })
38109
38233
  ]
38110
38234
  },
38111
38235
  comp.name
38112
38236
  )) })
38113
38237
  ] }, category)) }),
38114
- !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "px-4 py-3 border-t border-border flex items-center justify-between", children: [
38115
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
38238
+ !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "px-4 py-3 border-t border-[var(--border-color)] flex items-center justify-between", children: [
38239
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("span", { className: "text-xs text-[var(--foreground)]/50", children: [
38116
38240
  selected.size,
38117
38241
  " selected"
38118
38242
  ] }),
@@ -38130,8 +38254,11 @@ function UIComponentSelector({
38130
38254
  );
38131
38255
  }
38132
38256
 
38133
- // src/molecules/agent-builder/MultiAgentCard/MultiAgentCard.tsx
38257
+ // src/molecules/workstream-builder/MultiAgentCard/MultiAgentCard.tsx
38134
38258
  var import_jsx_runtime133 = require("react/jsx-runtime");
38259
+ var FONT_STYLE7 = {
38260
+ fontFamily: "Inter, system-ui, sans-serif"
38261
+ };
38135
38262
  var MultiAgentCard = ({
38136
38263
  name,
38137
38264
  display_name,
@@ -38148,22 +38275,29 @@ var MultiAgentCard = ({
38148
38275
  "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",
38149
38276
  className
38150
38277
  ),
38278
+ style: FONT_STYLE7,
38151
38279
  children: [
38152
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4", children: [
38280
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-start gap-4 px-5 py-4 bg-gradient-to-r from-[var(--foreground)]/[0.02] to-transparent", children: [
38153
38281
  /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("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__ */ (0, import_jsx_runtime133.jsx)("img", { src: avatarUrl, alt: display_name, className: "h-full w-full" }) }),
38154
38282
  /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex-1 min-w-0", children: [
38155
38283
  /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-2", children: [
38156
38284
  /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
38157
38285
  /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: name }),
38158
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
38159
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
38286
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-[10px] px-2 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
38287
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
38160
38288
  "span",
38161
38289
  {
38162
38290
  className: cn(
38163
- "text-[10px] px-1.5 py-0.5 rounded-full font-medium",
38291
+ "inline-flex items-center gap-1 text-[10px] px-2 py-0.5 rounded-full font-medium",
38164
38292
  enabled ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
38165
38293
  ),
38166
- children: enabled ? "Active" : "Disabled"
38294
+ children: [
38295
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: cn(
38296
+ "w-1.5 h-1.5 rounded-full",
38297
+ enabled ? "bg-emerald-500" : "bg-red-500"
38298
+ ) }),
38299
+ enabled ? "Active" : "Disabled"
38300
+ ]
38167
38301
  }
38168
38302
  )
38169
38303
  ] }),
@@ -38188,12 +38322,12 @@ var MultiAgentCard = ({
38188
38322
  children: idx + 1
38189
38323
  }
38190
38324
  ),
38191
- idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "w-px flex-1 bg-interactive/20 min-h-[16px]" })
38325
+ idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "w-px flex-1 min-h-[16px] border-l border-dashed border-interactive/30" })
38192
38326
  ] }),
38193
38327
  /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
38194
38328
  /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-2", children: [
38195
38329
  /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
38196
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30", children: stage.agent_name })
38330
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("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 })
38197
38331
  ] }),
38198
38332
  /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
38199
38333
  stage.tools && stage.tools.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("span", { children: [
@@ -38215,8 +38349,11 @@ var MultiAgentCard = ({
38215
38349
  );
38216
38350
  };
38217
38351
 
38218
- // src/molecules/agent-builder/MultiAgentPlan/MultiAgentPlan.tsx
38352
+ // src/molecules/workstream-builder/MultiAgentPlan/MultiAgentPlan.tsx
38219
38353
  var import_jsx_runtime134 = require("react/jsx-runtime");
38354
+ var FONT_STYLE8 = {
38355
+ fontFamily: "Inter, system-ui, sans-serif"
38356
+ };
38220
38357
  var MultiAgentPlan = ({
38221
38358
  stages = [],
38222
38359
  className
@@ -38228,8 +38365,9 @@ var MultiAgentPlan = ({
38228
38365
  "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",
38229
38366
  className
38230
38367
  ),
38368
+ style: FONT_STYLE8,
38231
38369
  children: [
38232
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex items-center gap-2", children: [
38370
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("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__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex items-center gap-2", children: [
38233
38371
  /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
38234
38372
  "svg",
38235
38373
  {
@@ -38249,7 +38387,7 @@ var MultiAgentPlan = ({
38249
38387
  /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex items-stretch min-w-0", children: [
38250
38388
  /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex flex-col items-center mr-3 w-6", children: [
38251
38389
  /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("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 }),
38252
- idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "w-px flex-1 bg-interactive/20 min-h-[12px]" })
38390
+ idx < stages.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "w-px flex-1 min-h-[12px] border-l border-dashed border-interactive/30" })
38253
38391
  ] }),
38254
38392
  /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
38255
38393
  /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
@@ -38276,9 +38414,12 @@ var MultiAgentPlan = ({
38276
38414
  );
38277
38415
  };
38278
38416
 
38279
- // src/molecules/agent-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
38417
+ // src/molecules/workstream-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
38280
38418
  var import_react73 = require("react");
38281
38419
  var import_jsx_runtime135 = require("react/jsx-runtime");
38420
+ var FONT_STYLE9 = {
38421
+ fontFamily: "Inter, system-ui, sans-serif"
38422
+ };
38282
38423
  var MultiAgentUISelector = ({
38283
38424
  stages = [],
38284
38425
  components = [],
@@ -38291,8 +38432,10 @@ var MultiAgentUISelector = ({
38291
38432
  const [selections, setSelections] = (0, import_react73.useState)(
38292
38433
  () => {
38293
38434
  const init = {};
38435
+ const recommendedNames = components.filter((c) => c.recommended).map((c) => c.name);
38294
38436
  for (const stage of stages) {
38295
- init[stage.id] = /* @__PURE__ */ new Set();
38437
+ const stageRecs = stage.recommended_components?.length ? stage.recommended_components : recommendedNames;
38438
+ init[stage.id] = new Set(stageRecs);
38296
38439
  }
38297
38440
  return init;
38298
38441
  }
@@ -38321,6 +38464,28 @@ var MultiAgentUISelector = ({
38321
38464
  },
38322
38465
  [submitted]
38323
38466
  );
38467
+ const selectAll = (0, import_react73.useCallback)(
38468
+ (stageId) => {
38469
+ if (submitted || !isLatestMessage) return;
38470
+ setSelections((prev) => {
38471
+ const updated = { ...prev };
38472
+ updated[stageId] = new Set(components.map((c) => c.name));
38473
+ return updated;
38474
+ });
38475
+ },
38476
+ [submitted, isLatestMessage, components]
38477
+ );
38478
+ const clearAll = (0, import_react73.useCallback)(
38479
+ (stageId) => {
38480
+ if (submitted || !isLatestMessage) return;
38481
+ setSelections((prev) => {
38482
+ const updated = { ...prev };
38483
+ updated[stageId] = /* @__PURE__ */ new Set();
38484
+ return updated;
38485
+ });
38486
+ },
38487
+ [submitted, isLatestMessage]
38488
+ );
38324
38489
  const handleContinue = (0, import_react73.useCallback)(() => {
38325
38490
  setSubmitted(true);
38326
38491
  if (onSelect) {
@@ -38339,6 +38504,7 @@ var MultiAgentUISelector = ({
38339
38504
  "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",
38340
38505
  className
38341
38506
  ),
38507
+ style: FONT_STYLE9,
38342
38508
  children: [
38343
38509
  /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center gap-2", children: [
38344
38510
  /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "w-4 h-4 rounded bg-interactive/20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
@@ -38361,25 +38527,46 @@ var MultiAgentUISelector = ({
38361
38527
  ) }),
38362
38528
  /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "UI Components per Stage" })
38363
38529
  ] }) }),
38364
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "flex border-b border-[var(--border-color)] px-4", children: stages.map((stage) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
38530
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("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__ */ (0, import_jsx_runtime135.jsx)(
38365
38531
  "button",
38366
38532
  {
38367
38533
  onClick: () => setActiveStageId(stage.id),
38368
38534
  className: cn(
38369
- "px-3 py-2 text-[11px] font-medium border-b-2 -mb-px transition-colors",
38370
- activeStageId === stage.id ? "border-interactive text-interactive" : "border-transparent text-[var(--foreground)]/50 hover:text-[var(--foreground)]"
38535
+ "px-3 py-1.5 text-[11px] font-medium rounded-full transition-colors",
38536
+ activeStageId === stage.id ? "bg-interactive text-white" : "text-[var(--foreground)]/50 hover:text-[var(--foreground)] hover:bg-[var(--foreground)]/[0.05]"
38371
38537
  ),
38372
38538
  children: stage.name
38373
38539
  },
38374
38540
  stage.id
38375
38541
  )) }),
38376
38542
  /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "px-4 py-3", children: [
38377
- activeStage && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("p", { className: "text-[10px] text-[var(--foreground)]/40 mb-3", children: [
38378
- "Select components for ",
38379
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("strong", { children: activeStage.name }),
38380
- " (",
38381
- activeStage.agent_name,
38382
- ")"
38543
+ activeStage && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center justify-between mb-3", children: [
38544
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("p", { className: "text-[10px] text-[var(--foreground)]/40", children: [
38545
+ "Select components for ",
38546
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("strong", { children: activeStage.name }),
38547
+ " (",
38548
+ activeStage.agent_name,
38549
+ ")"
38550
+ ] }),
38551
+ !submitted && isLatestMessage && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center gap-2", children: [
38552
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
38553
+ "button",
38554
+ {
38555
+ onClick: () => selectAll(activeStageId),
38556
+ className: "text-[10px] text-interactive hover:underline font-medium",
38557
+ children: "Select All"
38558
+ }
38559
+ ),
38560
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "text-[var(--foreground)]/20", children: "|" }),
38561
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
38562
+ "button",
38563
+ {
38564
+ onClick: () => clearAll(activeStageId),
38565
+ className: "text-[10px] text-[var(--foreground)]/40 hover:text-[var(--foreground)]/60 font-medium",
38566
+ children: "Clear"
38567
+ }
38568
+ )
38569
+ ] })
38383
38570
  ] }),
38384
38571
  Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "mb-3", children: [
38385
38572
  /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-1.5", children: category }),
@@ -38426,6 +38613,7 @@ var MultiAgentUISelector = ({
38426
38613
  }
38427
38614
  ),
38428
38615
  /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-medium text-[var(--foreground)]", children: comp.display_name }),
38616
+ comp.recommended && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("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" }),
38429
38617
  onPreview && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
38430
38618
  "button",
38431
38619
  {
@@ -38480,8 +38668,11 @@ var MultiAgentUISelector = ({
38480
38668
  );
38481
38669
  };
38482
38670
 
38483
- // src/molecules/agent-builder/StageIndicator/StageIndicator.tsx
38671
+ // src/molecules/workstream-builder/StageIndicator/StageIndicator.tsx
38484
38672
  var import_jsx_runtime136 = require("react/jsx-runtime");
38673
+ var FONT_STYLE10 = {
38674
+ fontFamily: "Inter, system-ui, sans-serif"
38675
+ };
38485
38676
  var StageIndicator = ({
38486
38677
  stage_name,
38487
38678
  agent_name,
@@ -38494,6 +38685,7 @@ var StageIndicator = ({
38494
38685
  "flex items-center gap-3 my-4",
38495
38686
  className
38496
38687
  ),
38688
+ style: { ...FONT_STYLE10, animation: "fadeIn 0.3s ease-out" },
38497
38689
  children: [
38498
38690
  /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
38499
38691
  /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex items-center gap-1.5 px-3 py-1 rounded-full bg-violet-500/10 border border-violet-500/20", children: [
@@ -40339,7 +40531,7 @@ var normalizeProps = (props) => {
40339
40531
  normalized[key] = value;
40340
40532
  return;
40341
40533
  }
40342
- if (["type", "component", "name"].includes(key)) {
40534
+ if (key === "type" || key === "component") {
40343
40535
  return;
40344
40536
  }
40345
40537
  if (value === "true") {