Merge pull request #2705 from cheahjs/fix/show-both-error-and-content

fix: show both message contents and error message
This commit is contained in:
Timothy Jaeryang Baek 2024-06-01 13:05:34 -07:00 committed by GitHub
commit d2cbb14ebf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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