From 16a65cb367a3d80063747decec0ad2295ce3be77 Mon Sep 17 00:00:00 2001 From: Hash Brown Date: Wed, 4 Dec 2024 16:17:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20cannot=20send=20message=20when=20debug?= =?UTF-8?q?=20with=20multiple=20model=20with=20conversa=E2=80=A6=20(#11333?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../debug/debug-with-multiple-model/chat-item.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx index 947abb853d..1144c323d1 100644 --- a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx +++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx @@ -29,6 +29,7 @@ import { useAppContext } from '@/context/app-context' import { ModelFeatureEnum } from '@/app/components/header/account-setting/model-provider-page/declarations' import { useFeatures } from '@/app/components/base/features/hooks' import type { InputForm } from '@/app/components/base/chat/chat/type' +import { getLastAnswer } from '@/app/components/base/chat/utils' type ChatItemProps = { modelAndParameter: ModelAndParameter @@ -101,7 +102,7 @@ const ChatItem: FC = ({ query: message, inputs, model_config: configData, - parent_message_id: chatListRef.current.at(-1)?.id || null, + parent_message_id: getLastAnswer(chatListRef.current)?.id || null, } if ((config.file_upload as any).enabled && files?.length && supportVision)