@datatechsolutions/ui 2.11.15 → 2.11.16
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/astrlabe/index.js +224 -175
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +126 -77
- package/dist/astrlabe/index.mjs.map +1 -1
- package/dist/astrlabe/workflow-canvas.js +2 -2
- package/dist/astrlabe/workflow-canvas.mjs +1 -1
- package/dist/{chunk-WB5CWGXD.js → chunk-2JK7GQYA.js} +13 -4
- package/dist/chunk-2JK7GQYA.js.map +1 -0
- package/dist/{chunk-NTXIFTIQ.mjs → chunk-4B47R7VI.mjs} +13 -4
- package/dist/chunk-4B47R7VI.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-NTXIFTIQ.mjs.map +0 -1
- package/dist/chunk-WB5CWGXD.js.map +0 -1
package/dist/astrlabe/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
require('../chunk-55H6WZQP.js');
|
|
5
5
|
var chunk3GE3MBUZ_js = require('../chunk-3GE3MBUZ.js');
|
|
6
|
-
var
|
|
6
|
+
var chunk2JK7GQYA_js = require('../chunk-2JK7GQYA.js');
|
|
7
7
|
var chunk4XID6LOC_js = require('../chunk-4XID6LOC.js');
|
|
8
8
|
require('../chunk-S7KHTUHA.js');
|
|
9
9
|
require('../chunk-UZ3CMNUJ.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 =
|
|
86
|
+
const frameworkMeta = chunk2JK7GQYA_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" },
|
|
@@ -375,12 +375,12 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
375
375
|
const isPrecise = temperature <= 0.3;
|
|
376
376
|
const isBalanced = temperature > 0.3 && temperature <= 0.7;
|
|
377
377
|
const isCreative = temperature > 0.7;
|
|
378
|
-
const frameworkKeys = Object.keys(
|
|
379
|
-
const compatibleModels =
|
|
378
|
+
const frameworkKeys = Object.keys(chunk2JK7GQYA_js.FRAMEWORK_META);
|
|
379
|
+
const compatibleModels = chunk2JK7GQYA_js.getCompatibleModels(models, selectedFramework);
|
|
380
380
|
const handleFrameworkChange = react.useCallback((newFramework) => {
|
|
381
381
|
setSelectedFramework(newFramework);
|
|
382
|
-
if (!
|
|
383
|
-
const compatible =
|
|
382
|
+
if (!chunk2JK7GQYA_js.isModelCompatibleWithFramework(selectedModelId, newFramework)) {
|
|
383
|
+
const compatible = chunk2JK7GQYA_js.getCompatibleModels(models, newFramework);
|
|
384
384
|
if (compatible.length > 0) {
|
|
385
385
|
setSelectedModelId(compatible[0].id);
|
|
386
386
|
}
|
|
@@ -391,9 +391,9 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
391
391
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
392
392
|
/* @__PURE__ */ jsxRuntime.jsx("label", { className: "mb-2 block text-xs font-medium text-gray-500 dark:text-gray-400", children: t("agentDrawer.framework") }),
|
|
393
393
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5", children: frameworkKeys.map((key) => {
|
|
394
|
-
const meta =
|
|
394
|
+
const meta = chunk2JK7GQYA_js.FRAMEWORK_META[key];
|
|
395
395
|
const isSelected = key === selectedFramework;
|
|
396
|
-
const compatCount =
|
|
396
|
+
const compatCount = chunk2JK7GQYA_js.getCompatibleModels(models, key).length;
|
|
397
397
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
398
398
|
"button",
|
|
399
399
|
{
|
|
@@ -423,7 +423,7 @@ function ConfigTab({ agent, models, t, selectedModelId, setSelectedModelId, sele
|
|
|
423
423
|
] }),
|
|
424
424
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 gap-2", children: models.map((model) => {
|
|
425
425
|
const isSelected = model.id === selectedModelId;
|
|
426
|
-
const isCompatible =
|
|
426
|
+
const isCompatible = chunk2JK7GQYA_js.isModelCompatibleWithFramework(model.id, selectedFramework);
|
|
427
427
|
const { IconComponent, color, providerLabel } = getModelIcon(model.id);
|
|
428
428
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
429
429
|
"button",
|
|
@@ -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 =
|
|
523
|
+
const nodeResults = chunk2JK7GQYA_js.useWorkflowStore((state) => state.nodeResults);
|
|
524
524
|
const agentResult = react.useMemo(() => {
|
|
525
525
|
return nodeResults[agentId] ?? null;
|
|
526
526
|
}, [nodeResults, agentId]);
|
|
@@ -547,28 +547,100 @@ function ResultsTab({ agentId, t }) {
|
|
|
547
547
|
] })
|
|
548
548
|
] });
|
|
549
549
|
}
|
|
550
|
-
|
|
550
|
+
var SI = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
|
|
551
|
+
var PROVIDER_LOGOS = {
|
|
552
|
+
anthropic: SI("anthropic", "D4A27F"),
|
|
553
|
+
amazon: "https://www.svgrepo.com/show/448266/aws.svg",
|
|
554
|
+
google: SI("googlegemini", "8E75B2"),
|
|
555
|
+
openai: "https://www.svgrepo.com/show/306500/openai.svg",
|
|
556
|
+
meta: SI("meta", "0668E1"),
|
|
557
|
+
aws_bedrock: "https://www.svgrepo.com/show/448266/aws.svg",
|
|
558
|
+
openai_api: "https://www.svgrepo.com/show/306500/openai.svg",
|
|
559
|
+
google_vertex: SI("googlegemini", "8E75B2"),
|
|
560
|
+
azure_openai: SI("microsoftazure", "0078D4"),
|
|
561
|
+
anthropic_api: SI("anthropic", "D4A27F")
|
|
562
|
+
};
|
|
563
|
+
function ModelsTab({ modelProviders, selectedProviderId, onSelectProvider, t }) {
|
|
564
|
+
if (modelProviders.length === 0) {
|
|
565
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
|
|
566
|
+
/* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "mb-2 h-8 w-8 text-gray-400 dark:text-gray-500" }),
|
|
567
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t("agentDrawer.noProvidersAvailable") }),
|
|
568
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.dragProviderHint") })
|
|
569
|
+
] });
|
|
570
|
+
}
|
|
571
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 p-4", children: [
|
|
572
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-xs text-gray-500 dark:text-gray-400", children: t("agentDrawer.modelsDescription") }),
|
|
573
|
+
modelProviders.map((provider) => {
|
|
574
|
+
const isSelected = selectedProviderId === provider.id;
|
|
575
|
+
const logo = PROVIDER_LOGOS[provider.provider];
|
|
576
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
577
|
+
"button",
|
|
578
|
+
{
|
|
579
|
+
type: "button",
|
|
580
|
+
onClick: () => onSelectProvider(provider.id),
|
|
581
|
+
className: `flex w-full items-center gap-3 rounded-xl border px-4 py-3 text-left transition-all ${isSelected ? "border-rose-500/30 bg-rose-50/50 ring-1 ring-rose-500/20 dark:border-rose-400/20 dark:bg-rose-500/5" : "border-gray-200/50 bg-gray-50/30 hover:border-gray-300 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20"}`,
|
|
582
|
+
children: [
|
|
583
|
+
logo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-white/10 p-1.5", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "", className: "h-6 w-6 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-rose-500 to-pink-600", children: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5 text-white" }) }),
|
|
584
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
585
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-sm font-medium ${isSelected ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`, children: provider.name }),
|
|
586
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-0.5 flex items-center gap-2 text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
587
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
588
|
+
provider.modelCount,
|
|
589
|
+
" models"
|
|
590
|
+
] }),
|
|
591
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rounded-full px-1.5 py-0.5 text-[9px] font-medium ${provider.configured ? "bg-green-100 text-green-600 dark:bg-green-500/10 dark:text-green-400" : "bg-amber-100 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400"}`, children: provider.configured ? t("agentDrawer.providerConfigured") : t("agentDrawer.providerSetup") })
|
|
592
|
+
] })
|
|
593
|
+
] }),
|
|
594
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-all ${isSelected ? "bg-rose-500 text-white" : "border border-gray-300 dark:border-gray-600"}`, children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-3 w-3" }) })
|
|
595
|
+
]
|
|
596
|
+
},
|
|
597
|
+
provider.id
|
|
598
|
+
);
|
|
599
|
+
})
|
|
600
|
+
] });
|
|
601
|
+
}
|
|
602
|
+
function ToolsTab({ agentTools, enabledToolIds, onToggle, agentFramework, t }) {
|
|
551
603
|
if (agentTools.length === 0) {
|
|
552
604
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
|
|
553
605
|
/* @__PURE__ */ jsxRuntime.jsx(outline.CommandLineIcon, { className: "mb-2 h-8 w-8 text-gray-400 dark:text-gray-500" }),
|
|
554
606
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t("agentDrawer.noToolsAvailable") })
|
|
555
607
|
] });
|
|
556
608
|
}
|
|
609
|
+
const sortedTools = [...agentTools].sort((a, b) => {
|
|
610
|
+
const aCompat = !a.compatibleFrameworks || a.compatibleFrameworks.length === 0 || a.compatibleFrameworks.includes(agentFramework);
|
|
611
|
+
const bCompat = !b.compatibleFrameworks || b.compatibleFrameworks.length === 0 || b.compatibleFrameworks.includes(agentFramework);
|
|
612
|
+
if (aCompat && !bCompat) return -1;
|
|
613
|
+
if (!aCompat && bCompat) return 1;
|
|
614
|
+
return 0;
|
|
615
|
+
});
|
|
557
616
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 p-4", children: [
|
|
558
617
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-xs text-gray-500 dark:text-gray-400", children: t("agentDrawer.toolsDescription") }),
|
|
559
|
-
|
|
618
|
+
sortedTools.map((tool) => {
|
|
560
619
|
const isEnabled = enabledToolIds.has(tool.agentToolId);
|
|
620
|
+
const isCompatible = !tool.compatibleFrameworks || tool.compatibleFrameworks.length === 0 || tool.compatibleFrameworks.includes(agentFramework);
|
|
561
621
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
562
622
|
"button",
|
|
563
623
|
{
|
|
564
624
|
type: "button",
|
|
565
625
|
onClick: () => onToggle(tool.agentToolId),
|
|
566
|
-
className: `flex w-full items-center gap-3 rounded-xl border px-4 py-3 text-left transition-all ${isEnabled ? "border-amber-500/30 bg-amber-50/50 dark:border-amber-400/20 dark:bg-amber-500/5" : "border-gray-200/50 bg-gray-50/30 hover:border-gray-300 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20"}`,
|
|
626
|
+
className: `flex w-full items-center gap-3 rounded-xl border px-4 py-3 text-left transition-all ${!isCompatible ? "border-gray-200/30 opacity-40 dark:border-white/5" : isEnabled ? "border-amber-500/30 bg-amber-50/50 dark:border-amber-400/20 dark:bg-amber-500/5" : "border-gray-200/50 bg-gray-50/30 hover:border-gray-300 dark:border-white/10 dark:bg-white/[0.02] dark:hover:border-white/20"}`,
|
|
627
|
+
disabled: !isCompatible,
|
|
567
628
|
children: [
|
|
568
629
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${isEnabled ? "bg-gradient-to-br from-amber-400 to-orange-500" : "bg-gray-200 dark:bg-gray-700"}`, children: /* @__PURE__ */ jsxRuntime.jsx(outline.CommandLineIcon, { className: `h-4 w-4 ${isEnabled ? "text-white" : "text-gray-500 dark:text-gray-400"}` }) }),
|
|
569
630
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
570
|
-
/* @__PURE__ */ jsxRuntime.
|
|
571
|
-
|
|
631
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
632
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-sm font-medium ${isEnabled ? "text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`, children: tool.name }),
|
|
633
|
+
!isCompatible && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-gray-100 px-1.5 py-0.5 text-[8px] font-medium text-gray-500 dark:bg-white/10 dark:text-gray-400", children: "incompatible" })
|
|
634
|
+
] }),
|
|
635
|
+
tool.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.description }),
|
|
636
|
+
tool.compatibleFrameworks && tool.compatibleFrameworks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-wrap gap-0.5", children: tool.compatibleFrameworks.map((framework) => {
|
|
637
|
+
const meta = chunk2JK7GQYA_js.getFrameworkMeta(framework);
|
|
638
|
+
const isCurrentFw = framework === agentFramework;
|
|
639
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[8px] font-medium ${isCurrentFw ? meta.badgeColor : "bg-gray-100 text-gray-500 dark:bg-white/5 dark:text-gray-400"}`, children: [
|
|
640
|
+
/* @__PURE__ */ jsxRuntime.jsx(meta.IconComponent, { className: "h-2.5 w-2.5" }),
|
|
641
|
+
meta.label
|
|
642
|
+
] }, framework);
|
|
643
|
+
}) })
|
|
572
644
|
] }),
|
|
573
645
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-5 w-5 shrink-0 items-center justify-center rounded-full transition-all ${isEnabled ? "bg-amber-500 text-white" : "border border-gray-300 dark:border-gray-600"}`, children: isEnabled && /* @__PURE__ */ jsxRuntime.jsx(outline.CheckIcon, { className: "h-3 w-3" }) })
|
|
574
646
|
]
|
|
@@ -580,9 +652,9 @@ function ToolsTab({ agentTools, enabledToolIds, onToggle, t }) {
|
|
|
580
652
|
}
|
|
581
653
|
function AgentModal({ onSaved }) {
|
|
582
654
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
583
|
-
const activeModal =
|
|
584
|
-
const agentData =
|
|
585
|
-
const closeModal =
|
|
655
|
+
const activeModal = chunk2JK7GQYA_js.useModalStore((s) => s.activeModal);
|
|
656
|
+
const agentData = chunk2JK7GQYA_js.useModalStore((s) => s.agentData);
|
|
657
|
+
const closeModal = chunk2JK7GQYA_js.useModalStore((s) => s.closeModal);
|
|
586
658
|
const open = activeModal === "agent";
|
|
587
659
|
const agent = agentData?.agent ?? null;
|
|
588
660
|
const models = agentData?.models ?? [];
|
|
@@ -595,6 +667,8 @@ function AgentModal({ onSaved }) {
|
|
|
595
667
|
const [elo, setElo] = react.useState(1e3);
|
|
596
668
|
const [saved, setSaved] = react.useState(true);
|
|
597
669
|
const [enabledToolIds, setEnabledToolIds] = react.useState(/* @__PURE__ */ new Set());
|
|
670
|
+
const [selectedProviderId, setSelectedProviderId] = react.useState("");
|
|
671
|
+
const availableModelProviders = agentData?.modelProviders ?? [];
|
|
598
672
|
const agentId = agent?.agentId ?? agent?.id ?? "";
|
|
599
673
|
react.useEffect(() => {
|
|
600
674
|
if (!agent) return;
|
|
@@ -606,6 +680,7 @@ function AgentModal({ onSaved }) {
|
|
|
606
680
|
setActiveTab("config");
|
|
607
681
|
const agentToolIds = agent.agentToolIds;
|
|
608
682
|
setEnabledToolIds(new Set(agentToolIds ?? availableAgentTools.filter((t2) => t2.enabled).map((t2) => t2.agentToolId)));
|
|
683
|
+
setSelectedProviderId(agent.modelProviderId ?? "");
|
|
609
684
|
}, [agentId]);
|
|
610
685
|
const dirty = !saved;
|
|
611
686
|
const markDirty = react.useCallback(() => setSaved(false), []);
|
|
@@ -613,6 +688,10 @@ function AgentModal({ onSaved }) {
|
|
|
613
688
|
const handleClose = react.useCallback(() => {
|
|
614
689
|
closeModal();
|
|
615
690
|
}, [closeModal]);
|
|
691
|
+
const handleSelectProvider = react.useCallback((providerId) => {
|
|
692
|
+
setSelectedProviderId(providerId);
|
|
693
|
+
markDirty();
|
|
694
|
+
}, [markDirty]);
|
|
616
695
|
const handleToggleTool = react.useCallback((toolId) => {
|
|
617
696
|
setEnabledToolIds((previous) => {
|
|
618
697
|
const next = new Set(previous);
|
|
@@ -627,7 +706,7 @@ function AgentModal({ onSaved }) {
|
|
|
627
706
|
onSaved?.();
|
|
628
707
|
}, [markSaved, onSaved]);
|
|
629
708
|
if (!agent) return null;
|
|
630
|
-
const tabList = ["config", "tools", "results"];
|
|
709
|
+
const tabList = ["config", "tools", "models", "results"];
|
|
631
710
|
const tabs = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex border-b border-white/20 dark:border-white/10", children: tabList.map((tab) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
632
711
|
"button",
|
|
633
712
|
{
|
|
@@ -635,8 +714,9 @@ function AgentModal({ onSaved }) {
|
|
|
635
714
|
onClick: () => setActiveTab(tab),
|
|
636
715
|
className: `flex-1 px-4 py-2 text-xs font-medium transition-colors ${activeTab === tab ? "border-b-2 border-blue-500 text-blue-600 dark:text-blue-400" : "text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"}`,
|
|
637
716
|
children: [
|
|
638
|
-
t(tab === "config" ? "agentDrawer.configTab" : tab === "tools" ? "agentDrawer.toolsTab" : "agentDrawer.resultsTab"),
|
|
639
|
-
tab === "tools" && enabledToolIds.size > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-amber-500/20 px-1 text-[9px] font-bold text-amber-600 dark:text-amber-400", children: enabledToolIds.size })
|
|
717
|
+
t(tab === "config" ? "agentDrawer.configTab" : tab === "tools" ? "agentDrawer.toolsTab" : tab === "models" ? "agentDrawer.modelsTab" : "agentDrawer.resultsTab"),
|
|
718
|
+
tab === "tools" && enabledToolIds.size > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-amber-500/20 px-1 text-[9px] font-bold text-amber-600 dark:text-amber-400", children: enabledToolIds.size }),
|
|
719
|
+
tab === "models" && selectedProviderId && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-rose-500/20 px-1 text-[9px] font-bold text-rose-600 dark:text-rose-400", children: "1" })
|
|
640
720
|
]
|
|
641
721
|
},
|
|
642
722
|
tab
|
|
@@ -682,7 +762,8 @@ function AgentModal({ onSaved }) {
|
|
|
682
762
|
children: [
|
|
683
763
|
/* @__PURE__ */ jsxRuntime.jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
|
|
684
764
|
activeTab === "config" && /* @__PURE__ */ jsxRuntime.jsx(ConfigTab, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework: (fw) => setSelectedFramework(fw), temperature, setTemperature, dirty, markDirty, markSaved: handleMarkSaved }),
|
|
685
|
-
activeTab === "tools" && /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, t }),
|
|
765
|
+
activeTab === "tools" && /* @__PURE__ */ jsxRuntime.jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t }),
|
|
766
|
+
activeTab === "models" && /* @__PURE__ */ jsxRuntime.jsx(ModelsTab, { modelProviders: availableModelProviders, selectedProviderId, onSelectProvider: handleSelectProvider, t }),
|
|
686
767
|
activeTab === "results" && /* @__PURE__ */ jsxRuntime.jsx(ResultsTab, { agentId: agent.agentId, t })
|
|
687
768
|
]
|
|
688
769
|
}
|
|
@@ -793,7 +874,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
793
874
|
const markDirty = useSubworkflowStore((s) => s.markDirty);
|
|
794
875
|
const markSaved = useSubworkflowStore((s) => s.markSaved);
|
|
795
876
|
const closeModal = useSubworkflowStore((s) => s.closeModal);
|
|
796
|
-
const agentBehind =
|
|
877
|
+
const agentBehind = chunk2JK7GQYA_js.useModalStore((s) => s.activeModal === "agent" ? s.agentData?.agent?.name : null);
|
|
797
878
|
const isCreateMode = !tool?.toolId;
|
|
798
879
|
const initialGraph = react.useMemo(() => {
|
|
799
880
|
const config = tool?.config;
|
|
@@ -822,9 +903,9 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
822
903
|
}, [tool, onSaved, name, category, description, timeoutMs, latestGraphRef, markSaved]);
|
|
823
904
|
if (!tool) return null;
|
|
824
905
|
const categoryKey = category ?? "external";
|
|
825
|
-
const gradient = tool.color ??
|
|
826
|
-
const categoryPill =
|
|
827
|
-
const IconComponent =
|
|
906
|
+
const gradient = tool.color ?? chunk2JK7GQYA_js.CATEGORY_COLORS[categoryKey] ?? chunk2JK7GQYA_js.CATEGORY_COLORS.external;
|
|
907
|
+
const categoryPill = chunk2JK7GQYA_js.CATEGORY_PILL_COLORS[categoryKey] ?? chunk2JK7GQYA_js.CATEGORY_PILL_COLORS.external;
|
|
908
|
+
const IconComponent = chunk2JK7GQYA_js.ICON_MAP[tool.icon ?? ""] ?? outline.ArrowPathRoundedSquareIcon;
|
|
828
909
|
const graph = latestGraphRef.current;
|
|
829
910
|
const startNode = graph.nodes.find((n) => n.type === "start");
|
|
830
911
|
const endNode = graph.nodes.find((n) => n.type === "end");
|
|
@@ -889,7 +970,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
889
970
|
{
|
|
890
971
|
type: "button",
|
|
891
972
|
onClick: () => setCategory(cat),
|
|
892
|
-
className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${
|
|
973
|
+
className: `rounded-full px-2 py-1 text-[9px] font-semibold transition-all ${cat === category ? `${chunk2JK7GQYA_js.CATEGORY_PILL_COLORS[cat] ?? chunk2JK7GQYA_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"}`,
|
|
893
974
|
children: cat
|
|
894
975
|
},
|
|
895
976
|
cat
|
|
@@ -976,7 +1057,7 @@ function SubworkflowModal({ onSaved, onMaximize }) {
|
|
|
976
1057
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto" })
|
|
977
1058
|
] }),
|
|
978
1059
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
979
|
-
|
|
1060
|
+
chunk2JK7GQYA_js.WorkflowCanvas,
|
|
980
1061
|
{
|
|
981
1062
|
initialGraph,
|
|
982
1063
|
agents: [],
|
|
@@ -1034,9 +1115,9 @@ function WorkspaceModal({
|
|
|
1034
1115
|
}
|
|
1035
1116
|
function PipelineSettingsModal({ onSave }) {
|
|
1036
1117
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow");
|
|
1037
|
-
const activeModal =
|
|
1038
|
-
const data =
|
|
1039
|
-
const closeModal =
|
|
1118
|
+
const activeModal = chunk2JK7GQYA_js.useModalStore((s) => s.activeModal);
|
|
1119
|
+
const data = chunk2JK7GQYA_js.useModalStore((s) => s.pipelineSettingsData);
|
|
1120
|
+
const closeModal = chunk2JK7GQYA_js.useModalStore((s) => s.closeModal);
|
|
1040
1121
|
const open = activeModal === "pipeline-settings";
|
|
1041
1122
|
const [nameValue, setNameValue] = react.useState("");
|
|
1042
1123
|
const [descriptionValue, setDescriptionValue] = react.useState("");
|
|
@@ -1123,7 +1204,7 @@ function PipelineSettingsModal({ onSave }) {
|
|
|
1123
1204
|
}
|
|
1124
1205
|
);
|
|
1125
1206
|
}
|
|
1126
|
-
var
|
|
1207
|
+
var SI2 = (slug, color) => `https://cdn.simpleicons.org/${slug}/${color}`;
|
|
1127
1208
|
var DATASOURCE_LOGOS = {
|
|
1128
1209
|
bigquery: "https://www.svgrepo.com/show/375546/bigquery.svg",
|
|
1129
1210
|
postgres: "https://www.svgrepo.com/show/354200/postgresql.svg",
|
|
@@ -1131,9 +1212,9 @@ var DATASOURCE_LOGOS = {
|
|
|
1131
1212
|
mongodb: "https://www.svgrepo.com/show/373845/mongo.svg",
|
|
1132
1213
|
redis: "https://www.svgrepo.com/show/354272/redis.svg",
|
|
1133
1214
|
mysql: "https://www.svgrepo.com/show/373848/mysql.svg",
|
|
1134
|
-
clickhouse:
|
|
1215
|
+
clickhouse: SI2("clickhouse", "FFCC01"),
|
|
1135
1216
|
elasticsearch: "https://www.svgrepo.com/show/353735/elasticsearch.svg",
|
|
1136
|
-
duckdb:
|
|
1217
|
+
duckdb: SI2("duckdb", "FFF000")
|
|
1137
1218
|
};
|
|
1138
1219
|
function getDatasourceLogo(entityId) {
|
|
1139
1220
|
const lower = entityId.toLowerCase();
|
|
@@ -1142,12 +1223,12 @@ function getDatasourceLogo(entityId) {
|
|
|
1142
1223
|
}
|
|
1143
1224
|
return null;
|
|
1144
1225
|
}
|
|
1145
|
-
var
|
|
1146
|
-
anthropic:
|
|
1226
|
+
var PROVIDER_LOGOS2 = {
|
|
1227
|
+
anthropic: SI2("anthropic", "D4A27F"),
|
|
1147
1228
|
amazon: "https://www.svgrepo.com/show/448266/aws.svg",
|
|
1148
|
-
google:
|
|
1229
|
+
google: SI2("googlegemini", "8E75B2"),
|
|
1149
1230
|
openai: "https://www.svgrepo.com/show/306500/openai.svg",
|
|
1150
|
-
meta:
|
|
1231
|
+
meta: SI2("meta", "0668E1")
|
|
1151
1232
|
};
|
|
1152
1233
|
function onDragStart(event, nodeType, entityId, label, config) {
|
|
1153
1234
|
event.dataTransfer.setData("nodeType", nodeType);
|
|
@@ -1245,8 +1326,8 @@ function CollapsibleSection({ title, icon, colorClass, defaultOpen = true, count
|
|
|
1245
1326
|
] });
|
|
1246
1327
|
}
|
|
1247
1328
|
function LogicNodeItemCard({ item, translationFunction }) {
|
|
1248
|
-
const IconComponent =
|
|
1249
|
-
const gradient =
|
|
1329
|
+
const IconComponent = chunk2JK7GQYA_js.LOGIC_ICON_MAP[item.nodeType];
|
|
1330
|
+
const gradient = chunk2JK7GQYA_js.LOGIC_NODE_GRADIENTS[item.nodeType] ?? "from-gray-400 to-gray-500";
|
|
1250
1331
|
const defaultConfig = chunkPWBWP5FJ_js.createDefaultLogicNodeConfig(item.nodeType);
|
|
1251
1332
|
const configJson = defaultConfig ? JSON.stringify(defaultConfig) : void 0;
|
|
1252
1333
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1363,64 +1444,32 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
1363
1444
|
colorClass: "text-indigo-600 dark:text-indigo-400",
|
|
1364
1445
|
onAdd: onCreateAgent,
|
|
1365
1446
|
addLabel: t("newAgent"),
|
|
1366
|
-
count: filteredAgents.length
|
|
1367
|
-
children: filteredAgents.length === 0 && filteredAgentTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */ jsxRuntime.
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
children: [
|
|
1375
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1376
|
-
|
|
1377
|
-
|
|
1447
|
+
count: filteredAgents.length,
|
|
1448
|
+
children: filteredAgents.length === 0 && filteredAgentTools.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: filteredAgents.map((agent) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1449
|
+
"div",
|
|
1450
|
+
{
|
|
1451
|
+
draggable: true,
|
|
1452
|
+
onDragStart: (event) => onDragStart(event, "agent", agent.agentId, agent.name),
|
|
1453
|
+
className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-2 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
|
|
1454
|
+
children: [
|
|
1455
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
|
|
1456
|
+
agent.avatar ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: agent.avatar, alt: agent.name, className: "h-7 w-7 rounded-full bg-white shadow-sm ring-1 ring-gray-200/50 dark:bg-gray-800 dark:ring-white/10" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-7 w-7 items-center justify-center rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-3.5 w-3.5 text-white" }) }),
|
|
1457
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-0.5 -right-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-indigo-500 ring-1.5 ring-white dark:ring-gray-900", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CpuChipIcon, { className: "h-2 w-2 text-white" }) })
|
|
1458
|
+
] }),
|
|
1459
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1460
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
1461
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
|
|
1462
|
+
(() => {
|
|
1463
|
+
const tier = chunkPWBWP5FJ_js.getAgentTier(Number(agent.elo ?? 0));
|
|
1464
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `shrink-0 rounded-full px-1.5 py-px text-[8px] font-bold ${tier.pillColor}`, children: t(`agentDrawer.tier${tier.key.charAt(0).toUpperCase()}${tier.key.slice(1)}`) });
|
|
1465
|
+
})()
|
|
1378
1466
|
] }),
|
|
1379
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
})()
|
|
1386
|
-
] }),
|
|
1387
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: agent.role ?? agent.agentId })
|
|
1388
|
-
] })
|
|
1389
|
-
]
|
|
1390
|
-
},
|
|
1391
|
-
agent.agentId
|
|
1392
|
-
)),
|
|
1393
|
-
filteredAgentTools.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1394
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 mb-1 flex items-center gap-1.5 px-1", children: [
|
|
1395
|
-
/* @__PURE__ */ jsxRuntime.jsx(outline.CommandLineIcon, { className: "h-2.5 w-2.5 text-amber-500 dark:text-amber-400" }),
|
|
1396
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[9px] font-semibold uppercase tracking-wider text-amber-600 dark:text-amber-400", children: t("agentToolsSection") }),
|
|
1397
|
-
onCreateAgentTool && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onCreateAgentTool, className: "ml-auto text-[9px] font-medium text-amber-500 hover:text-amber-600 dark:text-amber-400", children: /* @__PURE__ */ jsxRuntime.jsx(outline.PlusIcon, { className: "h-3 w-3" }) })
|
|
1398
|
-
] }),
|
|
1399
|
-
filteredAgentTools.map((agentTool) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1400
|
-
"div",
|
|
1401
|
-
{
|
|
1402
|
-
draggable: true,
|
|
1403
|
-
onDragStart: (event) => onDragStart(event, "agent_tool", agentTool.agentToolId, agentTool.name),
|
|
1404
|
-
className: "liquid-surface group flex items-center gap-2 rounded-lg px-3 py-1.5 transition-all cursor-grab hover:shadow-md active:cursor-grabbing",
|
|
1405
|
-
children: [
|
|
1406
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-md bg-gradient-to-br from-amber-400 to-orange-500 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(outline.CommandLineIcon, { className: "h-3 w-3 text-white" }) }),
|
|
1407
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1408
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[11px] font-medium text-gray-900 dark:text-white", children: agentTool.name }),
|
|
1409
|
-
agentTool.compatibleFrameworks && agentTool.compatibleFrameworks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex flex-wrap gap-0.5", children: agentTool.compatibleFrameworks.map((framework) => {
|
|
1410
|
-
const meta = chunkWB5CWGXD_js.getFrameworkMeta(framework);
|
|
1411
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center gap-0.5 rounded px-1 py-px text-[8px] font-medium ${meta.badgeColor}`, children: [
|
|
1412
|
-
/* @__PURE__ */ jsxRuntime.jsx(meta.IconComponent, { className: "h-2 w-2" }),
|
|
1413
|
-
meta.label
|
|
1414
|
-
] }, framework);
|
|
1415
|
-
}) })
|
|
1416
|
-
] }),
|
|
1417
|
-
!agentTool.enabled && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-gray-100 px-1.5 py-0.5 text-[8px] font-medium text-gray-500 dark:bg-white/10 dark:text-gray-400", children: "off" })
|
|
1418
|
-
]
|
|
1419
|
-
},
|
|
1420
|
-
agentTool.agentToolId
|
|
1421
|
-
))
|
|
1422
|
-
] })
|
|
1423
|
-
] })
|
|
1467
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: agent.role ?? agent.agentId })
|
|
1468
|
+
] })
|
|
1469
|
+
]
|
|
1470
|
+
},
|
|
1471
|
+
agent.agentId
|
|
1472
|
+
)) })
|
|
1424
1473
|
}
|
|
1425
1474
|
),
|
|
1426
1475
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1499,8 +1548,8 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
1499
1548
|
limit: entity.defaultLimit
|
|
1500
1549
|
});
|
|
1501
1550
|
const dsLogo = getDatasourceLogo(entity.id);
|
|
1502
|
-
const EntityIcon =
|
|
1503
|
-
const entityGradient =
|
|
1551
|
+
const EntityIcon = chunk2JK7GQYA_js.getEntityIcon(entity.id);
|
|
1552
|
+
const entityGradient = chunk2JK7GQYA_js.getEntityGradient(entity.id);
|
|
1504
1553
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1505
1554
|
"div",
|
|
1506
1555
|
{
|
|
@@ -1532,7 +1581,7 @@ function NodePalette({ agents, tools, agentTools = [], rules, entities = [], mod
|
|
|
1532
1581
|
colorClass: "text-rose-600 dark:text-rose-400",
|
|
1533
1582
|
count: filteredProviders.length,
|
|
1534
1583
|
children: filteredProviders.map((provider) => {
|
|
1535
|
-
const providerLogo =
|
|
1584
|
+
const providerLogo = PROVIDER_LOGOS2[provider.provider];
|
|
1536
1585
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1537
1586
|
"div",
|
|
1538
1587
|
{
|
|
@@ -1882,9 +1931,9 @@ function formatDuration2(durationMs) {
|
|
|
1882
1931
|
}
|
|
1883
1932
|
function RunPanel({ open, onClose, onRun, onStop }) {
|
|
1884
1933
|
const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.runPanel");
|
|
1885
|
-
const nodes =
|
|
1886
|
-
const isRunning =
|
|
1887
|
-
const nodeResults =
|
|
1934
|
+
const nodes = chunk2JK7GQYA_js.useWorkflowStore((state) => state.nodes);
|
|
1935
|
+
const isRunning = chunk2JK7GQYA_js.useWorkflowStore((state) => state.isRunning);
|
|
1936
|
+
const nodeResults = chunk2JK7GQYA_js.useWorkflowStore((state) => state.nodeResults);
|
|
1888
1937
|
const startNode = nodes.find((node) => node.type === "start");
|
|
1889
1938
|
const hasEndNode = nodes.some((node) => node.type === "end");
|
|
1890
1939
|
const hasValidStartConfig = Boolean(
|
|
@@ -2169,8 +2218,8 @@ function inferVariables(config, nodeType) {
|
|
|
2169
2218
|
}
|
|
2170
2219
|
function VariableInspector({ open, onClose }) {
|
|
2171
2220
|
const translations = chunkYXN2K77G_js.useTranslations("agents.workflow.variableInspector");
|
|
2172
|
-
const nodes =
|
|
2173
|
-
const edges =
|
|
2221
|
+
const nodes = chunk2JK7GQYA_js.useWorkflowStore((state) => state.nodes);
|
|
2222
|
+
const edges = chunk2JK7GQYA_js.useWorkflowStore((state) => state.edges);
|
|
2174
2223
|
const [expandedNodes, setExpandedNodes] = react.useState(/* @__PURE__ */ new Set());
|
|
2175
2224
|
const toggleNodeExpansion = react.useCallback((nodeId) => {
|
|
2176
2225
|
setExpandedNodes((current) => {
|
|
@@ -2232,8 +2281,8 @@ function VariableInspector({ open, onClose }) {
|
|
|
2232
2281
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-gray-500 dark:text-gray-400", children: translations("noNodes") })
|
|
2233
2282
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y divide-gray-100 dark:divide-gray-800", children: nodeVariableEntries.map((entry) => {
|
|
2234
2283
|
const isExpanded = expandedNodes.has(entry.nodeId);
|
|
2235
|
-
const IconComponent =
|
|
2236
|
-
const gradient =
|
|
2284
|
+
const IconComponent = chunk2JK7GQYA_js.LOGIC_ICON_MAP[entry.nodeType];
|
|
2285
|
+
const gradient = chunk2JK7GQYA_js.LOGIC_NODE_GRADIENTS[entry.nodeType] ?? "from-gray-400 to-gray-500";
|
|
2237
2286
|
const inputVariables = entry.variables.filter((variable) => variable.direction === "input");
|
|
2238
2287
|
const outputVariables = entry.variables.filter((variable) => variable.direction === "output");
|
|
2239
2288
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": `variable-node-${entry.nodeId}`, children: [
|
|
@@ -2299,7 +2348,7 @@ function RunInputDialog({
|
|
|
2299
2348
|
onRun
|
|
2300
2349
|
}) {
|
|
2301
2350
|
const t = chunkYXN2K77G_js.useTranslations("agents.workflow.runInputDialog");
|
|
2302
|
-
const nodes =
|
|
2351
|
+
const nodes = chunk2JK7GQYA_js.useWorkflowStore((state) => state.nodes);
|
|
2303
2352
|
const [values, setValues] = react.useState({});
|
|
2304
2353
|
const inputVariableNames = react.useMemo(() => {
|
|
2305
2354
|
const storeStartNode = nodes.find((node) => node.type === "start");
|
|
@@ -2381,8 +2430,8 @@ function PreviewPanel({ open, onClose, workflowId, loadRuns }) {
|
|
|
2381
2430
|
const [isLoadingRuns, setIsLoadingRuns] = react.useState(false);
|
|
2382
2431
|
const [selectedRun, setSelectedRun] = react.useState(null);
|
|
2383
2432
|
const [selectedNode, setSelectedNode] = react.useState(null);
|
|
2384
|
-
const isRunning =
|
|
2385
|
-
const nodeResults =
|
|
2433
|
+
const isRunning = chunk2JK7GQYA_js.useWorkflowStore((state) => state.isRunning);
|
|
2434
|
+
const nodeResults = chunk2JK7GQYA_js.useWorkflowStore((state) => state.nodeResults);
|
|
2386
2435
|
const refreshRuns = react.useCallback(async () => {
|
|
2387
2436
|
setIsLoadingRuns(true);
|
|
2388
2437
|
try {
|
|
@@ -2538,7 +2587,7 @@ var AutoSaveWorkspace = react.memo(function AutoSaveWorkspace2({
|
|
|
2538
2587
|
onAutoSaveGraph(graph);
|
|
2539
2588
|
}, [onAutoSaveGraph, onGraphSnapshot]);
|
|
2540
2589
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2541
|
-
|
|
2590
|
+
chunk2JK7GQYA_js.Workspace,
|
|
2542
2591
|
{
|
|
2543
2592
|
...workspaceProps,
|
|
2544
2593
|
onGraphChange: handleGraphChange
|
|
@@ -2911,14 +2960,14 @@ function DslImportModal({ open, onClose, onImport }) {
|
|
|
2911
2960
|
}
|
|
2912
2961
|
|
|
2913
2962
|
// src/astrlabe/store/selectors.ts
|
|
2914
|
-
var useCanUndo = () =>
|
|
2915
|
-
var useCanRedo = () =>
|
|
2916
|
-
var useHasCopied = () =>
|
|
2917
|
-
var useContextMenu = () =>
|
|
2918
|
-
var useEditingNodeId = () =>
|
|
2919
|
-
var useSelectedNodeCount = () =>
|
|
2920
|
-
var useIsRunning = () =>
|
|
2921
|
-
var useNodeResults = () =>
|
|
2963
|
+
var useCanUndo = () => chunk2JK7GQYA_js.useWorkflowStore((state) => state.past.length > 0);
|
|
2964
|
+
var useCanRedo = () => chunk2JK7GQYA_js.useWorkflowStore((state) => state.future.length > 0);
|
|
2965
|
+
var useHasCopied = () => chunk2JK7GQYA_js.useWorkflowStore((state) => state.clipboard !== null);
|
|
2966
|
+
var useContextMenu = () => chunk2JK7GQYA_js.useWorkflowStore((state) => state.contextMenu);
|
|
2967
|
+
var useEditingNodeId = () => chunk2JK7GQYA_js.useWorkflowStore((state) => state.editingNodeId);
|
|
2968
|
+
var useSelectedNodeCount = () => chunk2JK7GQYA_js.useWorkflowStore((state) => state.nodes.filter((node) => node.selected).length);
|
|
2969
|
+
var useIsRunning = () => chunk2JK7GQYA_js.useWorkflowStore((state) => state.isRunning);
|
|
2970
|
+
var useNodeResults = () => chunk2JK7GQYA_js.useWorkflowStore((state) => state.nodeResults);
|
|
2922
2971
|
var DEFAULT_MAX_HISTORY = 50;
|
|
2923
2972
|
function useUndoRedo(nodes, edges, setNodes, setEdges, maxHistory = DEFAULT_MAX_HISTORY) {
|
|
2924
2973
|
const pastRef = react.useRef([]);
|
|
@@ -3206,227 +3255,227 @@ Object.defineProperty(exports, "validateWorkflowGraph", {
|
|
|
3206
3255
|
});
|
|
3207
3256
|
Object.defineProperty(exports, "AgentFlowNode", {
|
|
3208
3257
|
enumerable: true,
|
|
3209
|
-
get: function () { return
|
|
3258
|
+
get: function () { return chunk2JK7GQYA_js.AgentFlowNode; }
|
|
3210
3259
|
});
|
|
3211
3260
|
Object.defineProperty(exports, "AgentToolFlowNode", {
|
|
3212
3261
|
enumerable: true,
|
|
3213
|
-
get: function () { return
|
|
3262
|
+
get: function () { return chunk2JK7GQYA_js.AgentToolFlowNode; }
|
|
3214
3263
|
});
|
|
3215
3264
|
Object.defineProperty(exports, "AnswerFlowNode", {
|
|
3216
3265
|
enumerable: true,
|
|
3217
|
-
get: function () { return
|
|
3266
|
+
get: function () { return chunk2JK7GQYA_js.AnswerFlowNode; }
|
|
3218
3267
|
});
|
|
3219
3268
|
Object.defineProperty(exports, "AnthropicIcon", {
|
|
3220
3269
|
enumerable: true,
|
|
3221
|
-
get: function () { return
|
|
3270
|
+
get: function () { return chunk2JK7GQYA_js.AnthropicIcon; }
|
|
3222
3271
|
});
|
|
3223
3272
|
Object.defineProperty(exports, "CodeFlowNode", {
|
|
3224
3273
|
enumerable: true,
|
|
3225
|
-
get: function () { return
|
|
3274
|
+
get: function () { return chunk2JK7GQYA_js.CodeFlowNode; }
|
|
3226
3275
|
});
|
|
3227
3276
|
Object.defineProperty(exports, "CrewAIIcon", {
|
|
3228
3277
|
enumerable: true,
|
|
3229
|
-
get: function () { return
|
|
3278
|
+
get: function () { return chunk2JK7GQYA_js.CrewAIIcon; }
|
|
3230
3279
|
});
|
|
3231
3280
|
Object.defineProperty(exports, "DocumentExtractorFlowNode", {
|
|
3232
3281
|
enumerable: true,
|
|
3233
|
-
get: function () { return
|
|
3282
|
+
get: function () { return chunk2JK7GQYA_js.DocumentExtractorFlowNode; }
|
|
3234
3283
|
});
|
|
3235
3284
|
Object.defineProperty(exports, "EndFlowNode", {
|
|
3236
3285
|
enumerable: true,
|
|
3237
|
-
get: function () { return
|
|
3286
|
+
get: function () { return chunk2JK7GQYA_js.EndFlowNode; }
|
|
3238
3287
|
});
|
|
3239
3288
|
Object.defineProperty(exports, "EntityFlowNode", {
|
|
3240
3289
|
enumerable: true,
|
|
3241
|
-
get: function () { return
|
|
3290
|
+
get: function () { return chunk2JK7GQYA_js.EntityFlowNode; }
|
|
3242
3291
|
});
|
|
3243
3292
|
Object.defineProperty(exports, "FRAMEWORK_META", {
|
|
3244
3293
|
enumerable: true,
|
|
3245
|
-
get: function () { return
|
|
3294
|
+
get: function () { return chunk2JK7GQYA_js.FRAMEWORK_META; }
|
|
3246
3295
|
});
|
|
3247
3296
|
Object.defineProperty(exports, "GoogleADKIcon", {
|
|
3248
3297
|
enumerable: true,
|
|
3249
|
-
get: function () { return
|
|
3298
|
+
get: function () { return chunk2JK7GQYA_js.GoogleADKIcon; }
|
|
3250
3299
|
});
|
|
3251
3300
|
Object.defineProperty(exports, "GroupFlowNode", {
|
|
3252
3301
|
enumerable: true,
|
|
3253
|
-
get: function () { return
|
|
3302
|
+
get: function () { return chunk2JK7GQYA_js.GroupFlowNode; }
|
|
3254
3303
|
});
|
|
3255
3304
|
Object.defineProperty(exports, "HttpRequestFlowNode", {
|
|
3256
3305
|
enumerable: true,
|
|
3257
|
-
get: function () { return
|
|
3306
|
+
get: function () { return chunk2JK7GQYA_js.HttpRequestFlowNode; }
|
|
3258
3307
|
});
|
|
3259
3308
|
Object.defineProperty(exports, "IfElseFlowNode", {
|
|
3260
3309
|
enumerable: true,
|
|
3261
|
-
get: function () { return
|
|
3310
|
+
get: function () { return chunk2JK7GQYA_js.IfElseFlowNode; }
|
|
3262
3311
|
});
|
|
3263
3312
|
Object.defineProperty(exports, "IterationFlowNode", {
|
|
3264
3313
|
enumerable: true,
|
|
3265
|
-
get: function () { return
|
|
3314
|
+
get: function () { return chunk2JK7GQYA_js.IterationFlowNode; }
|
|
3266
3315
|
});
|
|
3267
3316
|
Object.defineProperty(exports, "IterationStartFlowNode", {
|
|
3268
3317
|
enumerable: true,
|
|
3269
|
-
get: function () { return
|
|
3318
|
+
get: function () { return chunk2JK7GQYA_js.IterationStartFlowNode; }
|
|
3270
3319
|
});
|
|
3271
3320
|
Object.defineProperty(exports, "KnowledgeBaseFlowNode", {
|
|
3272
3321
|
enumerable: true,
|
|
3273
|
-
get: function () { return
|
|
3322
|
+
get: function () { return chunk2JK7GQYA_js.KnowledgeBaseFlowNode; }
|
|
3274
3323
|
});
|
|
3275
3324
|
Object.defineProperty(exports, "LOGIC_ICON_MAP", {
|
|
3276
3325
|
enumerable: true,
|
|
3277
|
-
get: function () { return
|
|
3326
|
+
get: function () { return chunk2JK7GQYA_js.LOGIC_ICON_MAP; }
|
|
3278
3327
|
});
|
|
3279
3328
|
Object.defineProperty(exports, "LOGIC_NODE_BADGE_COLORS", {
|
|
3280
3329
|
enumerable: true,
|
|
3281
|
-
get: function () { return
|
|
3330
|
+
get: function () { return chunk2JK7GQYA_js.LOGIC_NODE_BADGE_COLORS; }
|
|
3282
3331
|
});
|
|
3283
3332
|
Object.defineProperty(exports, "LOGIC_NODE_GRADIENTS", {
|
|
3284
3333
|
enumerable: true,
|
|
3285
|
-
get: function () { return
|
|
3334
|
+
get: function () { return chunk2JK7GQYA_js.LOGIC_NODE_GRADIENTS; }
|
|
3286
3335
|
});
|
|
3287
3336
|
Object.defineProperty(exports, "LOGIC_NODE_HANDLE_COLORS", {
|
|
3288
3337
|
enumerable: true,
|
|
3289
|
-
get: function () { return
|
|
3338
|
+
get: function () { return chunk2JK7GQYA_js.LOGIC_NODE_HANDLE_COLORS; }
|
|
3290
3339
|
});
|
|
3291
3340
|
Object.defineProperty(exports, "LangChainIcon", {
|
|
3292
3341
|
enumerable: true,
|
|
3293
|
-
get: function () { return
|
|
3342
|
+
get: function () { return chunk2JK7GQYA_js.LangChainIcon; }
|
|
3294
3343
|
});
|
|
3295
3344
|
Object.defineProperty(exports, "ListOperatorFlowNode", {
|
|
3296
3345
|
enumerable: true,
|
|
3297
|
-
get: function () { return
|
|
3346
|
+
get: function () { return chunk2JK7GQYA_js.ListOperatorFlowNode; }
|
|
3298
3347
|
});
|
|
3299
3348
|
Object.defineProperty(exports, "LogicNodeModal", {
|
|
3300
3349
|
enumerable: true,
|
|
3301
|
-
get: function () { return
|
|
3350
|
+
get: function () { return chunk2JK7GQYA_js.LogicNodeModal; }
|
|
3302
3351
|
});
|
|
3303
3352
|
Object.defineProperty(exports, "MINIMAP_NODE_COLORS", {
|
|
3304
3353
|
enumerable: true,
|
|
3305
|
-
get: function () { return
|
|
3354
|
+
get: function () { return chunk2JK7GQYA_js.MINIMAP_NODE_COLORS; }
|
|
3306
3355
|
});
|
|
3307
3356
|
Object.defineProperty(exports, "ModelProviderFlowNode", {
|
|
3308
3357
|
enumerable: true,
|
|
3309
|
-
get: function () { return
|
|
3358
|
+
get: function () { return chunk2JK7GQYA_js.ModelProviderFlowNode; }
|
|
3310
3359
|
});
|
|
3311
3360
|
Object.defineProperty(exports, "NodeCard", {
|
|
3312
3361
|
enumerable: true,
|
|
3313
|
-
get: function () { return
|
|
3362
|
+
get: function () { return chunk2JK7GQYA_js.NodeCard; }
|
|
3314
3363
|
});
|
|
3315
3364
|
Object.defineProperty(exports, "NodeContextMenu", {
|
|
3316
3365
|
enumerable: true,
|
|
3317
|
-
get: function () { return
|
|
3366
|
+
get: function () { return chunk2JK7GQYA_js.NodeContextMenu; }
|
|
3318
3367
|
});
|
|
3319
3368
|
Object.defineProperty(exports, "NoteFlowNode", {
|
|
3320
3369
|
enumerable: true,
|
|
3321
|
-
get: function () { return
|
|
3370
|
+
get: function () { return chunk2JK7GQYA_js.NoteFlowNode; }
|
|
3322
3371
|
});
|
|
3323
3372
|
Object.defineProperty(exports, "OpenAIIcon", {
|
|
3324
3373
|
enumerable: true,
|
|
3325
|
-
get: function () { return
|
|
3374
|
+
get: function () { return chunk2JK7GQYA_js.OpenAIIcon; }
|
|
3326
3375
|
});
|
|
3327
3376
|
Object.defineProperty(exports, "PanelContextMenu", {
|
|
3328
3377
|
enumerable: true,
|
|
3329
|
-
get: function () { return
|
|
3378
|
+
get: function () { return chunk2JK7GQYA_js.PanelContextMenu; }
|
|
3330
3379
|
});
|
|
3331
3380
|
Object.defineProperty(exports, "ParameterExtractorFlowNode", {
|
|
3332
3381
|
enumerable: true,
|
|
3333
|
-
get: function () { return
|
|
3382
|
+
get: function () { return chunk2JK7GQYA_js.ParameterExtractorFlowNode; }
|
|
3334
3383
|
});
|
|
3335
3384
|
Object.defineProperty(exports, "QuestionClassifierFlowNode", {
|
|
3336
3385
|
enumerable: true,
|
|
3337
|
-
get: function () { return
|
|
3386
|
+
get: function () { return chunk2JK7GQYA_js.QuestionClassifierFlowNode; }
|
|
3338
3387
|
});
|
|
3339
3388
|
Object.defineProperty(exports, "RuleFlowNode", {
|
|
3340
3389
|
enumerable: true,
|
|
3341
|
-
get: function () { return
|
|
3390
|
+
get: function () { return chunk2JK7GQYA_js.RuleFlowNode; }
|
|
3342
3391
|
});
|
|
3343
3392
|
Object.defineProperty(exports, "SelectionContextMenu", {
|
|
3344
3393
|
enumerable: true,
|
|
3345
|
-
get: function () { return
|
|
3394
|
+
get: function () { return chunk2JK7GQYA_js.SelectionContextMenu; }
|
|
3346
3395
|
});
|
|
3347
3396
|
Object.defineProperty(exports, "StartFlowNode", {
|
|
3348
3397
|
enumerable: true,
|
|
3349
|
-
get: function () { return
|
|
3398
|
+
get: function () { return chunk2JK7GQYA_js.StartFlowNode; }
|
|
3350
3399
|
});
|
|
3351
3400
|
Object.defineProperty(exports, "StrandsIcon", {
|
|
3352
3401
|
enumerable: true,
|
|
3353
|
-
get: function () { return
|
|
3402
|
+
get: function () { return chunk2JK7GQYA_js.StrandsIcon; }
|
|
3354
3403
|
});
|
|
3355
3404
|
Object.defineProperty(exports, "TemplateTransformFlowNode", {
|
|
3356
3405
|
enumerable: true,
|
|
3357
|
-
get: function () { return
|
|
3406
|
+
get: function () { return chunk2JK7GQYA_js.TemplateTransformFlowNode; }
|
|
3358
3407
|
});
|
|
3359
3408
|
Object.defineProperty(exports, "ToolFlowNode", {
|
|
3360
3409
|
enumerable: true,
|
|
3361
|
-
get: function () { return
|
|
3410
|
+
get: function () { return chunk2JK7GQYA_js.ToolFlowNode; }
|
|
3362
3411
|
});
|
|
3363
3412
|
Object.defineProperty(exports, "VariableAggregatorFlowNode", {
|
|
3364
3413
|
enumerable: true,
|
|
3365
|
-
get: function () { return
|
|
3414
|
+
get: function () { return chunk2JK7GQYA_js.VariableAggregatorFlowNode; }
|
|
3366
3415
|
});
|
|
3367
3416
|
Object.defineProperty(exports, "VariableAssignerFlowNode", {
|
|
3368
3417
|
enumerable: true,
|
|
3369
|
-
get: function () { return
|
|
3418
|
+
get: function () { return chunk2JK7GQYA_js.VariableAssignerFlowNode; }
|
|
3370
3419
|
});
|
|
3371
3420
|
Object.defineProperty(exports, "WorkflowBuilderProvider", {
|
|
3372
3421
|
enumerable: true,
|
|
3373
|
-
get: function () { return
|
|
3422
|
+
get: function () { return chunk2JK7GQYA_js.WorkflowBuilderProvider; }
|
|
3374
3423
|
});
|
|
3375
3424
|
Object.defineProperty(exports, "Workspace", {
|
|
3376
3425
|
enumerable: true,
|
|
3377
|
-
get: function () { return
|
|
3426
|
+
get: function () { return chunk2JK7GQYA_js.Workspace; }
|
|
3378
3427
|
});
|
|
3379
3428
|
Object.defineProperty(exports, "getCompatibleModels", {
|
|
3380
3429
|
enumerable: true,
|
|
3381
|
-
get: function () { return
|
|
3430
|
+
get: function () { return chunk2JK7GQYA_js.getCompatibleModels; }
|
|
3382
3431
|
});
|
|
3383
3432
|
Object.defineProperty(exports, "getDefaultFrameworkForModel", {
|
|
3384
3433
|
enumerable: true,
|
|
3385
|
-
get: function () { return
|
|
3434
|
+
get: function () { return chunk2JK7GQYA_js.getDefaultFrameworkForModel; }
|
|
3386
3435
|
});
|
|
3387
3436
|
Object.defineProperty(exports, "getEntityBadgeColor", {
|
|
3388
3437
|
enumerable: true,
|
|
3389
|
-
get: function () { return
|
|
3438
|
+
get: function () { return chunk2JK7GQYA_js.getEntityBadgeColor; }
|
|
3390
3439
|
});
|
|
3391
3440
|
Object.defineProperty(exports, "getEntityGradient", {
|
|
3392
3441
|
enumerable: true,
|
|
3393
|
-
get: function () { return
|
|
3442
|
+
get: function () { return chunk2JK7GQYA_js.getEntityGradient; }
|
|
3394
3443
|
});
|
|
3395
3444
|
Object.defineProperty(exports, "getEntityHandleColor", {
|
|
3396
3445
|
enumerable: true,
|
|
3397
|
-
get: function () { return
|
|
3446
|
+
get: function () { return chunk2JK7GQYA_js.getEntityHandleColor; }
|
|
3398
3447
|
});
|
|
3399
3448
|
Object.defineProperty(exports, "getEntityIcon", {
|
|
3400
3449
|
enumerable: true,
|
|
3401
|
-
get: function () { return
|
|
3450
|
+
get: function () { return chunk2JK7GQYA_js.getEntityIcon; }
|
|
3402
3451
|
});
|
|
3403
3452
|
Object.defineProperty(exports, "getEntityMinimapColor", {
|
|
3404
3453
|
enumerable: true,
|
|
3405
|
-
get: function () { return
|
|
3454
|
+
get: function () { return chunk2JK7GQYA_js.getEntityMinimapColor; }
|
|
3406
3455
|
});
|
|
3407
3456
|
Object.defineProperty(exports, "getFrameworkMeta", {
|
|
3408
3457
|
enumerable: true,
|
|
3409
|
-
get: function () { return
|
|
3458
|
+
get: function () { return chunk2JK7GQYA_js.getFrameworkMeta; }
|
|
3410
3459
|
});
|
|
3411
3460
|
Object.defineProperty(exports, "isModelCompatibleWithFramework", {
|
|
3412
3461
|
enumerable: true,
|
|
3413
|
-
get: function () { return
|
|
3462
|
+
get: function () { return chunk2JK7GQYA_js.isModelCompatibleWithFramework; }
|
|
3414
3463
|
});
|
|
3415
3464
|
Object.defineProperty(exports, "useModalStore", {
|
|
3416
3465
|
enumerable: true,
|
|
3417
|
-
get: function () { return
|
|
3466
|
+
get: function () { return chunk2JK7GQYA_js.useModalStore; }
|
|
3418
3467
|
});
|
|
3419
3468
|
Object.defineProperty(exports, "useWorkflowBuilderClient", {
|
|
3420
3469
|
enumerable: true,
|
|
3421
|
-
get: function () { return
|
|
3470
|
+
get: function () { return chunk2JK7GQYA_js.useWorkflowBuilderClient; }
|
|
3422
3471
|
});
|
|
3423
3472
|
Object.defineProperty(exports, "useWorkflowBuilderClientOptional", {
|
|
3424
3473
|
enumerable: true,
|
|
3425
|
-
get: function () { return
|
|
3474
|
+
get: function () { return chunk2JK7GQYA_js.useWorkflowBuilderClientOptional; }
|
|
3426
3475
|
});
|
|
3427
3476
|
Object.defineProperty(exports, "useWorkflowStore", {
|
|
3428
3477
|
enumerable: true,
|
|
3429
|
-
get: function () { return
|
|
3478
|
+
get: function () { return chunk2JK7GQYA_js.useWorkflowStore; }
|
|
3430
3479
|
});
|
|
3431
3480
|
Object.defineProperty(exports, "GraphNodeBadge", {
|
|
3432
3481
|
enumerable: true,
|