🐛 fix(chatModal): concatenate message and thought strings instead of overwriting them to preserve previous content
This commit is contained in:
parent
1fbc897cfa
commit
167c9cc2d8
1 changed files with 6 additions and 3 deletions
|
|
@ -86,12 +86,15 @@ export default function ChatModal({
|
||||||
if (end) {
|
if (end) {
|
||||||
newChat[newChat.length - 1].message = str;
|
newChat[newChat.length - 1].message = str;
|
||||||
} else {
|
} else {
|
||||||
newChat[newChat.length - 1].message =
|
newChat[newChat.length - 1].message += str;
|
||||||
newChat[newChat.length - 1].message + str;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (thought) {
|
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) {
|
if (files) {
|
||||||
newChat[newChat.length - 1].files = files;
|
newChat[newChat.length - 1].files = files;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue