diff --git a/app/store/chat.ts b/app/store/chat.ts index 69fffe0d5..77c16df3a 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -325,7 +325,12 @@ export const useChatStore = createPersistStore( let mContent: string | MultimodalContent[] = userContent; if (attachImages && attachImages.length > 0) { - mContent = []; + mContent = [ + { + type: "text", + text: userContent, + }, + ]; mContent = mContent.concat( attachImages.map((url) => { return { @@ -336,12 +341,6 @@ export const useChatStore = createPersistStore( }; }), ); - mContent = mContent.concat([ - { - type: "text", - text: userContent, - }, - ]); } let userMessage: ChatMessage = createMessage({ role: "user",