pxengine 0.1.41 → 0.1.43

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.mjs CHANGED
@@ -33309,9 +33309,14 @@ __export(molecules_exports, {
33309
33309
  CountrySelectDisplay: () => CountrySelectDisplay,
33310
33310
  CountrySelectEdit: () => CountrySelectEdit,
33311
33311
  CreatorActionHeader: () => CreatorActionHeader,
33312
+ CreatorCompactView: () => CreatorCompactView,
33312
33313
  CreatorGridCard: () => CreatorGridCard,
33314
+ CreatorImageList: () => CreatorImageList,
33313
33315
  CreatorProfileSummary: () => CreatorProfileSummary,
33316
+ CreatorProgressBar: () => CreatorProgressBar,
33314
33317
  CreatorSearch: () => CreatorSearch,
33318
+ CreatorWidget: () => CreatorWidget,
33319
+ CreatorWidgetSkeleton: () => CreatorWidgetSkeleton,
33315
33320
  DataGrid: () => DataGrid,
33316
33321
  EditableField: () => EditableField,
33317
33322
  EmptyState: () => EmptyState,
@@ -33339,7 +33344,8 @@ __export(molecules_exports, {
33339
33344
  ToolListCard: () => ToolListCard,
33340
33345
  TopPostsGrid: () => TopPostsGrid,
33341
33346
  UIComponentSelector: () => UIComponentSelector,
33342
- WorkflowVisualizer: () => WorkflowVisualizer
33347
+ WorkflowVisualizer: () => WorkflowVisualizer,
33348
+ useCreatorWidgetPolling: () => useCreatorWidgetPolling
33343
33349
  });
33344
33350
 
33345
33351
  // src/molecules/generic/EditableField/EditableField.tsx
@@ -36349,7 +36355,8 @@ var CampaignConceptCard = React94.memo(
36349
36355
  ...field,
36350
36356
  label: "Budget Allocation",
36351
36357
  renderDisplay: (val) => {
36352
- if (!val) return /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground text-sm", children: "-" });
36358
+ if (!val)
36359
+ return /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground text-sm", children: "-" });
36353
36360
  if (Array.isArray(val)) {
36354
36361
  return /* @__PURE__ */ jsx121("div", { className: "space-y-2", children: val.map((item, idx) => {
36355
36362
  const label = item?.label ?? item?.key ?? `Item ${idx + 1}`;
@@ -36367,7 +36374,8 @@ var CampaignConceptCard = React94.memo(
36367
36374
  }
36368
36375
  if (typeof val === "object") {
36369
36376
  const entries = Object.entries(val);
36370
- if (entries.length === 0) return /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground text-sm", children: "-" });
36377
+ if (entries.length === 0)
36378
+ return /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground text-sm", children: "-" });
36371
36379
  return /* @__PURE__ */ jsx121("div", { className: "space-y-2", children: entries.map(([k, v], idx) => /* @__PURE__ */ jsxs80("div", { className: "flex items-center gap-2", children: [
36372
36380
  /* @__PURE__ */ jsxs80("span", { className: "text-muted-foreground font-medium", children: [
36373
36381
  idx + 1,
@@ -36414,7 +36422,8 @@ var CampaignConceptCard = React94.memo(
36414
36422
  ...field,
36415
36423
  label: "Estimated Creators",
36416
36424
  renderDisplay: (val) => {
36417
- if (!val) return /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground text-sm", children: "-" });
36425
+ if (!val)
36426
+ return /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground text-sm", children: "-" });
36418
36427
  const displayValue = typeof val === "object" && !Array.isArray(val) ? `${val.min ?? 0}-${val.max ?? 0}` : String(val);
36419
36428
  return /* @__PURE__ */ jsx121("span", { className: "text-foreground text-sm", children: displayValue });
36420
36429
  },
@@ -36479,13 +36488,7 @@ var CampaignConceptCard = React94.memo(
36479
36488
  return {
36480
36489
  ...field,
36481
36490
  renderDisplay: (v) => /* @__PURE__ */ jsx121(PlatformSelectDisplay, { value: v }),
36482
- renderEdit: (v, onChange) => /* @__PURE__ */ jsx121(
36483
- PlatformSelectEdit,
36484
- {
36485
- value: v,
36486
- onChange
36487
- }
36488
- )
36491
+ renderEdit: (v, onChange) => /* @__PURE__ */ jsx121(PlatformSelectEdit, { value: v, onChange })
36489
36492
  };
36490
36493
  }
36491
36494
  if (field.key === "description" || field.key === "creator_strategy" || field.key === "creatorStrategy") {
@@ -36499,7 +36502,8 @@ var CampaignConceptCard = React94.memo(
36499
36502
  ...field,
36500
36503
  renderDisplay: (val) => {
36501
36504
  if (Array.isArray(val)) {
36502
- if (val.length === 0) return /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground text-sm", children: "-" });
36505
+ if (val.length === 0)
36506
+ return /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground text-sm", children: "-" });
36503
36507
  return /* @__PURE__ */ jsx121("div", { className: "flex flex-wrap gap-2 pt-1", children: val.map((item, idx) => {
36504
36508
  const label = typeof item === "object" && item !== null ? item.label || item.value || item.name || JSON.stringify(item) : String(item);
36505
36509
  return /* @__PURE__ */ jsx121(
@@ -36524,7 +36528,7 @@ var CampaignConceptCard = React94.memo(
36524
36528
  "div",
36525
36529
  {
36526
36530
  className: cn(
36527
- "w-full max-w-[600px] rounded-xl border bg-background dark:bg-gray100 relative transition-all duration-300",
36531
+ "w-full rounded-xl border bg-background dark:bg-gray100 relative transition-all duration-300",
36528
36532
  isSelected || isRecommended ? "border-2 border-green500" : "border-gray400",
36529
36533
  className
36530
36534
  ),
@@ -36539,7 +36543,8 @@ var CampaignConceptCard = React94.memo(
36539
36543
  /* @__PURE__ */ jsxs80("h3", { className: "mb-1 py-1 text-txtColor font-bold text-lg", children: [
36540
36544
  "Concept ",
36541
36545
  index !== void 0 ? index : "",
36542
- " : ",
36546
+ " :",
36547
+ " ",
36543
36548
  typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle)
36544
36549
  ] }),
36545
36550
  /* @__PURE__ */ jsxs80("div", { className: "flex flex-wrap gap-2", children: [
@@ -36547,25 +36552,32 @@ var CampaignConceptCard = React94.memo(
36547
36552
  !effectiveIsLatest && selectionStatus && /* @__PURE__ */ jsx121("div", { className: "inline-flex text-[10px] font-bold uppercase tracking-widest text-[#3B82F6]", children: /* @__PURE__ */ jsx121("span", { className: "bg-[#3B82F6]/10 px-2 py-0.5 rounded border border-[#3B82F6]/20", children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" }) })
36548
36553
  ] })
36549
36554
  ] }),
36550
- /* @__PURE__ */ jsx121("div", { className: "flex items-center gap-2 ml-3", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx121(
36551
- "button",
36555
+ /* @__PURE__ */ jsx121(
36556
+ "div",
36552
36557
  {
36553
- onClick: (e) => {
36554
- e.preventDefault();
36555
- e.stopPropagation();
36556
- handleToggle();
36557
- },
36558
- className: "p-2 bg-background hover:bg-gray200 dark:hover:bg-gray200 text-foreground rounded-lg shadow-lg",
36559
- "aria-label": isOpen ? "Collapse" : "Expand",
36560
- title: isOpen ? "Collapse" : "Expand",
36558
+ className: "flex items-center gap-2 ml-3",
36559
+ onClick: (e) => e.stopPropagation(),
36561
36560
  children: /* @__PURE__ */ jsx121(
36562
- ChevronDown,
36561
+ "button",
36563
36562
  {
36564
- className: `h-4 w-4 transition-transform ${isOpen ? "rotate-0" : "-rotate-90"}`
36563
+ onClick: (e) => {
36564
+ e.preventDefault();
36565
+ e.stopPropagation();
36566
+ handleToggle();
36567
+ },
36568
+ className: "p-2 bg-background hover:bg-gray200 dark:hover:bg-gray200 text-foreground rounded-lg shadow-lg",
36569
+ "aria-label": isOpen ? "Collapse" : "Expand",
36570
+ title: isOpen ? "Collapse" : "Expand",
36571
+ children: /* @__PURE__ */ jsx121(
36572
+ ChevronDown,
36573
+ {
36574
+ className: `h-4 w-4 transition-transform ${isOpen ? "rotate-0" : "-rotate-90"}`
36575
+ }
36576
+ )
36565
36577
  }
36566
36578
  )
36567
36579
  }
36568
- ) })
36580
+ )
36569
36581
  ]
36570
36582
  }
36571
36583
  ),
@@ -36577,7 +36589,7 @@ var CampaignConceptCard = React94.memo(
36577
36589
  exit: { height: 0, opacity: 0 },
36578
36590
  transition: { duration: 0.2, ease: "easeIn" },
36579
36591
  className: "overflow-hidden",
36580
- children: /* @__PURE__ */ jsxs80("div", { className: "px-4 py-3 w-full overflow-y-auto max-h-[400px] relative", children: [
36592
+ children: /* @__PURE__ */ jsxs80("div", { className: "px-4 py-3 w-full relative", children: [
36581
36593
  /* @__PURE__ */ jsx121(
36582
36594
  "div",
36583
36595
  {
@@ -36618,8 +36630,506 @@ var CampaignConceptCard = React94.memo(
36618
36630
  );
36619
36631
  CampaignConceptCard.displayName = "CampaignConceptCard";
36620
36632
 
36633
+ // src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
36634
+ import { useCallback as useCallback5, memo } from "react";
36635
+
36636
+ // src/molecules/creator-discovery/CreatorWidget/CreatorImageList.tsx
36637
+ import { useEffect as useEffect7, useState as useState10 } from "react";
36638
+ import { Fragment as Fragment4, jsx as jsx122, jsxs as jsxs81 } from "react/jsx-runtime";
36639
+ function useMediaQuery(query) {
36640
+ const [matches, setMatches] = useState10(false);
36641
+ useEffect7(() => {
36642
+ const media = window.matchMedia(query);
36643
+ const listener = () => setMatches(media.matches);
36644
+ listener();
36645
+ media.addEventListener("change", listener);
36646
+ return () => media.removeEventListener("change", listener);
36647
+ }, [query]);
36648
+ return matches;
36649
+ }
36650
+ function CreatorImage({
36651
+ img,
36652
+ idx,
36653
+ creatorsPercentage,
36654
+ totalCreators
36655
+ }) {
36656
+ const processedCount = Math.floor(creatorsPercentage / 100 * totalCreators);
36657
+ const isProcessed = idx < processedCount;
36658
+ const isCurrentlyProcessing = idx === processedCount;
36659
+ return /* @__PURE__ */ jsxs81("div", { className: "relative w-8 h-8", children: [
36660
+ /* @__PURE__ */ jsx122(
36661
+ "img",
36662
+ {
36663
+ src: img,
36664
+ alt: `Creator ${idx + 1}`,
36665
+ className: `w-8 h-8 rounded-full border-2 ${isProcessed ? "border-green-600" : "border-foreground"} object-cover transition-all duration-300`
36666
+ }
36667
+ ),
36668
+ !isProcessed && /* @__PURE__ */ jsx122("div", { className: "absolute inset-0 bg-black/50 rounded-full pointer-events-none" }),
36669
+ isCurrentlyProcessing && /* @__PURE__ */ jsxs81(Fragment4, { children: [
36670
+ /* @__PURE__ */ jsx122(
36671
+ "div",
36672
+ {
36673
+ className: "absolute inset-0 bg-black/50 rounded-full pointer-events-none",
36674
+ style: {
36675
+ background: `conic-gradient(
36676
+ from 0deg,
36677
+ #FFFFFF80 0deg,
36678
+ #FFFFFF80 60deg,
36679
+ #000000bf 60deg,
36680
+ #000000bf 360deg
36681
+ )`,
36682
+ opacity: 0.9
36683
+ }
36684
+ }
36685
+ ),
36686
+ /* @__PURE__ */ jsx122("div", { className: "absolute inset-0 rounded-full border-2 border-[#9CA3AF]/30 pointer-events-none" })
36687
+ ] })
36688
+ ] });
36689
+ }
36690
+ function CreatorImageList({
36691
+ creatorImages = [],
36692
+ creatorLength = 0,
36693
+ isAgentOutput,
36694
+ initialCreatorsPercentage
36695
+ }) {
36696
+ const isMobile = useMediaQuery("(max-width: 640px)");
36697
+ const isTablet = useMediaQuery("(min-width: 641px) and (max-width: 1024px)");
36698
+ const visibleCount = isMobile ? 7 : isTablet ? 10 : isAgentOutput ? 6 : 15;
36699
+ return /* @__PURE__ */ jsxs81("div", { className: "flex flex-nowrap sm:flex-wrap -space-x-2 w-fit", children: [
36700
+ creatorImages.slice(0, visibleCount).map((img, idx) => /* @__PURE__ */ jsx122(
36701
+ CreatorImage,
36702
+ {
36703
+ img,
36704
+ idx,
36705
+ creatorsPercentage: initialCreatorsPercentage || 0,
36706
+ totalCreators: creatorLength
36707
+ },
36708
+ idx
36709
+ )),
36710
+ creatorLength > visibleCount && /* @__PURE__ */ jsxs81(
36711
+ "div",
36712
+ {
36713
+ className: `relative w-8 h-8 rounded-full text-white flex items-center justify-center text-sm font-medium border-2 ${initialCreatorsPercentage === 100 ? "border-green-600 bg-sliderFill" : "border-foreground bg-black/50"}`,
36714
+ children: [
36715
+ "+",
36716
+ creatorLength - visibleCount
36717
+ ]
36718
+ }
36719
+ )
36720
+ ] });
36721
+ }
36722
+
36723
+ // src/molecules/creator-discovery/CreatorWidget/CreatorProgressBar.tsx
36724
+ import { useEffect as useEffect8, useState as useState11 } from "react";
36725
+ import { motion as motion2, AnimatePresence as AnimatePresence2 } from "framer-motion";
36726
+ import { jsx as jsx123, jsxs as jsxs82 } from "react/jsx-runtime";
36727
+ function truncateName(name, maxLength) {
36728
+ if (!name || name.length <= maxLength) return name || "";
36729
+ return name.substring(0, maxLength) + "...";
36730
+ }
36731
+ function ProgressBar({ overallPercentage }) {
36732
+ const [showTooltip, setShowTooltip] = useState11(true);
36733
+ useEffect8(() => {
36734
+ if (overallPercentage && overallPercentage >= 100) {
36735
+ setShowTooltip(false);
36736
+ }
36737
+ }, [overallPercentage]);
36738
+ return /* @__PURE__ */ jsx123("div", { className: "relative w-full", children: /* @__PURE__ */ jsx123("div", { className: "md:w-full dark:bg-purple500 bg-gray-200 rounded-full h-[6px]", children: /* @__PURE__ */ jsx123(
36739
+ motion2.div,
36740
+ {
36741
+ className: "bg-purple100 h-[6px] rounded-full relative",
36742
+ initial: { width: 0 },
36743
+ animate: { width: `${overallPercentage}%` },
36744
+ transition: { duration: 0.5, ease: "easeOut" },
36745
+ children: /* @__PURE__ */ jsx123(AnimatePresence2, { children: showTooltip && /* @__PURE__ */ jsxs82(
36746
+ motion2.div,
36747
+ {
36748
+ initial: { opacity: 0, y: 5 },
36749
+ animate: { opacity: 1, y: 0 },
36750
+ exit: { opacity: 0, y: 5 },
36751
+ className: "absolute -top-10 right-[-25px] bg-gray50 text-gray900 text-lg px-1 rounded-[6px] shadow-lg whitespace-nowrap border-2 border-gray300",
36752
+ children: [
36753
+ overallPercentage ? Math.round(overallPercentage) : 0,
36754
+ "%",
36755
+ /* @__PURE__ */ jsxs82("div", { className: "absolute left-1/2 top-full -translate-x-1/2", children: [
36756
+ /* @__PURE__ */ jsx123("div", { className: "w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-transparent border-t-gray300" }),
36757
+ /* @__PURE__ */ jsx123("div", { className: "absolute left-1/2 top-[-1px] -translate-x-1/2 w-0 h-0 border-l-[5px] border-r-[5px] border-t-[5px] border-transparent border-t-gray50" })
36758
+ ] })
36759
+ ]
36760
+ }
36761
+ ) })
36762
+ }
36763
+ ) }) });
36764
+ }
36765
+ function CreatorProgressBar({
36766
+ statusDetails,
36767
+ timeRemaining: _timeRemaining
36768
+ }) {
36769
+ return /* @__PURE__ */ jsxs82("div", { children: [
36770
+ /* @__PURE__ */ jsx123(ProgressBar, { overallPercentage: statusDetails?.overall_percentage }),
36771
+ /* @__PURE__ */ jsx123("div", { className: "dark:text-gray400 text-gray-500 text-xs mt-2", children: (statusDetails?.overall_percentage ?? 0) < 100 && /* @__PURE__ */ jsx123("span", { children: statusDetails?.thinking_message ? truncateName(statusDetails.thinking_message, 200) : "Processing..." }) })
36772
+ ] });
36773
+ }
36774
+
36775
+ // src/molecules/creator-discovery/CreatorWidget/CreatorWidgetSkeleton.tsx
36776
+ import { jsx as jsx124, jsxs as jsxs83 } from "react/jsx-runtime";
36777
+ function CreatorWidgetSkeleton() {
36778
+ return /* @__PURE__ */ jsx124("div", { className: "bg-background dark:bg-gray50 rounded-[25px] border border-gray300 overflow-hidden shadow-sm w-full relative", children: /* @__PURE__ */ jsxs83("div", { className: "p-4 md:p-6 space-y-4", children: [
36779
+ /* @__PURE__ */ jsx124("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: /* @__PURE__ */ jsxs83("div", { className: "flex flex-col gap-2 md:gap-4", children: [
36780
+ /* @__PURE__ */ jsx124("div", { className: "w-40 h-6 bg-purple200 rounded-md animate-pulse" }),
36781
+ /* @__PURE__ */ jsx124("div", { className: "w-64 h-7 bg-gray200 dark:bg-gray300 rounded animate-pulse" })
36782
+ ] }) }),
36783
+ /* @__PURE__ */ jsxs83("div", { className: "bg-paperBackground rounded-lg px-3 md:px-4 py-4 md:py-5 flex flex-col md:flex-row md:items-center md:justify-between gap-4 md:gap-0", children: [
36784
+ /* @__PURE__ */ jsxs83("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
36785
+ /* @__PURE__ */ jsx124("div", { className: "flex -space-x-2", children: Array.from({ length: 10 }).map((_, idx) => /* @__PURE__ */ jsx124(
36786
+ "div",
36787
+ {
36788
+ className: "w-8 h-8 md:w-10 md:h-10 rounded-full border-2 border-gray300 bg-gray200 animate-pulse"
36789
+ },
36790
+ idx
36791
+ )) }),
36792
+ /* @__PURE__ */ jsx124("div", { className: "space-y-2", children: /* @__PURE__ */ jsx124("div", { className: "w-full max-w-xs bg-gray200 rounded-full h-2 animate-pulse" }) })
36793
+ ] }),
36794
+ /* @__PURE__ */ jsx124("div", { className: "px-6 py-2 bg-gray200 rounded-[30px] animate-pulse h-10 w-48" })
36795
+ ] })
36796
+ ] }) });
36797
+ }
36798
+
36799
+ // src/molecules/creator-discovery/CreatorWidget/CreatorCompactView.tsx
36800
+ import { Fragment as Fragment5, jsx as jsx125, jsxs as jsxs84 } from "react/jsx-runtime";
36801
+ function CreatorCompactView({
36802
+ versions,
36803
+ selectedVersion,
36804
+ creatorImages,
36805
+ creatorLength,
36806
+ isAgentOutput,
36807
+ onVersionSelect,
36808
+ onViewCreators,
36809
+ versionStatus,
36810
+ statusDetails,
36811
+ timeDisplay,
36812
+ isLoading
36813
+ }) {
36814
+ const isComplete = versionStatus === "completed" || versionStatus === "complete";
36815
+ const statusTitle = isComplete ? "Creator Search Complete" : versionStatus === "failed" ? "Creator Search Failed" : "Creator Search Processing";
36816
+ if (isLoading) {
36817
+ return /* @__PURE__ */ jsx125(CreatorWidgetSkeleton, {});
36818
+ }
36819
+ return /* @__PURE__ */ jsx125("div", { className: "bg-background dark:bg-gray100 rounded-[25px] border border-gray300 overflow-hidden shadow-sm w-full relative", children: /* @__PURE__ */ jsxs84("div", { className: "p-4 md:p-6 space-y-4", children: [
36820
+ /* @__PURE__ */ jsxs84("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 relative", children: [
36821
+ /* @__PURE__ */ jsxs84("div", { className: "flex flex-col gap-2 md:gap-4", children: [
36822
+ /* @__PURE__ */ jsx125("h4", { className: "w-fit rounded-md bg-purple200 px-2 py-[4px] text-xs font-medium text-purpleText", children: "VERIFIED CREATORS LIST" }),
36823
+ /* @__PURE__ */ jsx125("h3", { className: "text-gray900 md:text-lg font-bold", children: statusTitle })
36824
+ ] }),
36825
+ versions.length > 1 && /* @__PURE__ */ jsx125("div", { className: "relative md:self-start", children: /* @__PURE__ */ jsxs84(DropdownMenu, { children: [
36826
+ /* @__PURE__ */ jsxs84(
36827
+ DropdownMenuTrigger,
36828
+ {
36829
+ disabled: !isComplete,
36830
+ className: `flex items-center gap-2 border-2 border-gray400 px-3 md:px-4 py-1 rounded-full text-xs md:text-sm outline-none ${!isComplete ? "bg-gray100 text-gray400 cursor-not-allowed opacity-60" : "text-gray600 hover:bg-purple100/20 cursor-pointer"}`,
36831
+ children: [
36832
+ "Version ",
36833
+ selectedVersion ?? "-",
36834
+ /* @__PURE__ */ jsx125(ChevronDown, { className: "w-3 h-3 md:w-4 md:h-4 transition-transform" })
36835
+ ]
36836
+ }
36837
+ ),
36838
+ /* @__PURE__ */ jsx125(DropdownMenuContent, { className: "bg-gray25 border-2 border-gray400 min-w-[120px] max-h-[150px] overflow-y-auto", children: versions.map((v) => /* @__PURE__ */ jsxs84(
36839
+ DropdownMenuItem,
36840
+ {
36841
+ onClick: () => onVersionSelect(v),
36842
+ className: "cursor-pointer text-sm",
36843
+ children: [
36844
+ "Version ",
36845
+ v
36846
+ ]
36847
+ },
36848
+ v
36849
+ )) })
36850
+ ] }) })
36851
+ ] }),
36852
+ /* @__PURE__ */ jsx125("div", { className: "bg-paperBackground rounded-lg px-3 md:px-4 py-4 md:py-5 flex flex-col md:flex-row md:items-center md:justify-between gap-4 md:gap-0", children: versionStatus === "failed" ? /* @__PURE__ */ jsxs84("div", { className: "flex flex-col items-center justify-center w-full py-6 md:py-8 text-center text-red-500", children: [
36853
+ /* @__PURE__ */ jsx125("p", { className: "text-base md:text-lg font-semibold mb-2", children: "Creator Search Failed" }),
36854
+ /* @__PURE__ */ jsx125("p", { className: "text-xs md:text-sm text-gray600 px-2", children: "Something went wrong while fetching creators. Please try again later or regenerate a new version." })
36855
+ ] }) : /* @__PURE__ */ jsxs84(Fragment5, { children: [
36856
+ /* @__PURE__ */ jsxs84("div", { className: "flex flex-col gap-4 md:gap-6 min-w-0", children: [
36857
+ /* @__PURE__ */ jsx125(
36858
+ CreatorImageList,
36859
+ {
36860
+ creatorImages,
36861
+ creatorLength,
36862
+ isAgentOutput,
36863
+ initialCreatorsPercentage: statusDetails?.social_fetch_percentage
36864
+ }
36865
+ ),
36866
+ /* @__PURE__ */ jsx125(
36867
+ CreatorProgressBar,
36868
+ {
36869
+ statusDetails,
36870
+ timeRemaining: timeDisplay
36871
+ }
36872
+ )
36873
+ ] }),
36874
+ /* @__PURE__ */ jsxs84(
36875
+ "button",
36876
+ {
36877
+ className: `px-4 py-2 text-xs md:text-sm rounded-[30px] shadow flex items-center justify-center gap-2 w-full md:w-auto md:flex-shrink-0 whitespace-nowrap ${!isComplete ? "bg-gray300 text-gray500 border-2 border-gray300 cursor-not-allowed" : "bg-purpleLight dark:bg-purple200 text-purpleText2 dark:text-purpleText border-2 border-purple100 cursor-pointer hover:bg-purpleText1 dark:hover:bg-purple100 dark:hover:text-background"}`,
36878
+ onClick: onViewCreators,
36879
+ disabled: !isComplete,
36880
+ children: [
36881
+ "View ",
36882
+ creatorLength,
36883
+ " Verified Creators",
36884
+ /* @__PURE__ */ jsx125(Triangle, { className: "w-3 h-3 md:w-4 md:h-4 rotate-90 font-bold" })
36885
+ ]
36886
+ }
36887
+ )
36888
+ ] }) })
36889
+ ] }) });
36890
+ }
36891
+
36892
+ // src/molecules/creator-discovery/CreatorWidget/useCreatorWidgetPolling.ts
36893
+ import { useState as useState12, useEffect as useEffect9, useCallback as useCallback4, useMemo as useMemo9, useRef as useRef6 } from "react";
36894
+ var DEFAULT_POLLING_CONFIG = {
36895
+ pollInterval: 5e3,
36896
+ maxDuration: 15 * 60 * 1e3,
36897
+ maxErrors: 10,
36898
+ secondsPerCreator: 13
36899
+ };
36900
+ function useCreatorWidgetPolling({
36901
+ sessionId,
36902
+ currentVersion,
36903
+ fetchVersions,
36904
+ fetchStatus,
36905
+ pollingConfig,
36906
+ onStatusChange
36907
+ }) {
36908
+ const config = useMemo9(
36909
+ () => ({ ...DEFAULT_POLLING_CONFIG, ...pollingConfig }),
36910
+ [pollingConfig]
36911
+ );
36912
+ const [versionData, setVersionData] = useState12(null);
36913
+ const [totalVersions, setTotalVersions] = useState12(0);
36914
+ const [selectedVersion, setSelectedVersion] = useState12();
36915
+ const [isLoadingVersion, setIsLoadingVersion] = useState12(false);
36916
+ const [isValidationComplete, setIsValidationComplete] = useState12(false);
36917
+ const [versionStatus, setVersionStatus] = useState12("checking");
36918
+ const [statusDetails, setStatusDetails] = useState12();
36919
+ const [timeDisplay, setTimeDisplay] = useState12("");
36920
+ const [loadingStatus, setLoadingStatus] = useState12(true);
36921
+ const remainingTimeRef = useRef6(0);
36922
+ const requestedVersion = selectedVersion ?? currentVersion ?? versionData?.currentVersion;
36923
+ const fetchVersionData = useCallback4(async () => {
36924
+ if (!sessionId) return;
36925
+ if (!versionData) setIsLoadingVersion(true);
36926
+ try {
36927
+ const data = await fetchVersions({
36928
+ sessionId,
36929
+ version: requestedVersion,
36930
+ validated: isValidationComplete
36931
+ });
36932
+ if (data.success !== false) {
36933
+ setVersionData(data);
36934
+ setTotalVersions(data.totalVersions || 0);
36935
+ }
36936
+ } catch (err) {
36937
+ if (err.name !== "AbortError") {
36938
+ console.error("Error fetching creator version:", err);
36939
+ }
36940
+ } finally {
36941
+ setIsLoadingVersion(false);
36942
+ }
36943
+ }, [sessionId, requestedVersion, isValidationComplete, fetchVersions, versionData]);
36944
+ useEffect9(() => {
36945
+ fetchVersionData();
36946
+ }, [sessionId, requestedVersion, isValidationComplete]);
36947
+ useEffect9(() => {
36948
+ if (totalVersions > 0 || !sessionId) return;
36949
+ const interval = setInterval(() => {
36950
+ if (totalVersions === 0) fetchVersionData();
36951
+ }, config.pollInterval);
36952
+ return () => clearInterval(interval);
36953
+ }, [totalVersions, sessionId, fetchVersionData, config.pollInterval]);
36954
+ useEffect9(() => {
36955
+ if (!selectedVersion && !requestedVersion) return;
36956
+ const activeVersion = selectedVersion ?? requestedVersion;
36957
+ let isMounted = true;
36958
+ let intervalId = null;
36959
+ let timerIntervalId = null;
36960
+ let elapsed = 0;
36961
+ let errorCount = 0;
36962
+ setLoadingStatus(true);
36963
+ setStatusDetails(void 0);
36964
+ setVersionStatus("checking");
36965
+ const creatorLength2 = versionData?.length || 0;
36966
+ remainingTimeRef.current = creatorLength2 > 0 ? creatorLength2 * config.secondsPerCreator : 60;
36967
+ const formatTime = (seconds) => {
36968
+ if (seconds <= 0) return "to complete";
36969
+ const minutes = Math.floor(seconds / 60);
36970
+ return minutes >= 1 ? `${minutes} min remaining...` : `${seconds} sec remaining...`;
36971
+ };
36972
+ setTimeDisplay(formatTime(remainingTimeRef.current));
36973
+ timerIntervalId = setInterval(() => {
36974
+ if (remainingTimeRef.current > 0) remainingTimeRef.current -= 1;
36975
+ setTimeDisplay(formatTime(remainingTimeRef.current));
36976
+ }, 1e3);
36977
+ const updateStatus = (status) => {
36978
+ setVersionStatus(status);
36979
+ onStatusChange?.(status);
36980
+ };
36981
+ const stopPolling = () => {
36982
+ if (intervalId) clearInterval(intervalId);
36983
+ if (timerIntervalId) clearInterval(timerIntervalId);
36984
+ setTimeDisplay("");
36985
+ };
36986
+ const pollStatus = async () => {
36987
+ try {
36988
+ const data = await fetchStatus({
36989
+ sessionId,
36990
+ versionNo: activeVersion
36991
+ });
36992
+ if (!isMounted) return;
36993
+ if (data?.status) setStatusDetails(data.status);
36994
+ const s = data?.status?.status;
36995
+ if (s === "completed" || s === "complete") {
36996
+ updateStatus(s);
36997
+ setIsValidationComplete(true);
36998
+ stopPolling();
36999
+ return;
37000
+ }
37001
+ if (s === "failed") {
37002
+ updateStatus("failed");
37003
+ stopPolling();
37004
+ return;
37005
+ }
37006
+ errorCount = 0;
37007
+ updateStatus(s || "in-progress");
37008
+ } catch (err) {
37009
+ console.error("Error fetching status:", err);
37010
+ errorCount++;
37011
+ if (errorCount >= config.maxErrors) {
37012
+ console.error(`Polling failed after ${config.maxErrors} consecutive errors`);
37013
+ updateStatus("failed");
37014
+ setLoadingStatus(false);
37015
+ stopPolling();
37016
+ return;
37017
+ }
37018
+ } finally {
37019
+ setLoadingStatus(false);
37020
+ }
37021
+ };
37022
+ pollStatus();
37023
+ intervalId = setInterval(() => {
37024
+ elapsed += config.pollInterval;
37025
+ if (elapsed >= config.maxDuration) {
37026
+ console.warn("Stopped polling after max duration");
37027
+ stopPolling();
37028
+ } else {
37029
+ pollStatus();
37030
+ }
37031
+ }, config.pollInterval);
37032
+ return () => {
37033
+ isMounted = false;
37034
+ stopPolling();
37035
+ };
37036
+ }, [selectedVersion, requestedVersion, sessionId]);
37037
+ const versionNumbers = useMemo9(() => {
37038
+ if (!totalVersions) return [];
37039
+ return Array.from({ length: totalVersions }, (_, i) => i + 1);
37040
+ }, [totalVersions]);
37041
+ const creatorIds = versionData?.ids || [];
37042
+ const creatorImages = versionData?.images || [];
37043
+ const creatorLength = versionData?.length || 0;
37044
+ const searchSpec = versionData?.searchSpec || {};
37045
+ const displayVersion = versionData?.currentVersion ?? requestedVersion;
37046
+ return {
37047
+ versionData,
37048
+ versionNumbers,
37049
+ selectedVersion: displayVersion,
37050
+ setSelectedVersion,
37051
+ creatorImages,
37052
+ creatorLength,
37053
+ creatorIds,
37054
+ searchSpec,
37055
+ versionStatus,
37056
+ statusDetails,
37057
+ timeDisplay,
37058
+ isLoading: loadingStatus || isLoadingVersion,
37059
+ isValidationComplete
37060
+ };
37061
+ }
37062
+
37063
+ // src/molecules/creator-discovery/CreatorWidget/CreatorWidget.tsx
37064
+ import { jsx as jsx126 } from "react/jsx-runtime";
37065
+ function CreatorWidgetInner({
37066
+ sessionId,
37067
+ currentVersion,
37068
+ isAgentOutput = false,
37069
+ fetchVersions,
37070
+ fetchStatus,
37071
+ pollingConfig,
37072
+ onStatusChange,
37073
+ onAction,
37074
+ className
37075
+ }) {
37076
+ const {
37077
+ versionNumbers,
37078
+ selectedVersion,
37079
+ setSelectedVersion,
37080
+ creatorImages,
37081
+ creatorLength,
37082
+ creatorIds,
37083
+ searchSpec,
37084
+ versionStatus,
37085
+ statusDetails,
37086
+ timeDisplay,
37087
+ isLoading
37088
+ } = useCreatorWidgetPolling({
37089
+ sessionId,
37090
+ currentVersion,
37091
+ fetchVersions,
37092
+ fetchStatus,
37093
+ pollingConfig,
37094
+ onStatusChange
37095
+ });
37096
+ const handleVersionSelect = useCallback5(
37097
+ (version) => setSelectedVersion(version),
37098
+ [setSelectedVersion]
37099
+ );
37100
+ const handleViewCreators = useCallback5(() => {
37101
+ onAction?.({
37102
+ type: "view-creators",
37103
+ sessionId,
37104
+ creatorIds,
37105
+ version: selectedVersion,
37106
+ searchSpec
37107
+ });
37108
+ }, [onAction, sessionId, creatorIds, selectedVersion, searchSpec]);
37109
+ if (!fetchVersions || !fetchStatus) {
37110
+ return /* @__PURE__ */ jsx126(CreatorWidgetSkeleton, {});
37111
+ }
37112
+ return /* @__PURE__ */ jsx126("div", { className, children: /* @__PURE__ */ jsx126(
37113
+ CreatorCompactView,
37114
+ {
37115
+ versions: versionNumbers,
37116
+ selectedVersion,
37117
+ creatorImages,
37118
+ creatorLength,
37119
+ isAgentOutput,
37120
+ onVersionSelect: handleVersionSelect,
37121
+ onViewCreators: handleViewCreators,
37122
+ versionStatus,
37123
+ statusDetails,
37124
+ timeDisplay,
37125
+ isLoading
37126
+ }
37127
+ ) });
37128
+ }
37129
+ var CreatorWidget = memo(CreatorWidgetInner);
37130
+
36621
37131
  // src/molecules/agent-builder/ToolListCard/ToolListCard.tsx
36622
- import { jsx as jsx122, jsxs as jsxs81 } from "react/jsx-runtime";
37132
+ import { jsx as jsx127, jsxs as jsxs85 } from "react/jsx-runtime";
36623
37133
  var ICON_MAP = {
36624
37134
  Search,
36625
37135
  Database,
@@ -36676,7 +37186,7 @@ var ToolListCard = ({
36676
37186
  grouped[cat].push(tool);
36677
37187
  }
36678
37188
  const categories = Object.keys(grouped);
36679
- return /* @__PURE__ */ jsxs81(
37189
+ return /* @__PURE__ */ jsxs85(
36680
37190
  "div",
36681
37191
  {
36682
37192
  className: cn(
@@ -36684,33 +37194,33 @@ var ToolListCard = ({
36684
37194
  className
36685
37195
  ),
36686
37196
  children: [
36687
- /* @__PURE__ */ jsxs81("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
36688
- /* @__PURE__ */ jsx122("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx122(Wrench, { className: "w-3.5 h-3.5 text-interactive" }) }),
36689
- /* @__PURE__ */ jsx122("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
36690
- /* @__PURE__ */ jsx122("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: tools.length })
37197
+ /* @__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
+ /* @__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" }) }),
37199
+ /* @__PURE__ */ jsx127("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Available Tools" }),
37200
+ /* @__PURE__ */ jsx127("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: tools.length })
36691
37201
  ] }),
36692
- /* @__PURE__ */ jsx122("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
37202
+ /* @__PURE__ */ jsx127("div", { className: "divide-y divide-[var(--border-color)]", children: categories.map((cat) => {
36693
37203
  const CatIcon = resolveCategoryIcon(cat);
36694
- return /* @__PURE__ */ jsxs81("div", { className: "px-4 py-3", children: [
36695
- /* @__PURE__ */ jsxs81("div", { className: "flex items-center gap-2 mb-2.5", children: [
36696
- /* @__PURE__ */ jsx122(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
36697
- /* @__PURE__ */ jsx122("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
36698
- /* @__PURE__ */ jsx122("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
37204
+ return /* @__PURE__ */ jsxs85("div", { className: "px-4 py-3", children: [
37205
+ /* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-2 mb-2.5", children: [
37206
+ /* @__PURE__ */ jsx127(CatIcon, { className: "w-3.5 h-3.5 text-interactive/70" }),
37207
+ /* @__PURE__ */ jsx127("span", { className: "text-[11px] font-semibold text-[var(--foreground)]/50 uppercase tracking-wider", children: cat }),
37208
+ /* @__PURE__ */ jsx127("span", { className: "text-[10px] text-[var(--foreground)]/30", children: grouped[cat].length })
36699
37209
  ] }),
36700
- /* @__PURE__ */ jsx122("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
37210
+ /* @__PURE__ */ jsx127("div", { className: "space-y-1.5", children: grouped[cat].map((tool) => {
36701
37211
  const ToolIcon = resolveIcon(tool);
36702
- return /* @__PURE__ */ jsxs81(
37212
+ return /* @__PURE__ */ jsxs85(
36703
37213
  "div",
36704
37214
  {
36705
37215
  className: "group flex items-start gap-3 px-3 py-2 rounded-lg hover:bg-[var(--foreground)]/[0.03] transition-colors",
36706
37216
  children: [
36707
- /* @__PURE__ */ jsx122("div", { className: "shrink-0 mt-0.5 w-5 h-5 rounded flex items-center justify-center bg-interactive/[0.08]", children: /* @__PURE__ */ jsx122(ToolIcon, { className: "w-3 h-3 text-interactive/60" }) }),
36708
- /* @__PURE__ */ jsxs81("div", { className: "flex-1 min-w-0", children: [
36709
- /* @__PURE__ */ jsxs81("div", { className: "flex items-center gap-2 flex-wrap", children: [
36710
- tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */ jsx122("span", { className: "text-[13px] font-medium text-[var(--foreground)] truncate max-w-full", children: tool.display_name }),
36711
- /* @__PURE__ */ jsx122("span", { className: "text-[11px] font-mono px-1.5 py-0.5 rounded bg-[var(--foreground)]/[0.06] text-[var(--foreground)]/50 border border-[var(--foreground)]/[0.06] truncate", children: tool.name })
37217
+ /* @__PURE__ */ jsx127("div", { className: "shrink-0 mt-0.5 w-5 h-5 rounded flex items-center justify-center bg-interactive/[0.08]", children: /* @__PURE__ */ jsx127(ToolIcon, { className: "w-3 h-3 text-interactive/60" }) }),
37218
+ /* @__PURE__ */ jsxs85("div", { className: "flex-1 min-w-0", children: [
37219
+ /* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-2 flex-wrap", children: [
37220
+ tool.display_name && tool.display_name !== tool.name && /* @__PURE__ */ jsx127("span", { className: "text-[13px] font-medium text-[var(--foreground)] truncate max-w-full", children: tool.display_name }),
37221
+ /* @__PURE__ */ jsx127("span", { className: "text-[11px] font-mono px-1.5 py-0.5 rounded bg-[var(--foreground)]/[0.06] text-[var(--foreground)]/50 border border-[var(--foreground)]/[0.06] truncate", children: tool.name })
36712
37222
  ] }),
36713
- tool.description && /* @__PURE__ */ jsx122("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed mt-0.5 break-words whitespace-normal", children: tool.description })
37223
+ tool.description && /* @__PURE__ */ jsx127("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed mt-0.5 break-words whitespace-normal", children: tool.description })
36714
37224
  ] })
36715
37225
  ]
36716
37226
  },
@@ -36725,8 +37235,8 @@ var ToolListCard = ({
36725
37235
  };
36726
37236
 
36727
37237
  // src/molecules/agent-builder/AgentCard/AgentCard.tsx
36728
- import { useState as useState10, useCallback as useCallback4 } from "react";
36729
- import { Fragment as Fragment4, jsx as jsx123, jsxs as jsxs82 } from "react/jsx-runtime";
37238
+ import { useState as useState13, useCallback as useCallback6 } from "react";
37239
+ import { Fragment as Fragment6, jsx as jsx128, jsxs as jsxs86 } from "react/jsx-runtime";
36730
37240
  var AgentCard = ({
36731
37241
  agent,
36732
37242
  editable = true,
@@ -36734,15 +37244,15 @@ var AgentCard = ({
36734
37244
  onSave,
36735
37245
  className
36736
37246
  }) => {
36737
- const [isEditing, setIsEditing] = useState10(false);
36738
- const [isSaving, setIsSaving] = useState10(false);
36739
- const [editState, setEditState] = useState10({
37247
+ const [isEditing, setIsEditing] = useState13(false);
37248
+ const [isSaving, setIsSaving] = useState13(false);
37249
+ const [editState, setEditState] = useState13({
36740
37250
  display_name: agent.display_name,
36741
37251
  description: agent.description,
36742
37252
  image: agent.image || ""
36743
37253
  });
36744
37254
  const avatarUrl = agent.image || `https://api.dicebear.com/7.x/avataaars/svg?seed=${agent.name}`;
36745
- const handleEdit = useCallback4(() => {
37255
+ const handleEdit = useCallback6(() => {
36746
37256
  setEditState({
36747
37257
  display_name: agent.display_name,
36748
37258
  description: agent.description,
@@ -36750,10 +37260,10 @@ var AgentCard = ({
36750
37260
  });
36751
37261
  setIsEditing(true);
36752
37262
  }, [agent]);
36753
- const handleCancel = useCallback4(() => {
37263
+ const handleCancel = useCallback6(() => {
36754
37264
  setIsEditing(false);
36755
37265
  }, []);
36756
- const handleSave = useCallback4(async () => {
37266
+ const handleSave = useCallback6(async () => {
36757
37267
  if (!onSave) return;
36758
37268
  const updates = {};
36759
37269
  if (editState.display_name !== agent.display_name)
@@ -36777,7 +37287,7 @@ var AgentCard = ({
36777
37287
  }
36778
37288
  }, [onSave, agent, editState]);
36779
37289
  if (compact) {
36780
- return /* @__PURE__ */ jsxs82(
37290
+ return /* @__PURE__ */ jsxs86(
36781
37291
  "div",
36782
37292
  {
36783
37293
  className: cn(
@@ -36785,14 +37295,14 @@ var AgentCard = ({
36785
37295
  className
36786
37296
  ),
36787
37297
  children: [
36788
- /* @__PURE__ */ jsxs82(Avatar, { className: "h-8 w-8 shrink-0", children: [
36789
- /* @__PURE__ */ jsx123(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
36790
- /* @__PURE__ */ jsx123(AvatarFallback, { className: "bg-interactive/10 text-interactive text-xs font-bold", children: agent.display_name.charAt(0) })
37298
+ /* @__PURE__ */ jsxs86(Avatar, { className: "h-8 w-8 shrink-0", children: [
37299
+ /* @__PURE__ */ jsx128(AvatarImage, { src: avatarUrl, alt: agent.display_name }),
37300
+ /* @__PURE__ */ jsx128(AvatarFallback, { className: "bg-interactive/10 text-interactive text-xs font-bold", children: agent.display_name.charAt(0) })
36791
37301
  ] }),
36792
- /* @__PURE__ */ jsxs82("div", { className: "flex-1 min-w-0", children: [
36793
- /* @__PURE__ */ jsxs82("div", { className: "flex items-center gap-2", children: [
36794
- /* @__PURE__ */ jsx123("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
36795
- /* @__PURE__ */ jsx123(
37302
+ /* @__PURE__ */ jsxs86("div", { className: "flex-1 min-w-0", children: [
37303
+ /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-2", children: [
37304
+ /* @__PURE__ */ jsx128("span", { className: "text-[var(--foreground)] text-sm font-semibold truncate", children: agent.display_name }),
37305
+ /* @__PURE__ */ jsx128(
36796
37306
  "span",
36797
37307
  {
36798
37308
  className: cn(
@@ -36803,13 +37313,13 @@ var AgentCard = ({
36803
37313
  }
36804
37314
  )
36805
37315
  ] }),
36806
- /* @__PURE__ */ jsx123("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
37316
+ /* @__PURE__ */ jsx128("p", { className: "text-[var(--foreground)]/50 text-xs truncate", children: agent.description })
36807
37317
  ] })
36808
37318
  ]
36809
37319
  }
36810
37320
  );
36811
37321
  }
36812
- return /* @__PURE__ */ jsxs82(
37322
+ return /* @__PURE__ */ jsxs86(
36813
37323
  "div",
36814
37324
  {
36815
37325
  className: cn(
@@ -36817,14 +37327,14 @@ var AgentCard = ({
36817
37327
  className
36818
37328
  ),
36819
37329
  children: [
36820
- /* @__PURE__ */ jsxs82("div", { className: "flex items-start gap-4 px-5 py-4", children: [
36821
- /* @__PURE__ */ jsxs82(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
36822
- /* @__PURE__ */ jsx123(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
36823
- /* @__PURE__ */ jsx123(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
37330
+ /* @__PURE__ */ jsxs86("div", { className: "flex items-start gap-4 px-5 py-4", children: [
37331
+ /* @__PURE__ */ jsxs86(Avatar, { className: "h-12 w-12 shrink-0 border-2 border-interactive/20", children: [
37332
+ /* @__PURE__ */ jsx128(AvatarImage, { src: isEditing && editState.image ? editState.image : avatarUrl, alt: agent.display_name }),
37333
+ /* @__PURE__ */ jsx128(AvatarFallback, { className: "bg-interactive/10 text-interactive text-lg font-bold", children: agent.display_name.charAt(0) })
36824
37334
  ] }),
36825
- /* @__PURE__ */ jsxs82("div", { className: "flex-1 min-w-0", children: [
36826
- /* @__PURE__ */ jsxs82("div", { className: "flex items-center gap-2", children: [
36827
- isEditing ? /* @__PURE__ */ jsx123(
37335
+ /* @__PURE__ */ jsxs86("div", { className: "flex-1 min-w-0", children: [
37336
+ /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-2", children: [
37337
+ isEditing ? /* @__PURE__ */ jsx128(
36828
37338
  "input",
36829
37339
  {
36830
37340
  type: "text",
@@ -36834,9 +37344,9 @@ var AgentCard = ({
36834
37344
  className: "flex-1 bg-transparent border-b border-interactive/30 text-sm font-semibold text-foreground outline-none focus:border-interactive transition-all",
36835
37345
  placeholder: "Agent name"
36836
37346
  }
36837
- ) : /* @__PURE__ */ jsx123("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
36838
- /* @__PURE__ */ jsx123("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 }),
36839
- /* @__PURE__ */ jsx123(
37347
+ ) : /* @__PURE__ */ jsx128("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: agent.display_name }),
37348
+ /* @__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__ */ jsx128(
36840
37350
  "span",
36841
37351
  {
36842
37352
  className: cn(
@@ -36847,7 +37357,7 @@ var AgentCard = ({
36847
37357
  }
36848
37358
  )
36849
37359
  ] }),
36850
- /* @__PURE__ */ jsx123("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ jsx123(
37360
+ /* @__PURE__ */ jsx128("div", { className: "mt-1", children: isEditing ? /* @__PURE__ */ jsx128(
36851
37361
  "textarea",
36852
37362
  {
36853
37363
  value: editState.description,
@@ -36857,10 +37367,10 @@ var AgentCard = ({
36857
37367
  rows: 2,
36858
37368
  placeholder: "Describe this agent..."
36859
37369
  }
36860
- ) : /* @__PURE__ */ jsx123("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed", children: agent.description }) }),
36861
- isEditing && /* @__PURE__ */ jsxs82("div", { className: "mt-2 flex items-center gap-2", children: [
36862
- /* @__PURE__ */ jsx123("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
36863
- /* @__PURE__ */ jsx123(
37370
+ ) : /* @__PURE__ */ jsx128("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-normal", children: agent.description }) }),
37371
+ isEditing && /* @__PURE__ */ jsxs86("div", { className: "mt-2 flex items-center gap-2", children: [
37372
+ /* @__PURE__ */ jsx128("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold", children: "Avatar:" }),
37373
+ /* @__PURE__ */ jsx128(
36864
37374
  "input",
36865
37375
  {
36866
37376
  type: "text",
@@ -36873,8 +37383,8 @@ var AgentCard = ({
36873
37383
  )
36874
37384
  ] })
36875
37385
  ] }),
36876
- editable && onSave && /* @__PURE__ */ jsx123("div", { className: "flex items-center gap-1.5 shrink-0", children: isEditing ? /* @__PURE__ */ jsxs82(Fragment4, { children: [
36877
- /* @__PURE__ */ jsx123(
37386
+ editable && onSave && /* @__PURE__ */ jsx128("div", { className: "flex items-center gap-1.5 shrink-0", children: isEditing ? /* @__PURE__ */ jsxs86(Fragment6, { children: [
37387
+ /* @__PURE__ */ jsx128(
36878
37388
  "button",
36879
37389
  {
36880
37390
  onClick: handleCancel,
@@ -36883,7 +37393,7 @@ var AgentCard = ({
36883
37393
  children: "Cancel"
36884
37394
  }
36885
37395
  ),
36886
- /* @__PURE__ */ jsx123(
37396
+ /* @__PURE__ */ jsx128(
36887
37397
  "button",
36888
37398
  {
36889
37399
  onClick: handleSave,
@@ -36892,7 +37402,7 @@ var AgentCard = ({
36892
37402
  children: isSaving ? "Saving..." : "Save"
36893
37403
  }
36894
37404
  )
36895
- ] }) : /* @__PURE__ */ jsx123(
37405
+ ] }) : /* @__PURE__ */ jsx128(
36896
37406
  "button",
36897
37407
  {
36898
37408
  onClick: handleEdit,
@@ -36901,18 +37411,18 @@ var AgentCard = ({
36901
37411
  }
36902
37412
  ) })
36903
37413
  ] }),
36904
- /* @__PURE__ */ jsx123("div", { className: "flex flex-wrap items-center gap-3 px-5 pb-3 text-xs", children: /* @__PURE__ */ jsxs82("span", { className: "text-[var(--foreground)]/40", children: [
37414
+ /* @__PURE__ */ jsx128("div", { className: "flex flex-wrap items-center gap-3 px-5 pb-3 text-xs", children: /* @__PURE__ */ jsxs86("span", { className: "text-[var(--foreground)]/40", children: [
36905
37415
  "Model:",
36906
37416
  " ",
36907
- /* @__PURE__ */ jsx123("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
37417
+ /* @__PURE__ */ jsx128("span", { className: "font-mono text-[var(--foreground)]/70", children: agent.model })
36908
37418
  ] }) }),
36909
- agent.tools && agent.tools.length > 0 && /* @__PURE__ */ jsxs82("div", { className: "border-t border-[var(--border-color)] px-5 py-3", children: [
36910
- /* @__PURE__ */ jsxs82("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
37419
+ agent.tools && agent.tools.length > 0 && /* @__PURE__ */ jsxs86("div", { className: "border-t border-[var(--border-color)] px-5 py-3", children: [
37420
+ /* @__PURE__ */ jsxs86("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-2", children: [
36911
37421
  "Tools (",
36912
37422
  agent.tools.length,
36913
37423
  ")"
36914
37424
  ] }),
36915
- /* @__PURE__ */ jsx123("div", { className: "flex flex-wrap gap-1.5", children: agent.tools.map((tool) => /* @__PURE__ */ jsx123(
37425
+ /* @__PURE__ */ jsx128("div", { className: "flex flex-wrap gap-1.5", children: agent.tools.map((tool) => /* @__PURE__ */ jsx128(
36916
37426
  "span",
36917
37427
  {
36918
37428
  className: "text-[11px] px-2 py-0.5 rounded-md bg-interactive/10 text-interactive font-mono border border-interactive/20",
@@ -36927,7 +37437,7 @@ var AgentCard = ({
36927
37437
  };
36928
37438
 
36929
37439
  // src/molecules/agent-builder/AgentDataTable/AgentDataTable.tsx
36930
- import { jsx as jsx124, jsxs as jsxs83 } from "react/jsx-runtime";
37440
+ import { jsx as jsx129, jsxs as jsxs87 } from "react/jsx-runtime";
36931
37441
  var AgentDataTable = ({
36932
37442
  headers,
36933
37443
  rows,
@@ -36935,7 +37445,7 @@ var AgentDataTable = ({
36935
37445
  }) => {
36936
37446
  const renderCell = (value) => {
36937
37447
  if (typeof value === "boolean") {
36938
- return /* @__PURE__ */ jsxs83(
37448
+ return /* @__PURE__ */ jsxs87(
36939
37449
  "span",
36940
37450
  {
36941
37451
  className: cn(
@@ -36943,7 +37453,7 @@ var AgentDataTable = ({
36943
37453
  value ? "bg-emerald-500/10 text-emerald-600" : "bg-red-500/10 text-red-500"
36944
37454
  ),
36945
37455
  children: [
36946
- /* @__PURE__ */ jsx124(
37456
+ /* @__PURE__ */ jsx129(
36947
37457
  "span",
36948
37458
  {
36949
37459
  className: cn(
@@ -36957,17 +37467,17 @@ var AgentDataTable = ({
36957
37467
  }
36958
37468
  );
36959
37469
  }
36960
- return /* @__PURE__ */ jsx124("span", { className: "text-[var(--foreground)]", children: String(value) });
37470
+ return /* @__PURE__ */ jsx129("span", { className: "text-[var(--foreground)]", children: String(value) });
36961
37471
  };
36962
- return /* @__PURE__ */ jsx124(
37472
+ return /* @__PURE__ */ jsx129(
36963
37473
  "div",
36964
37474
  {
36965
37475
  className: cn(
36966
37476
  "text-foreground hover:bg-muted/50 hover:text-foreground my-3 rounded-xl border border-[var(--border-color)] bg-[var(--card-background)] overflow-hidden",
36967
37477
  className
36968
37478
  ),
36969
- children: /* @__PURE__ */ jsx124("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs83("table", { className: "w-full text-xs", children: [
36970
- /* @__PURE__ */ jsx124("thead", { children: /* @__PURE__ */ jsx124("tr", { className: "border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: headers.map((header) => /* @__PURE__ */ jsx124(
37479
+ children: /* @__PURE__ */ jsx129("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs87("table", { className: "w-full text-xs", children: [
37480
+ /* @__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(
36971
37481
  "th",
36972
37482
  {
36973
37483
  className: "text-left px-4 py-2.5 text-[11px] font-semibold text-[var(--foreground)]/60 uppercase tracking-wide whitespace-nowrap",
@@ -36975,11 +37485,11 @@ var AgentDataTable = ({
36975
37485
  },
36976
37486
  header
36977
37487
  )) }) }),
36978
- /* @__PURE__ */ jsx124("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ jsx124(
37488
+ /* @__PURE__ */ jsx129("tbody", { children: rows.map((row, rowIdx) => /* @__PURE__ */ jsx129(
36979
37489
  "tr",
36980
37490
  {
36981
37491
  className: "border-b border-[var(--border-color)] last:border-b-0 hover:bg-[var(--foreground)]/[0.02] transition-colors",
36982
- children: row.map((cell, cellIdx) => /* @__PURE__ */ jsx124(
37492
+ children: row.map((cell, cellIdx) => /* @__PURE__ */ jsx129(
36983
37493
  "td",
36984
37494
  {
36985
37495
  className: "px-4 py-2.5 text-xs whitespace-nowrap",
@@ -36996,14 +37506,16 @@ var AgentDataTable = ({
36996
37506
  };
36997
37507
 
36998
37508
  // src/molecules/agent-builder/WorkflowVisualizer/WorkflowVisualizer.tsx
36999
- import { useState as useState11 } from "react";
37000
- import { jsx as jsx125, jsxs as jsxs84 } from "react/jsx-runtime";
37509
+ import { useState as useState14 } from "react";
37510
+ import { jsx as jsx130, jsxs as jsxs88 } from "react/jsx-runtime";
37001
37511
  var WorkflowVisualizer = ({
37002
37512
  steps,
37003
37513
  className
37004
37514
  }) => {
37005
- const [expandedStep, setExpandedStep] = useState11(null);
37006
- return /* @__PURE__ */ jsxs84(
37515
+ const [expandedStep, setExpandedStep] = useState14(
37516
+ steps[0]?.id || null
37517
+ );
37518
+ return /* @__PURE__ */ jsxs88(
37007
37519
  "div",
37008
37520
  {
37009
37521
  className: cn(
@@ -37011,8 +37523,8 @@ var WorkflowVisualizer = ({
37011
37523
  className
37012
37524
  ),
37013
37525
  children: [
37014
- /* @__PURE__ */ jsxs84("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
37015
- /* @__PURE__ */ jsx125("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx125(
37526
+ /* @__PURE__ */ jsxs88("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03] flex items-center gap-2.5", children: [
37527
+ /* @__PURE__ */ jsx130("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx130(
37016
37528
  "svg",
37017
37529
  {
37018
37530
  width: "14",
@@ -37024,24 +37536,24 @@ var WorkflowVisualizer = ({
37024
37536
  className: "text-interactive",
37025
37537
  strokeLinecap: "round",
37026
37538
  strokeLinejoin: "round",
37027
- children: /* @__PURE__ */ jsx125("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
37539
+ children: /* @__PURE__ */ jsx130("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
37028
37540
  }
37029
37541
  ) }),
37030
- /* @__PURE__ */ jsx125("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
37031
- /* @__PURE__ */ jsxs84("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: [
37542
+ /* @__PURE__ */ jsx130("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: "Workflow" }),
37543
+ /* @__PURE__ */ jsxs88("span", { className: "ml-auto text-[11px] font-medium text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.06] px-2 py-0.5 rounded-full", children: [
37032
37544
  steps.length,
37033
37545
  " steps"
37034
37546
  ] })
37035
37547
  ] }),
37036
- /* @__PURE__ */ jsx125("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
37548
+ /* @__PURE__ */ jsx130("div", { className: "px-4 py-3", children: steps.map((step, idx) => {
37037
37549
  const isLast = idx === steps.length - 1;
37038
37550
  const isExpanded = expandedStep === step.id;
37039
- return /* @__PURE__ */ jsxs84("div", { className: "flex gap-3", children: [
37040
- /* @__PURE__ */ jsxs84("div", { className: "flex flex-col items-center shrink-0", children: [
37041
- /* @__PURE__ */ jsx125("div", { className: "w-7 h-7 rounded-full bg-interactive/10 border-2 border-interactive/30 flex items-center justify-center", children: /* @__PURE__ */ jsx125("span", { className: "text-[10px] font-bold text-interactive", children: idx + 1 }) }),
37042
- !isLast && /* @__PURE__ */ jsx125("div", { className: "w-0.5 flex-1 min-h-[16px] bg-interactive/15" })
37551
+ return /* @__PURE__ */ jsxs88("div", { className: "flex gap-3", children: [
37552
+ /* @__PURE__ */ jsxs88("div", { className: "flex flex-col items-center shrink-0", children: [
37553
+ /* @__PURE__ */ jsx130("div", { className: "w-7 h-7 rounded-full bg-interactive/10 border-2 border-interactive/30 flex items-center justify-center", children: /* @__PURE__ */ jsx130("span", { className: "text-[10px] font-bold text-interactive", children: idx + 1 }) }),
37554
+ !isLast && /* @__PURE__ */ jsx130("div", { className: "w-0.5 flex-1 min-h-[16px] bg-interactive/15" })
37043
37555
  ] }),
37044
- /* @__PURE__ */ jsxs84(
37556
+ /* @__PURE__ */ jsxs88(
37045
37557
  "div",
37046
37558
  {
37047
37559
  className: cn(
@@ -37049,20 +37561,14 @@ var WorkflowVisualizer = ({
37049
37561
  isExpanded ? "bg-[var(--foreground)]/[0.02]" : "hover:bg-[var(--foreground)]/[0.02]"
37050
37562
  ),
37051
37563
  children: [
37052
- /* @__PURE__ */ jsxs84(
37564
+ /* @__PURE__ */ jsxs88(
37053
37565
  "button",
37054
37566
  {
37055
37567
  onClick: () => setExpandedStep(isExpanded ? null : step.id),
37056
- className: "w-full text-left px-3 py-2.5 flex items-center gap-2",
37568
+ className: "w-full text-left px-3 py-2.5 flex items-center gap-2 whitespace-normal",
37057
37569
  children: [
37058
- /* @__PURE__ */ jsxs84("div", { className: "flex-1 min-w-0", children: [
37059
- /* @__PURE__ */ jsx125("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }),
37060
- step.description && !isExpanded && /* @__PURE__ */ jsxs84("span", { className: "text-xs text-[var(--foreground)]/40 ml-2", children: [
37061
- "\u2014 ",
37062
- step.description
37063
- ] })
37064
- ] }),
37065
- /* @__PURE__ */ jsx125(
37570
+ /* @__PURE__ */ jsx130("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx130("span", { className: "text-[13px] font-medium text-[var(--foreground)]", children: step.name }) }),
37571
+ /* @__PURE__ */ jsx130(
37066
37572
  "svg",
37067
37573
  {
37068
37574
  width: "12",
@@ -37075,28 +37581,28 @@ var WorkflowVisualizer = ({
37075
37581
  "shrink-0 text-[var(--foreground)]/30 transition-transform",
37076
37582
  isExpanded && "rotate-180"
37077
37583
  ),
37078
- children: /* @__PURE__ */ jsx125("polyline", { points: "6 9 12 15 18 9" })
37584
+ children: /* @__PURE__ */ jsx130("polyline", { points: "6 9 12 15 18 9" })
37079
37585
  }
37080
37586
  )
37081
37587
  ]
37082
37588
  }
37083
37589
  ),
37084
- isExpanded && /* @__PURE__ */ jsxs84("div", { className: "px-3 pb-3 space-y-2.5", children: [
37085
- step.description && /* @__PURE__ */ jsx125("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed", children: step.description }),
37086
- step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ jsx125("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ jsxs84(
37590
+ isExpanded && /* @__PURE__ */ jsxs88("div", { className: "px-3 pb-3 space-y-2.5", children: [
37591
+ step.description && /* @__PURE__ */ jsx130("p", { className: "text-xs text-[var(--foreground)]/50 leading-relaxed whitespace-normal", children: step.description }),
37592
+ step.sub_steps && step.sub_steps.length > 0 && /* @__PURE__ */ jsx130("div", { className: "space-y-1", children: step.sub_steps.map((sub) => /* @__PURE__ */ jsxs88(
37087
37593
  "div",
37088
37594
  {
37089
37595
  className: "flex items-start gap-2 text-xs",
37090
37596
  children: [
37091
- /* @__PURE__ */ jsx125("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-interactive/40" }),
37092
- /* @__PURE__ */ jsx125("span", { className: "text-[var(--foreground)]/60", children: sub.action })
37597
+ /* @__PURE__ */ jsx130("span", { className: "shrink-0 mt-0.5 w-1.5 h-1.5 rounded-full bg-interactive/40" }),
37598
+ /* @__PURE__ */ jsx130("span", { className: "text-[var(--foreground)]/60", children: sub.action })
37093
37599
  ]
37094
37600
  },
37095
37601
  sub.id
37096
37602
  )) }),
37097
- step.tools && step.tools.length > 0 && /* @__PURE__ */ jsxs84("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
37098
- /* @__PURE__ */ jsx125("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
37099
- step.tools.map((tool) => /* @__PURE__ */ jsx125(
37603
+ step.tools && step.tools.length > 0 && /* @__PURE__ */ jsxs88("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
37604
+ /* @__PURE__ */ jsx130("span", { className: "text-[10px] text-[var(--foreground)]/30 uppercase font-semibold tracking-wider", children: "Tools:" }),
37605
+ step.tools.map((tool) => /* @__PURE__ */ jsx130(
37100
37606
  "span",
37101
37607
  {
37102
37608
  className: "text-[10px] font-mono px-1.5 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
@@ -37105,9 +37611,9 @@ var WorkflowVisualizer = ({
37105
37611
  tool
37106
37612
  ))
37107
37613
  ] }),
37108
- step.on_failure && /* @__PURE__ */ jsxs84("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: [
37109
- /* @__PURE__ */ jsx125("span", { className: "shrink-0 text-[10px] font-semibold text-[#ef4444]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
37110
- /* @__PURE__ */ jsx125("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
37614
+ step.on_failure && /* @__PURE__ */ jsxs88("div", { className: "flex items-start gap-2 text-xs bg-[#ef4444]/[0.06] border border-[#ef4444]/10 rounded-md px-2.5 py-2 whitespace-normal", children: [
37615
+ /* @__PURE__ */ jsx130("span", { className: "shrink-0 text-[10px] font-semibold text-[#ef4444]/70 uppercase tracking-wider mt-px", children: "On failure:" }),
37616
+ /* @__PURE__ */ jsx130("span", { className: "text-[var(--foreground)]/50", children: step.on_failure })
37111
37617
  ] })
37112
37618
  ] })
37113
37619
  ]
@@ -37121,8 +37627,8 @@ var WorkflowVisualizer = ({
37121
37627
  };
37122
37628
 
37123
37629
  // src/molecules/agent-builder/InstructionPreview/InstructionPreview.tsx
37124
- import { useState as useState12 } from "react";
37125
- import { jsx as jsx126, jsxs as jsxs85 } from "react/jsx-runtime";
37630
+ import { useState as useState15 } from "react";
37631
+ import { jsx as jsx131, jsxs as jsxs89 } from "react/jsx-runtime";
37126
37632
  var InstructionPreview = ({
37127
37633
  agent_name,
37128
37634
  description,
@@ -37131,11 +37637,11 @@ var InstructionPreview = ({
37131
37637
  tools,
37132
37638
  className
37133
37639
  }) => {
37134
- const [isExpanded, setIsExpanded] = useState12(false);
37640
+ const [isExpanded, setIsExpanded] = useState15(false);
37135
37641
  const previewLength = 300;
37136
37642
  const isLong = instruction.length > previewLength;
37137
37643
  const displayText = isExpanded || !isLong ? instruction : instruction.slice(0, previewLength) + "...";
37138
- return /* @__PURE__ */ jsxs85(
37644
+ return /* @__PURE__ */ jsxs89(
37139
37645
  "div",
37140
37646
  {
37141
37647
  className: cn(
@@ -37143,8 +37649,8 @@ var InstructionPreview = ({
37143
37649
  className
37144
37650
  ),
37145
37651
  children: [
37146
- /* @__PURE__ */ jsx126("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ jsxs85("div", { className: "flex items-center gap-2.5", children: [
37147
- /* @__PURE__ */ jsx126("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsxs85(
37652
+ /* @__PURE__ */ jsx131("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.03]", children: /* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-2.5", children: [
37653
+ /* @__PURE__ */ jsx131("div", { className: "w-6 h-6 rounded-md bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsxs89(
37148
37654
  "svg",
37149
37655
  {
37150
37656
  width: "14",
@@ -37157,24 +37663,24 @@ var InstructionPreview = ({
37157
37663
  strokeLinecap: "round",
37158
37664
  strokeLinejoin: "round",
37159
37665
  children: [
37160
- /* @__PURE__ */ jsx126("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
37161
- /* @__PURE__ */ jsx126("polyline", { points: "14 2 14 8 20 8" }),
37162
- /* @__PURE__ */ jsx126("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
37163
- /* @__PURE__ */ jsx126("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
37164
- /* @__PURE__ */ jsx126("polyline", { points: "10 9 9 9 8 9" })
37666
+ /* @__PURE__ */ jsx131("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
37667
+ /* @__PURE__ */ jsx131("polyline", { points: "14 2 14 8 20 8" }),
37668
+ /* @__PURE__ */ jsx131("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
37669
+ /* @__PURE__ */ jsx131("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
37670
+ /* @__PURE__ */ jsx131("polyline", { points: "10 9 9 9 8 9" })
37165
37671
  ]
37166
37672
  }
37167
37673
  ) }),
37168
- /* @__PURE__ */ jsxs85("div", { className: "flex-1 min-w-0", children: [
37169
- /* @__PURE__ */ jsx126("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
37170
- description && /* @__PURE__ */ jsx126("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5", children: description })
37674
+ /* @__PURE__ */ jsxs89("div", { className: "flex-1 min-w-0", children: [
37675
+ /* @__PURE__ */ jsx131("h4", { className: "text-sm font-semibold text-[var(--foreground)]", children: agent_name }),
37676
+ description && /* @__PURE__ */ jsx131("p", { className: "text-[11px] text-[var(--foreground)]/40 mt-0.5 whitespace-normal", children: description })
37171
37677
  ] })
37172
37678
  ] }) }),
37173
- /* @__PURE__ */ jsxs85("div", { className: "px-4 py-3 space-y-3", children: [
37174
- /* @__PURE__ */ jsxs85("div", { children: [
37175
- /* @__PURE__ */ jsx126("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Instruction" }),
37176
- /* @__PURE__ */ jsx126("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 }),
37177
- isLong && /* @__PURE__ */ jsx126(
37679
+ /* @__PURE__ */ jsxs89("div", { className: "px-4 py-3 space-y-3", children: [
37680
+ /* @__PURE__ */ jsxs89("div", { children: [
37681
+ /* @__PURE__ */ jsx131("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Instruction" }),
37682
+ /* @__PURE__ */ jsx131("div", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed whitespace-pre-wrap font-mono bg-[var(--foreground)]/[0.02] border border-[var(--border-color)] rounded-lg p-3", children: displayText }),
37683
+ isLong && /* @__PURE__ */ jsx131(
37178
37684
  "button",
37179
37685
  {
37180
37686
  onClick: () => setIsExpanded(!isExpanded),
@@ -37183,16 +37689,16 @@ var InstructionPreview = ({
37183
37689
  }
37184
37690
  )
37185
37691
  ] }),
37186
- workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ jsxs85("div", { children: [
37187
- /* @__PURE__ */ jsx126("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
37188
- /* @__PURE__ */ jsx126("div", { className: "space-y-1", children: workflow_summary.map((step, idx) => /* @__PURE__ */ jsxs85("div", { className: "flex items-start gap-2 text-xs", children: [
37189
- /* @__PURE__ */ jsx126("span", { className: "shrink-0 w-5 h-5 rounded-full bg-interactive/10 flex items-center justify-center text-[10px] font-bold text-interactive", children: idx + 1 }),
37190
- /* @__PURE__ */ jsx126("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
37692
+ workflow_summary && workflow_summary.length > 0 && /* @__PURE__ */ jsxs89("div", { children: [
37693
+ /* @__PURE__ */ jsx131("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Workflow" }),
37694
+ /* @__PURE__ */ jsx131("div", { className: "space-y-1", children: workflow_summary.map((step, idx) => /* @__PURE__ */ jsxs89("div", { className: "flex items-start gap-2 text-xs", children: [
37695
+ /* @__PURE__ */ jsx131("span", { className: "shrink-0 w-5 h-5 rounded-full bg-interactive/10 flex items-center justify-center text-[10px] font-bold text-interactive", children: idx + 1 }),
37696
+ /* @__PURE__ */ jsx131("span", { className: "text-[var(--foreground)]/50 mt-0.5", children: step })
37191
37697
  ] }, idx)) })
37192
37698
  ] }),
37193
- tools && tools.length > 0 && /* @__PURE__ */ jsxs85("div", { children: [
37194
- /* @__PURE__ */ jsx126("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
37195
- /* @__PURE__ */ jsx126("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ jsx126(
37699
+ tools && tools.length > 0 && /* @__PURE__ */ jsxs89("div", { children: [
37700
+ /* @__PURE__ */ jsx131("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/30 uppercase tracking-wider mb-1.5", children: "Tools" }),
37701
+ /* @__PURE__ */ jsx131("div", { className: "flex flex-wrap gap-1.5", children: tools.map((tool) => /* @__PURE__ */ jsx131(
37196
37702
  "span",
37197
37703
  {
37198
37704
  className: "text-[10px] font-mono px-2 py-0.5 rounded bg-interactive/[0.08] text-interactive/70 border border-interactive/10",
@@ -37208,16 +37714,17 @@ var InstructionPreview = ({
37208
37714
  };
37209
37715
 
37210
37716
  // src/molecules/agent-builder/UIComponentSelector/UIComponentSelector.tsx
37211
- import { useState as useState13 } from "react";
37212
- import { jsx as jsx127, jsxs as jsxs86 } from "react/jsx-runtime";
37717
+ import { useState as useState16 } from "react";
37718
+ import { jsx as jsx132, jsxs as jsxs90 } from "react/jsx-runtime";
37213
37719
  function UIComponentSelector({
37214
37720
  components,
37215
37721
  onSelect,
37216
37722
  onPreview,
37217
- className
37723
+ className,
37724
+ isLatestMessage = true
37218
37725
  }) {
37219
- const [selected, setSelected] = useState13(/* @__PURE__ */ new Set());
37220
- const [submitted, setSubmitted] = useState13(false);
37726
+ const [selected, setSelected] = useState16(/* @__PURE__ */ new Set());
37727
+ const [submitted, setSubmitted] = useState16(false);
37221
37728
  const grouped = components.reduce(
37222
37729
  (acc, comp) => {
37223
37730
  const cat = comp.category || "Other";
@@ -37228,7 +37735,7 @@ function UIComponentSelector({
37228
37735
  {}
37229
37736
  );
37230
37737
  const toggle = (name) => {
37231
- if (submitted) return;
37738
+ if (submitted || !isLatestMessage) return;
37232
37739
  setSelected((prev) => {
37233
37740
  const next = new Set(prev);
37234
37741
  if (next.has(name)) next.delete(name);
@@ -37241,7 +37748,7 @@ function UIComponentSelector({
37241
37748
  onSelect?.(Array.from(selected));
37242
37749
  };
37243
37750
  const categoryOrder = Object.keys(grouped).sort();
37244
- return /* @__PURE__ */ jsxs86(
37751
+ return /* @__PURE__ */ jsxs90(
37245
37752
  "div",
37246
37753
  {
37247
37754
  className: cn(
@@ -37249,36 +37756,36 @@ function UIComponentSelector({
37249
37756
  className
37250
37757
  ),
37251
37758
  children: [
37252
- /* @__PURE__ */ jsxs86("div", { className: "px-4 py-3 border-b border-border bg-muted/50", children: [
37253
- /* @__PURE__ */ jsx127("h3", { className: "text-sm font-semibold text-foreground", children: "Select UI Components" }),
37254
- /* @__PURE__ */ jsx127("p", { className: "text-xs text-muted-foreground mt-0.5", children: "Choose which visual components this agent can use in its responses." })
37759
+ /* @__PURE__ */ jsxs90("div", { className: "px-4 py-3 border-b border-border bg-muted/50", children: [
37760
+ /* @__PURE__ */ jsx132("h3", { className: "text-sm font-semibold text-foreground", children: "Select UI Components" }),
37761
+ /* @__PURE__ */ jsx132("p", { className: "text-xs text-muted-foreground mt-0.5", children: "Choose which visual components this agent can use in its responses." })
37255
37762
  ] }),
37256
- /* @__PURE__ */ jsx127("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ jsxs86("div", { children: [
37257
- /* @__PURE__ */ jsx127("h4", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2", children: category }),
37258
- /* @__PURE__ */ jsx127("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ jsxs86(
37763
+ /* @__PURE__ */ jsx132("div", { className: "px-4 py-3 space-y-4", children: categoryOrder.map((category) => /* @__PURE__ */ jsxs90("div", { children: [
37764
+ /* @__PURE__ */ jsx132("h4", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2", children: category }),
37765
+ /* @__PURE__ */ jsx132("div", { className: "space-y-1.5", children: grouped[category].map((comp) => /* @__PURE__ */ jsxs90(
37259
37766
  "label",
37260
37767
  {
37261
37768
  className: cn(
37262
37769
  "flex items-start gap-3 px-3 py-2 rounded-lg cursor-pointer transition-colors",
37263
- submitted ? "cursor-default opacity-70" : "hover:bg-muted/50",
37770
+ submitted || !isLatestMessage ? "cursor-default opacity-70" : "hover:bg-muted/50",
37264
37771
  selected.has(comp.name) && !submitted && "bg-interactive/5 border border-interactive/20",
37265
37772
  selected.has(comp.name) && submitted && "bg-interactive/5"
37266
37773
  ),
37267
37774
  children: [
37268
- /* @__PURE__ */ jsx127(
37775
+ /* @__PURE__ */ jsx132(
37269
37776
  "input",
37270
37777
  {
37271
37778
  type: "checkbox",
37272
37779
  checked: selected.has(comp.name),
37273
37780
  onChange: () => toggle(comp.name),
37274
- disabled: submitted,
37781
+ disabled: submitted || !isLatestMessage,
37275
37782
  className: "mt-0.5 h-4 w-4 rounded border-border text-interactive focus:ring-interactive/50 disabled:opacity-50"
37276
37783
  }
37277
37784
  ),
37278
- /* @__PURE__ */ jsxs86("div", { className: "flex-1 min-w-0", children: [
37279
- /* @__PURE__ */ jsxs86("div", { className: "flex items-center gap-1", children: [
37280
- /* @__PURE__ */ jsx127("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
37281
- onPreview && /* @__PURE__ */ jsx127(
37785
+ /* @__PURE__ */ jsxs90("div", { className: "flex-1 min-w-0", children: [
37786
+ /* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-1", children: [
37787
+ /* @__PURE__ */ jsx132("span", { className: "text-sm font-medium text-foreground", children: comp.display_name }),
37788
+ onPreview && /* @__PURE__ */ jsx132(
37282
37789
  "button",
37283
37790
  {
37284
37791
  type: "button",
@@ -37289,7 +37796,7 @@ function UIComponentSelector({
37289
37796
  },
37290
37797
  className: "shrink-0 p-0.5 rounded hover:bg-muted transition-colors",
37291
37798
  title: `Preview ${comp.display_name}`,
37292
- children: /* @__PURE__ */ jsxs86(
37799
+ children: /* @__PURE__ */ jsxs90(
37293
37800
  "svg",
37294
37801
  {
37295
37802
  width: "14",
@@ -37302,28 +37809,28 @@ function UIComponentSelector({
37302
37809
  strokeLinejoin: "round",
37303
37810
  className: "text-muted-foreground hover:text-primary",
37304
37811
  children: [
37305
- /* @__PURE__ */ jsx127("circle", { cx: "12", cy: "12", r: "10" }),
37306
- /* @__PURE__ */ jsx127("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
37307
- /* @__PURE__ */ jsx127("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
37812
+ /* @__PURE__ */ jsx132("circle", { cx: "12", cy: "12", r: "10" }),
37813
+ /* @__PURE__ */ jsx132("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
37814
+ /* @__PURE__ */ jsx132("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
37308
37815
  ]
37309
37816
  }
37310
37817
  )
37311
37818
  }
37312
37819
  )
37313
37820
  ] }),
37314
- /* @__PURE__ */ jsx127("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
37821
+ /* @__PURE__ */ jsx132("span", { className: "ml-0 text-xs text-muted-foreground", children: comp.description })
37315
37822
  ] })
37316
37823
  ]
37317
37824
  },
37318
37825
  comp.name
37319
37826
  )) })
37320
37827
  ] }, category)) }),
37321
- !submitted && /* @__PURE__ */ jsxs86("div", { className: "px-4 py-3 border-t border-border flex items-center justify-between", children: [
37322
- /* @__PURE__ */ jsxs86("span", { className: "text-xs text-muted-foreground", children: [
37828
+ !submitted && isLatestMessage && /* @__PURE__ */ jsxs90("div", { className: "px-4 py-3 border-t border-border flex items-center justify-between", children: [
37829
+ /* @__PURE__ */ jsxs90("span", { className: "text-xs text-muted-foreground", children: [
37323
37830
  selected.size,
37324
37831
  " selected"
37325
37832
  ] }),
37326
- /* @__PURE__ */ jsx127(
37833
+ /* @__PURE__ */ jsx132(
37327
37834
  "button",
37328
37835
  {
37329
37836
  onClick: handleContinue,
@@ -37338,7 +37845,7 @@ function UIComponentSelector({
37338
37845
  }
37339
37846
 
37340
37847
  // src/molecules/agent-builder/MultiAgentCard/MultiAgentCard.tsx
37341
- import { jsx as jsx128, jsxs as jsxs87 } from "react/jsx-runtime";
37848
+ import { jsx as jsx133, jsxs as jsxs91 } from "react/jsx-runtime";
37342
37849
  var MultiAgentCard = ({
37343
37850
  name,
37344
37851
  display_name,
@@ -37348,7 +37855,7 @@ var MultiAgentCard = ({
37348
37855
  className
37349
37856
  }) => {
37350
37857
  const avatarUrl = `https://api.dicebear.com/7.x/avataaars/svg?seed=${name}`;
37351
- return /* @__PURE__ */ jsxs87(
37858
+ return /* @__PURE__ */ jsxs91(
37352
37859
  "div",
37353
37860
  {
37354
37861
  className: cn(
@@ -37356,14 +37863,14 @@ var MultiAgentCard = ({
37356
37863
  className
37357
37864
  ),
37358
37865
  children: [
37359
- /* @__PURE__ */ jsxs87("div", { className: "flex items-start gap-4 px-5 py-4", children: [
37360
- /* @__PURE__ */ jsx128("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__ */ jsx128("img", { src: avatarUrl, alt: display_name, className: "h-full w-full" }) }),
37361
- /* @__PURE__ */ jsxs87("div", { className: "flex-1 min-w-0", children: [
37362
- /* @__PURE__ */ jsxs87("div", { className: "flex items-center gap-2", children: [
37363
- /* @__PURE__ */ jsx128("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
37364
- /* @__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: name }),
37365
- /* @__PURE__ */ jsx128("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
37366
- /* @__PURE__ */ jsx128(
37866
+ /* @__PURE__ */ jsxs91("div", { className: "flex items-start gap-4 px-5 py-4", children: [
37867
+ /* @__PURE__ */ jsx133("div", { className: "h-12 w-12 shrink-0 rounded-full border-2 border-interactive/20 overflow-hidden bg-interactive/10 flex items-center justify-center", children: /* @__PURE__ */ jsx133("img", { src: avatarUrl, alt: display_name, className: "h-full w-full" }) }),
37868
+ /* @__PURE__ */ jsxs91("div", { className: "flex-1 min-w-0", children: [
37869
+ /* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-2", children: [
37870
+ /* @__PURE__ */ jsx133("h4", { className: "text-sm font-semibold text-[var(--foreground)] truncate", children: display_name }),
37871
+ /* @__PURE__ */ jsx133("span", { className: "text-[11px] font-mono text-[var(--foreground)]/40 bg-[var(--foreground)]/[0.05] px-1.5 py-0.5 rounded", children: name }),
37872
+ /* @__PURE__ */ jsx133("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full font-medium bg-interactive/10 text-interactive", children: "Multi-Agent" }),
37873
+ /* @__PURE__ */ jsx133(
37367
37874
  "span",
37368
37875
  {
37369
37876
  className: cn(
@@ -37374,18 +37881,18 @@ var MultiAgentCard = ({
37374
37881
  }
37375
37882
  )
37376
37883
  ] }),
37377
- /* @__PURE__ */ jsx128("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed mt-1 whitespace-normal", style: { textWrap: "auto" }, children: description })
37884
+ /* @__PURE__ */ jsx133("p", { className: "text-xs text-[var(--foreground)]/60 leading-relaxed mt-1 whitespace-normal", style: { textWrap: "auto" }, children: description })
37378
37885
  ] })
37379
37886
  ] }),
37380
- stages.length > 0 && /* @__PURE__ */ jsxs87("div", { className: "border-t border-[var(--border-color)] px-5 py-4", children: [
37381
- /* @__PURE__ */ jsxs87("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-3", children: [
37887
+ stages.length > 0 && /* @__PURE__ */ jsxs91("div", { className: "border-t border-[var(--border-color)] px-5 py-4", children: [
37888
+ /* @__PURE__ */ jsxs91("p", { className: "text-[11px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-3", children: [
37382
37889
  "Stages (",
37383
37890
  stages.length,
37384
37891
  ")"
37385
37892
  ] }),
37386
- /* @__PURE__ */ jsx128("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ jsxs87("div", { className: "flex items-stretch", children: [
37387
- /* @__PURE__ */ jsxs87("div", { className: "flex flex-col items-center mr-3 w-5", children: [
37388
- /* @__PURE__ */ jsx128(
37893
+ /* @__PURE__ */ jsx133("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ jsxs91("div", { className: "flex items-stretch", children: [
37894
+ /* @__PURE__ */ jsxs91("div", { className: "flex flex-col items-center mr-3 w-5", children: [
37895
+ /* @__PURE__ */ jsx133(
37389
37896
  "div",
37390
37897
  {
37391
37898
  className: cn(
@@ -37395,20 +37902,20 @@ var MultiAgentCard = ({
37395
37902
  children: idx + 1
37396
37903
  }
37397
37904
  ),
37398
- idx < stages.length - 1 && /* @__PURE__ */ jsx128("div", { className: "w-px flex-1 bg-interactive/20 min-h-[16px]" })
37905
+ idx < stages.length - 1 && /* @__PURE__ */ jsx133("div", { className: "w-px flex-1 bg-interactive/20 min-h-[16px]" })
37399
37906
  ] }),
37400
- /* @__PURE__ */ jsxs87("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
37401
- /* @__PURE__ */ jsxs87("div", { className: "flex items-center gap-2", children: [
37402
- /* @__PURE__ */ jsx128("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
37403
- /* @__PURE__ */ jsx128("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30", children: stage.agent_name })
37907
+ /* @__PURE__ */ jsxs91("div", { className: "flex-1 mb-2 p-3 rounded-lg border border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: [
37908
+ /* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-2", children: [
37909
+ /* @__PURE__ */ jsx133("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: stage.name }),
37910
+ /* @__PURE__ */ jsx133("span", { className: "text-[10px] font-mono text-[var(--foreground)]/30", children: stage.agent_name })
37404
37911
  ] }),
37405
- /* @__PURE__ */ jsxs87("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
37406
- stage.tools && stage.tools.length > 0 && /* @__PURE__ */ jsxs87("span", { children: [
37912
+ /* @__PURE__ */ jsxs91("div", { className: "flex items-center gap-3 mt-1.5 text-[10px] text-[var(--foreground)]/50", children: [
37913
+ stage.tools && stage.tools.length > 0 && /* @__PURE__ */ jsxs91("span", { children: [
37407
37914
  stage.tools.length,
37408
37915
  " tool",
37409
37916
  stage.tools.length !== 1 ? "s" : ""
37410
37917
  ] }),
37411
- stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */ jsxs87("span", { children: [
37918
+ stage.ui_components && stage.ui_components.length > 0 && /* @__PURE__ */ jsxs91("span", { children: [
37412
37919
  stage.ui_components.length,
37413
37920
  " component",
37414
37921
  stage.ui_components.length !== 1 ? "s" : ""
@@ -37423,12 +37930,12 @@ var MultiAgentCard = ({
37423
37930
  };
37424
37931
 
37425
37932
  // src/molecules/agent-builder/MultiAgentPlan/MultiAgentPlan.tsx
37426
- import { jsx as jsx129, jsxs as jsxs88 } from "react/jsx-runtime";
37933
+ import { jsx as jsx134, jsxs as jsxs92 } from "react/jsx-runtime";
37427
37934
  var MultiAgentPlan = ({
37428
37935
  stages = [],
37429
37936
  className
37430
37937
  }) => {
37431
- return /* @__PURE__ */ jsxs88(
37938
+ return /* @__PURE__ */ jsxs92(
37432
37939
  "div",
37433
37940
  {
37434
37941
  className: cn(
@@ -37436,8 +37943,8 @@ var MultiAgentPlan = ({
37436
37943
  className
37437
37944
  ),
37438
37945
  children: [
37439
- /* @__PURE__ */ jsx129("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: /* @__PURE__ */ jsxs88("div", { className: "flex items-center gap-2", children: [
37440
- /* @__PURE__ */ jsx129("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ jsx129(
37946
+ /* @__PURE__ */ jsx134("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: /* @__PURE__ */ jsxs92("div", { className: "flex items-center gap-2", children: [
37947
+ /* @__PURE__ */ jsx134("div", { className: "w-4 h-4 rounded bg-violet-500/20 flex items-center justify-center", children: /* @__PURE__ */ jsx134(
37441
37948
  "svg",
37442
37949
  {
37443
37950
  width: "10",
@@ -37447,20 +37954,20 @@ var MultiAgentPlan = ({
37447
37954
  stroke: "currentColor",
37448
37955
  strokeWidth: "2",
37449
37956
  className: "text-violet-600",
37450
- children: /* @__PURE__ */ jsx129("path", { d: "M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" })
37957
+ children: /* @__PURE__ */ jsx134("path", { d: "M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5" })
37451
37958
  }
37452
37959
  ) }),
37453
- /* @__PURE__ */ jsx129("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "Proposed Multi-Agent Workflow" }),
37454
- /* @__PURE__ */ jsx129("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-amber-500/10 text-amber-600 font-medium", children: "Draft" })
37960
+ /* @__PURE__ */ jsx134("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "Proposed Multi-Agent Workflow" }),
37961
+ /* @__PURE__ */ jsx134("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-amber-500/10 text-amber-600 font-medium", children: "Draft" })
37455
37962
  ] }) }),
37456
- /* @__PURE__ */ jsx129("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsx129("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ jsxs88("div", { className: "flex items-stretch min-w-0", children: [
37457
- /* @__PURE__ */ jsxs88("div", { className: "flex flex-col items-center mr-3 w-6", children: [
37458
- /* @__PURE__ */ jsx129("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 }),
37459
- idx < stages.length - 1 && /* @__PURE__ */ jsx129("div", { className: "w-px flex-1 bg-interactive/20 min-h-[12px]" })
37963
+ /* @__PURE__ */ jsx134("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsx134("div", { className: "flex flex-col gap-0", children: stages.map((stage, idx) => /* @__PURE__ */ jsxs92("div", { className: "flex items-stretch min-w-0", children: [
37964
+ /* @__PURE__ */ jsxs92("div", { className: "flex flex-col items-center mr-3 w-6", children: [
37965
+ /* @__PURE__ */ jsx134("div", { className: "w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold shrink-0 bg-interactive/10 text-interactive border border-interactive/30", children: idx + 1 }),
37966
+ idx < stages.length - 1 && /* @__PURE__ */ jsx134("div", { className: "w-px flex-1 bg-interactive/20 min-h-[12px]" })
37460
37967
  ] }),
37461
- /* @__PURE__ */ jsxs88("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
37462
- /* @__PURE__ */ jsx129("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
37463
- stage.description && /* @__PURE__ */ jsx129(
37968
+ /* @__PURE__ */ jsxs92("div", { className: "flex-1 mb-2 pb-2 min-w-0", children: [
37969
+ /* @__PURE__ */ jsx134("p", { className: "text-xs font-semibold text-foreground", children: stage.name }),
37970
+ stage.description && /* @__PURE__ */ jsx134(
37464
37971
  "p",
37465
37972
  {
37466
37973
  className: "text-[11px] text-foreground/50 mt-0.5 whitespace-normal",
@@ -37468,7 +37975,7 @@ var MultiAgentPlan = ({
37468
37975
  children: stage.description
37469
37976
  }
37470
37977
  ),
37471
- stage.proposed_tools && stage.proposed_tools.length > 0 && /* @__PURE__ */ jsx129("div", { className: "flex flex-wrap gap-1 mt-1.5", children: stage.proposed_tools.map((tool) => /* @__PURE__ */ jsx129(
37978
+ stage.proposed_tools && stage.proposed_tools.length > 0 && /* @__PURE__ */ jsx134("div", { className: "flex flex-wrap gap-1 mt-1.5", children: stage.proposed_tools.map((tool) => /* @__PURE__ */ jsx134(
37472
37979
  "span",
37473
37980
  {
37474
37981
  className: "text-[10px] px-1.5 py-0.5 rounded bg-interactive/10 text-interactive font-mono",
@@ -37484,17 +37991,18 @@ var MultiAgentPlan = ({
37484
37991
  };
37485
37992
 
37486
37993
  // src/molecules/agent-builder/MultiAgentUISelector/MultiAgentUISelector.tsx
37487
- import { useState as useState14, useCallback as useCallback5 } from "react";
37488
- import { jsx as jsx130, jsxs as jsxs89 } from "react/jsx-runtime";
37994
+ import { useState as useState17, useCallback as useCallback7 } from "react";
37995
+ import { jsx as jsx135, jsxs as jsxs93 } from "react/jsx-runtime";
37489
37996
  var MultiAgentUISelector = ({
37490
37997
  stages = [],
37491
37998
  components = [],
37492
37999
  onSelect,
37493
38000
  onPreview,
37494
- className
38001
+ className,
38002
+ isLatestMessage = true
37495
38003
  }) => {
37496
- const [activeStageId, setActiveStageId] = useState14(stages[0]?.id || "");
37497
- const [selections, setSelections] = useState14(
38004
+ const [activeStageId, setActiveStageId] = useState17(stages[0]?.id || "");
38005
+ const [selections, setSelections] = useState17(
37498
38006
  () => {
37499
38007
  const init = {};
37500
38008
  for (const stage of stages) {
@@ -37503,16 +38011,16 @@ var MultiAgentUISelector = ({
37503
38011
  return init;
37504
38012
  }
37505
38013
  );
37506
- const [submitted, setSubmitted] = useState14(false);
38014
+ const [submitted, setSubmitted] = useState17(false);
37507
38015
  const grouped = components.reduce((acc, comp) => {
37508
38016
  const cat = comp.category || "Other";
37509
38017
  if (!acc[cat]) acc[cat] = [];
37510
38018
  acc[cat].push(comp);
37511
38019
  return acc;
37512
38020
  }, {});
37513
- const toggleComponent = useCallback5(
38021
+ const toggleComponent = useCallback7(
37514
38022
  (stageId, compName) => {
37515
- if (submitted) return;
38023
+ if (submitted || !isLatestMessage) return;
37516
38024
  setSelections((prev) => {
37517
38025
  const updated = { ...prev };
37518
38026
  const set = new Set(updated[stageId] || []);
@@ -37527,7 +38035,7 @@ var MultiAgentUISelector = ({
37527
38035
  },
37528
38036
  [submitted]
37529
38037
  );
37530
- const handleContinue = useCallback5(() => {
38038
+ const handleContinue = useCallback7(() => {
37531
38039
  setSubmitted(true);
37532
38040
  if (onSelect) {
37533
38041
  const result = {};
@@ -37538,7 +38046,7 @@ var MultiAgentUISelector = ({
37538
38046
  }
37539
38047
  }, [onSelect, selections]);
37540
38048
  const activeStage = stages.find((s) => s.id === activeStageId);
37541
- return /* @__PURE__ */ jsxs89(
38049
+ return /* @__PURE__ */ jsxs93(
37542
38050
  "div",
37543
38051
  {
37544
38052
  className: cn(
@@ -37546,8 +38054,8 @@ var MultiAgentUISelector = ({
37546
38054
  className
37547
38055
  ),
37548
38056
  children: [
37549
- /* @__PURE__ */ jsx130("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: /* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-2", children: [
37550
- /* @__PURE__ */ jsx130("div", { className: "w-4 h-4 rounded bg-interactive/20 flex items-center justify-center", children: /* @__PURE__ */ jsxs89(
38057
+ /* @__PURE__ */ jsx135("div", { className: "px-4 py-3 border-b border-[var(--border-color)] bg-[var(--foreground)]/[0.02]", children: /* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-2", children: [
38058
+ /* @__PURE__ */ jsx135("div", { className: "w-4 h-4 rounded bg-interactive/20 flex items-center justify-center", children: /* @__PURE__ */ jsxs93(
37551
38059
  "svg",
37552
38060
  {
37553
38061
  width: "10",
@@ -37558,42 +38066,40 @@ var MultiAgentUISelector = ({
37558
38066
  strokeWidth: "2",
37559
38067
  className: "text-interactive",
37560
38068
  children: [
37561
- /* @__PURE__ */ jsx130("rect", { x: "3", y: "3", width: "7", height: "7" }),
37562
- /* @__PURE__ */ jsx130("rect", { x: "14", y: "3", width: "7", height: "7" }),
37563
- /* @__PURE__ */ jsx130("rect", { x: "3", y: "14", width: "7", height: "7" }),
37564
- /* @__PURE__ */ jsx130("rect", { x: "14", y: "14", width: "7", height: "7" })
38069
+ /* @__PURE__ */ jsx135("rect", { x: "3", y: "3", width: "7", height: "7" }),
38070
+ /* @__PURE__ */ jsx135("rect", { x: "14", y: "3", width: "7", height: "7" }),
38071
+ /* @__PURE__ */ jsx135("rect", { x: "3", y: "14", width: "7", height: "7" }),
38072
+ /* @__PURE__ */ jsx135("rect", { x: "14", y: "14", width: "7", height: "7" })
37565
38073
  ]
37566
38074
  }
37567
38075
  ) }),
37568
- /* @__PURE__ */ jsx130("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "UI Components per Stage" })
38076
+ /* @__PURE__ */ jsx135("span", { className: "text-xs font-semibold text-[var(--foreground)]", children: "UI Components per Stage" })
37569
38077
  ] }) }),
37570
- /* @__PURE__ */ jsx130("div", { className: "flex border-b border-[var(--border-color)] px-4", children: stages.map((stage) => /* @__PURE__ */ jsx130(
38078
+ /* @__PURE__ */ jsx135("div", { className: "flex border-b border-[var(--border-color)] px-4", children: stages.map((stage) => /* @__PURE__ */ jsx135(
37571
38079
  "button",
37572
38080
  {
37573
38081
  onClick: () => setActiveStageId(stage.id),
37574
- disabled: submitted,
37575
38082
  className: cn(
37576
38083
  "px-3 py-2 text-[11px] font-medium border-b-2 -mb-px transition-colors",
37577
- activeStageId === stage.id ? "border-interactive text-interactive" : "border-transparent text-[var(--foreground)]/50 hover:text-[var(--foreground)]",
37578
- submitted && "opacity-60 cursor-default"
38084
+ activeStageId === stage.id ? "border-interactive text-interactive" : "border-transparent text-[var(--foreground)]/50 hover:text-[var(--foreground)]"
37579
38085
  ),
37580
38086
  children: stage.name
37581
38087
  },
37582
38088
  stage.id
37583
38089
  )) }),
37584
- /* @__PURE__ */ jsxs89("div", { className: "px-4 py-3", children: [
37585
- activeStage && /* @__PURE__ */ jsxs89("p", { className: "text-[10px] text-[var(--foreground)]/40 mb-3", children: [
38090
+ /* @__PURE__ */ jsxs93("div", { className: "px-4 py-3", children: [
38091
+ activeStage && /* @__PURE__ */ jsxs93("p", { className: "text-[10px] text-[var(--foreground)]/40 mb-3", children: [
37586
38092
  "Select components for ",
37587
- /* @__PURE__ */ jsx130("strong", { children: activeStage.name }),
38093
+ /* @__PURE__ */ jsx135("strong", { children: activeStage.name }),
37588
38094
  " (",
37589
38095
  activeStage.agent_name,
37590
38096
  ")"
37591
38097
  ] }),
37592
- Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ jsxs89("div", { className: "mb-3", children: [
37593
- /* @__PURE__ */ jsx130("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-1.5", children: category }),
37594
- /* @__PURE__ */ jsx130("div", { className: "grid grid-cols-2 gap-1.5", children: comps.map((comp) => {
38098
+ Object.entries(grouped).map(([category, comps]) => /* @__PURE__ */ jsxs93("div", { className: "mb-3", children: [
38099
+ /* @__PURE__ */ jsx135("p", { className: "text-[10px] font-semibold text-[var(--foreground)]/40 uppercase tracking-wide mb-1.5", children: category }),
38100
+ /* @__PURE__ */ jsx135("div", { className: "grid grid-cols-2 gap-1.5", children: comps.map((comp) => {
37595
38101
  const isSelected = selections[activeStageId]?.has(comp.name) || false;
37596
- return /* @__PURE__ */ jsxs89(
38102
+ return /* @__PURE__ */ jsxs93(
37597
38103
  "div",
37598
38104
  {
37599
38105
  role: "button",
@@ -37608,18 +38114,18 @@ var MultiAgentUISelector = ({
37608
38114
  className: cn(
37609
38115
  "text-left p-2.5 rounded-lg border text-[11px] transition-all overflow-hidden cursor-pointer",
37610
38116
  isSelected ? "border-interactive bg-interactive/5" : "border-[var(--border-color)] hover:border-interactive/50",
37611
- submitted && "opacity-60 cursor-default pointer-events-none"
38117
+ (submitted || !isLatestMessage) && "opacity-60 cursor-default"
37612
38118
  ),
37613
38119
  children: [
37614
- /* @__PURE__ */ jsxs89("div", { className: "flex items-center gap-1.5", children: [
37615
- /* @__PURE__ */ jsx130(
38120
+ /* @__PURE__ */ jsxs93("div", { className: "flex items-center gap-1.5", children: [
38121
+ /* @__PURE__ */ jsx135(
37616
38122
  "div",
37617
38123
  {
37618
38124
  className: cn(
37619
38125
  "w-3.5 h-3.5 rounded border flex items-center justify-center shrink-0",
37620
38126
  isSelected ? "bg-interactive border-interactive" : "border-[var(--foreground)]/20"
37621
38127
  ),
37622
- children: isSelected && /* @__PURE__ */ jsx130(
38128
+ children: isSelected && /* @__PURE__ */ jsx135(
37623
38129
  "svg",
37624
38130
  {
37625
38131
  width: "8",
@@ -37628,13 +38134,13 @@ var MultiAgentUISelector = ({
37628
38134
  fill: "none",
37629
38135
  stroke: "white",
37630
38136
  strokeWidth: "3",
37631
- children: /* @__PURE__ */ jsx130("polyline", { points: "20 6 9 17 4 12" })
38137
+ children: /* @__PURE__ */ jsx135("polyline", { points: "20 6 9 17 4 12" })
37632
38138
  }
37633
38139
  )
37634
38140
  }
37635
38141
  ),
37636
- /* @__PURE__ */ jsx130("span", { className: "font-medium text-[var(--foreground)]", children: comp.display_name }),
37637
- onPreview && /* @__PURE__ */ jsx130(
38142
+ /* @__PURE__ */ jsx135("span", { className: "font-medium text-[var(--foreground)]", children: comp.display_name }),
38143
+ onPreview && /* @__PURE__ */ jsx135(
37638
38144
  "button",
37639
38145
  {
37640
38146
  type: "button",
@@ -37644,7 +38150,7 @@ var MultiAgentUISelector = ({
37644
38150
  },
37645
38151
  className: "ml-auto shrink-0 p-0.5 rounded hover:bg-[var(--foreground)]/10 transition-colors",
37646
38152
  title: `Preview ${comp.display_name}`,
37647
- children: /* @__PURE__ */ jsxs89(
38153
+ children: /* @__PURE__ */ jsxs93(
37648
38154
  "svg",
37649
38155
  {
37650
38156
  width: "14",
@@ -37657,16 +38163,16 @@ var MultiAgentUISelector = ({
37657
38163
  strokeLinejoin: "round",
37658
38164
  className: "text-[var(--foreground)]/40 hover:text-[var(--primary-color)]",
37659
38165
  children: [
37660
- /* @__PURE__ */ jsx130("circle", { cx: "12", cy: "12", r: "10" }),
37661
- /* @__PURE__ */ jsx130("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
37662
- /* @__PURE__ */ jsx130("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
38166
+ /* @__PURE__ */ jsx135("circle", { cx: "12", cy: "12", r: "10" }),
38167
+ /* @__PURE__ */ jsx135("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
38168
+ /* @__PURE__ */ jsx135("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
37663
38169
  ]
37664
38170
  }
37665
38171
  )
37666
38172
  }
37667
38173
  )
37668
38174
  ] }),
37669
- /* @__PURE__ */ jsx130("p", { className: "text-[10px] text-[var(--foreground)]/40 mt-0.5 ml-5 whitespace-normal", children: comp.description })
38175
+ /* @__PURE__ */ jsx135("p", { className: "text-[10px] text-[var(--foreground)]/40 mt-0.5 ml-5 whitespace-normal", children: comp.description })
37670
38176
  ]
37671
38177
  },
37672
38178
  comp.name
@@ -37674,7 +38180,7 @@ var MultiAgentUISelector = ({
37674
38180
  }) })
37675
38181
  ] }, category))
37676
38182
  ] }),
37677
- !submitted && /* @__PURE__ */ jsx130("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsx130(
38183
+ !submitted && isLatestMessage && /* @__PURE__ */ jsx135("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsx135(
37678
38184
  "button",
37679
38185
  {
37680
38186
  onClick: handleContinue,
@@ -37682,20 +38188,20 @@ var MultiAgentUISelector = ({
37682
38188
  children: "Continue"
37683
38189
  }
37684
38190
  ) }),
37685
- submitted && /* @__PURE__ */ jsx130("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsx130("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5 ", children: "Selections confirmed" }) })
38191
+ submitted && /* @__PURE__ */ jsx135("div", { className: "px-4 pb-3", children: /* @__PURE__ */ jsx135("div", { className: "text-[10px] text-emerald-600 font-medium text-center py-1.5 ", children: "Selections confirmed" }) })
37686
38192
  ]
37687
38193
  }
37688
38194
  );
37689
38195
  };
37690
38196
 
37691
38197
  // src/molecules/agent-builder/StageIndicator/StageIndicator.tsx
37692
- import { jsx as jsx131, jsxs as jsxs90 } from "react/jsx-runtime";
38198
+ import { jsx as jsx136, jsxs as jsxs94 } from "react/jsx-runtime";
37693
38199
  var StageIndicator = ({
37694
38200
  stage_name,
37695
38201
  agent_name,
37696
38202
  className
37697
38203
  }) => {
37698
- return /* @__PURE__ */ jsxs90(
38204
+ return /* @__PURE__ */ jsxs94(
37699
38205
  "div",
37700
38206
  {
37701
38207
  className: cn(
@@ -37703,12 +38209,12 @@ var StageIndicator = ({
37703
38209
  className
37704
38210
  ),
37705
38211
  children: [
37706
- /* @__PURE__ */ jsx131("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
37707
- /* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-1.5 px-3 py-1 rounded-full bg-violet-500/10 border border-violet-500/20", children: [
37708
- /* @__PURE__ */ jsx131("div", { className: "w-1.5 h-1.5 rounded-full bg-violet-500 animate-pulse" }),
37709
- /* @__PURE__ */ jsx131("span", { className: "text-[10px] font-medium text-violet-600", children: stage_name || agent_name })
38212
+ /* @__PURE__ */ jsx136("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
38213
+ /* @__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: [
38214
+ /* @__PURE__ */ jsx136("div", { className: "w-1.5 h-1.5 rounded-full bg-violet-500 animate-pulse" }),
38215
+ /* @__PURE__ */ jsx136("span", { className: "text-[10px] font-medium text-violet-600", children: stage_name || agent_name })
37710
38216
  ] }),
37711
- /* @__PURE__ */ jsx131("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
38217
+ /* @__PURE__ */ jsx136("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
37712
38218
  ]
37713
38219
  }
37714
38220
  );
@@ -38006,7 +38512,7 @@ __export(ui_exports, {
38006
38512
  // src/components/ui/button-group.tsx
38007
38513
  import { Slot as Slot4 } from "@radix-ui/react-slot";
38008
38514
  import { cva as cva8 } from "class-variance-authority";
38009
- import { jsx as jsx132 } from "react/jsx-runtime";
38515
+ import { jsx as jsx137 } from "react/jsx-runtime";
38010
38516
  var buttonGroupVariants = cva8(
38011
38517
  "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
38012
38518
  {
@@ -38026,7 +38532,7 @@ function ButtonGroup({
38026
38532
  orientation,
38027
38533
  ...props
38028
38534
  }) {
38029
- return /* @__PURE__ */ jsx132(
38535
+ return /* @__PURE__ */ jsx137(
38030
38536
  "div",
38031
38537
  {
38032
38538
  role: "group",
@@ -38043,7 +38549,7 @@ function ButtonGroupText({
38043
38549
  ...props
38044
38550
  }) {
38045
38551
  const Comp = asChild ? Slot4 : "div";
38046
- return /* @__PURE__ */ jsx132(
38552
+ return /* @__PURE__ */ jsx137(
38047
38553
  Comp,
38048
38554
  {
38049
38555
  className: cn(
@@ -38059,7 +38565,7 @@ function ButtonGroupSeparator({
38059
38565
  orientation = "vertical",
38060
38566
  ...props
38061
38567
  }) {
38062
- return /* @__PURE__ */ jsx132(
38568
+ return /* @__PURE__ */ jsx137(
38063
38569
  Separator2,
38064
38570
  {
38065
38571
  "data-slot": "button-group-separator",
@@ -38075,9 +38581,9 @@ function ButtonGroupSeparator({
38075
38581
 
38076
38582
  // src/components/ui/empty.tsx
38077
38583
  import { cva as cva9 } from "class-variance-authority";
38078
- import { jsx as jsx133 } from "react/jsx-runtime";
38584
+ import { jsx as jsx138 } from "react/jsx-runtime";
38079
38585
  function Empty({ className, ...props }) {
38080
- return /* @__PURE__ */ jsx133(
38586
+ return /* @__PURE__ */ jsx138(
38081
38587
  "div",
38082
38588
  {
38083
38589
  "data-slot": "empty",
@@ -38090,7 +38596,7 @@ function Empty({ className, ...props }) {
38090
38596
  );
38091
38597
  }
38092
38598
  function EmptyHeader({ className, ...props }) {
38093
- return /* @__PURE__ */ jsx133(
38599
+ return /* @__PURE__ */ jsx138(
38094
38600
  "div",
38095
38601
  {
38096
38602
  "data-slot": "empty-header",
@@ -38121,7 +38627,7 @@ function EmptyMedia({
38121
38627
  variant = "default",
38122
38628
  ...props
38123
38629
  }) {
38124
- return /* @__PURE__ */ jsx133(
38630
+ return /* @__PURE__ */ jsx138(
38125
38631
  "div",
38126
38632
  {
38127
38633
  "data-slot": "empty-icon",
@@ -38132,7 +38638,7 @@ function EmptyMedia({
38132
38638
  );
38133
38639
  }
38134
38640
  function EmptyTitle({ className, ...props }) {
38135
- return /* @__PURE__ */ jsx133(
38641
+ return /* @__PURE__ */ jsx138(
38136
38642
  "div",
38137
38643
  {
38138
38644
  "data-slot": "empty-title",
@@ -38142,7 +38648,7 @@ function EmptyTitle({ className, ...props }) {
38142
38648
  );
38143
38649
  }
38144
38650
  function EmptyDescription({ className, ...props }) {
38145
- return /* @__PURE__ */ jsx133(
38651
+ return /* @__PURE__ */ jsx138(
38146
38652
  "div",
38147
38653
  {
38148
38654
  "data-slot": "empty-description",
@@ -38155,7 +38661,7 @@ function EmptyDescription({ className, ...props }) {
38155
38661
  );
38156
38662
  }
38157
38663
  function EmptyContent({ className, ...props }) {
38158
- return /* @__PURE__ */ jsx133(
38664
+ return /* @__PURE__ */ jsx138(
38159
38665
  "div",
38160
38666
  {
38161
38667
  "data-slot": "empty-content",
@@ -38169,11 +38675,11 @@ function EmptyContent({ className, ...props }) {
38169
38675
  }
38170
38676
 
38171
38677
  // src/components/ui/field.tsx
38172
- import { useMemo as useMemo9 } from "react";
38678
+ import { useMemo as useMemo10 } from "react";
38173
38679
  import { cva as cva10 } from "class-variance-authority";
38174
- import { jsx as jsx134, jsxs as jsxs91 } from "react/jsx-runtime";
38680
+ import { jsx as jsx139, jsxs as jsxs95 } from "react/jsx-runtime";
38175
38681
  function FieldSet({ className, ...props }) {
38176
- return /* @__PURE__ */ jsx134(
38682
+ return /* @__PURE__ */ jsx139(
38177
38683
  "fieldset",
38178
38684
  {
38179
38685
  "data-slot": "field-set",
@@ -38191,7 +38697,7 @@ function FieldLegend({
38191
38697
  variant = "legend",
38192
38698
  ...props
38193
38699
  }) {
38194
- return /* @__PURE__ */ jsx134(
38700
+ return /* @__PURE__ */ jsx139(
38195
38701
  "legend",
38196
38702
  {
38197
38703
  "data-slot": "field-legend",
@@ -38207,7 +38713,7 @@ function FieldLegend({
38207
38713
  );
38208
38714
  }
38209
38715
  function FieldGroup({ className, ...props }) {
38210
- return /* @__PURE__ */ jsx134(
38716
+ return /* @__PURE__ */ jsx139(
38211
38717
  "div",
38212
38718
  {
38213
38719
  "data-slot": "field-group",
@@ -38247,7 +38753,7 @@ function Field({
38247
38753
  orientation = "vertical",
38248
38754
  ...props
38249
38755
  }) {
38250
- return /* @__PURE__ */ jsx134(
38756
+ return /* @__PURE__ */ jsx139(
38251
38757
  "div",
38252
38758
  {
38253
38759
  role: "group",
@@ -38259,7 +38765,7 @@ function Field({
38259
38765
  );
38260
38766
  }
38261
38767
  function FieldContent({ className, ...props }) {
38262
- return /* @__PURE__ */ jsx134(
38768
+ return /* @__PURE__ */ jsx139(
38263
38769
  "div",
38264
38770
  {
38265
38771
  "data-slot": "field-content",
@@ -38275,7 +38781,7 @@ function FieldLabel({
38275
38781
  className,
38276
38782
  ...props
38277
38783
  }) {
38278
- return /* @__PURE__ */ jsx134(
38784
+ return /* @__PURE__ */ jsx139(
38279
38785
  Label,
38280
38786
  {
38281
38787
  "data-slot": "field-label",
@@ -38290,7 +38796,7 @@ function FieldLabel({
38290
38796
  );
38291
38797
  }
38292
38798
  function FieldTitle({ className, ...props }) {
38293
- return /* @__PURE__ */ jsx134(
38799
+ return /* @__PURE__ */ jsx139(
38294
38800
  "div",
38295
38801
  {
38296
38802
  "data-slot": "field-label",
@@ -38303,7 +38809,7 @@ function FieldTitle({ className, ...props }) {
38303
38809
  );
38304
38810
  }
38305
38811
  function FieldDescription({ className, ...props }) {
38306
- return /* @__PURE__ */ jsx134(
38812
+ return /* @__PURE__ */ jsx139(
38307
38813
  "p",
38308
38814
  {
38309
38815
  "data-slot": "field-description",
@@ -38322,7 +38828,7 @@ function FieldSeparator({
38322
38828
  className,
38323
38829
  ...props
38324
38830
  }) {
38325
- return /* @__PURE__ */ jsxs91(
38831
+ return /* @__PURE__ */ jsxs95(
38326
38832
  "div",
38327
38833
  {
38328
38834
  "data-slot": "field-separator",
@@ -38333,8 +38839,8 @@ function FieldSeparator({
38333
38839
  ),
38334
38840
  ...props,
38335
38841
  children: [
38336
- /* @__PURE__ */ jsx134(Separator2, { className: "absolute inset-0 top-1/2" }),
38337
- children && /* @__PURE__ */ jsx134(
38842
+ /* @__PURE__ */ jsx139(Separator2, { className: "absolute inset-0 top-1/2" }),
38843
+ children && /* @__PURE__ */ jsx139(
38338
38844
  "span",
38339
38845
  {
38340
38846
  className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
@@ -38352,7 +38858,7 @@ function FieldError({
38352
38858
  errors,
38353
38859
  ...props
38354
38860
  }) {
38355
- const content = useMemo9(() => {
38861
+ const content = useMemo10(() => {
38356
38862
  if (children) {
38357
38863
  return children;
38358
38864
  }
@@ -38362,14 +38868,14 @@ function FieldError({
38362
38868
  if (errors?.length === 1 && errors[0]?.message) {
38363
38869
  return errors[0].message;
38364
38870
  }
38365
- return /* @__PURE__ */ jsx134("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
38366
- (error, index) => error?.message && /* @__PURE__ */ jsx134("li", { children: error.message }, index)
38871
+ return /* @__PURE__ */ jsx139("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
38872
+ (error, index) => error?.message && /* @__PURE__ */ jsx139("li", { children: error.message }, index)
38367
38873
  ) });
38368
38874
  }, [children, errors]);
38369
38875
  if (!content) {
38370
38876
  return null;
38371
38877
  }
38372
- return /* @__PURE__ */ jsx134(
38878
+ return /* @__PURE__ */ jsx139(
38373
38879
  "div",
38374
38880
  {
38375
38881
  role: "alert",
@@ -38383,9 +38889,9 @@ function FieldError({
38383
38889
 
38384
38890
  // src/components/ui/input-group.tsx
38385
38891
  import { cva as cva11 } from "class-variance-authority";
38386
- import { jsx as jsx135 } from "react/jsx-runtime";
38892
+ import { jsx as jsx140 } from "react/jsx-runtime";
38387
38893
  function InputGroup({ className, ...props }) {
38388
- return /* @__PURE__ */ jsx135(
38894
+ return /* @__PURE__ */ jsx140(
38389
38895
  "div",
38390
38896
  {
38391
38897
  "data-slot": "input-group",
@@ -38429,7 +38935,7 @@ function InputGroupAddon({
38429
38935
  align = "inline-start",
38430
38936
  ...props
38431
38937
  }) {
38432
- return /* @__PURE__ */ jsx135(
38938
+ return /* @__PURE__ */ jsx140(
38433
38939
  "div",
38434
38940
  {
38435
38941
  role: "group",
@@ -38469,7 +38975,7 @@ function InputGroupButton({
38469
38975
  size = "xs",
38470
38976
  ...props
38471
38977
  }) {
38472
- return /* @__PURE__ */ jsx135(
38978
+ return /* @__PURE__ */ jsx140(
38473
38979
  Button,
38474
38980
  {
38475
38981
  type,
@@ -38481,7 +38987,7 @@ function InputGroupButton({
38481
38987
  );
38482
38988
  }
38483
38989
  function InputGroupText({ className, ...props }) {
38484
- return /* @__PURE__ */ jsx135(
38990
+ return /* @__PURE__ */ jsx140(
38485
38991
  "span",
38486
38992
  {
38487
38993
  className: cn(
@@ -38496,7 +39002,7 @@ function InputGroupInput({
38496
39002
  className,
38497
39003
  ...props
38498
39004
  }) {
38499
- return /* @__PURE__ */ jsx135(
39005
+ return /* @__PURE__ */ jsx140(
38500
39006
  Input,
38501
39007
  {
38502
39008
  "data-slot": "input-group-control",
@@ -38512,7 +39018,7 @@ function InputGroupTextarea({
38512
39018
  className,
38513
39019
  ...props
38514
39020
  }) {
38515
- return /* @__PURE__ */ jsx135(
39021
+ return /* @__PURE__ */ jsx140(
38516
39022
  Textarea,
38517
39023
  {
38518
39024
  "data-slot": "input-group-control",
@@ -38528,9 +39034,9 @@ function InputGroupTextarea({
38528
39034
  // src/components/ui/item.tsx
38529
39035
  import { Slot as Slot5 } from "@radix-ui/react-slot";
38530
39036
  import { cva as cva12 } from "class-variance-authority";
38531
- import { jsx as jsx136 } from "react/jsx-runtime";
39037
+ import { jsx as jsx141 } from "react/jsx-runtime";
38532
39038
  function ItemGroup({ className, ...props }) {
38533
- return /* @__PURE__ */ jsx136(
39039
+ return /* @__PURE__ */ jsx141(
38534
39040
  "div",
38535
39041
  {
38536
39042
  role: "list",
@@ -38544,7 +39050,7 @@ function ItemSeparator({
38544
39050
  className,
38545
39051
  ...props
38546
39052
  }) {
38547
- return /* @__PURE__ */ jsx136(
39053
+ return /* @__PURE__ */ jsx141(
38548
39054
  Separator2,
38549
39055
  {
38550
39056
  "data-slot": "item-separator",
@@ -38582,7 +39088,7 @@ function Item8({
38582
39088
  ...props
38583
39089
  }) {
38584
39090
  const Comp = asChild ? Slot5 : "div";
38585
- return /* @__PURE__ */ jsx136(
39091
+ return /* @__PURE__ */ jsx141(
38586
39092
  Comp,
38587
39093
  {
38588
39094
  "data-slot": "item",
@@ -38613,7 +39119,7 @@ function ItemMedia({
38613
39119
  variant = "default",
38614
39120
  ...props
38615
39121
  }) {
38616
- return /* @__PURE__ */ jsx136(
39122
+ return /* @__PURE__ */ jsx141(
38617
39123
  "div",
38618
39124
  {
38619
39125
  "data-slot": "item-media",
@@ -38624,7 +39130,7 @@ function ItemMedia({
38624
39130
  );
38625
39131
  }
38626
39132
  function ItemContent({ className, ...props }) {
38627
- return /* @__PURE__ */ jsx136(
39133
+ return /* @__PURE__ */ jsx141(
38628
39134
  "div",
38629
39135
  {
38630
39136
  "data-slot": "item-content",
@@ -38637,7 +39143,7 @@ function ItemContent({ className, ...props }) {
38637
39143
  );
38638
39144
  }
38639
39145
  function ItemTitle({ className, ...props }) {
38640
- return /* @__PURE__ */ jsx136(
39146
+ return /* @__PURE__ */ jsx141(
38641
39147
  "div",
38642
39148
  {
38643
39149
  "data-slot": "item-title",
@@ -38650,7 +39156,7 @@ function ItemTitle({ className, ...props }) {
38650
39156
  );
38651
39157
  }
38652
39158
  function ItemDescription({ className, ...props }) {
38653
- return /* @__PURE__ */ jsx136(
39159
+ return /* @__PURE__ */ jsx141(
38654
39160
  "p",
38655
39161
  {
38656
39162
  "data-slot": "item-description",
@@ -38664,7 +39170,7 @@ function ItemDescription({ className, ...props }) {
38664
39170
  );
38665
39171
  }
38666
39172
  function ItemActions({ className, ...props }) {
38667
- return /* @__PURE__ */ jsx136(
39173
+ return /* @__PURE__ */ jsx141(
38668
39174
  "div",
38669
39175
  {
38670
39176
  "data-slot": "item-actions",
@@ -38674,7 +39180,7 @@ function ItemActions({ className, ...props }) {
38674
39180
  );
38675
39181
  }
38676
39182
  function ItemHeader({ className, ...props }) {
38677
- return /* @__PURE__ */ jsx136(
39183
+ return /* @__PURE__ */ jsx141(
38678
39184
  "div",
38679
39185
  {
38680
39186
  "data-slot": "item-header",
@@ -38687,7 +39193,7 @@ function ItemHeader({ className, ...props }) {
38687
39193
  );
38688
39194
  }
38689
39195
  function ItemFooter({ className, ...props }) {
38690
- return /* @__PURE__ */ jsx136(
39196
+ return /* @__PURE__ */ jsx141(
38691
39197
  "div",
38692
39198
  {
38693
39199
  "data-slot": "item-footer",
@@ -38701,9 +39207,9 @@ function ItemFooter({ className, ...props }) {
38701
39207
  }
38702
39208
 
38703
39209
  // src/components/ui/kbd.tsx
38704
- import { jsx as jsx137 } from "react/jsx-runtime";
39210
+ import { jsx as jsx142 } from "react/jsx-runtime";
38705
39211
  function Kbd({ className, ...props }) {
38706
- return /* @__PURE__ */ jsx137(
39212
+ return /* @__PURE__ */ jsx142(
38707
39213
  "kbd",
38708
39214
  {
38709
39215
  "data-slot": "kbd",
@@ -38718,7 +39224,7 @@ function Kbd({ className, ...props }) {
38718
39224
  );
38719
39225
  }
38720
39226
  function KbdGroup({ className, ...props }) {
38721
- return /* @__PURE__ */ jsx137(
39227
+ return /* @__PURE__ */ jsx142(
38722
39228
  "kbd",
38723
39229
  {
38724
39230
  "data-slot": "kbd-group",
@@ -38751,7 +39257,7 @@ function useIsMobile() {
38751
39257
  }
38752
39258
 
38753
39259
  // src/components/ui/sidebar.tsx
38754
- import { jsx as jsx138, jsxs as jsxs92 } from "react/jsx-runtime";
39260
+ import { jsx as jsx143, jsxs as jsxs96 } from "react/jsx-runtime";
38755
39261
  var SIDEBAR_COOKIE_NAME = "sidebar_state";
38756
39262
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
38757
39263
  var SIDEBAR_WIDTH = "16rem";
@@ -38818,7 +39324,7 @@ var SidebarProvider = React100.forwardRef(
38818
39324
  }),
38819
39325
  [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
38820
39326
  );
38821
- return /* @__PURE__ */ jsx138(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx138(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx138(
39327
+ return /* @__PURE__ */ jsx143(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx143(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx143(
38822
39328
  "div",
38823
39329
  {
38824
39330
  style: {
@@ -38849,7 +39355,7 @@ var Sidebar = React100.forwardRef(
38849
39355
  }, ref) => {
38850
39356
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
38851
39357
  if (collapsible === "none") {
38852
- return /* @__PURE__ */ jsx138(
39358
+ return /* @__PURE__ */ jsx143(
38853
39359
  "div",
38854
39360
  {
38855
39361
  className: cn(
@@ -38863,7 +39369,7 @@ var Sidebar = React100.forwardRef(
38863
39369
  );
38864
39370
  }
38865
39371
  if (isMobile) {
38866
- return /* @__PURE__ */ jsx138(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs92(
39372
+ return /* @__PURE__ */ jsx143(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs96(
38867
39373
  SheetContent,
38868
39374
  {
38869
39375
  "data-sidebar": "sidebar",
@@ -38874,16 +39380,16 @@ var Sidebar = React100.forwardRef(
38874
39380
  },
38875
39381
  side,
38876
39382
  children: [
38877
- /* @__PURE__ */ jsxs92(SheetHeader, { className: "sr-only", children: [
38878
- /* @__PURE__ */ jsx138(SheetTitle, { children: "Sidebar" }),
38879
- /* @__PURE__ */ jsx138(SheetDescription, { children: "Displays the mobile sidebar." })
39383
+ /* @__PURE__ */ jsxs96(SheetHeader, { className: "sr-only", children: [
39384
+ /* @__PURE__ */ jsx143(SheetTitle, { children: "Sidebar" }),
39385
+ /* @__PURE__ */ jsx143(SheetDescription, { children: "Displays the mobile sidebar." })
38880
39386
  ] }),
38881
- /* @__PURE__ */ jsx138("div", { className: "flex h-full w-full flex-col", children })
39387
+ /* @__PURE__ */ jsx143("div", { className: "flex h-full w-full flex-col", children })
38882
39388
  ]
38883
39389
  }
38884
39390
  ) });
38885
39391
  }
38886
- return /* @__PURE__ */ jsxs92(
39392
+ return /* @__PURE__ */ jsxs96(
38887
39393
  "div",
38888
39394
  {
38889
39395
  ref,
@@ -38893,7 +39399,7 @@ var Sidebar = React100.forwardRef(
38893
39399
  "data-variant": variant,
38894
39400
  "data-side": side,
38895
39401
  children: [
38896
- /* @__PURE__ */ jsx138(
39402
+ /* @__PURE__ */ jsx143(
38897
39403
  "div",
38898
39404
  {
38899
39405
  className: cn(
@@ -38904,7 +39410,7 @@ var Sidebar = React100.forwardRef(
38904
39410
  )
38905
39411
  }
38906
39412
  ),
38907
- /* @__PURE__ */ jsx138(
39413
+ /* @__PURE__ */ jsx143(
38908
39414
  "div",
38909
39415
  {
38910
39416
  className: cn(
@@ -38915,7 +39421,7 @@ var Sidebar = React100.forwardRef(
38915
39421
  className
38916
39422
  ),
38917
39423
  ...props,
38918
- children: /* @__PURE__ */ jsx138(
39424
+ children: /* @__PURE__ */ jsx143(
38919
39425
  "div",
38920
39426
  {
38921
39427
  "data-sidebar": "sidebar",
@@ -38933,7 +39439,7 @@ var Sidebar = React100.forwardRef(
38933
39439
  Sidebar.displayName = "Sidebar";
38934
39440
  var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref) => {
38935
39441
  const { toggleSidebar } = useSidebar();
38936
- return /* @__PURE__ */ jsxs92(
39442
+ return /* @__PURE__ */ jsxs96(
38937
39443
  Button,
38938
39444
  {
38939
39445
  ref,
@@ -38947,8 +39453,8 @@ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref)
38947
39453
  },
38948
39454
  ...props,
38949
39455
  children: [
38950
- /* @__PURE__ */ jsx138(PanelLeft, {}),
38951
- /* @__PURE__ */ jsx138("span", { className: "sr-only", children: "Toggle Sidebar" })
39456
+ /* @__PURE__ */ jsx143(PanelLeft, {}),
39457
+ /* @__PURE__ */ jsx143("span", { className: "sr-only", children: "Toggle Sidebar" })
38952
39458
  ]
38953
39459
  }
38954
39460
  );
@@ -38956,7 +39462,7 @@ var SidebarTrigger = React100.forwardRef(({ className, onClick, ...props }, ref)
38956
39462
  SidebarTrigger.displayName = "SidebarTrigger";
38957
39463
  var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
38958
39464
  const { toggleSidebar } = useSidebar();
38959
- return /* @__PURE__ */ jsx138(
39465
+ return /* @__PURE__ */ jsx143(
38960
39466
  "button",
38961
39467
  {
38962
39468
  ref,
@@ -38980,7 +39486,7 @@ var SidebarRail = React100.forwardRef(({ className, ...props }, ref) => {
38980
39486
  });
38981
39487
  SidebarRail.displayName = "SidebarRail";
38982
39488
  var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
38983
- return /* @__PURE__ */ jsx138(
39489
+ return /* @__PURE__ */ jsx143(
38984
39490
  "main",
38985
39491
  {
38986
39492
  ref,
@@ -38995,7 +39501,7 @@ var SidebarInset = React100.forwardRef(({ className, ...props }, ref) => {
38995
39501
  });
38996
39502
  SidebarInset.displayName = "SidebarInset";
38997
39503
  var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
38998
- return /* @__PURE__ */ jsx138(
39504
+ return /* @__PURE__ */ jsx143(
38999
39505
  Input,
39000
39506
  {
39001
39507
  ref,
@@ -39010,7 +39516,7 @@ var SidebarInput = React100.forwardRef(({ className, ...props }, ref) => {
39010
39516
  });
39011
39517
  SidebarInput.displayName = "SidebarInput";
39012
39518
  var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
39013
- return /* @__PURE__ */ jsx138(
39519
+ return /* @__PURE__ */ jsx143(
39014
39520
  "div",
39015
39521
  {
39016
39522
  ref,
@@ -39022,7 +39528,7 @@ var SidebarHeader = React100.forwardRef(({ className, ...props }, ref) => {
39022
39528
  });
39023
39529
  SidebarHeader.displayName = "SidebarHeader";
39024
39530
  var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
39025
- return /* @__PURE__ */ jsx138(
39531
+ return /* @__PURE__ */ jsx143(
39026
39532
  "div",
39027
39533
  {
39028
39534
  ref,
@@ -39034,7 +39540,7 @@ var SidebarFooter = React100.forwardRef(({ className, ...props }, ref) => {
39034
39540
  });
39035
39541
  SidebarFooter.displayName = "SidebarFooter";
39036
39542
  var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
39037
- return /* @__PURE__ */ jsx138(
39543
+ return /* @__PURE__ */ jsx143(
39038
39544
  Separator2,
39039
39545
  {
39040
39546
  ref,
@@ -39046,7 +39552,7 @@ var SidebarSeparator = React100.forwardRef(({ className, ...props }, ref) => {
39046
39552
  });
39047
39553
  SidebarSeparator.displayName = "SidebarSeparator";
39048
39554
  var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
39049
- return /* @__PURE__ */ jsx138(
39555
+ return /* @__PURE__ */ jsx143(
39050
39556
  "div",
39051
39557
  {
39052
39558
  ref,
@@ -39061,7 +39567,7 @@ var SidebarContent = React100.forwardRef(({ className, ...props }, ref) => {
39061
39567
  });
39062
39568
  SidebarContent.displayName = "SidebarContent";
39063
39569
  var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
39064
- return /* @__PURE__ */ jsx138(
39570
+ return /* @__PURE__ */ jsx143(
39065
39571
  "div",
39066
39572
  {
39067
39573
  ref,
@@ -39074,7 +39580,7 @@ var SidebarGroup = React100.forwardRef(({ className, ...props }, ref) => {
39074
39580
  SidebarGroup.displayName = "SidebarGroup";
39075
39581
  var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
39076
39582
  const Comp = asChild ? Slot6 : "div";
39077
- return /* @__PURE__ */ jsx138(
39583
+ return /* @__PURE__ */ jsx143(
39078
39584
  Comp,
39079
39585
  {
39080
39586
  ref,
@@ -39091,7 +39597,7 @@ var SidebarGroupLabel = React100.forwardRef(({ className, asChild = false, ...pr
39091
39597
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
39092
39598
  var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...props }, ref) => {
39093
39599
  const Comp = asChild ? Slot6 : "button";
39094
- return /* @__PURE__ */ jsx138(
39600
+ return /* @__PURE__ */ jsx143(
39095
39601
  Comp,
39096
39602
  {
39097
39603
  ref,
@@ -39108,7 +39614,7 @@ var SidebarGroupAction = React100.forwardRef(({ className, asChild = false, ...p
39108
39614
  );
39109
39615
  });
39110
39616
  SidebarGroupAction.displayName = "SidebarGroupAction";
39111
- var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx138(
39617
+ var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx143(
39112
39618
  "div",
39113
39619
  {
39114
39620
  ref,
@@ -39118,7 +39624,7 @@ var SidebarGroupContent = React100.forwardRef(({ className, ...props }, ref) =>
39118
39624
  }
39119
39625
  ));
39120
39626
  SidebarGroupContent.displayName = "SidebarGroupContent";
39121
- var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx138(
39627
+ var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx143(
39122
39628
  "ul",
39123
39629
  {
39124
39630
  ref,
@@ -39128,7 +39634,7 @@ var SidebarMenu = React100.forwardRef(({ className, ...props }, ref) => /* @__PU
39128
39634
  }
39129
39635
  ));
39130
39636
  SidebarMenu.displayName = "SidebarMenu";
39131
- var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx138(
39637
+ var SidebarMenuItem = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx143(
39132
39638
  "li",
39133
39639
  {
39134
39640
  ref,
@@ -39170,7 +39676,7 @@ var SidebarMenuButton = React100.forwardRef(
39170
39676
  }, ref) => {
39171
39677
  const Comp = asChild ? Slot6 : "button";
39172
39678
  const { isMobile, state } = useSidebar();
39173
- const button = /* @__PURE__ */ jsx138(
39679
+ const button = /* @__PURE__ */ jsx143(
39174
39680
  Comp,
39175
39681
  {
39176
39682
  ref,
@@ -39189,9 +39695,9 @@ var SidebarMenuButton = React100.forwardRef(
39189
39695
  children: tooltip
39190
39696
  };
39191
39697
  }
39192
- return /* @__PURE__ */ jsxs92(Tooltip, { children: [
39193
- /* @__PURE__ */ jsx138(TooltipTrigger, { asChild: true, children: button }),
39194
- /* @__PURE__ */ jsx138(
39698
+ return /* @__PURE__ */ jsxs96(Tooltip, { children: [
39699
+ /* @__PURE__ */ jsx143(TooltipTrigger, { asChild: true, children: button }),
39700
+ /* @__PURE__ */ jsx143(
39195
39701
  TooltipContent,
39196
39702
  {
39197
39703
  side: "right",
@@ -39206,7 +39712,7 @@ var SidebarMenuButton = React100.forwardRef(
39206
39712
  SidebarMenuButton.displayName = "SidebarMenuButton";
39207
39713
  var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
39208
39714
  const Comp = asChild ? Slot6 : "button";
39209
- return /* @__PURE__ */ jsx138(
39715
+ return /* @__PURE__ */ jsx143(
39210
39716
  Comp,
39211
39717
  {
39212
39718
  ref,
@@ -39227,7 +39733,7 @@ var SidebarMenuAction = React100.forwardRef(({ className, asChild = false, showO
39227
39733
  );
39228
39734
  });
39229
39735
  SidebarMenuAction.displayName = "SidebarMenuAction";
39230
- var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx138(
39736
+ var SidebarMenuBadge = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx143(
39231
39737
  "div",
39232
39738
  {
39233
39739
  ref,
@@ -39249,7 +39755,7 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
39249
39755
  const width = React100.useMemo(() => {
39250
39756
  return `${Math.floor(Math.random() * 40) + 50}%`;
39251
39757
  }, []);
39252
- return /* @__PURE__ */ jsxs92(
39758
+ return /* @__PURE__ */ jsxs96(
39253
39759
  "div",
39254
39760
  {
39255
39761
  ref,
@@ -39257,14 +39763,14 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
39257
39763
  className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
39258
39764
  ...props,
39259
39765
  children: [
39260
- showIcon && /* @__PURE__ */ jsx138(
39766
+ showIcon && /* @__PURE__ */ jsx143(
39261
39767
  Skeleton,
39262
39768
  {
39263
39769
  className: "size-4 rounded-md",
39264
39770
  "data-sidebar": "menu-skeleton-icon"
39265
39771
  }
39266
39772
  ),
39267
- /* @__PURE__ */ jsx138(
39773
+ /* @__PURE__ */ jsx143(
39268
39774
  Skeleton,
39269
39775
  {
39270
39776
  className: "h-4 max-w-[--skeleton-width] flex-1",
@@ -39279,7 +39785,7 @@ var SidebarMenuSkeleton = React100.forwardRef(({ className, showIcon = false, ..
39279
39785
  );
39280
39786
  });
39281
39787
  SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
39282
- var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx138(
39788
+ var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx143(
39283
39789
  "ul",
39284
39790
  {
39285
39791
  ref,
@@ -39293,11 +39799,11 @@ var SidebarMenuSub = React100.forwardRef(({ className, ...props }, ref) => /* @_
39293
39799
  }
39294
39800
  ));
39295
39801
  SidebarMenuSub.displayName = "SidebarMenuSub";
39296
- var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx138("li", { ref, ...props }));
39802
+ var SidebarMenuSubItem = React100.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx143("li", { ref, ...props }));
39297
39803
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
39298
39804
  var SidebarMenuSubButton = React100.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
39299
39805
  const Comp = asChild ? Slot6 : "a";
39300
- return /* @__PURE__ */ jsx138(
39806
+ return /* @__PURE__ */ jsx143(
39301
39807
  Comp,
39302
39808
  {
39303
39809
  ref,
@@ -39321,20 +39827,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
39321
39827
  // src/components/ui/sonner.tsx
39322
39828
  import { useTheme } from "next-themes";
39323
39829
  import { Toaster as Sonner } from "sonner";
39324
- import { jsx as jsx139 } from "react/jsx-runtime";
39830
+ import { jsx as jsx144 } from "react/jsx-runtime";
39325
39831
  var Toaster = ({ ...props }) => {
39326
39832
  const { theme = "system" } = useTheme();
39327
- return /* @__PURE__ */ jsx139(
39833
+ return /* @__PURE__ */ jsx144(
39328
39834
  Sonner,
39329
39835
  {
39330
39836
  theme,
39331
39837
  className: "toaster group",
39332
39838
  icons: {
39333
- success: /* @__PURE__ */ jsx139(CircleCheck, { className: "h-4 w-4" }),
39334
- info: /* @__PURE__ */ jsx139(Info, { className: "h-4 w-4" }),
39335
- warning: /* @__PURE__ */ jsx139(TriangleAlert, { className: "h-4 w-4" }),
39336
- error: /* @__PURE__ */ jsx139(OctagonX, { className: "h-4 w-4" }),
39337
- loading: /* @__PURE__ */ jsx139(LoaderCircle, { className: "h-4 w-4 animate-spin" })
39839
+ success: /* @__PURE__ */ jsx144(CircleCheck, { className: "h-4 w-4" }),
39840
+ info: /* @__PURE__ */ jsx144(Info, { className: "h-4 w-4" }),
39841
+ warning: /* @__PURE__ */ jsx144(TriangleAlert, { className: "h-4 w-4" }),
39842
+ error: /* @__PURE__ */ jsx144(OctagonX, { className: "h-4 w-4" }),
39843
+ loading: /* @__PURE__ */ jsx144(LoaderCircle, { className: "h-4 w-4 animate-spin" })
39338
39844
  },
39339
39845
  toastOptions: {
39340
39846
  classNames: {
@@ -39352,24 +39858,24 @@ var Toaster = ({ ...props }) => {
39352
39858
  // src/components/ui/toggle-group.tsx
39353
39859
  import * as React101 from "react";
39354
39860
  import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
39355
- import { jsx as jsx140 } from "react/jsx-runtime";
39861
+ import { jsx as jsx145 } from "react/jsx-runtime";
39356
39862
  var ToggleGroupContext = React101.createContext({
39357
39863
  size: "default",
39358
39864
  variant: "default"
39359
39865
  });
39360
- var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx140(
39866
+ var ToggleGroup = React101.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx145(
39361
39867
  ToggleGroupPrimitive.Root,
39362
39868
  {
39363
39869
  ref,
39364
39870
  className: cn("flex items-center justify-center gap-1", className),
39365
39871
  ...props,
39366
- children: /* @__PURE__ */ jsx140(ToggleGroupContext.Provider, { value: { variant, size }, children })
39872
+ children: /* @__PURE__ */ jsx145(ToggleGroupContext.Provider, { value: { variant, size }, children })
39367
39873
  }
39368
39874
  ));
39369
39875
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
39370
39876
  var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size, ...props }, ref) => {
39371
39877
  const context = React101.useContext(ToggleGroupContext);
39372
- return /* @__PURE__ */ jsx140(
39878
+ return /* @__PURE__ */ jsx145(
39373
39879
  ToggleGroupPrimitive.Item,
39374
39880
  {
39375
39881
  ref,
@@ -39388,7 +39894,7 @@ var ToggleGroupItem = React101.forwardRef(({ className, children, variant, size,
39388
39894
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
39389
39895
 
39390
39896
  // src/render/PXEngineRenderer.tsx
39391
- import { jsx as jsx141, jsxs as jsxs93 } from "react/jsx-runtime";
39897
+ import { jsx as jsx146, jsxs as jsxs97 } from "react/jsx-runtime";
39392
39898
  var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
39393
39899
  // Form components - require FormField + FormItem context
39394
39900
  "FormLabel",
@@ -39480,24 +39986,24 @@ var COMPONENT_SUGGESTIONS = {
39480
39986
  };
39481
39987
  var renderContextDependentError = (componentName, normalizedName, key) => {
39482
39988
  const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
39483
- return /* @__PURE__ */ jsxs93(
39989
+ return /* @__PURE__ */ jsxs97(
39484
39990
  "div",
39485
39991
  {
39486
39992
  className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
39487
39993
  children: [
39488
- /* @__PURE__ */ jsxs93("div", { className: "flex items-start gap-2", children: [
39489
- /* @__PURE__ */ jsx141("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
39490
- /* @__PURE__ */ jsxs93("div", { className: "flex-1", children: [
39491
- /* @__PURE__ */ jsxs93("p", { className: "text-sm font-semibold text-amber-900", children: [
39994
+ /* @__PURE__ */ jsxs97("div", { className: "flex items-start gap-2", children: [
39995
+ /* @__PURE__ */ jsx146("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
39996
+ /* @__PURE__ */ jsxs97("div", { className: "flex-1", children: [
39997
+ /* @__PURE__ */ jsxs97("p", { className: "text-sm font-semibold text-amber-900", children: [
39492
39998
  "Invalid Component: ",
39493
39999
  componentName
39494
40000
  ] }),
39495
- /* @__PURE__ */ jsx141("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
40001
+ /* @__PURE__ */ jsx146("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
39496
40002
  ] })
39497
40003
  ] }),
39498
- /* @__PURE__ */ jsxs93("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
39499
- /* @__PURE__ */ jsx141("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
39500
- /* @__PURE__ */ jsx141("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
40004
+ /* @__PURE__ */ jsxs97("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
40005
+ /* @__PURE__ */ jsx146("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
40006
+ /* @__PURE__ */ jsx146("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
39501
40007
  ] })
39502
40008
  ]
39503
40009
  },
@@ -39656,7 +40162,7 @@ var PXEngineRenderer = ({
39656
40162
  const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
39657
40163
  const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
39658
40164
  if (isAtomWithRenderProp) {
39659
- return /* @__PURE__ */ jsx141(
40165
+ return /* @__PURE__ */ jsx146(
39660
40166
  TargetComponent,
39661
40167
  {
39662
40168
  ...finalProps,
@@ -39668,7 +40174,7 @@ var PXEngineRenderer = ({
39668
40174
  uniqueKey
39669
40175
  );
39670
40176
  } else {
39671
- return /* @__PURE__ */ jsx141(
40177
+ return /* @__PURE__ */ jsx146(
39672
40178
  TargetComponent,
39673
40179
  {
39674
40180
  ...finalProps,
@@ -39680,7 +40186,7 @@ var PXEngineRenderer = ({
39680
40186
  );
39681
40187
  }
39682
40188
  };
39683
- return /* @__PURE__ */ jsx141("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
40189
+ return /* @__PURE__ */ jsx146("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
39684
40190
  };
39685
40191
  export {
39686
40192
  Accordion,
@@ -39774,9 +40280,14 @@ export {
39774
40280
  CountrySelectDisplay,
39775
40281
  CountrySelectEdit,
39776
40282
  CreatorActionHeader,
40283
+ CreatorCompactView,
39777
40284
  CreatorGridCard,
40285
+ CreatorImageList,
39778
40286
  CreatorProfileSummary,
40287
+ CreatorProgressBar,
39779
40288
  CreatorSearch,
40289
+ CreatorWidget,
40290
+ CreatorWidgetSkeleton,
39780
40291
  DataGrid,
39781
40292
  Dialog,
39782
40293
  DialogAtom,
@@ -39954,7 +40465,8 @@ export {
39954
40465
  UIComponentSelector,
39955
40466
  VideoAtom,
39956
40467
  WorkflowVisualizer,
39957
- cn
40468
+ cn,
40469
+ useCreatorWidgetPolling
39958
40470
  };
39959
40471
  /*! Bundled license information:
39960
40472