🐛 fix(chatModal): concatenate message and thought strings instead of overwriting them to preserve previous content

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-08 14:58:24 -03:00
commit 167c9cc2d8

View file

@ -86,12 +86,15 @@ export default function ChatModal({
if (end) {
newChat[newChat.length - 1].message = str;
} else {
newChat[newChat.length - 1].message =
newChat[newChat.length - 1].message + str;
newChat[newChat.length - 1].message += str;
}
}
if (thought) {
newChat[newChat.length - 1].thought = thought;
if (end) {
newChat[newChat.length - 1].thought = thought;
} else {
newChat[newChat.length - 1].thought += thought;
}
}
if (files) {
newChat[newChat.length - 1].files = files;