From 4b7d6018402c47a7cc3ca9b315fcff027856c8b3 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Thu, 9 Nov 2023 13:42:33 +0800 Subject: [PATCH] fix user input msg content type --- src/chatbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 27286b3..057f207 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -231,7 +231,7 @@ export default function ChatBOX(props: { if (images.length > 0) { content = images; } - if (inputMsg.trim()) { + if (images.length > 0 && inputMsg.trim()) { content = [{ type: "text", text: inputMsg }, ...images]; } chatStore.history.push({