feat(workflow): Allow paste node into nested block (#24234)
Co-authored-by: crab.huang <crab.huang@huolala.cn>
This commit is contained in:
parent
804e599598
commit
8d5f788f2b
2 changed files with 48 additions and 2 deletions
|
|
@ -135,6 +135,13 @@ export const getTopLeftNodePosition = (nodes: Node[]) => {
|
|||
}
|
||||
}
|
||||
|
||||
export const getNestedNodePosition = (node: Node, parentNode: Node) => {
|
||||
return {
|
||||
x: node.position.x - parentNode.position.x,
|
||||
y: node.position.y - parentNode.position.y,
|
||||
}
|
||||
}
|
||||
|
||||
export const hasRetryNode = (nodeType?: BlockEnum) => {
|
||||
return nodeType === BlockEnum.LLM || nodeType === BlockEnum.Tool || nodeType === BlockEnum.HttpRequest || nodeType === BlockEnum.Code
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue