diff --git a/docs/plans/2026-06-26-textgate-run-from-here-design.md b/docs/plans/2026-06-26-textgate-run-from-here-design.md index 6f52625..8eff75a 100644 --- a/docs/plans/2026-06-26-textgate-run-from-here-design.md +++ b/docs/plans/2026-06-26-textgate-run-from-here-design.md @@ -20,8 +20,12 @@ The node currently has no explicit state. Add three: - **passed** — after Pass click. Textarea keeps the edited text, **Pass** hidden, **▶ Run from here** shown, status `passed — Run from here to re-run`. -**Run from here** click → `app.queuePrompt(0, 1)` with `app.queuePrompt(0)` -fallback — copied verbatim from the Image Gate's `queueFromHere`. +**Run from here** click → executes the `Comfy.QueuePrompt` command via +`app.extensionManager.command.execute(...)` — the same path the Run button and +Ctrl+Enter use, so the prompt actually starts. A bare `app.queuePrompt(0, 1)` +enqueues but skips the command's run setup, so the 1.47 frontend doesn't kick off +execution (you'd have to press Run yourself). `app.queuePrompt` remains a fallback +for older frontends without the command registry. ## Sticky edited text (by intent, not text comparison) diff --git a/web/text_gate.js b/web/text_gate.js index 37b864d..820d47b 100644 --- a/web/text_gate.js +++ b/web/text_gate.js @@ -43,6 +43,16 @@ async function postPass(node, text) { // re-pauses the gate, matching the Image Gate's queueFromHere. async function queueFromHere(node) { + // Fire the same command the Run button / Ctrl+Enter use, so the prompt + // actually EXECUTES. A bare app.queuePrompt(...) enqueues but skips the + // command's run setup, so the 1.47 frontend doesn't kick off the run (you'd + // have to press Run yourself). Fall back to app.queuePrompt on older + // frontends without the command registry. + const cmd = app.extensionManager?.command; + if (cmd?.execute) { + try { await cmd.execute("Comfy.QueuePrompt"); return; } + catch (e) { /* fall through to the legacy path */ } + } try { await app.queuePrompt(0, 1); } catch (e) {