@datatechsolutions/ui 2.7.118 → 2.7.119

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.
@@ -5024,6 +5024,7 @@ function WorkflowCanvasInner({
5024
5024
  agents,
5025
5025
  models,
5026
5026
  tools,
5027
+ agentTools = [],
5027
5028
  rules,
5028
5029
  entities = [],
5029
5030
  initialGraph,
@@ -5117,6 +5118,13 @@ function WorkflowCanvasInner({
5117
5118
  }
5118
5119
  return map;
5119
5120
  }, [allTools]);
5121
+ const agentToolMap = useMemo(() => {
5122
+ const map = /* @__PURE__ */ new Map();
5123
+ for (const at of agentTools) {
5124
+ map.set(at.agentToolId, at);
5125
+ }
5126
+ return map;
5127
+ }, [agentTools]);
5120
5128
  const ruleMap = useMemo(() => {
5121
5129
  const map = /* @__PURE__ */ new Map();
5122
5130
  for (const rule of allRules) {
@@ -6050,6 +6058,20 @@ function WorkflowCanvasInner({
6050
6058
  }
6051
6059
  };
6052
6060
  setNodes((currentNodes) => [...currentNodes, newNode]);
6061
+ } else if (nodeType === "agent_tool") {
6062
+ const agentTool = agentToolMap.get(entityId);
6063
+ if (!agentTool) return;
6064
+ const newNode = {
6065
+ id: newNodeId,
6066
+ type: "agent_tool",
6067
+ position,
6068
+ data: {
6069
+ agentTool,
6070
+ order: 0,
6071
+ onRemoveFromCanvas: handleRemoveNodeFromCanvas
6072
+ }
6073
+ };
6074
+ setNodes((currentNodes) => [...currentNodes, newNode]);
6053
6075
  } else if (nodeType === "rule") {
6054
6076
  const rule = ruleMap.get(entityId);
6055
6077
  if (!rule) return;
@@ -6645,5 +6667,5 @@ function Workspace({
6645
6667
  }
6646
6668
 
6647
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, NodeCardBadge, NodeCardHeader, NodeCardMeta, NodeContextMenu, NodeRunningIndicator, NoteFlowNode, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, QuestionClassifierFlowNode, RuleFlowNode, SelectionContextMenu, StartFlowNode, StrandsIcon, TemplateTransformFlowNode, ToolFlowNode, VariableAggregatorFlowNode, VariableAssignerFlowNode, WorkflowBuilderProvider, WorkflowCanvas, WorkflowHandle, Workspace, WorkspaceDrawer, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, isModelCompatibleWithFramework, useDrawerStore, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
6648
- //# sourceMappingURL=chunk-4ESKCNPI.mjs.map
6649
- //# sourceMappingURL=chunk-4ESKCNPI.mjs.map
6670
+ //# sourceMappingURL=chunk-MAYOV7OM.mjs.map
6671
+ //# sourceMappingURL=chunk-MAYOV7OM.mjs.map