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.

fix(index.html): update script and stylesheet links for asset loading

nirholas38073814e3df
diff --git a/api/skills/[id].js b/api/skills/[id].js
index 35c6edce8..e689b2049 100644
--- a/api/skills/[id].js
+++ b/api/skills/[id].js
@@ -24,6 +24,7 @@ const updateSchema = z.object({
)
.min(1)
.optional(),
+ content: z.string().trim().max(200000).optional(),
});
export default wrap(async (req, res) => {
@@ -58,6 +59,7 @@ function toSkill(row, { includeInstalled = false } = {}) {
avg_rating: Number(row.avg_rating) || 0,
rating_count: row.rating_count || 0,
schema_json: row.schema_json,
+ content: row.content ?? null,
author: row.author_id
? { id: row.author_id, display_name: row.author_display_name }
: null,
@@ -128,6 +130,8 @@ async function handleUpdate(req, res, id) {
if (body.is_public !== undefined) updates.push(sql`is_public = ${body.is_public}`);
if (body.schema_json !== undefined)
updates.push(sql`schema_json = ${JSON.stringify(body.schema_json)}::jsonb`);
+ if (body.content !== undefined)
+ updates.push(sql`content = ${body.content}`);
updates.push(sql`updated_at = now()`);
const setClauses = updates.reduce((acc, frag) => sql`${acc}, ${frag}`);
diff --git a/api/skills/[id]/install.js b/api/skills/[id]/install.js
index 1fddabf70..e571e3b1b 100644
--- a/api/skills/[id]/install.js
+++ b/api/skills/[id]/install.js
@@ -20,7 +20,7 @@ export default wrap(async (req, res) => {
const rl = await limits.chatUser(userId);
if (!rl.success) return error(res, 429, 'rate_limited', 'too many requests');
- const [skill] = await sql`SELECT id, schema_json FROM marketplace_skills WHERE id = ${id} AND is_public = true`;
+ const [skill] = await sql`SELECT id, schema_json, content FROM marketplace_skills WHERE id = ${id} AND is_public = true`;
if (!skill) return error(res, 404, 'not_found', 'skill not found');
if (req.method === 'POST') {
@@ -36,7 +36,7 @@ export default wrap(async (req, res) => {
SET install_count = install_count + 1
WHERE marketplace_skills.id = ${id} AND EXISTS (SELECT 1 FROM ins)
`;
- return json(res, 200, { installed: true, schema_json: skill.schema_json });
+ return json(res, 200, { installed: true, schema_json: skill.schema_json, content: skill.content });
}
// DELETE — uninstall
diff --git a/api/skills/index.js b/api/skills/index.js
index 2453fac11..42d47ae9f 100644
--- a/api/skills/index.js
+++ b/api/skills/index.js
@@ -33,7 +33,9 @@ const publishSchema = z.object({
})
.passthrough(),
)
- .min(1),
+ .min(1)
+ .optional(),
+ content: z.string().trim().min(1).max(200000).optional(),
is_public: z.boolean().default(true),
price_per_call_usd: z.number().min(0).max(10).default(0),
});
@@ -55,6 +57,7 @@ async function resolveOptionalAuth(req) {
}
function toSkill(row, { includeInstalled = false, includeSchema = false } = {}) {
+ const hasContent = typeof row.content === 'string' && row.content.length > 0;
const skill = {
id: row.id,
name: row.name,
@@ -70,6 +73,8 @@ function toSkill(row, { includeInstalled = false, includeSchema = false } = {})
? { id: row.author_id, display_name: row.author_display_name }
: null,
created_at: row.created_at,
+ has_content: hasContent,
+ content_preview: hasContent ? row.content.slice(0, 280) : null,
};
if (includeInstalled) skill.installed = !!row.installed;
if (includeSchema) skill.schema_json = row.schema_json;
@@ -190,7 +195,7 @@ function runListQuery(p) {
return sql`
SELECT
ms.id, ms.name, ms.slug, ms.description, ms.category, ms.tags,
- ms.install_count, ms.created_at, ms.author_id, ms.price_per_call_usd,
+ ms.install_count, ms.created_at, ms.author_id, ms.price_per_call_usd, ms.content,
u.display_name AS author_display_name,
ROUND(COALESCE(AVG(sr.rating), 0)::numeric, 1)::float AS avg_rating,
COUNT(sr.rating)::int AS rating_count,
@@ -234,7 +239,7 @@ function runListQuery(p) {
return sql`
SELECT
ms.id, ms.name, ms.slug, ms.description, ms.category, ms.tags,
- ms.install_count, ms.created_at, ms.author_id, ms.price_per_call_usd,
+ ms.install_count, ms.created_at, ms.author_id, ms.price_per_call_usd, ms.content,
u.display_name AS author_display_name,
ROUND(COALESCE(AVG(sr.rating), 0)::numeric, 1)::float AS avg_rating,
COUNT(sr.rating)::int AS rating_count,
@@ -326,10 +331,14 @@ async function handlePublish(req, res) {
const body = parse(publishSchema, await readJson(req));
+ if (!body.schema_json && !body.content) {
+ return error(res, 400, 'validation_error', 'skill must have schema_json or content');
+ }
+
let row;
try {
[row] = await sql`
- INSERT INTO marketplace_skills (author_id, name, slug, description, category, tags, schema_json, is_public, price_per_call_usd)
+ INSERT INTO marketplace_skills (author_id, name, slug, description, category, tags, schema_json, content, is_public, price_per_call_usd)
VALUES (
${auth.userId},
${body.name},
@@ -337,7 +346,8 @@ async function handlePublish(req, res) {
${body.description},
${body.category},
${body.tags},
- ${JSON.stringify(body.schema_json)}::jsonb,
+ ${body.schema_json ? JSON.stringify(body.schema_json) : null}::jsonb,
+ ${body.content ?? null},
${body.is_public},
${body.price_per_call_usd}
)
diff --git a/chat/src/App.svelte b/chat/src/App.svelte
index f16bd65a5..f42adf62f 100644
--- a/chat/src/App.svelte
+++ b/chat/src/App.svelte
@@ -1546,6 +1546,28 @@
let agentPickerOpen = false;
let showAgentSettings = false;
+ // Live thought bubble above the avatar — streams the active reasoning,
+ // then collapses to a "Thought for Xs" summary while the response streams.
+ let thoughtBubbleEl;
+ $: thinkingMessage = (() => {
+ const msgs = convo?.messages;
+ if (!msgs?.length || !generating) return null;
+ const last = msgs[msgs.length - 1];
+ if (!last || last.role !== 'assistant' || !last.reasoning) return null;
+ return last;
+ })();
+ $: thoughtBubbleActive = !!thinkingMessage?.thinking;
+ $: thoughtBubbleText = thinkingMessage?.thoughts || '';
+ $: thoughtBubbleSeconds = thinkingMessage?.thinkingTime
+ ? thinkingMessage.thinkingTime < 1 ? '<1' : Math.ceil(thinkingMessage.thinkingTime)
+ : 0;
+ $: if (thoughtBubbleEl && thoughtBubbleActive && thoughtBubbleText) {
+ // Auto-scroll to bottom as tokens stream in
+ queueMicrotask(() => {
+ if (thoughtBubbleEl) thoughtBubbleEl.scrollTop = thoughtBubbleEl.scrollHeight;
+ });
+ }
+
// Drag state for the floating agent widget
let dragPos = { x: null, y: null };
let dragging = false;
@@ -2280,6 +2302,33 @@
</div>
{/if}
+ {#if thinkingMessage && agentVisible}
+ <div
+ class="thought-bubble"
+ class:thought-bubble-collapsed={!thoughtBubbleActive}
+ role="status"
+ aria-live="polite"
+ >
+ <div class="thought-bubble-header">
+ <span class="thought-bubble-dot" class:idle={!thoughtBubbleActive} />
+ <span class="thought-bubble-label">
+ {thoughtBubbleActive ? 'Thinking' : 'Thought'} for {thoughtBubbleSeconds}s
+ </span>
+ </div>
+ {#if thoughtBubbleActive}
+ <div class="thought-bubble-body" bind:this={thoughtBubbleEl}>
+ {#if thoughtBubbleText}
+ {thoughtBubbleText}
+ {:else}
+ <span class="thought-bubble-placeholder">Reasoning…</span>
+ {/if}
+ </div>
+ {/if}
+ <span class="thought-bubble-tail thought-bubble-tail-1" />
+ <span class="thought-bubble-tail thought-bubble-tail-2" />
+ </div>
+ {/if}
+
{#if effectiveAgentId && agentVisible}
<!-- svelte-ignore custom-element-no-implicit-ns -->
<agent-3d
@@ -2504,4 +2553,102 @@
background-color: #EBE8E0;
border-color: #E5E3DC;
}
+
+ .thought-bubble {
+ position: relative;
+ width: 280px;
+ max-width: calc(100vw - 48px);
+ margin-bottom: 14px;
+ padding: 10px 14px 12px;
+ border-radius: 18px;
+ background: #ffffff;
+ border: 1px solid #E5E3DC;
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
+ font-family: 'Inter', system-ui, sans-serif;
+ animation: thought-bubble-pop 220ms ease-out;
+ pointer-events: auto;
+ }
+
+ @keyframes thought-bubble-pop {
+ from { opacity: 0; transform: translateY(6px) scale(0.96); }
+ to { opacity: 1; transform: translateY(0) scale(1); }
+ }
+
+ .thought-bubble-header {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ margin-bottom: 6px;
+ font-size: 11px;
+ font-weight: 600;
+ color: #9C9A93;
+ text-transform: uppercase;
+ letter-spacing: 0.04em;
+ }
+
+ .thought-bubble-collapsed {
+ padding-bottom: 10px;
+ }
+ .thought-bubble-collapsed .thought-bubble-header {
+ margin-bottom: 0;
+ }
+
+ .thought-bubble-dot {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: #6366F1;
+ animation: thought-bubble-pulse 1.2s ease-in-out infinite;
+ }
+ .thought-bubble-dot.idle {
+ background: #C7C4BB;
+ animation: none;
+ }
+
+ @keyframes thought-bubble-pulse {
+ 0%, 100% { opacity: 0.4; transform: scale(0.85); }
+ 50% { opacity: 1; transform: scale(1.1); }
+ }
+
+ .thought-bubble-body {
+ max-height: 140px;
+ overflow-y: auto;
+ font-size: 12px;
+ line-height: 1.5;
+ color: #4B4A45;
+ white-space: pre-wrap;
+ word-break: break-word;
+ scrollbar-width: thin;
+ scrollbar-color: #D4D2CA transparent;
+ mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
+ -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
+ }
+
+ .thought-bubble-body::-webkit-scrollbar { width: 4px; }
+ .thought-bubble-body::-webkit-scrollbar-thumb { background: #D4D2CA; border-radius: 2px; }
+
+ .thought-bubble-placeholder {
+ color: #9C9A93;
+ font-style: italic;
+ }
+
+ .thought-bubble-tail {
+ position: absolute;
+ right: 28px;
+ border-radius: 50%;
+ background: #ffffff;
+ border: 1px solid #E5E3DC;
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
+ }
+ .thought-bubble-tail-1 {
+ bottom: -8px;
+ width: 12px;
+ height: 12px;
+ }
+ .thought-bubble-tail-2 {
+ bottom: -18px;
+ right: 22px;
+ width: 7px;
+ height: 7px;
+ }
</style>
diff --git a/chat/src/CompanyLogo.svelte b/chat/src/CompanyLogo.svelte
index 545164451..299e1c18a 100644
--- a/chat/src/CompanyLogo.svelte
+++ b/chat/src/CompanyLogo.svelte
@@ -1,24 +1,15 @@
<script>
- import { talkingHeadAvatarUrl, localAgentId, brandConfig } from './stores.js';
- import AvatarIcon from './AvatarIcon.svelte';
+ import { localAgentId, brandConfig } from './stores.js';
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;
- // Remember to update hasCompanyLogo from convo.js when adding new logos.
- const base = import.meta.env.BASE_URL;
-
$: effectiveAgentId = $localAgentId || $brandConfig?.agent_id || '';
</script>
-{#if $talkingHeadAvatarUrl}
- <span class="{size} {rounded || 'rounded-sm'} overflow-hidden inline-block shrink-0">
- <AvatarIcon avatarUrl={$talkingHeadAvatarUrl} {live} />
- </span>
-{:else if effectiveAgentId}
+{#if effectiveAgentId}
<span class="{size} {rounded || 'rounded-sm'} overflow-hidden inline-block shrink-0">
<!-- svelte-ignore custom-element-no-implicit-ns -->
<agent-3d
@@ -32,38 +23,4 @@
style="width:100%;height:100%;display:block;"
></agent-3d>
</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 80592d2e0..d19ec9ff6 100644
--- a/chat/src/Message.svelte
+++ b/chat/src/Message.svelte
@@ -23,7 +23,7 @@
import Icon from './Icon.svelte';
import MessageContent from './MessageContent.svelte';
import { formatModelName, hasCompanyLogo } from './providers.js';
- import { config, talkingHeadAvatarUrl } from './stores.js';
+ import { config, talkingHeadAvatarUrl, localAgentId, brandConfig } from './stores.js';
import Toolcall from './Toolcall.svelte';
import ToolcallButton from './ToolcallButton.svelte';
@@ -120,7 +120,8 @@
</script>
{#if (['user', 'assistant'].includes(message.role) || (message.role === 'system' && (!message.customInstructions || (message.customInstructions && message.showCustomInstructions)))) && ($config.explicitToolView || !collapsedRanges.some((r) => i >= r.starti && i < r.endi))}
- {@const hasLogo = message.role === 'assistant' && (!!$talkingHeadAvatarUrl || hasCompanyLogo(message.model))}
+ {@const effectiveAgentId = $localAgentId || $brandConfig?.agent_id || ''}
+ {@const hasLogo = message.role === 'assistant' && (!!effectiveAgentId || !!$talkingHeadAvatarUrl || hasCompanyLogo(message.model))}
<!-- svelte-ignore a11y-click-events-have-key-events a11y-no-noninteractive-element-interactions -->
<li
data-role={message.role}
diff --git a/public/chat/index.html b/public/chat/index.html
index d771b38c6..dc149900d 100644
--- a/public/chat/index.html
+++ b/public/chat/index.html
@@ -43,8 +43,8 @@
}
}
</script>
- <script type="module" crossorigin src="/chat/assets/index-Dl9PhC-D.js"></script>
- <link rel="stylesheet" crossorigin href="/chat/assets/index-CnW8cFvI.css">
+ <script type="module" crossorigin src="/chat/assets/index--e_e4g6h.js"></script>
+ <link rel="stylesheet" crossorigin href="/chat/assets/index-B-I9zSRy.css">
</head>
<body>
<div id="app"></div>