Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
1cef4873
Commit
1cef4873
authored
Jun 01, 2024
by
Jun Siang Cheah
Browse files
fix: show both message contents and error message
parent
561778d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/lib/components/chat/Messages/ResponseMessage.svelte
src/lib/components/chat/Messages/ResponseMessage.svelte
+3
-1
No files found.
src/lib/components/chat/Messages/ResponseMessage.svelte
View file @
1cef4873
...
@@ -453,7 +453,9 @@
...
@@ -453,7 +453,9 @@
<div class="w-full">
<div class="w-full">
{#if message.content === '' && !message.error}
{#if message.content === '' && !message.error}
<Skeleton />
<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}
{#each tokens as token, tokenIdx}
{#if token.type === 'code'}
{#if token.type === 'code'}
<CodeBlock
<CodeBlock
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment