]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/blob
11ca52049b04f7371ed30dc0ac1fca5272660132
[pkg/ggml/sources/llama.cpp] /
1 <script lang="ts">
2 import type { Snippet } from 'svelte';
3 import type { MCPServerSettingsEntry } from '$lib/types';
4 import { mcpStore } from '$lib/stores/mcp.svelte';
5
6 interface Props {
7 server: MCPServerSettingsEntry | undefined;
8 serverLabel: string;
9 title: string;
10 description?: string;
11 titleExtra?: Snippet;
12 subtitle?: Snippet;
13 }
14
15 let { server, serverLabel, title, description, titleExtra, subtitle }: Props = $props();
16
17 let faviconUrl = $derived(server ? mcpStore.getServerFavicon(server.id) : null);
18 </script>
19
20 <div class="min-w-0 flex-1">
21 <div class="mb-0.5 flex items-center gap-1.5 text-xs text-muted-foreground">
22 {#if faviconUrl}
23 <img
24 src={faviconUrl}
25 alt=""
26 class="h-3 w-3 shrink-0 rounded-sm"
27 onerror={(e) => {
28 (e.currentTarget as HTMLImageElement).style.display = 'none';
29 }}
30 />
31 {/if}
32
33 <span>{serverLabel}</span>
34 </div>
35
36 <div class="flex items-center gap-2">
37 <span class="font-medium">
38 {title}
39 </span>
40
41 {#if titleExtra}
42 {@render titleExtra()}
43 {/if}
44 </div>
45
46 {#if description}
47 <p class="mt-0.5 truncate text-sm text-muted-foreground">
48 {description}
49 </p>
50 {/if}
51
52 {#if subtitle}
53 {@render subtitle()}
54 {/if}
55 </div>