Use ComfyNodeDefImpl on nodeSearchService (#233)

* Make nodeSearchService use ComfyNodeDefImpl

* Fix test
This commit is contained in:
Chenlei Hu
2024-07-26 13:41:24 -04:00
committed by GitHub
parent 9bcc08d7ab
commit b4d7735855
4 changed files with 30 additions and 77 deletions

View File

@@ -236,7 +236,11 @@ export const useNodeDefStore = defineStore('nodeDef', {
return Object.values(state.nodeDefsByName)
},
nodeSearchService(state) {
return new NodeSearchService(Object.values(state.nodeDefsByName))
return new NodeSearchService(
Object.values(state.nodeDefsByName).map((nodeDef) =>
plainToClass(ComfyNodeDefImpl, nodeDef)
)
)
}
},
actions: {