Add group nodes to search and node library (#861)

* Register group nodes in nodeDefStore

* Add playwright tests

* Update test expectations [skip ci]

* Mock nodeDefStore in group node unit test

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
bymyself
2024-09-17 00:06:58 -07:00
committed by GitHub
parent 582acd7bd1
commit e8daebdc0c
8 changed files with 56 additions and 1 deletions

View File

@@ -314,6 +314,11 @@ export const useNodeDefStore = defineStore('nodeDef', {
this.nodeDefsByName = newNodeDefsByName
this.nodeDefsByDisplayName = nodeDefsByDisplayName
},
addNodeDef(nodeDef: ComfyNodeDef) {
const nodeDefImpl = plainToClass(ComfyNodeDefImpl, nodeDef)
this.nodeDefsByName[nodeDef.name] = nodeDefImpl
this.nodeDefsByDisplayName[nodeDef.display_name] = nodeDefImpl
},
updateWidgets(widgets: Record<string, ComfyWidgetConstructor>) {
this.widgets = widgets
},