LCOV - code coverage report
Current view: top level - src/platform/workflow/templates/utils - refreshDownloadedTemplateInputBindings.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 0.0 % 11 0
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import type { LGraph } from '@/lib/litegraph/src/litegraph'
       2              : import type { MissingMediaCandidate } from '@/platform/workflowErrors/missingMedia/types'
       3              : import { getNodeByExecutionId } from '@/utils/graphTraversalUtil'
       4              : 
       5            0 : export function refreshDownloadedTemplateInputBindings(
       6              :   rootGraph: LGraph,
       7              :   candidates: readonly MissingMediaCandidate[],
       8              :   completedInputNames: ReadonlySet<string>
       9              : ): void {
      10            0 :   const refreshedWidgets = new Set<string>()
      11              : 
      12            0 :   for (const candidate of candidates) {
      13            0 :     if (!completedInputNames.has(candidate.name)) continue
      14              : 
      15            0 :     const widgetId = `${String(candidate.nodeId)}\0${candidate.widgetName}`
      16            0 :     if (refreshedWidgets.has(widgetId)) continue
      17              : 
      18            0 :     const node = getNodeByExecutionId(rootGraph, String(candidate.nodeId))
      19            0 :     const widget = node?.widgets?.find(
      20              :       ({ name }) => name === candidate.widgetName
      21              :     )
      22            0 :     if (!node || widget?.value !== candidate.name || !widget.callback) continue
      23              : 
      24            0 :     refreshedWidgets.add(widgetId)
      25            0 :     widget.callback(widget.value, undefined, node)
      26              :   }
      27              : }
        

Generated by: LCOV version 2.0-1