@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.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import '../chunk-JB6RNAD2.mjs';
|
|
3
3
|
export { topologicalSortAgents, validateWorkflowGraph } from '../chunk-BLNXRUC4.mjs';
|
|
4
|
-
import { Workspace, useModalStore, CATEGORY_COLORS, CATEGORY_PILL_COLORS, ICON_MAP, WorkflowCanvas,
|
|
5
|
-
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore } from '../chunk-
|
|
4
|
+
import { Workspace, useModalStore, CATEGORY_COLORS, CATEGORY_PILL_COLORS, ICON_MAP, WorkflowCanvas, getEntityIcon, getEntityGradient, useWorkflowStore, LOGIC_ICON_MAP, LOGIC_NODE_GRADIENTS, getFrameworkMeta, getCompatibleModels, isModelCompatibleWithFramework, FRAMEWORK_META } from '../chunk-4B47R7VI.mjs';
|
|
5
|
+
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeModal, MINIMAP_NODE_COLORS, ModelProviderFlowNode, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, Workspace, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useModalStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore } from '../chunk-4B47R7VI.mjs';
|
|
6
6
|
import { GlassModalShell, Button, FormInput, FormTextarea, GlassFormModal, Input, DynamicIslandConfirm } from '../chunk-46ZM5VJJ.mjs';
|
|
7
7
|
import '../chunk-QWG2FMUN.mjs';
|
|
8
8
|
import '../chunk-D2JF6C3E.mjs';
|
|
@@ -11,7 +11,7 @@ import { getAgentTier, createDefaultLogicNodeConfig } from '../chunk-TLPPVL3W.mj
|
|
|
11
11
|
export { applyDagreLayout, createDefaultLogicNodeConfig, getAgentTier } from '../chunk-TLPPVL3W.mjs';
|
|
12
12
|
import { useTranslations } from '../chunk-7VJ7CMMT.mjs';
|
|
13
13
|
import { memo, useCallback, useState, useEffect, useMemo, useRef, Children } from 'react';
|
|
14
|
-
import { CpuChipIcon, ArrowPathRoundedSquareIcon, ArrowsPointingOutIcon, ArrowsPointingInIcon, BoltIcon, ClockIcon, CheckIcon, Cog6ToothIcon,
|
|
14
|
+
import { CpuChipIcon, ArrowPathRoundedSquareIcon, ArrowsPointingOutIcon, ArrowsPointingInIcon, BoltIcon, ClockIcon, CheckIcon, Cog6ToothIcon, AdjustmentsHorizontalIcon, CircleStackIcon, KeyIcon, TrashIcon, PlusIcon, XMarkIcon, EyeIcon, ArrowPathIcon, PlayIcon, StopIcon, XCircleIcon, CheckCircleIcon, VariableIcon, ChevronDownIcon, ChevronRightIcon, ExclamationCircleIcon, ClipboardDocumentIcon, ArrowDownTrayIcon, ArrowUpTrayIcon, ExclamationTriangleIcon, CommandLineIcon } from '@heroicons/react/24/outline';
|
|
15
15
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
16
|
import { create } from 'zustand';
|
|
17
17
|
|
|
@@ -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__ */ jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
|
|
566
|
+
/* @__PURE__ */ jsx(KeyIcon, { className: "mb-2 h-8 w-8 text-gray-400 dark:text-gray-500" }),
|
|
567
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: t("agentDrawer.noProvidersAvailable") }),
|
|
568
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-gray-400 dark:text-gray-500", children: t("agentDrawer.dragProviderHint") })
|
|
569
|
+
] });
|
|
570
|
+
}
|
|
571
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-2 p-4", children: [
|
|
572
|
+
/* @__PURE__ */ 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__ */ 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__ */ jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-white/10 p-1.5", children: /* @__PURE__ */ jsx("img", { src: logo, alt: "", className: "h-6 w-6 object-contain", loading: "lazy" }) }) : /* @__PURE__ */ 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__ */ jsx(KeyIcon, { className: "h-5 w-5 text-white" }) }),
|
|
584
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
585
|
+
/* @__PURE__ */ 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__ */ jsxs("div", { className: "mt-0.5 flex items-center gap-2 text-[10px] text-gray-400 dark:text-gray-500", children: [
|
|
587
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
588
|
+
provider.modelCount,
|
|
589
|
+
" models"
|
|
590
|
+
] }),
|
|
591
|
+
/* @__PURE__ */ 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__ */ 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__ */ jsx(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__ */ jsxs("div", { className: "flex flex-col items-center justify-center px-4 py-12 text-center", children: [
|
|
553
605
|
/* @__PURE__ */ jsx(CommandLineIcon, { className: "mb-2 h-8 w-8 text-gray-400 dark:text-gray-500" }),
|
|
554
606
|
/* @__PURE__ */ 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__ */ jsxs("div", { className: "space-y-2 p-4", children: [
|
|
558
617
|
/* @__PURE__ */ 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__ */ 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__ */ 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__ */ jsx(CommandLineIcon, { className: `h-4 w-4 ${isEnabled ? "text-white" : "text-gray-500 dark:text-gray-400"}` }) }),
|
|
569
630
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
|
|
631
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
632
|
+
/* @__PURE__ */ 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__ */ 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__ */ jsx("p", { className: "truncate text-[10px] text-gray-400 dark:text-gray-500", children: tool.description }),
|
|
636
|
+
tool.compatibleFrameworks && tool.compatibleFrameworks.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-1 flex flex-wrap gap-0.5", children: tool.compatibleFrameworks.map((framework) => {
|
|
637
|
+
const meta = getFrameworkMeta(framework);
|
|
638
|
+
const isCurrentFw = framework === agentFramework;
|
|
639
|
+
return /* @__PURE__ */ 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__ */ jsx(meta.IconComponent, { className: "h-2.5 w-2.5" }),
|
|
641
|
+
meta.label
|
|
642
|
+
] }, framework);
|
|
643
|
+
}) })
|
|
572
644
|
] }),
|
|
573
645
|
/* @__PURE__ */ 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__ */ jsx(CheckIcon, { className: "h-3 w-3" }) })
|
|
574
646
|
]
|
|
@@ -595,6 +667,8 @@ function AgentModal({ onSaved }) {
|
|
|
595
667
|
const [elo, setElo] = useState(1e3);
|
|
596
668
|
const [saved, setSaved] = useState(true);
|
|
597
669
|
const [enabledToolIds, setEnabledToolIds] = useState(/* @__PURE__ */ new Set());
|
|
670
|
+
const [selectedProviderId, setSelectedProviderId] = useState("");
|
|
671
|
+
const availableModelProviders = agentData?.modelProviders ?? [];
|
|
598
672
|
const agentId = agent?.agentId ?? agent?.id ?? "";
|
|
599
673
|
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 = useCallback(() => setSaved(false), []);
|
|
@@ -613,6 +688,10 @@ function AgentModal({ onSaved }) {
|
|
|
613
688
|
const handleClose = useCallback(() => {
|
|
614
689
|
closeModal();
|
|
615
690
|
}, [closeModal]);
|
|
691
|
+
const handleSelectProvider = useCallback((providerId) => {
|
|
692
|
+
setSelectedProviderId(providerId);
|
|
693
|
+
markDirty();
|
|
694
|
+
}, [markDirty]);
|
|
616
695
|
const handleToggleTool = 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__ */ jsx("div", { className: "flex border-b border-white/20 dark:border-white/10", children: tabList.map((tab) => /* @__PURE__ */ 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__ */ 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__ */ 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__ */ 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__ */ jsx(AgentProfileHeader, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, temperature, setTemperature, elo, setElo, onChanged: markDirty }),
|
|
684
764
|
activeTab === "config" && /* @__PURE__ */ jsx(ConfigTab, { agent, models, t, selectedModelId, setSelectedModelId, selectedFramework, setSelectedFramework: (fw) => setSelectedFramework(fw), temperature, setTemperature, dirty, markDirty, markSaved: handleMarkSaved }),
|
|
685
|
-
activeTab === "tools" && /* @__PURE__ */ jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, t }),
|
|
765
|
+
activeTab === "tools" && /* @__PURE__ */ jsx(ToolsTab, { agentTools: availableAgentTools, enabledToolIds, onToggle: handleToggleTool, agentFramework: selectedFramework, t }),
|
|
766
|
+
activeTab === "models" && /* @__PURE__ */ jsx(ModelsTab, { modelProviders: availableModelProviders, selectedProviderId, onSelectProvider: handleSelectProvider, t }),
|
|
686
767
|
activeTab === "results" && /* @__PURE__ */ jsx(ResultsTab, { agentId: agent.agentId, t })
|
|
687
768
|
]
|
|
688
769
|
}
|
|
@@ -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);
|
|
@@ -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__ */ jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
children: [
|
|
1375
|
-
/* @__PURE__ */
|
|
1376
|
-
|
|
1377
|
-
|
|
1447
|
+
count: filteredAgents.length,
|
|
1448
|
+
children: filteredAgents.length === 0 && filteredAgentTools.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-[10px] text-gray-400 dark:text-gray-500", children: t("noAgents") }) : /* @__PURE__ */ jsx(Fragment, { children: filteredAgents.map((agent) => /* @__PURE__ */ 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__ */ jsxs("div", { className: "relative flex-shrink-0", children: [
|
|
1456
|
+
agent.avatar ? /* @__PURE__ */ 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__ */ 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__ */ jsx(CpuChipIcon, { className: "h-3.5 w-3.5 text-white" }) }),
|
|
1457
|
+
/* @__PURE__ */ 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__ */ jsx(CpuChipIcon, { className: "h-2 w-2 text-white" }) })
|
|
1458
|
+
] }),
|
|
1459
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1460
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
1461
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-gray-900 dark:text-white", children: agent.name }),
|
|
1462
|
+
(() => {
|
|
1463
|
+
const tier = getAgentTier(Number(agent.elo ?? 0));
|
|
1464
|
+
return /* @__PURE__ */ 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__ */
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
})()
|
|
1386
|
-
] }),
|
|
1387
|
-
/* @__PURE__ */ 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__ */ jsxs(Fragment, { children: [
|
|
1394
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-2 mb-1 flex items-center gap-1.5 px-1", children: [
|
|
1395
|
-
/* @__PURE__ */ jsx(CommandLineIcon, { className: "h-2.5 w-2.5 text-amber-500 dark:text-amber-400" }),
|
|
1396
|
-
/* @__PURE__ */ jsx("span", { className: "text-[9px] font-semibold uppercase tracking-wider text-amber-600 dark:text-amber-400", children: t("agentToolsSection") }),
|
|
1397
|
-
onCreateAgentTool && /* @__PURE__ */ 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__ */ jsx(PlusIcon, { className: "h-3 w-3" }) })
|
|
1398
|
-
] }),
|
|
1399
|
-
filteredAgentTools.map((agentTool) => /* @__PURE__ */ 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__ */ 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__ */ jsx(CommandLineIcon, { className: "h-3 w-3 text-white" }) }),
|
|
1407
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1408
|
-
/* @__PURE__ */ 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__ */ jsx("div", { className: "mt-0.5 flex flex-wrap gap-0.5", children: agentTool.compatibleFrameworks.map((framework) => {
|
|
1410
|
-
const meta = getFrameworkMeta(framework);
|
|
1411
|
-
return /* @__PURE__ */ jsxs("span", { className: `inline-flex items-center gap-0.5 rounded px-1 py-px text-[8px] font-medium ${meta.badgeColor}`, children: [
|
|
1412
|
-
/* @__PURE__ */ jsx(meta.IconComponent, { className: "h-2 w-2" }),
|
|
1413
|
-
meta.label
|
|
1414
|
-
] }, framework);
|
|
1415
|
-
}) })
|
|
1416
|
-
] }),
|
|
1417
|
-
!agentTool.enabled && /* @__PURE__ */ 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__ */ 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__ */ jsx(
|
|
@@ -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__ */ jsxs(
|
|
1537
1586
|
"div",
|
|
1538
1587
|
{
|