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: enhance event rendering with improved market cap display and additional developer stats; add mint copy and focus buttons

nirholas56c378ac07af
diff --git a/public/pumpfun.html b/public/pumpfun.html
index fffa3e871..70e16df83 100644
--- a/public/pumpfun.html
+++ b/public/pumpfun.html
@@ -160,6 +160,9 @@
#side h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
color: var(--muted); margin: 12px 16px 6px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
#agent-card { padding: 4px 16px 12px; border-bottom: 1px solid var(--border); }
+ #first-claims-section { border-bottom: 1px solid var(--border); padding-bottom: 8px; max-height: 30%; display: flex; flex-direction: column; }
+ #first-claims { padding: 0 12px 4px; overflow-y: auto; flex: 1; min-height: 0; }
+ #first-claims .empty { padding: 6px 4px; }
#feed-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#feed { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.kv { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; gap: 8px; }
@@ -194,6 +197,9 @@
border: 1px solid #2a2a3c; color: #cbd5e1; }
.evt-socials a:hover { background: #26263a; color: #fff; }
.evt-pool { font-size: 10px; color: #9a8cff; margin-top: 4px; }
+ .evt-copy, .evt-focus { background: transparent; border: 0; color: #888; cursor: pointer; font-size: 11px; padding: 0 2px; }
+ .evt-copy:hover, .evt-focus:hover { color: #fff; }
+ .evt-copy[data-copied="1"]::after { content: ' ✓'; color: #4ade80; }
.evt-row { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.evt-kind { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.evt-tier { font-size: 10px; color: #fbbf24; }
@@ -1099,8 +1105,8 @@
function renderMint(ev) {
const mint = ev.mint || '';
- const mcSol = ev.market_cap_sol != null ? Number(ev.market_cap_sol).toFixed(2) + ' SOL' : '';
- const mcUsd = ev.market_cap_usd != null ? fmtUsd(ev.market_cap_usd) : '';
+ const mcSol = Number.isFinite(Number(ev.market_cap_sol)) ? Number(ev.market_cap_sol).toFixed(2) + ' SOL' : '';
+ const mcUsd = Number.isFinite(Number(ev.market_cap_usd)) ? fmtUsd(ev.market_cap_usd) : '';
const mcStr = [mcUsd, mcSol].filter(Boolean).join(' / ');
const buyStr = ev.initial_buy_sol ? `${fmtSol(ev.initial_buy_sol)}${ev.initial_buy_usd ? ' (' + fmtUsd(ev.initial_buy_usd) + ')' : ''}` : '';
const social = [
@@ -1108,19 +1114,40 @@
ev.telegram ? `<a href="${attr(ev.telegram)}" target="_blank" rel="noopener">TG</a>` : '',
ev.website ? `<a href="${attr(ev.website)}" target="_blank" rel="noopener">🌐</a>` : '',
].filter(Boolean).join(' ');
+
+ const launches = ev.creator_launches;
+ const graduated = ev.creator_graduated;
+ const devStats = launches != null
+ ? (graduated != null ? `${launches} launches · 🎓 ${graduated}` : `${launches} launches`)
+ : '';
+
const replay = ev.replay ? ' replay' : '';
- return `<div class="evt${replay}">
+ const thumb = ev.image_uri
+ ? `<img class="evt-thumb" src="${attr(ev.image_uri)}" alt="" loading="lazy" decoding="async" referrerpolicy="no-referrer" onerror="this.style.display='none'" />`
+ : '';
+
+ return `<div class="evt${replay}" data-mint="${attr(mint)}">
<div class="evt-row">
<span class="evt-kind">🌱 new token</span>
<span class="evt-time">${escapeHtml(timeAgo(ev.created_at))}</span>
</div>
- <div class="evt-title">${escapeHtml(ev.name || '—')} — $${escapeHtml(ev.symbol || '?')}</div>
- ${ev.description ? `<div class="evt-desc">${escapeHtml(ev.description.slice(0, 100))}</div>` : ''}
- ${mcStr ? `<div class="evt-amt">💎 MC: ${escapeHtml(mcStr)}${buyStr ? ' &nbsp;·&nbsp; initial: ' + escapeHtml(buyStr) : ''}</div>` : ''}
- <div class="evt-links">${toolLinks(mint)}${social ? ' ' + social : ''}</div>
- ${ev.creator ? `<div class="evt-meta"><span>dev: <code>${shortKey(ev.creator)}</code></span></div>` : ''}
+ <div class="evt-head" style="margin-top:4px">
+ ${thumb}
+ <div class="evt-head-text">
+ <div class="evt-title">${escapeHtml(ev.name || '—')} — $${escapeHtml(ev.symbol || '?')}</div>
+ ${ev.description ? `<div class="evt-desc">${escapeHtml(ev.description.slice(0, 100))}</div>` : ''}
+ ${social ? `<div class="evt-socials">${social}</div>` : ''}
+ </div>
+ </div>
+ ${mcStr ? `<div class="evt-amt" style="margin-top:6px">💎 MC: ${escapeHtml(mcStr)}${buyStr ? ' &nbsp;·&nbsp; initial: ' + escapeHtml(buyStr) : ''}</div>` : ''}
+ ${devStats ? `<div class="evt-row2" style="margin-top:4px">👨‍💻 ${devStats}${ev.creator ? ' &nbsp;·&nbsp; <code>' + shortKey(ev.creator) + '</code>' : ''}</div>` : (ev.creator ? `<div class="evt-meta"><span>dev: <code>${shortKey(ev.creator)}</code></span></div>` : '')}
+ <div class="evt-links">${toolLinks(mint)}</div>
<div class="evt-mint">${escapeHtml(mint)}</div>
- ${ev.signature ? `<div class="evt-meta"><a href="https://solscan.io/tx/${encodeURIComponent(ev.signature)}" target="_blank" rel="noopener">TX ↗</a></div>` : ''}
+ <div class="evt-meta">
+ ${ev.signature ? `<a href="https://solscan.io/tx/${encodeURIComponent(ev.signature)}" target="_blank" rel="noopener">TX ↗</a>` : ''}
+ ${mint ? ` · <button class="evt-copy" type="button" data-copy="${attr(mint)}" title="Copy mint">📋</button>` : ''}
+ ${mint ? ` · <button class="evt-focus" type="button" data-focus="${attr(mint)}" title="Filter to this mint">🎯</button>` : ''}
+ </div>
</div>`;
}
@@ -1217,6 +1244,8 @@
${sig ? `🔗 <a href="https://solscan.io/tx/${encodeURIComponent(sig)}" target="_blank" rel="noopener">TX</a>` : ''}
${mint ? ` · <a href="https://pump.fun/coin/${m}" target="_blank" rel="noopener">pump.fun</a>` : ''}
${tsStr ? ` · 🕐 ${escapeHtml(tsStr)}` : ''}
+ ${mint ? ` · <button class="evt-copy" type="button" data-copy="${attr(mint)}" title="Copy mint">📋</button>` : ''}
+ ${mint ? ` · <button class="evt-focus" type="button" data-focus="${attr(mint)}" title="Filter to this mint">🎯</button>` : ''}
</div>
</div>`;
}
diff --git a/vercel.json b/vercel.json
index 5753a8fe1..b0a6826fc 100644
--- a/vercel.json
+++ b/vercel.json
@@ -539,9 +539,8 @@
{
"src": "/agent/([^/]+)/embed",
"headers": {
- "content-security-policy": "frame-ancestors *; default-src 'self' https: data: blob:; img-src 'self' https: data: blob:; media-src 'self' https: data: blob:; connect-src 'self' https: wss: data: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; style-src 'self' 'unsafe-inline' https:; font-src 'self' https: data:; worker-src 'self' blob:; object-src 'none'; base-uri 'self'",
+ "content-security-policy": "frame-ancestors *",
"x-content-type-options": "nosniff",
- "x-frame-options": "ALLOWALL",
"referrer-policy": "strict-origin-when-cross-origin",
"permissions-policy": "microphone=(self), camera=(self), xr-spatial-tracking=*",
"cross-origin-resource-policy": "cross-origin"