[Refactor/TS] Simplify node filter logic (#3275)

This commit is contained in:
Chenlei Hu
2025-03-29 13:00:18 -04:00
committed by GitHub
parent 3922a5882b
commit fcc22f06ac
9 changed files with 211 additions and 178 deletions

View File

@@ -14,19 +14,19 @@ import type {
ComfyNodeDef as ComfyNodeDefV1,
ComfyOutputTypesSpec as ComfyOutputSpecV1
} from '@/schemas/nodeDefSchema'
import {
NodeSearchService,
type SearchAuxScore
} from '@/services/nodeSearchService'
import { NodeSearchService } from '@/services/nodeSearchService'
import {
type NodeSource,
NodeSourceType,
getNodeSource
} from '@/types/nodeSource'
import type { TreeNode } from '@/types/treeExplorerTypes'
import type { FuseSearchable, SearchAuxScore } from '@/utils/fuseUtil'
import { buildTree } from '@/utils/treeUtil'
export class ComfyNodeDefImpl implements ComfyNodeDefV1, ComfyNodeDefV2 {
export class ComfyNodeDefImpl
implements ComfyNodeDefV1, ComfyNodeDefV2, FuseSearchable
{
// ComfyNodeDef fields (V1)
readonly name: string
readonly display_name: string