From 097c544bebb124efc0bdf421046af8908dbcafac Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期五, 20 十二月 2024 13:59:14 +0800
Subject: [PATCH] historyId 问题修复

---
 src/components/chat/hooks/useAssistantContentOpt.ts |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/components/chat/hooks/useAssistantContentOpt.ts b/src/components/chat/hooks/useAssistantContentOpt.ts
index f03e8d9..f77efe8 100644
--- a/src/components/chat/hooks/useAssistantContentOpt.ts
+++ b/src/components/chat/hooks/useAssistantContentOpt.ts
@@ -37,7 +37,6 @@
 			answer_state: toSetState,
 		});
 		item.state = toSetState;
-		
 	};
 
 	const unLikeClick = async (item) => {
@@ -47,8 +46,6 @@
 			answer_state: toSetState,
 		});
 		item.state = toSetState;
-
-	
 	};
 	const feedbackPosition = ref({
 		x: 0,
@@ -93,11 +90,12 @@
 		if (!displayMessageList.value || displayMessageList.value.length === 0) return false;
 		const last = displayMessageList.value.at(-1);
 		const isShow = last?.role === RoleEnum.assistant && last?.content?.values && last.content?.askMoreList?.length > 0;
-		return isShow && !isSharePage ;
+		const result =  isShow && !isSharePage.value;
+		return result;
 	});
 
 	const showFixQuestion = (item) => {
-		const isShow = item?.role === RoleEnum.assistant && item?.content?.values && item.content?.origin?.err_json?.fix_question;
+		const isShow = item?.role === RoleEnum.assistant  && item.content?.origin?.sample_question?.length > 0;
 		return isShow;
 	};
 	const askMoreClick = (item) => {
@@ -106,15 +104,15 @@
 	};
 
 	const fixQuestionClick = (item, originData) => {
-		if (!item.question) return;
-		preQuestion.value = originData?.question;
+		if (!item) return;
+		// preQuestion.value = originData?.question;
 		try {
 			sendChatMessage({
 				type: AnswerType.Text,
-				values: item.question,
+				values: item,
 			});
 		} finally {
-			preQuestion.value = null;
+			// preQuestion.value = null;
 		}
 	};
 

--
Gitblit v1.9.3