From 5eb8f003e8c6586c77f5ecdda0b74882147bfa3f Mon Sep 17 00:00:00 2001 From: Nathan Sarrazin Date: Mon, 5 Feb 2024 09:18:09 +0100 Subject: [PATCH] Use assistant avatar in conversation, if available (#776) --- src/lib/components/chat/ChatMessage.svelte | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/lib/components/chat/ChatMessage.svelte b/src/lib/components/chat/ChatMessage.svelte index d40420e93b6..46c6d4c0bcf 100644 --- a/src/lib/components/chat/ChatMessage.svelte +++ b/src/lib/components/chat/ChatMessage.svelte @@ -19,6 +19,7 @@ import OpenWebSearchResults from "../OpenWebSearchResults.svelte"; import type { WebSearchUpdate } from "$lib/types/MessageUpdate"; + import { base } from "$app/paths"; function sanitizeMd(md: string) { let ret = md @@ -139,11 +140,19 @@ on:click={() => (isTapped = !isTapped)} on:keypress={() => (isTapped = !isTapped)} > - + {#if $page.data?.assistant?.avatar} + Avatar + {:else} + + {/if}