From bdaf416a10484e1fcff6563fe6c2c396128d57e4 Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Sat, 9 Mar 2024 16:02:53 +0800 Subject: [PATCH] fix: #220 --- app/store/chat.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/store/chat.ts b/app/store/chat.ts index d6c252222..342e8075b 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -314,12 +314,7 @@ export const useChatStore = createPersistStore( let mContent: string | MultimodalContent[] = userContent; if (attachImages && attachImages.length > 0) { - mContent = [ - { - type: "text", - text: userContent, - }, - ]; + mContent = []; mContent = mContent.concat( attachImages.map((url) => { return { @@ -330,6 +325,12 @@ export const useChatStore = createPersistStore( }; }), ); + mContent = mContent.concat([ + { + type: "text", + text: userContent, + }, + ]); } let userMessage: ChatMessage = createMessage({ role: "user",