fix: edit message issue

This commit is contained in:
Timothy J. Baek 2024-01-01 13:01:42 -08:00
parent 111288d689
commit 60658abbbc
3 changed files with 38 additions and 43 deletions

View file

@ -215,6 +215,7 @@
{#if messages.length == 0} {#if messages.length == 0}
<Placeholder models={selectedModels} modelfiles={selectedModelfiles} /> <Placeholder models={selectedModels} modelfiles={selectedModelfiles} />
{:else} {:else}
{#key chatId}
{#each messages as message, messageIdx} {#each messages as message, messageIdx}
<div class=" w-full"> <div class=" w-full">
<div class="flex justify-between px-5 mb-3 max-w-3xl mx-auto rounded-lg group"> <div class="flex justify-between px-5 mb-3 max-w-3xl mx-auto rounded-lg group">
@ -253,4 +254,5 @@
{#if bottomPadding} {#if bottomPadding}
<div class=" mb-10" /> <div class=" mb-10" />
{/if} {/if}
{/key}
{/if} {/if}

View file

@ -33,8 +33,6 @@
let speaking = null; let speaking = null;
$: if (message) { $: if (message) {
edit = false;
editedContent = '';
renderStyling(); renderStyling();
} }

View file

@ -39,11 +39,6 @@
edit = false; edit = false;
editedContent = ''; editedContent = '';
}; };
$: if (message) {
edit = false;
editedContent = '';
}
</script> </script>
<div class=" flex w-full"> <div class=" flex w-full">