@datatechsolutions/ui 2.7.119 → 2.7.121
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/{chunk-DOO5ICHD.js → chunk-2QXKMKQK.js} +147 -57
- package/dist/chunk-2QXKMKQK.js.map +1 -0
- package/dist/{chunk-MAYOV7OM.mjs → chunk-3AW434K4.mjs} +98 -4
- package/dist/chunk-3AW434K4.mjs.map +1 -0
- package/dist/{chunk-YRY7HFKG.js → chunk-DOOTVMMR.js} +19 -2
- package/dist/chunk-DOOTVMMR.js.map +1 -0
- package/dist/{chunk-URTWMG3V.mjs → chunk-T3E6GSQ2.mjs} +19 -3
- package/dist/chunk-T3E6GSQ2.mjs.map +1 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +363 -359
- package/dist/index.mjs +1 -1
- package/dist/workflow/index.js +122 -213
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/index.mjs +5 -99
- package/dist/workflow/index.mjs.map +1 -1
- package/dist/workflow/workflow-canvas.js +3 -3
- package/dist/workflow/workflow-canvas.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-DOO5ICHD.js.map +0 -1
- package/dist/chunk-MAYOV7OM.mjs.map +0 -1
- package/dist/chunk-URTWMG3V.mjs.map +0 -1
- package/dist/chunk-YRY7HFKG.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { EntityDrawer, ContextMenu, FormInput, FormTextarea, FormSelect, Button, Card, CardContent, IconButton, Input } from './chunk-
|
|
2
|
+
import { EntityDrawer, ContextMenu, FormInput, FormTextarea, FormSelect, Button, Card, CardContent, IconButton, Input } from './chunk-T3E6GSQ2.mjs';
|
|
3
3
|
import { GraphNodeHeader, GraphNodeMeta, GraphNodeBadge, GraphNodeIconBubble } from './chunk-UBCSCLUW.mjs';
|
|
4
4
|
import { getAgentTier, createDefaultLogicNodeConfig, applyDagreLayout } from './chunk-6KYBGBI4.mjs';
|
|
5
5
|
import { memo, useState, useRef, useCallback, useEffect, createContext, useMemo, useContext } from 'react';
|
|
@@ -1399,6 +1399,99 @@ var AgentFlowNode = memo(function AgentFlowNode2({ id, data, selected }) {
|
|
|
1399
1399
|
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "rule-out", style: { top: "75%" }, colorClass: "!bg-violet-500" })
|
|
1400
1400
|
] });
|
|
1401
1401
|
});
|
|
1402
|
+
var CATEGORY_ICONS = {
|
|
1403
|
+
search: "from-sky-400 to-blue-500",
|
|
1404
|
+
code: "from-cyan-400 to-sky-500",
|
|
1405
|
+
file: "from-violet-400 to-purple-500",
|
|
1406
|
+
web: "from-orange-400 to-amber-500",
|
|
1407
|
+
math: "from-emerald-400 to-green-500",
|
|
1408
|
+
custom: "from-amber-400 to-orange-500"
|
|
1409
|
+
};
|
|
1410
|
+
var CATEGORY_PILL = {
|
|
1411
|
+
search: "bg-sky-100 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300",
|
|
1412
|
+
code: "bg-cyan-100 text-cyan-700 dark:bg-cyan-500/20 dark:text-cyan-300",
|
|
1413
|
+
file: "bg-violet-100 text-violet-700 dark:bg-violet-500/20 dark:text-violet-300",
|
|
1414
|
+
web: "bg-orange-100 text-orange-700 dark:bg-orange-500/20 dark:text-orange-300",
|
|
1415
|
+
math: "bg-emerald-100 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-300",
|
|
1416
|
+
custom: "bg-amber-100 text-amber-700 dark:bg-amber-500/20 dark:text-amber-300"
|
|
1417
|
+
};
|
|
1418
|
+
var AgentToolFlowNode = memo(function AgentToolFlowNode2({ id, data, selected }) {
|
|
1419
|
+
const t = useTranslations("agents.workflow");
|
|
1420
|
+
const { agentTool, onRemoveFromCanvas } = data;
|
|
1421
|
+
const isCompact = data.displayMode === "compact";
|
|
1422
|
+
if (!agentTool?.name) {
|
|
1423
|
+
const label = data.label;
|
|
1424
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1425
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
1426
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-amber-400" }),
|
|
1427
|
+
/* @__PURE__ */ jsx(NodeCard, { variant: "error", nodeType: "agent_tool", children: /* @__PURE__ */ jsx(
|
|
1428
|
+
NodeCardHeader,
|
|
1429
|
+
{
|
|
1430
|
+
icon: /* @__PURE__ */ jsx(ExclamationTriangleIcon, { className: "h-5 w-5 text-white" }),
|
|
1431
|
+
title: label || "Agent Tool",
|
|
1432
|
+
description: t("agentToolNotFound"),
|
|
1433
|
+
iconClassName: "flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br from-amber-400 to-orange-500 shadow-lg"
|
|
1434
|
+
}
|
|
1435
|
+
) }),
|
|
1436
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-amber-500" })
|
|
1437
|
+
] });
|
|
1438
|
+
}
|
|
1439
|
+
const category = agentTool.category ?? "custom";
|
|
1440
|
+
const gradient = CATEGORY_ICONS[category] ?? CATEGORY_ICONS.custom;
|
|
1441
|
+
const pill = CATEGORY_PILL[category] ?? CATEGORY_PILL.custom;
|
|
1442
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1443
|
+
/* @__PURE__ */ jsx(NodeRunningIndicator, { nodeId: id }),
|
|
1444
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "target", position: Position.Left, id: "left-in", colorClass: "!bg-amber-400" }),
|
|
1445
|
+
/* @__PURE__ */ jsxs(NodeCard, { compact: isCompact, selected, nodeType: "agent_tool", width: "w-[280px]", children: [
|
|
1446
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
1447
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
1448
|
+
/* @__PURE__ */ jsx("div", { className: `flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br ${gradient} shadow-lg`, children: /* @__PURE__ */ jsx(CommandLineIcon, { className: "h-5 w-5 text-white" }) }),
|
|
1449
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1450
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 dark:text-white", children: agentTool.name }),
|
|
1451
|
+
!isCompact && agentTool.description && /* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-gray-500 dark:text-gray-400", children: agentTool.description })
|
|
1452
|
+
] })
|
|
1453
|
+
] }),
|
|
1454
|
+
data.onToggle && /* @__PURE__ */ jsx(
|
|
1455
|
+
"span",
|
|
1456
|
+
{
|
|
1457
|
+
role: "switch",
|
|
1458
|
+
"aria-checked": agentTool.enabled,
|
|
1459
|
+
className: `nodrag nopan relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer items-center rounded-full border border-white/50 px-0.5 shadow-[inset_0_1px_0_rgba(255,255,255,0.5)] transition duration-200 dark:border-white/15 ${agentTool.enabled ? "bg-amber-500/90" : "bg-slate-300/80 dark:bg-slate-700/80"}`,
|
|
1460
|
+
onClick: (event) => {
|
|
1461
|
+
event.stopPropagation();
|
|
1462
|
+
data.onToggle(agentTool);
|
|
1463
|
+
},
|
|
1464
|
+
children: /* @__PURE__ */ jsx("span", { className: `pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow transition duration-200 ${agentTool.enabled ? "translate-x-4" : "translate-x-0"}` })
|
|
1465
|
+
}
|
|
1466
|
+
)
|
|
1467
|
+
] }),
|
|
1468
|
+
/* @__PURE__ */ jsx(NodeCardMeta, { compact: isCompact, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
1469
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { className: "rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-semibold text-amber-700 dark:bg-amber-500/20 dark:text-amber-300", children: t("agentToolNode") }),
|
|
1470
|
+
/* @__PURE__ */ jsx(NodeCardBadge, { className: `rounded-full px-2 py-0.5 text-[10px] font-medium ${pill}`, children: category }),
|
|
1471
|
+
agentTool.parameters && agentTool.parameters.length > 0 && /* @__PURE__ */ jsxs(NodeCardBadge, { className: "rounded-full bg-gray-100 px-2 py-0.5 text-[10px] font-medium text-gray-600 dark:bg-white/10 dark:text-gray-300", children: [
|
|
1472
|
+
agentTool.parameters.length,
|
|
1473
|
+
" params"
|
|
1474
|
+
] }),
|
|
1475
|
+
onRemoveFromCanvas && /* @__PURE__ */ jsx(
|
|
1476
|
+
"span",
|
|
1477
|
+
{
|
|
1478
|
+
role: "button",
|
|
1479
|
+
tabIndex: 0,
|
|
1480
|
+
onClick: (event) => {
|
|
1481
|
+
event.stopPropagation();
|
|
1482
|
+
event.preventDefault();
|
|
1483
|
+
onRemoveFromCanvas(id);
|
|
1484
|
+
},
|
|
1485
|
+
className: "nodrag nopan ml-auto cursor-pointer rounded-lg p-1 opacity-0 transition hover:bg-red-50 group-hover:opacity-100 dark:hover:bg-red-900/20",
|
|
1486
|
+
"aria-label": t("removeFromCanvas"),
|
|
1487
|
+
children: /* @__PURE__ */ jsx(TrashIcon, { className: "h-3.5 w-3.5 text-red-600 dark:text-red-400" })
|
|
1488
|
+
}
|
|
1489
|
+
)
|
|
1490
|
+
] }) })
|
|
1491
|
+
] }),
|
|
1492
|
+
/* @__PURE__ */ jsx(WorkflowHandle, { type: "source", position: Position.Right, id: "right-out", colorClass: "!bg-amber-500" })
|
|
1493
|
+
] });
|
|
1494
|
+
});
|
|
1402
1495
|
var ToolFlowNode = memo(function ToolFlowNode2({ id, data, selected }) {
|
|
1403
1496
|
const t = useTranslations("admin.tools");
|
|
1404
1497
|
const { tool, onRemoveFromCanvas } = data;
|
|
@@ -4955,6 +5048,7 @@ var MiniMap = dynamic(
|
|
|
4955
5048
|
);
|
|
4956
5049
|
var BUILT_IN_NODE_TYPES = {
|
|
4957
5050
|
agent: AgentFlowNode,
|
|
5051
|
+
agent_tool: AgentToolFlowNode,
|
|
4958
5052
|
tool: ToolFlowNode,
|
|
4959
5053
|
rule: RuleFlowNode,
|
|
4960
5054
|
entity: EntityFlowNode,
|
|
@@ -6666,6 +6760,6 @@ function Workspace({
|
|
|
6666
6760
|
) });
|
|
6667
6761
|
}
|
|
6668
6762
|
|
|
6669
|
-
export { AgentFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeDrawer, MINIMAP_NODE_COLORS, NodeCard,
|
|
6670
|
-
//# sourceMappingURL=chunk-
|
|
6671
|
-
//# sourceMappingURL=chunk-
|
|
6763
|
+
export { AgentFlowNode, AgentToolFlowNode, AnswerFlowNode, AnthropicIcon, CATEGORY_COLORS, CATEGORY_PILL_COLORS, CodeFlowNode, CrewAIIcon, DocumentExtractorFlowNode, EndFlowNode, EntityFlowNode, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, HttpRequestFlowNode, ICON_MAP, IfElseFlowNode, IterationFlowNode, IterationStartFlowNode, KnowledgeBaseFlowNode, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, ListOperatorFlowNode, LogicNodeDrawer, MINIMAP_NODE_COLORS, NodeCard, NodeContextMenu, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, Workspace, WorkspaceDrawer, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useDrawerStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
6764
|
+
//# sourceMappingURL=chunk-3AW434K4.mjs.map
|
|
6765
|
+
//# sourceMappingURL=chunk-3AW434K4.mjs.map
|