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.

harden(forge): ignore forge:run-prompt while a generation is in flight

nirholasaacd19b7c602
diff --git a/src/forge.js b/src/forge.js
index 87ed34795..a302e0b5b 100644
--- a/src/forge.js
+++ b/src/forge.js
@@ -2750,8 +2750,10 @@ els.emptyStarters?.addEventListener('click', (e) => {
});
// Let decoupled result-panel modules (e.g. "More like this") request a fresh
-// generation from a derived prompt, reusing the exact example-chip path.
+// generation from a derived prompt, reusing the exact example-chip path. Ignore
+// while a generation is already in flight, mirroring the Roll & Forge guard.
document.addEventListener('forge:run-prompt', (e) => {
+ if (els.generate?.dataset.busy === '1') return;
const text = typeof e.detail?.prompt === 'string' ? e.detail.prompt.trim() : '';
if (text) runExamplePrompt(text);
});