LCOV - code coverage report
Current view: top level - src/renderer/extensions/linearMode - mediaTypes.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 85.7 % 7 6
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import type { AugmentedResultItem } from '@/utils/resultItem'
       2              : import { isImageResult, isTextResult, isVideoResult } from '@/utils/resultItem'
       3              : 
       4         2355 : export const mediaTypes: Record<string, { iconClass: string }> = {
       5              :   '3d': {
       6              :     iconClass: 'icon-[lucide--box]'
       7              :   },
       8              :   audio: {
       9              :     iconClass: 'icon-[lucide--audio-lines]'
      10              :   },
      11              :   images: {
      12              :     iconClass: 'icon-[lucide--image]'
      13              :   },
      14              :   text: {
      15              :     iconClass: 'icon-[lucide--text]'
      16              :   },
      17              :   video: {
      18              :     iconClass: 'icon-[lucide--video]'
      19              :   }
      20              : }
      21              : 
      22          234 : export function getMediaType(output?: AugmentedResultItem) {
      23          234 :   if (!output) return ''
      24          234 :   if (isVideoResult(output)) return 'video'
      25          231 :   if (isImageResult(output)) return 'images'
      26            4 :   if (isTextResult(output)) return 'text'
      27            0 :   return output.mediaType
      28              : }
        

Generated by: LCOV version 2.0-1