diff --git a/projects/app/src/web/core/workflow/utils.ts b/projects/app/src/web/core/workflow/utils.ts index 9e416f36794a..b44982da788c 100644 --- a/projects/app/src/web/core/workflow/utils.ts +++ b/projects/app/src/web/core/workflow/utils.ts @@ -352,8 +352,16 @@ export const checkWorkflowNodeAndConnection = ({ return [data.nodeId]; } - // check empty node(not edge) - const hasEdge = edges.some( + // filter tools node edge + const edgeFilted = edges.filter( + (edge) => + !( + data.flowNodeType === FlowNodeTypeEnum.tools && + edge.sourceHandle === NodeOutputKeyEnum.selectedTools + ) + ); + // check node has edge + const hasEdge = edgeFilted.some( (edge) => edge.source === data.nodeId || edge.target === data.nodeId ); if (!hasEdge) {