From 5253c99de18d92113df926f802454f4955d6181f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=9F=E8=B4=A4?= Date: Wed, 6 Dec 2023 15:15:25 +0800 Subject: [PATCH] fix: fix messageItemExtraRender item no set extra error --- src/ProChat/components/ChatList/Extras/Assistant.tsx | 2 +- src/ProChat/components/ChatList/Extras/User.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProChat/components/ChatList/Extras/Assistant.tsx b/src/ProChat/components/ChatList/Extras/Assistant.tsx index 98583db2..4a0ec299 100644 --- a/src/ProChat/components/ChatList/Extras/Assistant.tsx +++ b/src/ProChat/components/ChatList/Extras/Assistant.tsx @@ -17,7 +17,7 @@ export const AssistantMessageExtra: RenderMessageExtra = memo(({ extra, ...rest const showExtra = showModelTag || hasTranslate; - const dom = messageItemExtraRender?.(rest, 'assistant'); + const dom = messageItemExtraRender?.({ extra, ...rest }, 'assistant'); if (!showExtra && !dom) return; return ( diff --git a/src/ProChat/components/ChatList/Extras/User.tsx b/src/ProChat/components/ChatList/Extras/User.tsx index ad6c6978..4d9dac2e 100644 --- a/src/ProChat/components/ChatList/Extras/User.tsx +++ b/src/ProChat/components/ChatList/Extras/User.tsx @@ -16,7 +16,7 @@ export const UserMessageExtra: RenderMessageExtra = memo(({ extra, ...rest }) => )} - {messageItemExtraRender?.(rest, 'user')} + {messageItemExtraRender?.({ extra, ...rest }, 'user')} ); });