From 0318fda9447a8375be13c3a7829a5d434b9063d9 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 16 Feb 2024 13:12:13 -0800 Subject: [PATCH] fix: disable empty edited response content --- .../chat/Messages/ResponseMessage.svelte | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index b743d06f..96a9f009 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -239,6 +239,10 @@ }; const editMessageConfirmHandler = async () => { + if (editedContent === '') { + editedContent = ' '; + } + confirmEditResponseMessage(message.id, editedContent); edit = false; @@ -284,7 +288,7 @@ {:else}
{#if edit === true} @@ -361,11 +365,13 @@ {/if} {#if message.done} -
+
{#if siblings.length > 1}
-
+
{siblings.indexOf(message.id) + 1} / {siblings.length}