Bläddra i källkod

enh: keep originalContent

Timothy J. Baek 11 månader sedan
förälder
incheckning
6922529b78
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      src/lib/components/chat/Chat.svelte

+ 5 - 1
src/lib/components/chat/Chat.svelte

@@ -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
+								};
 							}
 							}
 						}
 						}
 					}
 					}