mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
[Bug] Identify api nodes as core nodes (#3683)
This commit is contained in:
@@ -29,7 +29,7 @@ export const getNodeSource = (python_module?: string): NodeSource => {
|
||||
return UNKNOWN_NODE_SOURCE
|
||||
}
|
||||
const modules = python_module.split('.')
|
||||
if (['nodes', 'comfy_extras'].includes(modules[0])) {
|
||||
if (['nodes', 'comfy_extras', 'comfy_api_nodes'].includes(modules[0])) {
|
||||
return {
|
||||
type: NodeSourceType.Core,
|
||||
className: 'comfy-core',
|
||||
|
||||
@@ -33,6 +33,16 @@ describe('getNodeSource', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('should identify core nodes from comfy_api_nodes module', () => {
|
||||
const result = getNodeSource('comfy_api_nodes.some_module')
|
||||
expect(result).toEqual({
|
||||
type: NodeSourceType.Core,
|
||||
className: 'comfy-core',
|
||||
displayText: 'Comfy Core',
|
||||
badgeText: '🦊'
|
||||
})
|
||||
})
|
||||
|
||||
it('should identify custom nodes and format their names', () => {
|
||||
const result = getNodeSource('custom_nodes.ComfyUI-Example')
|
||||
expect(result).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user