feat: refine node deletion logic to protect only start nodes

This commit is contained in:
mlogclub
2026-06-28 21:24:54 +08:00
parent c7555d67c5
commit 77dda5fd9c
6 changed files with 13 additions and 7 deletions
@@ -199,7 +199,7 @@ export function deleteWorkflowNode(
nodeId: string
): AIWorkflowDefinition {
const node = definition.nodes.find((item) => item.id === nodeId)
if (!node || node.type === "start" || node.type === "end") {
if (!node || node.type === "start") {
return definition
}
return {