瀏覽代碼

enh: keep originalContent

Timothy J. Baek 11 月之前
父節點
當前提交
6922529b78
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/lib/components/chat/Chat.svelte

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

@@ -626,7 +626,11 @@
 						if (res !== null) {
 							// Update chat history with the new 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
+								};
 							}
 						}
 					}