@datatechsolutions/ui 2.11.4 → 2.11.6

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.
@@ -3,8 +3,8 @@
3
3
 
4
4
  require('../chunk-55H6WZQP.js');
5
5
  var chunk3GE3MBUZ_js = require('../chunk-3GE3MBUZ.js');
6
- var chunkAZ3BXAI6_js = require('../chunk-AZ3BXAI6.js');
7
- var chunkEVX2CFNL_js = require('../chunk-EVX2CFNL.js');
6
+ var chunkE7GVGD4Z_js = require('../chunk-E7GVGD4Z.js');
7
+ var chunk4XID6LOC_js = require('../chunk-4XID6LOC.js');
8
8
  require('../chunk-S7KHTUHA.js');
9
9
  require('../chunk-UZ3CMNUJ.js');
10
10
  var chunkP4YYEM4B_js = require('../chunk-P4YYEM4B.js');
@@ -83,7 +83,7 @@ function OutputCard({ label, value }) {
83
83
  function AgentProfileHeader({ agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged }) {
84
84
  const modelName = models.find((model) => model.id === selectedModelId)?.name ?? selectedModelId ?? "\u2014";
85
85
  const avatarUrl = agent.avatar;
86
- const frameworkMeta = chunkAZ3BXAI6_js.getFrameworkMeta(selectedFramework);
86
+ const frameworkMeta = chunkE7GVGD4Z_js.getFrameworkMeta(selectedFramework);
87
87
  const tierInfo = getEloTier(elo);
88
88
  const difficultyConfig = {
89
89
  beginner: { color: "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-400", labelKey: "agentDrawer.tierBeginner" },
@@ -284,7 +284,12 @@ function AgentCapabilityCard({ elo, setElo, models, selectedModelId, setSelected
284
284
  step: "50",
285
285
  value: elo,
286
286
  onChange: handleEloChange,
287
- className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-gray-900"
287
+ "aria-label": t("agentDrawer.capabilityRating"),
288
+ "aria-valuemin": 800,
289
+ "aria-valuemax": 2400,
290
+ "aria-valuenow": elo,
291
+ "aria-valuetext": `${elo} ELO \u2014 ${t(`agentDrawer.tier${tierInfo.tierKey.charAt(0).toUpperCase()}${tierInfo.tierKey.slice(1)}`)}`,
292
+ className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-gray-900"
288
293
  }
289
294
  ),
290
295
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: `input[type="range"]::-webkit-slider-thumb { background: ${elo < 1200 ? "#06b6d4" : elo < 1600 ? "#ec4899" : elo < 2e3 ? "#f59e0b" : "#10b981"}; box-shadow: 0 0 6px ${elo < 1200 ? "rgba(6,182,212,0.5)" : elo < 1600 ? "rgba(236,72,153,0.5)" : elo < 2e3 ? "rgba(245,158,11,0.5)" : "rgba(16,185,129,0.5)"}; }` })
@@ -329,16 +334,18 @@ function AgentCapabilityCard({ elo, setElo, models, selectedModelId, setSelected
329
334
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-[10px] font-semibold ${tierInfo.color}`, children: t(`agentDrawer.${tierInfo.autonomyKey}`) })
330
335
  ] }),
331
336
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1", children: [
332
- { level: 25, label: "Low" },
333
- { level: 50, label: "Med" },
334
- { level: 75, label: "High" },
335
- { level: 100, label: "Full" }
336
- ].map(({ level }) => /* @__PURE__ */ jsxRuntime.jsx(
337
+ { level: 25, labelKey: "autonomyLow" },
338
+ { level: 50, labelKey: "autonomyMedium" },
339
+ { level: 75, labelKey: "autonomyHigh" },
340
+ { level: 100, labelKey: "autonomyFull" }
341
+ ].map(({ level, labelKey }) => /* @__PURE__ */ jsxRuntime.jsx(
337
342
  "button",
338
343
  {
339
344
  type: "button",
340
345
  onClick: () => handleAutonomyClick(level),
341
- className: `h-2 flex-1 rounded-full transition-all ${level <= tierInfo.autonomyPercent ? `bg-gradient-to-r ${tierInfo.barColor} hover:opacity-80` : "bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600"}`
346
+ "aria-label": t(`agentDrawer.${labelKey}`),
347
+ "aria-pressed": level <= tierInfo.autonomyPercent,
348
+ className: `h-2 flex-1 rounded-full transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 ${level <= tierInfo.autonomyPercent ? `bg-gradient-to-r ${tierInfo.barColor} hover:opacity-80` : "bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600"}`
342
349
  },
343
350
  level
344
351
  )) }),
@@ -361,19 +368,19 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
361
368
  setPromptText(event.target.value);
362
369
  markDirty();
363
370
  }, []);
364
- const handleSave = react.useCallback(() => {
371
+ react.useCallback(() => {
365
372
  markSaved();
366
373
  }, [markSaved]);
367
374
  const temperaturePercent = temperature * 100;
368
375
  const isPrecise = temperature <= 0.3;
369
376
  const isBalanced = temperature > 0.3 && temperature <= 0.7;
370
377
  const isCreative = temperature > 0.7;
371
- const frameworkKeys = Object.keys(chunkAZ3BXAI6_js.FRAMEWORK_META);
372
- const compatibleModels = chunkAZ3BXAI6_js.getCompatibleModels(models, selectedFramework);
378
+ const frameworkKeys = Object.keys(chunkE7GVGD4Z_js.FRAMEWORK_META);
379
+ const compatibleModels = chunkE7GVGD4Z_js.getCompatibleModels(models, selectedFramework);
373
380
  const handleFrameworkChange = react.useCallback((newFramework) => {
374
381
  setSelectedFramework(newFramework);
375
- if (!chunkAZ3BXAI6_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
376
- const compatible = chunkAZ3BXAI6_js.getCompatibleModels(models, newFramework);
382
+ if (!chunkE7GVGD4Z_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
383
+ const compatible = chunkE7GVGD4Z_js.getCompatibleModels(models, newFramework);
377
384
  if (compatible.length > 0) {
378
385
  setSelectedModelId(compatible[0].id);
379
386
  }
@@ -384,9 +391,9 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
384
391
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
385
392
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.framework") }),
386
393
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: frameworkKeys.map((key) => {
387
- const meta = chunkAZ3BXAI6_js.FRAMEWORK_META[key];
394
+ const meta = chunkE7GVGD4Z_js.FRAMEWORK_META[key];
388
395
  const isSelected = key === selectedFramework;
389
- const compatCount = chunkAZ3BXAI6_js.getCompatibleModels(models, key).length;
396
+ const compatCount = chunkE7GVGD4Z_js.getCompatibleModels(models, key).length;
390
397
  return /* @__PURE__ */ jsxRuntime.jsxs(
391
398
  "button",
392
399
  {
@@ -416,7 +423,7 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
416
423
  ] }),
417
424
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2", children: models.map((model) => {
418
425
  const isSelected = model.id === selectedModelId;
419
- const isCompatible = chunkAZ3BXAI6_js.isModelCompatibleWithFramework(model.id, selectedFramework);
426
+ const isCompatible = chunkE7GVGD4Z_js.isModelCompatibleWithFramework(model.id, selectedFramework);
420
427
  const { IconComponent, color, providerLabel } = getModelIcon(model.id);
421
428
  return /* @__PURE__ */ jsxRuntime.jsxs(
422
429
  "button",
@@ -465,7 +472,12 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
465
472
  step: "0.05",
466
473
  value: temperature,
467
474
  onChange: handleTemperatureChange,
468
- className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-gray-900",
475
+ "aria-label": t("agentDrawer.temperature"),
476
+ "aria-valuemin": 0,
477
+ "aria-valuemax": 1,
478
+ "aria-valuenow": temperature,
479
+ "aria-valuetext": `${temperature.toFixed(2)} \u2014 ${isPrecise ? t("agentDrawer.precise") : isBalanced ? t("agentDrawer.balanced") : t("agentDrawer.creative")}`,
480
+ className: "relative z-10 h-5 w-full cursor-pointer appearance-none bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 [&::-webkit-slider-thumb]:h-5 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:shadow-lg dark:[&::-webkit-slider-thumb]:border-gray-900",
469
481
  style: {
470
482
  // Thumb color based on temperature zone
471
483
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -489,21 +501,9 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
489
501
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
490
502
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1 flex items-center justify-between", children: [
491
503
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.systemPrompt") }),
492
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
493
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
494
- promptText.length,
495
- " chars"
496
- ] }),
497
- dirty && /* @__PURE__ */ jsxRuntime.jsx(
498
- "button",
499
- {
500
- type: "button",
501
- onClick: handleSave,
502
- className: "rounded-md bg-gradient-to-r from-indigo-500 to-purple-500 px-2.5 py-1 text-[10px] font-semibold text-white shadow-sm transition-all hover:from-indigo-600 hover:to-purple-600",
503
- children: t("agentDrawer.save")
504
- }
505
- ),
506
- !dirty && promptText.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium text-emerald-500", children: t("agentDrawer.saved") })
504
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: [
505
+ promptText.length,
506
+ " chars"
507
507
  ] })
508
508
  ] }),
509
509
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -520,7 +520,7 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
520
520
  ] });
521
521
  }
522
522
  function ResultsTab({ agentId, t }) {
523
- const nodeResults = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.nodeResults);
523
+ const nodeResults = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.nodeResults);
524
524
  const agentResult = react.useMemo(() => {
525
525
  return nodeResults[agentId] ?? null;
526
526
  }, [nodeResults, agentId]);
@@ -547,11 +547,11 @@ function ResultsTab({ agentId, t }) {
547
547
  ] })
548
548
  ] });
549
549
  }
550
- function AgentDrawer({ onSaved }) {
550
+ function AgentModal({ onSaved }) {
551
551
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
552
- const activeModal = chunkAZ3BXAI6_js.useModalStore((s) => s.activeModal);
553
- const agentData = chunkAZ3BXAI6_js.useModalStore((s) => s.agentData);
554
- const closeModal = chunkAZ3BXAI6_js.useModalStore((s) => s.closeModal);
552
+ const activeModal = chunkE7GVGD4Z_js.useModalStore((s) => s.activeModal);
553
+ const agentData = chunkE7GVGD4Z_js.useModalStore((s) => s.agentData);
554
+ const closeModal = chunkE7GVGD4Z_js.useModalStore((s) => s.closeModal);
555
555
  const open = activeModal === "agent";
556
556
  const agent = agentData?.agent ?? null;
557
557
  const models = agentData?.models ?? [];
@@ -593,8 +593,32 @@ function AgentDrawer({ onSaved }) {
593
593
  },
594
594
  tab
595
595
  )) });
596
+ const footer = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
597
+ /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-live": "polite", className: "text-xs", children: dirty ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-amber-500 dark:text-amber-400", children: t("agentDrawer.unsavedChanges") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-emerald-500 dark:text-emerald-400", children: t("agentDrawer.saved") }) }),
598
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
599
+ /* @__PURE__ */ jsxRuntime.jsx(
600
+ "button",
601
+ {
602
+ type: "button",
603
+ onClick: handleClose,
604
+ className: "rounded-lg border border-gray-200/50 px-4 py-2 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-100/50 dark:border-white/10 dark:text-gray-300 dark:hover:bg-white/5",
605
+ children: t("agentDrawer.cancel")
606
+ }
607
+ ),
608
+ /* @__PURE__ */ jsxRuntime.jsx(
609
+ "button",
610
+ {
611
+ type: "button",
612
+ onClick: handleMarkSaved,
613
+ disabled: !dirty,
614
+ className: `rounded-lg px-4 py-2 text-xs font-semibold text-white shadow-sm transition-all ${dirty ? "bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600" : "cursor-not-allowed bg-gray-300 dark:bg-gray-700"}`,
615
+ children: t("agentDrawer.save")
616
+ }
617
+ )
618
+ ] })
619
+ ] });
596
620
  return /* @__PURE__ */ jsxRuntime.jsxs(
597
- chunkAZ3BXAI6_js.WorkspaceModal,
621
+ chunk4XID6LOC_js.GlassModalShell,
598
622
  {
599
623
  open,
600
624
  onClose: handleClose,
@@ -602,7 +626,11 @@ function AgentDrawer({ onSaved }) {
602
626
  subtitle: agent.role ?? "",
603
627
  gradient: "from-indigo-500 to-purple-600",
604
628
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-6 w-6 text-white" }),
605
- tabs,
629
+ label: isCreateMode ? t("agentDrawer.createAgent") : t("agentDrawer.editAgent"),
630
+ headerActions: tabs,
631
+ footer,
632
+ maxWidth: "2xl",
633
+ closeLabel: t("agentDrawer.close"),
606
634
  children: [
607
635
  /* @__PURE__ */ jsxRuntime.jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
608
636
  activeTab === "config" ? /* @__PURE__ */ jsxRuntime.jsx(ConfigTab, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework: (fw) => setSelectedFramework(fw), temperature, setTemperature, dirty, markDirty, markSaved: handleMarkSaved }) : /* @__PURE__ */ jsxRuntime.jsx(ResultsTab, { agentId: agent.agentId, t })
@@ -621,7 +649,7 @@ var useSubworkflowStore = zustand.create((set) => ({
621
649
  retryCount: 0,
622
650
  dirty: false,
623
651
  // Actions
624
- openDrawer: (tool) => set({
652
+ openModal: (tool) => set({
625
653
  tool,
626
654
  open: true,
627
655
  name: tool.name ?? "",
@@ -685,6 +713,7 @@ function ConfigSection({ title, icon: Icon, defaultOpen = true, children }) {
685
713
  {
686
714
  type: "button",
687
715
  onClick: () => setOpen(!open),
716
+ "aria-expanded": open,
688
717
  className: "flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-white/5",
689
718
  children: [
690
719
  open ? /* @__PURE__ */ jsxRuntime.jsx(outline.ChevronDownIcon, { className: "h-3 w-3 text-gray-400" }) : /* @__PURE__ */ jsxRuntime.jsx(outline.ChevronRightIcon, { className: "h-3 w-3 text-gray-400" }),
@@ -696,7 +725,7 @@ function ConfigSection({ title, icon: Icon, defaultOpen = true, children }) {
696
725
  open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-3", children })
697
726
  ] });
698
727
  }
699
- function SubworkflowDrawer({ onSaved, onMaximize }) {
728
+ function SubworkflowModal({ onSaved, onMaximize }) {
700
729
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
701
730
  const tool = useSubworkflowStore((s) => s.tool);
702
731
  const open = useSubworkflowStore((s) => s.open);
@@ -742,9 +771,9 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
742
771
  }, [tool, onSaved, name, category, description, timeoutMs, latestGraphRef, markSaved]);
743
772
  if (!tool) return null;
744
773
  const categoryKey = category ?? "external";
745
- const gradient = tool.color ?? chunkAZ3BXAI6_js.CATEGORY_COLORS[categoryKey] ?? chunkAZ3BXAI6_js.CATEGORY_COLORS.external;
746
- const categoryPill = chunkAZ3BXAI6_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunkAZ3BXAI6_js.CATEGORY_PILL_COLORS.external;
747
- const IconComponent = chunkAZ3BXAI6_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
774
+ const gradient = tool.color ?? chunkE7GVGD4Z_js.CATEGORY_COLORS[categoryKey] ?? chunkE7GVGD4Z_js.CATEGORY_COLORS.external;
775
+ const categoryPill = chunkE7GVGD4Z_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunkE7GVGD4Z_js.CATEGORY_PILL_COLORS.external;
776
+ const IconComponent = chunkE7GVGD4Z_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
748
777
  const graph = latestGraphRef.current;
749
778
  const startNode = graph.nodes.find((n) => n.type === "start");
750
779
  const endNode = graph.nodes.find((n) => n.type === "end");
@@ -752,16 +781,42 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
752
781
  const endConfig = endNode?.data?.config;
753
782
  const inputVariables = (startConfig?.inputVariables ?? []).map((v) => ({ name: v, type: "string" }));
754
783
  const outputVariables = (endConfig?.outputVariables ?? []).map((v) => ({ name: v, type: "string" }));
784
+ const footer = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
785
+ /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", "aria-live": "polite", className: "text-xs", children: dirty ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-amber-500 dark:text-amber-400", children: t("subworkflowDrawer.unsavedChanges") }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-emerald-500 dark:text-emerald-400", children: t("subworkflowDrawer.saved") }) }),
786
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
787
+ /* @__PURE__ */ jsxRuntime.jsx(
788
+ "button",
789
+ {
790
+ type: "button",
791
+ onClick: closeModal,
792
+ className: "rounded-lg border border-gray-200/50 px-4 py-2 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-100/50 dark:border-white/10 dark:text-gray-300 dark:hover:bg-white/5",
793
+ children: t("subworkflowDrawer.cancel")
794
+ }
795
+ ),
796
+ /* @__PURE__ */ jsxRuntime.jsx(
797
+ "button",
798
+ {
799
+ type: "button",
800
+ onClick: handleSave,
801
+ disabled: isCreateMode && !name.trim(),
802
+ className: `rounded-lg px-4 py-2 text-xs font-semibold text-white shadow-sm transition-all ${dirty ? "bg-gradient-to-r from-teal-500 to-cyan-500 hover:from-teal-600 hover:to-cyan-600" : "cursor-not-allowed bg-gray-300 dark:bg-gray-700"}`,
803
+ children: isCreateMode ? t("subworkflowDrawer.create") : t("subworkflowDrawer.save")
804
+ }
805
+ )
806
+ ] })
807
+ ] });
755
808
  return /* @__PURE__ */ jsxRuntime.jsx(
756
- chunkAZ3BXAI6_js.WorkspaceModal,
809
+ chunk4XID6LOC_js.GlassModalShell,
757
810
  {
758
811
  open,
759
812
  onClose: closeModal,
760
813
  title: isCreateMode ? t("subworkflowDrawer.createTitle") : name,
761
814
  subtitle: t("subworkflowDrawer.subworkflow"),
815
+ label: isCreateMode ? t("subworkflowDrawer.new") : t("subworkflowDrawer.edit"),
762
816
  gradient: "from-teal-500 to-cyan-600",
763
817
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.ArrowPathRoundedSquareIcon, { className: "h-6 w-6 text-white" }),
764
- maxWidth: "max-w-6xl",
818
+ maxWidth: "6xl",
819
+ footer,
765
820
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[80vh] min-h-[600px]", children: [
766
821
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-72 flex-shrink-0 flex-col overflow-y-auto border-r border-white/10", children: [
767
822
  isCreateMode ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-white/10 bg-gradient-to-br from-teal-500/15 via-cyan-500/8 to-transparent px-4 py-4 dark:from-teal-500/8 dark:via-cyan-500/4", children: [
@@ -782,7 +837,7 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
782
837
  {
783
838
  type: "button",
784
839
  onClick: () => setCategory(cat),
785
- className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunkAZ3BXAI6_js.CATEGORY_PILL_COLORS[cat] ?? chunkAZ3BXAI6_js.CATEGORY_PILL_COLORS.external} ring-1 ring-current/20` : "bg-white/30 text-gray-500 hover:bg-white/50 dark:bg-white/5 dark:text-gray-400"}`,
840
+ className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunkE7GVGD4Z_js.CATEGORY_PILL_COLORS[cat] ?? chunkE7GVGD4Z_js.CATEGORY_PILL_COLORS.external} ring-1 ring-current/20` : "bg-white/30 text-gray-500 hover:bg-white/50 dark:bg-white/5 dark:text-gray-400"}`,
786
841
  children: cat
787
842
  },
788
843
  cat
@@ -840,7 +895,12 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
840
895
  step: "1000",
841
896
  value: timeoutMs,
842
897
  onChange: (event) => setTimeoutMs(parseInt(event.target.value, 10)),
843
- className: "h-3 w-full cursor-pointer appearance-none rounded-full bg-gray-200 dark:bg-gray-700 [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-teal-500"
898
+ "aria-label": t("subworkflowDrawer.timeout"),
899
+ "aria-valuemin": 1,
900
+ "aria-valuemax": 30,
901
+ "aria-valuenow": timeoutMs / 1e3,
902
+ "aria-valuetext": `${(timeoutMs / 1e3).toFixed(0)} seconds`,
903
+ className: "h-3 w-full cursor-pointer appearance-none rounded-full bg-gray-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-teal-500 dark:bg-gray-700 [&::-webkit-slider-thumb]:h-3 [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-teal-500"
844
904
  }
845
905
  )
846
906
  ] }),
@@ -861,19 +921,10 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
861
921
  )) })
862
922
  ] })
863
923
  ] }),
864
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto border-t border-white/10 px-4 py-3", children: dirty ? /* @__PURE__ */ jsxRuntime.jsx(
865
- "button",
866
- {
867
- type: "button",
868
- onClick: handleSave,
869
- disabled: isCreateMode && !name.trim(),
870
- className: "w-full rounded-lg bg-gradient-to-r from-teal-500 to-cyan-500 py-2 text-xs font-semibold text-white shadow-sm transition-all hover:from-teal-600 hover:to-cyan-600 disabled:cursor-not-allowed disabled:opacity-40",
871
- children: isCreateMode ? t("subworkflowDrawer.create") : t("subworkflowDrawer.save")
872
- }
873
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-[10px] font-medium text-emerald-500", children: t("subworkflowDrawer.saved") }) })
924
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto" })
874
925
  ] }),
875
926
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
876
- chunkAZ3BXAI6_js.WorkflowCanvas,
927
+ chunkE7GVGD4Z_js.WorkflowCanvas,
877
928
  {
878
929
  initialGraph,
879
930
  agents: [],
@@ -887,11 +938,47 @@ function SubworkflowDrawer({ onSaved, onMaximize }) {
887
938
  }
888
939
  );
889
940
  }
941
+ var LEGACY_WIDTH_MAP = {
942
+ "max-w-xl": "xl",
943
+ "max-w-2xl": "2xl",
944
+ "max-w-4xl": "4xl",
945
+ "max-w-6xl": "6xl",
946
+ "max-w-full": "full"
947
+ };
948
+ function WorkspaceModal({
949
+ open,
950
+ onClose,
951
+ title,
952
+ subtitle,
953
+ icon,
954
+ gradient = "from-gray-400 to-gray-500",
955
+ maxWidth = "2xl",
956
+ tabs,
957
+ children
958
+ }) {
959
+ const resolvedSize = LEGACY_WIDTH_MAP[maxWidth] ?? maxWidth;
960
+ return /* @__PURE__ */ jsxRuntime.jsxs(
961
+ chunk4XID6LOC_js.GlassModalShell,
962
+ {
963
+ open,
964
+ onClose,
965
+ title,
966
+ subtitle,
967
+ icon,
968
+ gradient,
969
+ maxWidth: resolvedSize,
970
+ children: [
971
+ tabs,
972
+ children
973
+ ]
974
+ }
975
+ );
976
+ }
890
977
  function PipelineSettingsModal({ onSave }) {
891
978
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
892
- const activeModal = chunkAZ3BXAI6_js.useModalStore((s) => s.activeModal);
893
- const data = chunkAZ3BXAI6_js.useModalStore((s) => s.pipelineSettingsData);
894
- const closeModal = chunkAZ3BXAI6_js.useModalStore((s) => s.closeModal);
979
+ const activeModal = chunkE7GVGD4Z_js.useModalStore((s) => s.activeModal);
980
+ const data = chunkE7GVGD4Z_js.useModalStore((s) => s.pipelineSettingsData);
981
+ const closeModal = chunkE7GVGD4Z_js.useModalStore((s) => s.closeModal);
895
982
  const open = activeModal === "pipeline-settings";
896
983
  const [nameValue, setNameValue] = react.useState("");
897
984
  const [descriptionValue, setDescriptionValue] = react.useState("");
@@ -915,18 +1002,47 @@ function PipelineSettingsModal({ onSave }) {
915
1002
  setIsSaving(false);
916
1003
  }
917
1004
  };
1005
+ const footer = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2", children: [
1006
+ /* @__PURE__ */ jsxRuntime.jsx(
1007
+ "button",
1008
+ {
1009
+ type: "button",
1010
+ onClick: closeModal,
1011
+ className: "rounded-lg border border-gray-200/50 px-4 py-2 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-100/50 dark:border-white/10 dark:text-gray-300 dark:hover:bg-white/5",
1012
+ children: t("cancel")
1013
+ }
1014
+ ),
1015
+ /* @__PURE__ */ jsxRuntime.jsxs(
1016
+ chunk4XID6LOC_js.Button,
1017
+ {
1018
+ type: "submit",
1019
+ form: "pipeline-settings-form",
1020
+ color: "ios-glass-blue",
1021
+ loading: isSaving,
1022
+ loadingText: t("saving"),
1023
+ children: [
1024
+ /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-4 w-4" }),
1025
+ t("saveSettings")
1026
+ ]
1027
+ }
1028
+ )
1029
+ ] });
918
1030
  return /* @__PURE__ */ jsxRuntime.jsx(
919
- chunkAZ3BXAI6_js.WorkspaceModal,
1031
+ chunk4XID6LOC_js.GlassModalShell,
920
1032
  {
921
1033
  open,
922
1034
  onClose: closeModal,
923
1035
  title: t("pipelineSettings"),
924
1036
  subtitle: t("pipelineSettingsSubtitle"),
1037
+ label: t("settings"),
925
1038
  icon: /* @__PURE__ */ jsxRuntime.jsx(outline.Cog6ToothIcon, { className: "h-5 w-5 text-white" }),
926
1039
  gradient: "from-indigo-500 to-purple-600",
927
- children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "space-y-6", children: [
1040
+ maxWidth: "md",
1041
+ footer,
1042
+ onSubmit: handleSubmit,
1043
+ children: /* @__PURE__ */ jsxRuntime.jsxs("form", { id: "pipeline-settings-form", onSubmit: handleSubmit, className: "space-y-6", children: [
928
1044
  /* @__PURE__ */ jsxRuntime.jsx(
929
- chunkEVX2CFNL_js.FormInput,
1045
+ chunk4XID6LOC_js.FormInput,
930
1046
  {
931
1047
  label: t("pipelineName"),
932
1048
  value: nameValue,
@@ -936,7 +1052,7 @@ function PipelineSettingsModal({ onSave }) {
936
1052
  }
937
1053
  ),
938
1054
  /* @__PURE__ */ jsxRuntime.jsx(
939
- chunkEVX2CFNL_js.FormTextarea,
1055
+ chunk4XID6LOC_js.FormTextarea,
940
1056
  {
941
1057
  label: t("pipelineDescription"),
942
1058
  value: descriptionValue,
@@ -944,21 +1060,7 @@ function PipelineSettingsModal({ onSave }) {
944
1060
  placeholder: t("pipelineDescriptionPlaceholder"),
945
1061
  rows: 4
946
1062
  }
947
- ),
948
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
949
- chunkEVX2CFNL_js.Button,
950
- {
951
- type: "submit",
952
- color: "ios-glass-blue",
953
- fullWidth: true,
954
- loading: isSaving,
955
- loadingText: t("saving"),
956
- children: [
957
- /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-4 w-4" }),
958
- t("saveSettings")
959
- ]
960
- }
961
- ) })
1063
+ )
962
1064
  ] })
963
1065
  }
964
1066
  );
@@ -1059,8 +1161,8 @@ function CollapsibleSection({ title, icon, colorClass, defaultOpen = true, count
1059
1161
  ] });
1060
1162
  }
1061
1163
  function LogicNodeItemCard({ item, translationFunction }) {
1062
- const IconComponent = chunkAZ3BXAI6_js.LOGIC_ICON_MAP[item.nodeType];
1063
- const gradient = chunkAZ3BXAI6_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
1164
+ const IconComponent = chunkE7GVGD4Z_js.LOGIC_ICON_MAP[item.nodeType];
1165
+ const gradient = chunkE7GVGD4Z_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
1064
1166
  const defaultConfig = chunkPWBWP5FJ_js.createDefaultLogicNodeConfig(item.nodeType);
1065
1167
  const configJson = defaultConfig ? JSON.stringify(defaultConfig) : void 0;
1066
1168
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1300,8 +1402,8 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], onC
1300
1402
  outputVariable: `${entity.label.replace(/\s+/g, "")}Data`,
1301
1403
  limit: entity.defaultLimit
1302
1404
  });
1303
- const EntityIcon = chunkAZ3BXAI6_js.getEntityIcon(entity.id);
1304
- const entityGradient = chunkAZ3BXAI6_js.getEntityGradient(entity.id);
1405
+ const EntityIcon = chunkE7GVGD4Z_js.getEntityIcon(entity.id);
1406
+ const entityGradient = chunkE7GVGD4Z_js.getEntityGradient(entity.id);
1305
1407
  return /* @__PURE__ */ jsxRuntime.jsxs(
1306
1408
  "div",
1307
1409
  {
@@ -1640,9 +1742,9 @@ function formatDuration2(durationMs) {
1640
1742
  }
1641
1743
  function RunPanel({ open, onClose, onRun, onStop }) {
1642
1744
  const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.runPanel");
1643
- const nodes = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.nodes);
1644
- const isRunning = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.isRunning);
1645
- const nodeResults = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.nodeResults);
1745
+ const nodes = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.nodes);
1746
+ const isRunning = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.isRunning);
1747
+ const nodeResults = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.nodeResults);
1646
1748
  const startNode = nodes.find((node) => node.type === "start");
1647
1749
  const hasEndNode = nodes.some((node) => node.type === "end");
1648
1750
  const hasValidStartConfig = Boolean(
@@ -1927,8 +2029,8 @@ function inferVariables(config, nodeType) {
1927
2029
  }
1928
2030
  function VariableInspector({ open, onClose }) {
1929
2031
  const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.variableInspector");
1930
- const nodes = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.nodes);
1931
- const edges = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.edges);
2032
+ const nodes = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.nodes);
2033
+ const edges = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.edges);
1932
2034
  const [expandedNodes, setExpandedNodes] = react.useState(/* @__PURE__ */ new Set());
1933
2035
  const toggleNodeExpansion = react.useCallback((nodeId) => {
1934
2036
  setExpandedNodes((current) => {
@@ -1990,8 +2092,8 @@ function VariableInspector({ open, onClose }) {
1990
2092
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: translations("noNodes") })
1991
2093
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-100 dark:divide-gray-800", children: nodeVariableEntries.map((entry) => {
1992
2094
  const isExpanded = expandedNodes.has(entry.nodeId);
1993
- const IconComponent = chunkAZ3BXAI6_js.LOGIC_ICON_MAP[entry.nodeType];
1994
- const gradient = chunkAZ3BXAI6_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
2095
+ const IconComponent = chunkE7GVGD4Z_js.LOGIC_ICON_MAP[entry.nodeType];
2096
+ const gradient = chunkE7GVGD4Z_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
1995
2097
  const inputVariables = entry.variables.filter((variable) => variable.direction === "input");
1996
2098
  const outputVariables = entry.variables.filter((variable) => variable.direction === "output");
1997
2099
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `variable-node-${entry.nodeId}`, children: [
@@ -2057,7 +2159,7 @@ function RunInputDialog({
2057
2159
  onRun
2058
2160
  }) {
2059
2161
  const t = chunkYXN2K77G_js.useTranslations("agents.workflow.runInputDialog");
2060
- const nodes = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.nodes);
2162
+ const nodes = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.nodes);
2061
2163
  const [values, setValues] = react.useState({});
2062
2164
  const inputVariableNames = react.useMemo(() => {
2063
2165
  const storeStartNode = nodes.find((node) => node.type === "start");
@@ -2084,7 +2186,7 @@ function RunInputDialog({
2084
2186
  }, [onClose]);
2085
2187
  if (!open) return null;
2086
2188
  return /* @__PURE__ */ jsxRuntime.jsxs(
2087
- chunkEVX2CFNL_js.GlassFormModal,
2189
+ chunk4XID6LOC_js.GlassFormModal,
2088
2190
  {
2089
2191
  open,
2090
2192
  onClose: handleClose,
@@ -2096,7 +2198,7 @@ function RunInputDialog({
2096
2198
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: inputVariableNames.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-sm text-gray-500 dark:text-gray-400", children: t("noInputs") }) : inputVariableNames.map((variableName) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2097
2199
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-1 block text-xs font-medium text-gray-700 dark:text-gray-300", children: variableName }),
2098
2200
  /* @__PURE__ */ jsxRuntime.jsx(
2099
- chunkEVX2CFNL_js.Input,
2201
+ chunk4XID6LOC_js.Input,
2100
2202
  {
2101
2203
  value: values[variableName] ?? "",
2102
2204
  onChange: (event) => handleValueChange(variableName, event.target.value),
@@ -2105,8 +2207,8 @@ function RunInputDialog({
2105
2207
  )
2106
2208
  ] }, variableName)) }),
2107
2209
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex items-center justify-end gap-2", children: [
2108
- /* @__PURE__ */ jsxRuntime.jsx(chunkEVX2CFNL_js.Button, { size: "sm", plain: true, onClick: handleClose, children: t("cancel") }),
2109
- /* @__PURE__ */ jsxRuntime.jsxs(chunkEVX2CFNL_js.Button, { size: "sm", gradient: true, onClick: handleSubmit, children: [
2210
+ /* @__PURE__ */ jsxRuntime.jsx(chunk4XID6LOC_js.Button, { size: "sm", plain: true, onClick: handleClose, children: t("cancel") }),
2211
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk4XID6LOC_js.Button, { size: "sm", gradient: true, onClick: handleSubmit, children: [
2110
2212
  /* @__PURE__ */ jsxRuntime.jsx(outline.PlayIcon, { className: "h-3.5 w-3.5", "data-slot": "icon" }),
2111
2213
  t("run")
2112
2214
  ] })
@@ -2139,8 +2241,8 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
2139
2241
  const [isLoadingRuns, setIsLoadingRuns] = react.useState(false);
2140
2242
  const [selectedRun, setSelectedRun] = react.useState(null);
2141
2243
  const [selectedNode, setSelectedNode] = react.useState(null);
2142
- const isRunning = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.isRunning);
2143
- const nodeResults = chunkAZ3BXAI6_js.useWorkflowStore((state) => state.nodeResults);
2244
+ const isRunning = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.isRunning);
2245
+ const nodeResults = chunkE7GVGD4Z_js.useWorkflowStore((state) => state.nodeResults);
2144
2246
  const refreshRuns = react.useCallback(async () => {
2145
2247
  setIsLoadingRuns(true);
2146
2248
  try {
@@ -2296,7 +2398,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
2296
2398
  onAutoSaveGraph(graph);
2297
2399
  }, [onAutoSaveGraph, onGraphSnapshot]);
2298
2400
  return /* @__PURE__ */ jsxRuntime.jsx(
2299
- chunkAZ3BXAI6_js.Workspace,
2401
+ chunkE7GVGD4Z_js.Workspace,
2300
2402
  {
2301
2403
  ...workspaceProps,
2302
2404
  onGraphChange: handleGraphChange
@@ -2304,7 +2406,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
2304
2406
  );
2305
2407
  });
2306
2408
  function DynamicIslandConfirm2(props) {
2307
- return /* @__PURE__ */ jsxRuntime.jsx(chunkEVX2CFNL_js.DynamicIslandConfirm, { ...props });
2409
+ return /* @__PURE__ */ jsxRuntime.jsx(chunk4XID6LOC_js.DynamicIslandConfirm, { ...props });
2308
2410
  }
2309
2411
  var JSON_PREVIEW_LINE_LIMIT = 50;
2310
2412
  function DslExportModal({ open, onClose, workflow, graph }) {
@@ -2358,7 +2460,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
2358
2460
  }, [jsonString, workflow.name, workflow.version]);
2359
2461
  if (!open) return null;
2360
2462
  return /* @__PURE__ */ jsxRuntime.jsx(
2361
- chunkEVX2CFNL_js.GlassFormModal,
2463
+ chunk4XID6LOC_js.GlassFormModal,
2362
2464
  {
2363
2465
  open,
2364
2466
  onClose,
@@ -2401,7 +2503,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
2401
2503
  ] }),
2402
2504
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 border-t border-gray-200 px-1 py-4 dark:border-gray-700", children: [
2403
2505
  /* @__PURE__ */ jsxRuntime.jsx(
2404
- chunkEVX2CFNL_js.Button,
2506
+ chunk4XID6LOC_js.Button,
2405
2507
  {
2406
2508
  type: "button",
2407
2509
  onClick: handleCopyToClipboard,
@@ -2418,7 +2520,7 @@ function DslExportModal({ open, onClose, workflow, graph }) {
2418
2520
  }
2419
2521
  ),
2420
2522
  /* @__PURE__ */ jsxRuntime.jsxs(
2421
- chunkEVX2CFNL_js.Button,
2523
+ chunk4XID6LOC_js.Button,
2422
2524
  {
2423
2525
  type: "button",
2424
2526
  onClick: handleDownloadJson,
@@ -2577,7 +2679,7 @@ function DslImportModal({ open, onClose, onImport }) {
2577
2679
  }, []);
2578
2680
  if (!open) return null;
2579
2681
  return /* @__PURE__ */ jsxRuntime.jsx(
2580
- chunkEVX2CFNL_js.GlassFormModal,
2682
+ chunk4XID6LOC_js.GlassFormModal,
2581
2683
  {
2582
2684
  open,
2583
2685
  onClose,
@@ -2615,7 +2717,7 @@ function DslImportModal({ open, onClose, onImport }) {
2615
2717
  ) : /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "import-validation-result", children: [
2616
2718
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
2617
2719
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: fileName }),
2618
- /* @__PURE__ */ jsxRuntime.jsx(chunkEVX2CFNL_js.Button, { type: "button", plain: true, size: "sm", onClick: handleReset, children: translations("chooseAnother") })
2720
+ /* @__PURE__ */ jsxRuntime.jsx(chunk4XID6LOC_js.Button, { type: "button", plain: true, size: "sm", onClick: handleReset, children: translations("chooseAnother") })
2619
2721
  ] }),
2620
2722
  validationResult.isValid ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-800 dark:bg-green-900/20", children: [
2621
2723
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -2643,9 +2745,9 @@ function DslImportModal({ open, onClose, onImport }) {
2643
2745
  ] })
2644
2746
  ] }) }),
2645
2747
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 border-t border-gray-200 px-1 py-4 dark:border-gray-700", children: [
2646
- /* @__PURE__ */ jsxRuntime.jsx(chunkEVX2CFNL_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
2748
+ /* @__PURE__ */ jsxRuntime.jsx(chunk4XID6LOC_js.Button, { type: "button", onClick: onClose, outline: true, size: "sm", "data-testid": "import-cancel-button", children: translations("cancel") }),
2647
2749
  /* @__PURE__ */ jsxRuntime.jsxs(
2648
- chunkEVX2CFNL_js.Button,
2750
+ chunk4XID6LOC_js.Button,
2649
2751
  {
2650
2752
  type: "button",
2651
2753
  onClick: handleImport,
@@ -2666,14 +2768,14 @@ function DslImportModal({ open, onClose, onImport }) {
2666
2768
  }
2667
2769
 
2668
2770
  // src/astrlabe/store/selectors.ts
2669
- var useCanUndo = () => chunkAZ3BXAI6_js.useWorkflowStore((state) => state.past.length > 0);
2670
- var useCanRedo = () => chunkAZ3BXAI6_js.useWorkflowStore((state) => state.future.length > 0);
2671
- var useHasCopied = () => chunkAZ3BXAI6_js.useWorkflowStore((state) => state.clipboard !== null);
2672
- var useContextMenu = () => chunkAZ3BXAI6_js.useWorkflowStore((state) => state.contextMenu);
2673
- var useEditingNodeId = () => chunkAZ3BXAI6_js.useWorkflowStore((state) => state.editingNodeId);
2674
- var useSelectedNodeCount = () => chunkAZ3BXAI6_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
2675
- var useIsRunning = () => chunkAZ3BXAI6_js.useWorkflowStore((state) => state.isRunning);
2676
- var useNodeResults = () => chunkAZ3BXAI6_js.useWorkflowStore((state) => state.nodeResults);
2771
+ var useCanUndo = () => chunkE7GVGD4Z_js.useWorkflowStore((state) => state.past.length > 0);
2772
+ var useCanRedo = () => chunkE7GVGD4Z_js.useWorkflowStore((state) => state.future.length > 0);
2773
+ var useHasCopied = () => chunkE7GVGD4Z_js.useWorkflowStore((state) => state.clipboard !== null);
2774
+ var useContextMenu = () => chunkE7GVGD4Z_js.useWorkflowStore((state) => state.contextMenu);
2775
+ var useEditingNodeId = () => chunkE7GVGD4Z_js.useWorkflowStore((state) => state.editingNodeId);
2776
+ var useSelectedNodeCount = () => chunkE7GVGD4Z_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
2777
+ var useIsRunning = () => chunkE7GVGD4Z_js.useWorkflowStore((state) => state.isRunning);
2778
+ var useNodeResults = () => chunkE7GVGD4Z_js.useWorkflowStore((state) => state.nodeResults);
2677
2779
  var DEFAULT_MAX_HISTORY = 50;
2678
2780
  function useUndoRedo(nodes, edges, setNodes, setEdges, maxHistory = DEFAULT_MAX_HISTORY) {
2679
2781
  const pastRef = react.useRef([]);
@@ -2961,227 +3063,223 @@ Object.defineProperty(exports, "validateWorkflowGraph", {
2961
3063
  });
2962
3064
  Object.defineProperty(exports, "AgentFlowNode", {
2963
3065
  enumerable: true,
2964
- get: function () { return chunkAZ3BXAI6_js.AgentFlowNode; }
3066
+ get: function () { return chunkE7GVGD4Z_js.AgentFlowNode; }
2965
3067
  });
2966
3068
  Object.defineProperty(exports, "AgentToolFlowNode", {
2967
3069
  enumerable: true,
2968
- get: function () { return chunkAZ3BXAI6_js.AgentToolFlowNode; }
3070
+ get: function () { return chunkE7GVGD4Z_js.AgentToolFlowNode; }
2969
3071
  });
2970
3072
  Object.defineProperty(exports, "AnswerFlowNode", {
2971
3073
  enumerable: true,
2972
- get: function () { return chunkAZ3BXAI6_js.AnswerFlowNode; }
3074
+ get: function () { return chunkE7GVGD4Z_js.AnswerFlowNode; }
2973
3075
  });
2974
3076
  Object.defineProperty(exports, "AnthropicIcon", {
2975
3077
  enumerable: true,
2976
- get: function () { return chunkAZ3BXAI6_js.AnthropicIcon; }
3078
+ get: function () { return chunkE7GVGD4Z_js.AnthropicIcon; }
2977
3079
  });
2978
3080
  Object.defineProperty(exports, "CodeFlowNode", {
2979
3081
  enumerable: true,
2980
- get: function () { return chunkAZ3BXAI6_js.CodeFlowNode; }
3082
+ get: function () { return chunkE7GVGD4Z_js.CodeFlowNode; }
2981
3083
  });
2982
3084
  Object.defineProperty(exports, "CrewAIIcon", {
2983
3085
  enumerable: true,
2984
- get: function () { return chunkAZ3BXAI6_js.CrewAIIcon; }
3086
+ get: function () { return chunkE7GVGD4Z_js.CrewAIIcon; }
2985
3087
  });
2986
3088
  Object.defineProperty(exports, "DocumentExtractorFlowNode", {
2987
3089
  enumerable: true,
2988
- get: function () { return chunkAZ3BXAI6_js.DocumentExtractorFlowNode; }
3090
+ get: function () { return chunkE7GVGD4Z_js.DocumentExtractorFlowNode; }
2989
3091
  });
2990
3092
  Object.defineProperty(exports, "EndFlowNode", {
2991
3093
  enumerable: true,
2992
- get: function () { return chunkAZ3BXAI6_js.EndFlowNode; }
3094
+ get: function () { return chunkE7GVGD4Z_js.EndFlowNode; }
2993
3095
  });
2994
3096
  Object.defineProperty(exports, "EntityFlowNode", {
2995
3097
  enumerable: true,
2996
- get: function () { return chunkAZ3BXAI6_js.EntityFlowNode; }
3098
+ get: function () { return chunkE7GVGD4Z_js.EntityFlowNode; }
2997
3099
  });
2998
3100
  Object.defineProperty(exports, "FRAMEWORK_META", {
2999
3101
  enumerable: true,
3000
- get: function () { return chunkAZ3BXAI6_js.FRAMEWORK_META; }
3102
+ get: function () { return chunkE7GVGD4Z_js.FRAMEWORK_META; }
3001
3103
  });
3002
3104
  Object.defineProperty(exports, "GoogleADKIcon", {
3003
3105
  enumerable: true,
3004
- get: function () { return chunkAZ3BXAI6_js.GoogleADKIcon; }
3106
+ get: function () { return chunkE7GVGD4Z_js.GoogleADKIcon; }
3005
3107
  });
3006
3108
  Object.defineProperty(exports, "GroupFlowNode", {
3007
3109
  enumerable: true,
3008
- get: function () { return chunkAZ3BXAI6_js.GroupFlowNode; }
3110
+ get: function () { return chunkE7GVGD4Z_js.GroupFlowNode; }
3009
3111
  });
3010
3112
  Object.defineProperty(exports, "HttpRequestFlowNode", {
3011
3113
  enumerable: true,
3012
- get: function () { return chunkAZ3BXAI6_js.HttpRequestFlowNode; }
3114
+ get: function () { return chunkE7GVGD4Z_js.HttpRequestFlowNode; }
3013
3115
  });
3014
3116
  Object.defineProperty(exports, "IfElseFlowNode", {
3015
3117
  enumerable: true,
3016
- get: function () { return chunkAZ3BXAI6_js.IfElseFlowNode; }
3118
+ get: function () { return chunkE7GVGD4Z_js.IfElseFlowNode; }
3017
3119
  });
3018
3120
  Object.defineProperty(exports, "IterationFlowNode", {
3019
3121
  enumerable: true,
3020
- get: function () { return chunkAZ3BXAI6_js.IterationFlowNode; }
3122
+ get: function () { return chunkE7GVGD4Z_js.IterationFlowNode; }
3021
3123
  });
3022
3124
  Object.defineProperty(exports, "IterationStartFlowNode", {
3023
3125
  enumerable: true,
3024
- get: function () { return chunkAZ3BXAI6_js.IterationStartFlowNode; }
3126
+ get: function () { return chunkE7GVGD4Z_js.IterationStartFlowNode; }
3025
3127
  });
3026
3128
  Object.defineProperty(exports, "KnowledgeBaseFlowNode", {
3027
3129
  enumerable: true,
3028
- get: function () { return chunkAZ3BXAI6_js.KnowledgeBaseFlowNode; }
3130
+ get: function () { return chunkE7GVGD4Z_js.KnowledgeBaseFlowNode; }
3029
3131
  });
3030
3132
  Object.defineProperty(exports, "LOGIC_ICON_MAP", {
3031
3133
  enumerable: true,
3032
- get: function () { return chunkAZ3BXAI6_js.LOGIC_ICON_MAP; }
3134
+ get: function () { return chunkE7GVGD4Z_js.LOGIC_ICON_MAP; }
3033
3135
  });
3034
3136
  Object.defineProperty(exports, "LOGIC_NODE_BADGE_COLORS", {
3035
3137
  enumerable: true,
3036
- get: function () { return chunkAZ3BXAI6_js.LOGIC_NODE_BADGE_COLORS; }
3138
+ get: function () { return chunkE7GVGD4Z_js.LOGIC_NODE_BADGE_COLORS; }
3037
3139
  });
3038
3140
  Object.defineProperty(exports, "LOGIC_NODE_GRADIENTS", {
3039
3141
  enumerable: true,
3040
- get: function () { return chunkAZ3BXAI6_js.LOGIC_NODE_GRADIENTS; }
3142
+ get: function () { return chunkE7GVGD4Z_js.LOGIC_NODE_GRADIENTS; }
3041
3143
  });
3042
3144
  Object.defineProperty(exports, "LOGIC_NODE_HANDLE_COLORS", {
3043
3145
  enumerable: true,
3044
- get: function () { return chunkAZ3BXAI6_js.LOGIC_NODE_HANDLE_COLORS; }
3146
+ get: function () { return chunkE7GVGD4Z_js.LOGIC_NODE_HANDLE_COLORS; }
3045
3147
  });
3046
3148
  Object.defineProperty(exports, "LangChainIcon", {
3047
3149
  enumerable: true,
3048
- get: function () { return chunkAZ3BXAI6_js.LangChainIcon; }
3150
+ get: function () { return chunkE7GVGD4Z_js.LangChainIcon; }
3049
3151
  });
3050
3152
  Object.defineProperty(exports, "ListOperatorFlowNode", {
3051
3153
  enumerable: true,
3052
- get: function () { return chunkAZ3BXAI6_js.ListOperatorFlowNode; }
3154
+ get: function () { return chunkE7GVGD4Z_js.ListOperatorFlowNode; }
3053
3155
  });
3054
3156
  Object.defineProperty(exports, "LogicNodeModal", {
3055
3157
  enumerable: true,
3056
- get: function () { return chunkAZ3BXAI6_js.LogicNodeModal; }
3158
+ get: function () { return chunkE7GVGD4Z_js.LogicNodeModal; }
3057
3159
  });
3058
3160
  Object.defineProperty(exports, "MINIMAP_NODE_COLORS", {
3059
3161
  enumerable: true,
3060
- get: function () { return chunkAZ3BXAI6_js.MINIMAP_NODE_COLORS; }
3162
+ get: function () { return chunkE7GVGD4Z_js.MINIMAP_NODE_COLORS; }
3061
3163
  });
3062
3164
  Object.defineProperty(exports, "NodeCard", {
3063
3165
  enumerable: true,
3064
- get: function () { return chunkAZ3BXAI6_js.NodeCard; }
3166
+ get: function () { return chunkE7GVGD4Z_js.NodeCard; }
3065
3167
  });
3066
3168
  Object.defineProperty(exports, "NodeContextMenu", {
3067
3169
  enumerable: true,
3068
- get: function () { return chunkAZ3BXAI6_js.NodeContextMenu; }
3170
+ get: function () { return chunkE7GVGD4Z_js.NodeContextMenu; }
3069
3171
  });
3070
3172
  Object.defineProperty(exports, "NoteFlowNode", {
3071
3173
  enumerable: true,
3072
- get: function () { return chunkAZ3BXAI6_js.NoteFlowNode; }
3174
+ get: function () { return chunkE7GVGD4Z_js.NoteFlowNode; }
3073
3175
  });
3074
3176
  Object.defineProperty(exports, "OpenAIIcon", {
3075
3177
  enumerable: true,
3076
- get: function () { return chunkAZ3BXAI6_js.OpenAIIcon; }
3178
+ get: function () { return chunkE7GVGD4Z_js.OpenAIIcon; }
3077
3179
  });
3078
3180
  Object.defineProperty(exports, "PanelContextMenu", {
3079
3181
  enumerable: true,
3080
- get: function () { return chunkAZ3BXAI6_js.PanelContextMenu; }
3182
+ get: function () { return chunkE7GVGD4Z_js.PanelContextMenu; }
3081
3183
  });
3082
3184
  Object.defineProperty(exports, "ParameterExtractorFlowNode", {
3083
3185
  enumerable: true,
3084
- get: function () { return chunkAZ3BXAI6_js.ParameterExtractorFlowNode; }
3186
+ get: function () { return chunkE7GVGD4Z_js.ParameterExtractorFlowNode; }
3085
3187
  });
3086
3188
  Object.defineProperty(exports, "QuestionClassifierFlowNode", {
3087
3189
  enumerable: true,
3088
- get: function () { return chunkAZ3BXAI6_js.QuestionClassifierFlowNode; }
3190
+ get: function () { return chunkE7GVGD4Z_js.QuestionClassifierFlowNode; }
3089
3191
  });
3090
3192
  Object.defineProperty(exports, "RuleFlowNode", {
3091
3193
  enumerable: true,
3092
- get: function () { return chunkAZ3BXAI6_js.RuleFlowNode; }
3194
+ get: function () { return chunkE7GVGD4Z_js.RuleFlowNode; }
3093
3195
  });
3094
3196
  Object.defineProperty(exports, "SelectionContextMenu", {
3095
3197
  enumerable: true,
3096
- get: function () { return chunkAZ3BXAI6_js.SelectionContextMenu; }
3198
+ get: function () { return chunkE7GVGD4Z_js.SelectionContextMenu; }
3097
3199
  });
3098
3200
  Object.defineProperty(exports, "StartFlowNode", {
3099
3201
  enumerable: true,
3100
- get: function () { return chunkAZ3BXAI6_js.StartFlowNode; }
3202
+ get: function () { return chunkE7GVGD4Z_js.StartFlowNode; }
3101
3203
  });
3102
3204
  Object.defineProperty(exports, "StrandsIcon", {
3103
3205
  enumerable: true,
3104
- get: function () { return chunkAZ3BXAI6_js.StrandsIcon; }
3206
+ get: function () { return chunkE7GVGD4Z_js.StrandsIcon; }
3105
3207
  });
3106
3208
  Object.defineProperty(exports, "TemplateTransformFlowNode", {
3107
3209
  enumerable: true,
3108
- get: function () { return chunkAZ3BXAI6_js.TemplateTransformFlowNode; }
3210
+ get: function () { return chunkE7GVGD4Z_js.TemplateTransformFlowNode; }
3109
3211
  });
3110
3212
  Object.defineProperty(exports, "ToolFlowNode", {
3111
3213
  enumerable: true,
3112
- get: function () { return chunkAZ3BXAI6_js.ToolFlowNode; }
3214
+ get: function () { return chunkE7GVGD4Z_js.ToolFlowNode; }
3113
3215
  });
3114
3216
  Object.defineProperty(exports, "VariableAggregatorFlowNode", {
3115
3217
  enumerable: true,
3116
- get: function () { return chunkAZ3BXAI6_js.VariableAggregatorFlowNode; }
3218
+ get: function () { return chunkE7GVGD4Z_js.VariableAggregatorFlowNode; }
3117
3219
  });
3118
3220
  Object.defineProperty(exports, "VariableAssignerFlowNode", {
3119
3221
  enumerable: true,
3120
- get: function () { return chunkAZ3BXAI6_js.VariableAssignerFlowNode; }
3222
+ get: function () { return chunkE7GVGD4Z_js.VariableAssignerFlowNode; }
3121
3223
  });
3122
3224
  Object.defineProperty(exports, "WorkflowBuilderProvider", {
3123
3225
  enumerable: true,
3124
- get: function () { return chunkAZ3BXAI6_js.WorkflowBuilderProvider; }
3226
+ get: function () { return chunkE7GVGD4Z_js.WorkflowBuilderProvider; }
3125
3227
  });
3126
3228
  Object.defineProperty(exports, "Workspace", {
3127
3229
  enumerable: true,
3128
- get: function () { return chunkAZ3BXAI6_js.Workspace; }
3129
- });
3130
- Object.defineProperty(exports, "WorkspaceModal", {
3131
- enumerable: true,
3132
- get: function () { return chunkAZ3BXAI6_js.WorkspaceModal; }
3230
+ get: function () { return chunkE7GVGD4Z_js.Workspace; }
3133
3231
  });
3134
3232
  Object.defineProperty(exports, "getCompatibleModels", {
3135
3233
  enumerable: true,
3136
- get: function () { return chunkAZ3BXAI6_js.getCompatibleModels; }
3234
+ get: function () { return chunkE7GVGD4Z_js.getCompatibleModels; }
3137
3235
  });
3138
3236
  Object.defineProperty(exports, "getDefaultFrameworkForModel", {
3139
3237
  enumerable: true,
3140
- get: function () { return chunkAZ3BXAI6_js.getDefaultFrameworkForModel; }
3238
+ get: function () { return chunkE7GVGD4Z_js.getDefaultFrameworkForModel; }
3141
3239
  });
3142
3240
  Object.defineProperty(exports, "getEntityBadgeColor", {
3143
3241
  enumerable: true,
3144
- get: function () { return chunkAZ3BXAI6_js.getEntityBadgeColor; }
3242
+ get: function () { return chunkE7GVGD4Z_js.getEntityBadgeColor; }
3145
3243
  });
3146
3244
  Object.defineProperty(exports, "getEntityGradient", {
3147
3245
  enumerable: true,
3148
- get: function () { return chunkAZ3BXAI6_js.getEntityGradient; }
3246
+ get: function () { return chunkE7GVGD4Z_js.getEntityGradient; }
3149
3247
  });
3150
3248
  Object.defineProperty(exports, "getEntityHandleColor", {
3151
3249
  enumerable: true,
3152
- get: function () { return chunkAZ3BXAI6_js.getEntityHandleColor; }
3250
+ get: function () { return chunkE7GVGD4Z_js.getEntityHandleColor; }
3153
3251
  });
3154
3252
  Object.defineProperty(exports, "getEntityIcon", {
3155
3253
  enumerable: true,
3156
- get: function () { return chunkAZ3BXAI6_js.getEntityIcon; }
3254
+ get: function () { return chunkE7GVGD4Z_js.getEntityIcon; }
3157
3255
  });
3158
3256
  Object.defineProperty(exports, "getEntityMinimapColor", {
3159
3257
  enumerable: true,
3160
- get: function () { return chunkAZ3BXAI6_js.getEntityMinimapColor; }
3258
+ get: function () { return chunkE7GVGD4Z_js.getEntityMinimapColor; }
3161
3259
  });
3162
3260
  Object.defineProperty(exports, "getFrameworkMeta", {
3163
3261
  enumerable: true,
3164
- get: function () { return chunkAZ3BXAI6_js.getFrameworkMeta; }
3262
+ get: function () { return chunkE7GVGD4Z_js.getFrameworkMeta; }
3165
3263
  });
3166
3264
  Object.defineProperty(exports, "isModelCompatibleWithFramework", {
3167
3265
  enumerable: true,
3168
- get: function () { return chunkAZ3BXAI6_js.isModelCompatibleWithFramework; }
3266
+ get: function () { return chunkE7GVGD4Z_js.isModelCompatibleWithFramework; }
3169
3267
  });
3170
3268
  Object.defineProperty(exports, "useModalStore", {
3171
3269
  enumerable: true,
3172
- get: function () { return chunkAZ3BXAI6_js.useModalStore; }
3270
+ get: function () { return chunkE7GVGD4Z_js.useModalStore; }
3173
3271
  });
3174
3272
  Object.defineProperty(exports, "useWorkflowBuilderClient", {
3175
3273
  enumerable: true,
3176
- get: function () { return chunkAZ3BXAI6_js.useWorkflowBuilderClient; }
3274
+ get: function () { return chunkE7GVGD4Z_js.useWorkflowBuilderClient; }
3177
3275
  });
3178
3276
  Object.defineProperty(exports, "useWorkflowBuilderClientOptional", {
3179
3277
  enumerable: true,
3180
- get: function () { return chunkAZ3BXAI6_js.useWorkflowBuilderClientOptional; }
3278
+ get: function () { return chunkE7GVGD4Z_js.useWorkflowBuilderClientOptional; }
3181
3279
  });
3182
3280
  Object.defineProperty(exports, "useWorkflowStore", {
3183
3281
  enumerable: true,
3184
- get: function () { return chunkAZ3BXAI6_js.useWorkflowStore; }
3282
+ get: function () { return chunkE7GVGD4Z_js.useWorkflowStore; }
3185
3283
  });
3186
3284
  Object.defineProperty(exports, "GraphNodeBadge", {
3187
3285
  enumerable: true,
@@ -3211,7 +3309,7 @@ Object.defineProperty(exports, "getAgentTier", {
3211
3309
  enumerable: true,
3212
3310
  get: function () { return chunkPWBWP5FJ_js.getAgentTier; }
3213
3311
  });
3214
- exports.AgentDrawer = AgentDrawer;
3312
+ exports.AgentModal = AgentModal;
3215
3313
  exports.AmazonNovaIcon = AmazonNovaIcon;
3216
3314
  exports.AnthropicModelIcon = AnthropicModelIcon;
3217
3315
  exports.AutoSaveWorkspace = AutoSaveWorkspace;
@@ -3225,10 +3323,11 @@ exports.PreviewPanel = PreviewPanel;
3225
3323
  exports.RunInputDialog = RunInputDialog;
3226
3324
  exports.RunPanel = RunPanel;
3227
3325
  exports.SaveStatusBadge = SaveStatusBadge;
3228
- exports.SubworkflowDrawer = SubworkflowDrawer;
3326
+ exports.SubworkflowModal = SubworkflowModal;
3229
3327
  exports.VariableInspector = VariableInspector;
3230
3328
  exports.VersionHistoryPanel = VersionHistoryPanel;
3231
3329
  exports.WorkflowListBar = WorkflowListBar;
3330
+ exports.WorkspaceModal = WorkspaceModal;
3232
3331
  exports.getModelIcon = getModelIcon;
3233
3332
  exports.useCanRedo = useCanRedo;
3234
3333
  exports.useCanUndo = useCanUndo;