From 1a336426351feb23a75336895614bd917f67ce78 Mon Sep 17 00:00:00 2001 From: xianlezheng Date: Sun, 8 Sep 2024 15:26:05 +0800 Subject: [PATCH] =?UTF-8?q?Fixs:=E5=BD=93=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E6=9D=A1=E6=95=B0=E6=8D=AE=E5=9B=A0=E5=A4=A7=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=B2=A1=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE=E6=97=B6=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=B0=83=E8=AF=95=E6=97=B6=E5=89=8D=E7=AB=AF=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E3=80=82=20(#2637)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在lastMessageValue取值时需要提前判断空值。 Co-authored-by: zhengxianle --- .../app/src/components/core/chat/ChatContainer/ChatBox/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/utils.ts b/projects/app/src/components/core/chat/ChatContainer/ChatBox/utils.ts index 88f12932b..a1f98496a 100644 --- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/utils.ts +++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/utils.ts @@ -51,6 +51,7 @@ export const checkIsInteractiveByHistories = (chatHistories: ChatSiteItemType[]) ] as AIChatItemValueItemType; return ( + lastMessageValue && lastMessageValue.type === ChatItemValueTypeEnum.interactive && !!lastMessageValue?.interactive?.params && // 如果用户选择了,则不认为是交互模式(可能是上一轮以交互结尾,发起的新的一轮对话)