enh: keep originalContent

This commit is contained in:
Timothy J. Baek 2024-05-30 16:23:10 -07:00
parent 9cd150a048
commit 6922529b78

View File

@ -626,7 +626,11 @@
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],
originalContent: history.messages[message.id].content,
...message
};
} }
} }
} }