Properly mirror the new description type

Remove errant logging
This commit is contained in:
Austin Mroz
2024-10-15 13:41:09 -05:00
parent 9263330379
commit f48594fbd5
4 changed files with 6 additions and 5 deletions

View File

@@ -84,7 +84,6 @@ function collapseOnClick() {
} }
function selectHelp(name: string, value?: string) { function selectHelp(name: string, value?: string) {
if (!docElement.value) { if (!docElement.value) {
console.log("doc element doesn't exist")
return null return null
} }
if (def[2]?.select) { if (def[2]?.select) {

View File

@@ -5,7 +5,8 @@ import {
} from '@/services/nodeSearchService' } from '@/services/nodeSearchService'
import { import {
type ComfyNodeDef, type ComfyNodeDef,
type ComfyInputsSpec as ComfyInputsSpecSchema type ComfyInputsSpec as ComfyInputsSpecSchema,
type DescriptionSpec
} from '@/types/apiTypes' } from '@/types/apiTypes'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { ComfyWidgetConstructor } from '@/scripts/widgets' import { ComfyWidgetConstructor } from '@/scripts/widgets'
@@ -154,7 +155,7 @@ export class ComfyNodeDefImpl {
display_name: string display_name: string
category: string category: string
python_module: string python_module: string
description: string description: DescriptionSpec
deprecated: boolean deprecated: boolean
experimental: boolean experimental: boolean
input: ComfyInputsSpec input: ComfyInputsSpec

View File

@@ -372,6 +372,7 @@ export type InputSpec = z.infer<typeof zInputSpec>
export type ComfyInputsSpec = z.infer<typeof zComfyInputsSpec> export type ComfyInputsSpec = z.infer<typeof zComfyInputsSpec>
export type ComfyOutputTypesSpec = z.infer<typeof zComfyOutputTypesSpec> export type ComfyOutputTypesSpec = z.infer<typeof zComfyOutputTypesSpec>
export type ComfyNodeDef = z.infer<typeof zComfyNodeDef> export type ComfyNodeDef = z.infer<typeof zComfyNodeDef>
export type DescriptionSpec = z.infer<typeof zDescriptionSpec>
export function validateComfyNodeDef( export function validateComfyNodeDef(
data: any, data: any,

View File

@@ -1,6 +1,6 @@
import { LGraphNode, IWidget } from './litegraph' import { LGraphNode, IWidget } from './litegraph'
import { ComfyApp } from '../scripts/app' import { ComfyApp } from '../scripts/app'
import type { ComfyNodeDef } from '@/types/apiTypes' import type { ComfyNodeDef, DescriptionSpec } from '@/types/apiTypes'
import type { Keybinding } from '@/types/keyBindingTypes' import type { Keybinding } from '@/types/keyBindingTypes'
import type { ComfyCommand } from '@/stores/commandStore' import type { ComfyCommand } from '@/stores/commandStore'
@@ -117,7 +117,7 @@ export interface ComfyExtension {
export type ComfyObjectInfo = { export type ComfyObjectInfo = {
name: string name: string
display_name?: string display_name?: string
description?: [string | string, string | string, string, Record<string, any>] description?: DescriptionSpec
category: string category: string
input?: { input?: {
required?: Record<string, ComfyObjectInfoConfig> required?: Record<string, ComfyObjectInfoConfig>