mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 21:42:58 +00:00
fix
This commit is contained in:
parent
6922529b78
commit
e1d65065f5
@ -628,7 +628,9 @@
|
|||||||
for (const message of res.messages) {
|
for (const message of res.messages) {
|
||||||
history.messages[message.id] = {
|
history.messages[message.id] = {
|
||||||
...history.messages[message.id],
|
...history.messages[message.id],
|
||||||
originalContent: history.messages[message.id].content,
|
...(history.messages[message.id].content !== message.content
|
||||||
|
? { originalContent: history.messages[message.id].content }
|
||||||
|
: {}),
|
||||||
...message
|
...message
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -913,7 +915,13 @@
|
|||||||
if (res !== null) {
|
if (res !== null) {
|
||||||
// Update chat history with the new messages
|
// Update chat history with the new messages
|
||||||
for (const message of res.messages) {
|
for (const message of res.messages) {
|
||||||
history.messages[message.id] = { ...history.messages[message.id], ...message };
|
history.messages[message.id] = {
|
||||||
|
...history.messages[message.id],
|
||||||
|
...(history.messages[message.id].content !== message.content
|
||||||
|
? { originalContent: history.messages[message.id].content }
|
||||||
|
: {}),
|
||||||
|
...message
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user