From b5046f9d8686e18450a200dccda181f2ac7f97c9 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 21 Oct 2026 08:47:17 +0900 Subject: [PATCH] refac --- .../layout/Sidebar/ChatHoverPreview.svelte | 18 ++++++++++++++++-- .../layout/Sidebar/ChatPreview.svelte | 8 +++++++- src/lib/i18n/locales/en-US/translation.json | 3 +++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/lib/components/layout/Sidebar/ChatHoverPreview.svelte b/src/lib/components/layout/Sidebar/ChatHoverPreview.svelte index 397c575db4..2751bdb2ca 100644 --- a/src/lib/components/layout/Sidebar/ChatHoverPreview.svelte +++ b/src/lib/components/layout/Sidebar/ChatHoverPreview.svelte @@ -2,6 +2,7 @@ import { getContext } from 'svelte'; import { LinkPreview } from 'bits-ui'; import ChatPreview from './ChatPreview.svelte'; + import Tooltip from '$lib/components/common/Tooltip.svelte'; const i18n: any = getContext('i18n'); export let chatId = ''; @@ -10,6 +11,7 @@ export let side: 'left' | 'right' | 'bottom' | 'top' = 'right'; export let align: 'start' | 'end' | 'center' = 'start'; export let sideOffset = 12; + let turnCount: number | null = null; {#if openPreview} @@ -20,15 +22,27 @@ {align} {sideOffset} > -
+
{title || $i18n.t('Chat')}
+ {#if turnCount !== null} + + {$i18n.t('{{count}} turns', { count: turnCount })} + + {/if}
diff --git a/src/lib/components/layout/Sidebar/ChatPreview.svelte b/src/lib/components/layout/Sidebar/ChatPreview.svelte index ee14a2546c..ff9aa027a5 100644 --- a/src/lib/components/layout/Sidebar/ChatPreview.svelte +++ b/src/lib/components/layout/Sidebar/ChatPreview.svelte @@ -1,7 +1,7 @@