fix: show both message contents and error message

This commit is contained in:
Jun Siang Cheah 2024-06-01 20:47:04 +01:00
parent 561778d04d
commit 1cef48730e

View File

@ -453,7 +453,9 @@
<div class="w-full">
{#if message.content === '' && !message.error}
<Skeleton />
{:else if !message.error}
{:else if message.content && message.error !== true}
<!-- always show message contents even if there's an error -->
<!-- unless message.error === true which is legacy error handling, where the error message is stored in message.content -->
{#each tokens as token, tokenIdx}
{#if token.type === 'code'}
<CodeBlock