Feat: Add a child operator node by clicking the operator node anchor point #3221 (#8309)

### What problem does this PR solve?

Feat: Add a child operator node by clicking the operator node anchor
point #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-06-17 11:57:07 +08:00
committed by GitHub
parent a9532cb9e7
commit 307d5299e7
14 changed files with 375 additions and 177 deletions

View File

@ -11,6 +11,7 @@ import {
FormLabel,
} from '@/components/ui/form';
import { zodResolver } from '@hookform/resolvers/zod';
import { Position } from '@xyflow/react';
import { useContext, useMemo } from 'react';
import { useForm } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
@ -109,7 +110,12 @@ const AgentForm = ({ node }: INextOperatorForm) => {
)}
/>
</FormContainer>
<BlockButton onClick={addCanvasNode(Operator.Agent, node?.id)}>
<BlockButton
onClick={addCanvasNode(Operator.Agent, {
id: node?.id,
position: Position.Bottom,
})}
>
Add Agent
</BlockButton>
<Output list={outputList}></Output>