This commit is contained in:
Hk-Gosuto 2024-03-09 16:02:53 +08:00
parent c7450e3ee0
commit bdaf416a10

View File

@ -314,12 +314,7 @@ export const useChatStore = createPersistStore(
let mContent: string | MultimodalContent[] = userContent; let mContent: string | MultimodalContent[] = userContent;
if (attachImages && attachImages.length > 0) { if (attachImages && attachImages.length > 0) {
mContent = [ mContent = [];
{
type: "text",
text: userContent,
},
];
mContent = mContent.concat( mContent = mContent.concat(
attachImages.map((url) => { attachImages.map((url) => {
return { return {
@ -330,6 +325,12 @@ export const useChatStore = createPersistStore(
}; };
}), }),
); );
mContent = mContent.concat([
{
type: "text",
text: userContent,
},
]);
} }
let userMessage: ChatMessage = createMessage({ let userMessage: ChatMessage = createMessage({
role: "user", role: "user",