This commit is contained in:
Timothy Jaeryang Baek 2025-07-07 19:42:08 +04:00
parent 67063e6400
commit 821243ef40
2 changed files with 30 additions and 4 deletions

View file

@ -164,6 +164,10 @@
loading = true; loading = true;
await chatCompletionHandler(); await chatCompletionHandler();
messages = messages.filter((message) => {
return message.content !== '';
});
loading = false; loading = false;
stopResponseFlag = false; stopResponseFlag = false;
} }

View file

@ -17,12 +17,34 @@
</script> </script>
<div class="flex flex-col gap-1 group"> <div class="flex flex-col gap-1 group">
<div class="flex items-start pt-1"> <div class="flex items-center justify-between pt-1 px-2">
<div <div class="py-1 text-sm font-semibold uppercase min-w-[6rem] text-left rounded-lg transition">
class="px-2 py-1 text-sm font-semibold uppercase min-w-[6rem] text-left rounded-lg transition"
>
{$i18n.t(message.role)} {$i18n.t(message.role)}
</div> </div>
<div class="flex items-center">
<button
class=" text-transparent group-hover:text-gray-500 dark:hover:text-gray-300 transition"
on:click={() => {
onDelete();
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="2"
stroke="currentColor"
class="size-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
/>
</svg>
</button>
</div>
</div> </div>
<div class="flex-1"> <div class="flex-1">