From e6b6f42139b64e1bfae45bea04232240c6cbbd1a Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 18 Sep 2024 16:46:13 +0200 Subject: [PATCH] refac: display error content on node --- src/lib/components/chat/Overview/Node.svelte | 21 +++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/Overview/Node.svelte b/src/lib/components/chat/Overview/Node.svelte index 906c572a7..23903b97f 100644 --- a/src/lib/components/chat/Overview/Node.svelte +++ b/src/lib/components/chat/Overview/Node.svelte @@ -12,7 +12,10 @@
- + {#if data.message.role === 'user'}
{data.user.name}
-
{data.message.content}
+ + {#if data?.message?.error} +
{data.message.error.content}
+ {:else} +
{data.message.content}
+ {/if}
{:else} @@ -33,7 +41,14 @@
{data.model.name}
-
{data.message.content}
+ + {#if data?.message?.error} +
+ {data.message.error.content} +
+ {:else} +
{data.message.content}
+ {/if}
{/if}