From f527f31d2bc18342fb620e93b03db9005112ffa0 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 3 Feb 2025 19:11:23 -0800 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 072a0140a..7d3eb617a 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1440,7 +1440,7 @@ const chatEventEmitter = await getChatEventEmitter(model.id, _chatId); scrollToBottom(); - await sendPromptSocket(model, responseMessageId, _chatId); + await sendPromptSocket(history, model, responseMessageId, _chatId); if (chatEventEmitter) clearInterval(chatEventEmitter); } else { @@ -1453,7 +1453,7 @@ chats.set(await getChatList(localStorage.token, $currentChatPage)); }; - const sendPromptSocket = async (model, responseMessageId, _chatId) => { + const sendPromptSocket = async (history, model, responseMessageId, _chatId) => { const responseMessage = history.messages[responseMessageId]; const userMessage = history.messages[responseMessage.parentId]; @@ -1738,7 +1738,7 @@ .at(0); if (model) { - await sendPromptSocket(model, responseMessage.id, _chatId); + await sendPromptSocket(history, model, responseMessage.id, _chatId); } } };