From 62166b2c49d85de933bafd4bab20d89eb34ee966 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 20 八月 2024 11:56:50 +0800
Subject: [PATCH] answer 为null 情况

---
 src/components/chat/Chat.vue |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/chat/Chat.vue b/src/components/chat/Chat.vue
index caf5748..0b172f2 100644
--- a/src/components/chat/Chat.vue
+++ b/src/components/chat/Chat.vue
@@ -364,7 +364,7 @@
 			cb?.(resMsgContent);
 		}
 		userItem.historyId = questionRes.history_id;
-		userItem.content.values = questionRes?.question;
+		userItem.content.values = questionRes?.question ?? userItem.content.values;
 		assistantItem.historyId = questionRes.history_id;
 		appendLastMessageContent(resMsgContent);
 	} catch (error: any) {
@@ -408,7 +408,7 @@
 	resList.map((item, index) => {
 		const insertIndex = index + 1 + i;
 		const userMsg = messageList.value[insertIndex - 1];
-		userMsg.content.values = item?.answer?.question;
+		userMsg.content.values = item?.answer?.question ??userMsg.content.values;
 		messageList.value.splice(
 			insertIndex,
 			0,

--
Gitblit v1.9.3