From 6922529b786b9f39bb190ff36833ca396ee64277 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 30 May 2024 16:23:10 -0700 Subject: [PATCH] enh: keep originalContent --- src/lib/components/chat/Chat.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index e58d2cdc4..e0152bfc3 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/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 + }; } } }