feat(web): 增加节点分组

This commit is contained in:
v-zhangjc9
2025-07-12 19:09:47 +08:00
parent 528e66c497
commit 60f6b79167
3 changed files with 40 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
import {type Connection, type Edge, getOutgoers, type Node} from '@xyflow/react'
import {find, has, isEmpty, isEqual, lpad, toStr} from 'licia'
import NodeRegistry from './NodeRegistry.tsx'
import {NodeRegistryMap} from './NodeRegistry.tsx'
export class CheckError extends Error {
readonly id: string
@@ -83,7 +83,7 @@ export const checkSave: (inputSchema: Record<string, Record<string, any>>, nodes
throw nodeTypeNotFound()
}
let nodeType = node.type!
let nodeDefine = NodeRegistry[nodeType]
let nodeDefine = NodeRegistryMap[nodeType]
for (let checker of nodeDefine.checkers) {
let checkResult = checker(nodeId, inputSchema, nodes, edges, data)
if (checkResult.error) {