Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(CompanyLogo, Message): enhance avatar rendering with talking head support and fallback logic

nirholas83f9091fb305
diff --git a/chat/src/CompanyLogo.svelte b/chat/src/CompanyLogo.svelte
index 299e1c18a..af70ab166 100644
--- a/chat/src/CompanyLogo.svelte
+++ b/chat/src/CompanyLogo.svelte
@@ -1,26 +1,53 @@
<script>
- import { localAgentId, brandConfig } from './stores.js';
+ import { talkingHeadAvatarUrl } from './stores.js';
+ import AvatarIcon from './AvatarIcon.svelte';
export let model;
export let size = 'h-7 w-7';
export let rounded = null;
+ /** Live-animated walking avatar. Set false for dense lists (dropdown rows) — uses still frame. */
export let live = true;
- $: effectiveAgentId = $localAgentId || $brandConfig?.agent_id || '';
+ // Remember to update hasCompanyLogo from convo.js when adding new logos.
+ const base = import.meta.env.BASE_URL;
</script>
-{#if effectiveAgentId}
+{#if $talkingHeadAvatarUrl}
<span class="{size} {rounded || 'rounded-sm'} overflow-hidden inline-block shrink-0">
- <!-- svelte-ignore custom-element-no-implicit-ns -->
- <agent-3d
- agent-id={effectiveAgentId}
- mode="inline"
- width="128"
- height="128"
- background="transparent"
- kiosk
- name-plate="off"
- style="width:100%;height:100%;display:block;"
- ></agent-3d>
+ <AvatarIcon avatarUrl={$talkingHeadAvatarUrl} {live} />
</span>
+{:else if model && model.provider}
+ {#if model.provider === 'OpenAI' || model.id.startsWith('openai')}
+ <img src="{base}logos/openai.ico" loading="lazy" class="{size} {rounded || 'rounded-sm'}" alt="" />
+ {:else if model.provider === 'Anthropic' || model.id.startsWith('anthropic')}
+ <img
+ src="{base}logos/anthropic.jpeg"
+ loading="lazy"
+ class="{size} {rounded || 'rounded-sm'}"
+ alt=""
+ />
+ {:else if model.id.startsWith('meta-llama')}
+ <img src="{base}logos/meta.png" loading="lazy" class={size} alt="" />
+ {:else if model.provider === 'Mistral' || model.id.startsWith('mistralai')}
+ <img src="{base}logos/mistral.png" loading="lazy" class={size} alt="" />
+ {:else if model.id.startsWith('cohere')}
+ <img src="{base}logos/cohere.png" loading="lazy" class={size} alt="" />
+ {:else if model.provider === 'Groq'}
+ <img src="{base}logos/groq.png" loading="lazy" class="{size} {rounded || 'rounded-sm'}" alt="" />
+ {:else if model.id.startsWith('nous')}
+ <img src="{base}logos/nous.png" loading="lazy" class={size} alt="" />
+ {:else if model.id.startsWith('google')}
+ <img src="{base}logos/google.png" loading="lazy" class={size} alt="" />
+ {:else if model.id.startsWith('perplexity')}
+ <img
+ src="{base}logos/perplexity.svg"
+ loading="lazy"
+ class="{size} {rounded || 'rounded-sm'}"
+ alt=""
+ />
+ {:else if model.id.startsWith('deepseek')}
+ <img src="{base}logos/deepseek.ico" loading="lazy" class={size} alt="" />
+ {:else if model.id.startsWith('qwen')}
+ <img src="{base}logos/qwen.svg" loading="lazy" class={size} alt="" />
+ {/if}
{/if}
diff --git a/chat/src/Message.svelte b/chat/src/Message.svelte
index d19ec9ff6..4f2ca3a38 100644
--- a/chat/src/Message.svelte
+++ b/chat/src/Message.svelte
@@ -179,7 +179,23 @@
: ''}"
>
{#if message.role === 'assistant' && hasLogo}
- <CompanyLogo model={message.model} size="w-full h-full" rounded="rounded-[inherit]" />
+ {#if effectiveAgentId}
+ <span class="w-full h-full overflow-hidden inline-block shrink-0 rounded-[inherit]">
+ <!-- svelte-ignore custom-element-no-implicit-ns -->
+ <agent-3d
+ agent-id={effectiveAgentId}
+ mode="inline"
+ width="128"
+ height="128"
+ background="transparent"
+ kiosk
+ name-plate="off"
+ style="width:100%;height:100%;display:block;"
+ ></agent-3d>
+ </span>
+ {:else}
+ <CompanyLogo model={message.model} size="w-full h-full" rounded="rounded-[inherit]" />
+ {/if}
{:else}
<span class="m-auto">
{#if message.role === 'system'}
diff --git a/public/chat/index.html b/public/chat/index.html
index dc149900d..85631b546 100644
--- a/public/chat/index.html
+++ b/public/chat/index.html
@@ -43,7 +43,7 @@
}
}
</script>
- <script type="module" crossorigin src="/chat/assets/index--e_e4g6h.js"></script>
+ <script type="module" crossorigin src="/chat/assets/index-LB3jJ7Ru.js"></script>
<link rel="stylesheet" crossorigin href="/chat/assets/index-B-I9zSRy.css">
</head>
<body>