feat: Improve statistic badges
This commit is contained in:
parent
d73353732f
commit
9086bc30bd
|
|
@ -260,11 +260,7 @@
|
|||
disabled={isLoading()}
|
||||
/>
|
||||
{:else}
|
||||
<BadgeModelName
|
||||
model={displayedModel() || undefined}
|
||||
onclick={handleCopyModel}
|
||||
showCopyIcon={true}
|
||||
/>
|
||||
<BadgeModelName model={displayedModel() || undefined} onclick={handleCopyModel} />
|
||||
{/if}
|
||||
|
||||
{#if currentConfig.showMessageStats && message.timings && message.timings.predicted_n && message.timings.predicted_ms}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { BadgeInfo } from '$lib/components/app';
|
||||
import { copyToClipboard } from '$lib/utils/copy';
|
||||
import type { Component } from 'svelte';
|
||||
|
||||
interface Props {
|
||||
|
|
@ -9,9 +10,13 @@
|
|||
}
|
||||
|
||||
let { class: className = '', icon: Icon, value }: Props = $props();
|
||||
|
||||
function handleClick() {
|
||||
void copyToClipboard(String(value));
|
||||
}
|
||||
</script>
|
||||
|
||||
<BadgeInfo class={className}>
|
||||
<BadgeInfo class={className} onclick={handleClick}>
|
||||
{#snippet icon()}
|
||||
<Icon class="h-3 w-3" />
|
||||
{/snippet}
|
||||
|
|
|
|||
Loading…
Reference in New Issue