Merge pull request #341 from ollama-webui/edit-message-fix

fix: edit message issue
This commit is contained in:
Timothy Jaeryang Baek 2024-01-01 16:03:18 -05:00 committed by GitHub
commit 9937b5e467
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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">