char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
cae63579b
char/aliceai-t5-moe
1/** 2* Icon mappings for file types and model modalities 3* Centralized configuration to ensure consistent icon usage across the app 4*/ 5 6import { 7Eye as VisionIcon , 8File as FileIcon , 9FileText as FileTextIcon , 10Image as ImageIcon , 11Lightbulb as ReasoningIcon , 12Mic as AudioIcon , 13Video as VideoIcon 14} from '@lucide/svelte' ; 15import { FileTypeCategory , ModelCapability , ModelModality } from '$lib/enums' ; 16import type { ModelCapabilities , ModelModalities } from '$lib/types/models' ; 17import type { Component } from 'svelte' ; 18 19export const FILE_TYPE_ICONS = { 20[ FileTypeCategory . AUDIO ] :AudioIcon , 21[ FileTypeCategory . IMAGE ] :ImageIcon , 22[ FileTypeCategory . ] :FileIcon , 23[ FileTypeCategory . TEXT ] :FileTextIcon , 24[ FileTypeCategory . VIDEO ] :VideoIcon 25} as const ; 26 27export const DEFAULT_FILE_ICON = FileIcon ; 28 29export const MODALITY_ICONS = { 30[ ModelModality . AUDIO ] :AudioIcon , 31[ ModelModality . VIDEO ] :VideoIcon , 32[ ModelModality . VISION ] :VisionIcon 33} as const ; 34 35export const MODALITY_LABELS = { 36[ ModelModality . AUDIO ] :'Audio' , 37[ ModelModality . VIDEO ] :'Video' , 38[ ModelModality . VISION ] :'Vision' 39} as const ; 40 41/** Maps an input ModelModality to the boolean flag it drives on the ModelModalities type */ 42export const MODALITY_FLAG_KEYS :Record < 43Exclude < ModelModality , ModelModality . TEXT >, 44keyof ModelModalities 45> = { 46[ ModelModality . AUDIO ] :'audio' , 47[ ModelModality . VIDEO ] :'video' , 48[ ModelModality . VISION ] :'vision' 49}; 50 51export const CAPABILITY_ICONS :Record < ModelCapability , Component > = { 52[ ModelCapability . REASONING ] :ReasoningIcon 53} as const ; 54 55export const CAPABILITY_LABELS :Record < ModelCapability , string > = { 56[ ModelCapability . REASONING ] :'Reasoning' 57} as const ; 58 59/** Maps a ModelCapability to the boolean flag it drives on the ModelCapabilities type */ 60export const CAPABILITY_FLAG_KEYS :Record < ModelCapability , keyof ModelCapabilities > = { 61[ ModelCapability . REASONING ] :'reasoning' 62}; 63 64// Shared SVG icon strings for copy and preview buttons 65export const COPY_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy-icon lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>` ; 66 67export const PREVIEW_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-eye lucide-eye-icon"><path d="M2.062 12.345a1 1 0 0 1 0-.69C3.5 7.73 7.36 5 12 5s8.5 2.73 9.938 6.655a1 1 0 0 1 0 .69C20.5 16.27 16.64 19 12 19s-8.5-2.73-9.938-6.655"/><circle cx="12" cy="12" r="3"/></svg>` ; 68 69export const CODE_ICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code lucide-code-icon"><path d="m16 18 6-6-6-6"/><path d="m8 6-6 6 6 6"/></svg>` ;