From 7000a52485fb8a1d68ee52c173abfc60984b6189 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 1 Jan 2024 11:47:23 -0800 Subject: [PATCH] fix: edit message issue --- src/lib/components/chat/Messages/ResponseMessage.svelte | 2 ++ src/lib/components/chat/Messages/UserMessage.svelte | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 6f821b46..2bf4c42b 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -33,6 +33,8 @@ let speaking = null; $: if (message) { + edit = false; + editedContent = ''; renderStyling(); } diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index 693d20e2..f5be0af3 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -39,6 +39,11 @@ edit = false; editedContent = ''; }; + + $: if (message) { + edit = false; + editedContent = ''; + }