@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.
@@ -5030,6 +5030,7 @@ function WorkflowCanvasInner({
5030
5030
  agents,
5031
5031
  models,
5032
5032
  tools,
5033
+ agentTools = [],
5033
5034
  rules,
5034
5035
  entities = [],
5035
5036
  initialGraph,
@@ -5123,6 +5124,13 @@ function WorkflowCanvasInner({
5123
5124
  }
5124
5125
  return map;
5125
5126
  }, [allTools]);
5127
+ const agentToolMap = react.useMemo(() => {
5128
+ const map = /* @__PURE__ */ new Map();
5129
+ for (const at of agentTools) {
5130
+ map.set(at.agentToolId, at);
5131
+ }
5132
+ return map;
5133
+ }, [agentTools]);
5126
5134
  const ruleMap = react.useMemo(() => {
5127
5135
  const map = /* @__PURE__ */ new Map();
5128
5136
  for (const rule of allRules) {
@@ -6056,6 +6064,20 @@ function WorkflowCanvasInner({
6056
6064
  }
6057
6065
  };
6058
6066
  setNodes((currentNodes) => [...currentNodes, newNode]);
6067
+ } else if (nodeType === "agent_tool") {
6068
+ const agentTool = agentToolMap.get(entityId);
6069
+ if (!agentTool) return;
6070
+ const newNode = {
6071
+ id: newNodeId,
6072
+ type: "agent_tool",
6073
+ position,
6074
+ data: {
6075
+ agentTool,
6076
+ order: 0,
6077
+ onRemoveFromCanvas: handleRemoveNodeFromCanvas
6078
+ }
6079
+ };
6080
+ setNodes((currentNodes) => [...currentNodes, newNode]);
6059
6081
  } else if (nodeType === "rule") {
6060
6082
  const rule = ruleMap.get(entityId);
6061
6083
  if (!rule) return;
@@ -6714,5 +6736,5 @@ exports.useDrawerStore = useDrawerStore;
6714
6736
  exports.useWorkflowBuilderClient = useWorkflowBuilderClient;
6715
6737
  exports.useWorkflowBuilderClientOptional = useWorkflowBuilderClientOptional;
6716
6738
  exports.useWorkflowStore = useWorkflowStore;
6717
- //# sourceMappingURL=chunk-JOLZ453P.js.map
6718
- //# sourceMappingURL=chunk-JOLZ453P.js.map
6739
+ //# sourceMappingURL=chunk-DOO5ICHD.js.map
6740
+ //# sourceMappingURL=chunk-DOO5ICHD.js.map