Fixed message not being displayed

This commit is contained in:
Lucas Oliveira 2024-02-24 23:01:36 +01:00
commit 9cafc09d6f
3 changed files with 3 additions and 1 deletions

View file

@ -70,7 +70,7 @@ export default function ChatMessage({
useEffect(() => { useEffect(() => {
// This effect is specifically for calling updateChat after streaming ends // This effect is specifically for calling updateChat after streaming ends
if (!isStreaming && streamUrl === null) { if (!isStreaming && streamUrl) {
if (updateChat) { if (updateChat) {
updateChat(chat, chatMessage, streamUrl); updateChat(chat, chatMessage, streamUrl);
} }

View file

@ -576,6 +576,7 @@ export default function FormModal({
chatHistory.length - 1 === index ? true : false chatHistory.length - 1 === index ? true : false
} }
key={index} key={index}
updateChat={() => {}}
/> />
)) ))
) : ( ) : (

View file

@ -524,6 +524,7 @@ export type chatMessagePropsType = {
chat: ChatMessageType; chat: ChatMessageType;
lockChat: boolean; lockChat: boolean;
lastMessage: boolean; lastMessage: boolean;
updateChat: (chat: ChatMessageType, message: string, stream_url: string) => void;
}; };
export type formModalPropsType = { export type formModalPropsType = {