LCOV - code coverage report
Current view: top level - src/components/node - NodeHelpContent.vue Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 6 6
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : <template>
       2           35 :   <div class="node-help-content mx-auto w-full">
       3              :     <AppSpinner v-if="isLoading" class="m-auto" />
       4              :     <SanitizedHtml
       5              :       v-else-if="!error"
       6              :       class="comfy-markdown-content overflow-visible [--comfy-markdown-font-size:var(--text-sm)] [&_table]:block [&_table]:overflow-x-auto"
       7              :       :html="renderedHelpHtml"
       8              :     />
       9              :     <div
      10              :       v-else
      11              :       class="comfy-markdown-content space-y-6 [--comfy-markdown-font-size:var(--text-sm)]"
      12              :     >
      13              :       <p v-if="node.description">
      14              :         <strong>{{ $t('g.description') }}:</strong> {{ node.description }}
      15              :       </p>
      16              : 
      17              :       <div v-if="inputList.length">
      18              :         <p>
      19              :           <strong>{{ $t('nodeHelpPage.inputs') }}:</strong>
      20              :         </p>
      21              :         <div class="overflow-x-auto">
      22              :           <table>
      23              :             <thead>
      24              :               <tr>
      25              :                 <th>{{ $t('g.name') }}</th>
      26              :                 <th>{{ $t('nodeHelpPage.type') }}</th>
      27              :                 <th>{{ $t('g.description') }}</th>
      28              :               </tr>
      29              :             </thead>
      30              :             <tbody>
      31           23 :               <tr v-for="input in inputList" :key="input.name">
      32              :                 <td>
      33              :                   <code>{{ input.name }}</code>
      34              :                 </td>
      35              :                 <td>{{ input.type }}</td>
      36              :                 <td>{{ input.tooltip || '-' }}</td>
      37              :               </tr>
      38              :             </tbody>
      39              :           </table>
      40              :         </div>
      41              :       </div>
      42              : 
      43              :       <div v-if="outputList.length">
      44              :         <p>
      45              :           <strong>{{ $t('nodeHelpPage.outputs') }}:</strong>
      46              :         </p>
      47              :         <div class="overflow-x-auto">
      48              :           <table>
      49              :             <thead>
      50              :               <tr>
      51              :                 <th>{{ $t('g.name') }}</th>
      52              :                 <th>{{ $t('nodeHelpPage.type') }}</th>
      53              :                 <th>{{ $t('g.description') }}</th>
      54              :               </tr>
      55              :             </thead>
      56              :             <tbody>
      57            2 :               <tr v-for="output in outputList" :key="output.name">
      58              :                 <td>
      59              :                   <code>{{ output.name }}</code>
      60              :                 </td>
      61              :                 <td>{{ output.type }}</td>
      62              :                 <td>{{ output.tooltip || '-' }}</td>
      63              :               </tr>
      64              :             </tbody>
      65              :           </table>
      66              :         </div>
      67              :       </div>
      68              :     </div>
      69              :   </div>
      70              : </template>
      71              : 
      72              : <script setup lang="ts">
      73              : import { computed } from 'vue'
      74              : 
      75              : import SanitizedHtml from '@comfyorg/design-system/common/SanitizedHtml'
      76              : import AppSpinner from '@/components/common/AppSpinner.vue'
      77              : import { useNodeHelpContent } from '@/composables/useNodeHelpContent'
      78              : import { flattenInputSpecs } from '@/core/graph/nodeDef/inputSpecInterpreter'
      79              : import type { ComfyNodeDefImpl } from '@/core/graph/nodeDef/ComfyNodeDefImpl'
      80              : 
      81              : const { node } = defineProps<{
      82              :   node: ComfyNodeDefImpl
      83              : }>()
      84              : 
      85           17 : const { renderedHelpHtml, isLoading, error } = useNodeHelpContent(() => node)
      86              : 
      87           17 : const inputList = computed(() =>
      88              :   flattenInputSpecs(node.inputs).map((spec) => ({
      89              :     name: spec.name,
      90              :     type: spec.type,
      91              :     tooltip: spec.tooltip || ''
      92              :   }))
      93              : )
      94              : 
      95           17 : const outputList = computed(() =>
      96              :   node.outputs.map((spec) => ({
      97              :     name: spec.name,
      98              :     type: spec.type,
      99              :     tooltip: spec.tooltip || ''
     100              :   }))
     101              : )
     102              : </script>
        

Generated by: LCOV version 2.0-1