From aaf2834db758bfec69408ab4cabcf324965c221c Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 23 Jul 2026 12:03:26 -0400 Subject: [PATCH] refac --- src/lib/components/layout/Sidebar/ChatHoverPreview.svelte | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lib/components/layout/Sidebar/ChatHoverPreview.svelte b/src/lib/components/layout/Sidebar/ChatHoverPreview.svelte index 1a45373a45..0d663479cc 100644 --- a/src/lib/components/layout/Sidebar/ChatHoverPreview.svelte +++ b/src/lib/components/layout/Sidebar/ChatHoverPreview.svelte @@ -6,7 +6,6 @@ import Messages from '$lib/components/chat/Messages.svelte'; import Spinner from '$lib/components/common/Spinner.svelte'; import { user } from '$lib/stores'; - import { createMessagesList } from '$lib/utils'; const i18n: any = getContext('i18n'); @@ -21,7 +20,6 @@ let selectedModels = ['']; let history: any = null; - let previewMessages: any[] = []; let previewReady = false; let loading = false; let error = ''; @@ -56,7 +54,6 @@ loading = true; error = ''; previewReady = false; - previewMessages = []; history = null; selectedModels = ['']; @@ -68,11 +65,9 @@ ? chat.chat.models : [chat.chat.models ?? '']; history = chat.chat.history; - previewMessages = createMessagesList(chat.chat.history, chat.chat.history.currentId); previewReady = true; scrollPreviewToBottom(); } else if (chat) { - previewMessages = []; previewReady = true; } else { error = $i18n.t('Failed to load chat preview'); @@ -135,7 +130,7 @@ atSelectedModel={null} {history} autoScroll={true} - messagesCount={null} + messagesCount={8} sendMessage={() => {}} continueResponse={() => {}} regenerateResponse={() => {}}