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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(studio): include prompt title in shapePoll response and poll URL
nirholas25dc1c8f6eb2
diff --git a/api/3d/studio.js b/api/3d/studio.jsindex 804a38881..9c3e880b2 100644--- a/api/3d/studio.js+++ b/api/3d/studio.js@@ -77,7 +77,7 @@ export function shapeSubmit(job, base, prompt) {}// Shape a forge poll response into { status:'pending'|'done'|'error', ... }.-export function shapePoll(data, base, jobId) {+export function shapePoll(data, base, jobId, title) {const glbUrl = typeof data?.glb_url === 'string' ? data.glb_url : '';if (data?.status === 'done' && glbUrl) {return {@@ -85,7 +85,7 @@ export function shapePoll(data, base, jobId) {job: jobId,glbUrl,viewerUrl: viewerUrl(base, glbUrl),- arUrl: arLaunchUrl(base, glbUrl),+ arUrl: arLaunchUrl(base, glbUrl, title),format: 'glb',};}@@ -98,8 +98,10 @@ export function shapePoll(data, base, jobId) {error: data?.error || '3D generation hit a snag upstream — it costs nothing to try again.',};}- // queued / running / anything transient → still pending.- return { status: 'pending', job: jobId, poll: `/api/3d/studio?job=${encodeURIComponent(jobId)}` };+ // queued / running / anything transient → still pending; keep the title on the+ // poll URL so it survives to the done response.+ const t = typeof title === 'string' && title.trim() ? `&title=${encodeURIComponent(title.trim().slice(0, 80))}` : '';+ return { status: 'pending', job: jobId, poll: `/api/3d/studio?job=${encodeURIComponent(jobId)}${t}` };}// Map a startForge lane failure to an honest boundary response. A well-formed@@ -205,7 +207,7 @@ async function generate(req, res) {return json(res, 200, shapeSubmit(job, base, prompt));}-async function poll(req, res, jobId) {+async function poll(req, res, jobId, title) {if (!JOB_HANDLE_RE.test(jobId)) {return json(res, 400, { error: 'invalid_job', message: 'Malformed job id. Pass the "job" value from the generate response.' });}