refactor: Cleanup
refactor: Cleanup refactor: Cleanup refactor: Cleanup
This commit is contained in:
parent
7b127db90c
commit
5bf1c86635
|
|
@ -41,6 +41,7 @@
|
|||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if prompt.description}
|
||||
<p class="mt-1 text-sm text-muted-foreground">
|
||||
{prompt.description}
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@
|
|||
{#if TransportIcon}
|
||||
<TransportIcon class="h-3 w-3" />
|
||||
{/if}
|
||||
|
||||
{transportLabels[transportType] || transportType}
|
||||
</Badge>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue