refactor: Cleanup

refactor: Cleanup
refactor: Cleanup
refactor: Cleanup
This commit is contained in:
Aleksander Grygier 2026-01-26 15:27:21 +01:00
parent 7b127db90c
commit 5bf1c86635
4 changed files with 7 additions and 9 deletions

View File

@ -41,6 +41,7 @@
</span>
{/if}
</div>
{#if prompt.description}
<p class="mt-1 text-sm text-muted-foreground">
{prompt.description}

View File

@ -29,9 +29,11 @@
<ChevronRight class="h-3.5 w-3.5" />
{/if}
<span>Connection Log ({logs.length})</span>
{#if connectionTimeMs !== undefined}
<span class="ml-1">· Connected in {connectionTimeMs}ms</span>
{/if}
</Collapsible.Trigger>
</div>
@ -41,11 +43,14 @@
>
{#each logs as log (log.timestamp.getTime() + log.message)}
{@const Icon = getMcpLogLevelIcon(log.level)}
<div class={cn('flex items-start gap-1.5', getMcpLogLevelClass(log.level))}>
<span class="shrink-0 text-muted-foreground">
{formatTime(log.timestamp)}
</span>
<Icon class="mt-0.5 h-3 w-3 shrink-0" />
<span class="break-all">{log.message}</span>
</div>
{/each}

View File

@ -87,6 +87,7 @@
{#if TransportIcon}
<TransportIcon class="h-3 w-3" />
{/if}
{transportLabels[transportType] || transportType}
</Badge>
{/if}

View File

@ -17,23 +17,14 @@
import type { Component } from 'svelte';
interface Props {
/** Whether the card is expanded */
open?: boolean;
/** CSS class for the root element */
class?: string;
/** Icon component to display */
icon?: Component;
/** Custom icon class (for animations like spin) */
iconClass?: string;
/** Title text */
title: string;
/** Optional subtitle/status text */
subtitle?: string;
/** Whether content is currently streaming (enables auto-scroll) */
isStreaming?: boolean;
/** Optional click handler for the trigger */
onToggle?: () => void;
/** Content to display in the collapsible section */
children: Snippet;
}