fix(bridge): resolve missing Discord embed bodies by extracting detailed RPC payload from step_probe

This commit is contained in:
Variet Worker
2026-04-10 08:02:41 +09:00
parent fadd39424b
commit 89c95de18c
5 changed files with 91 additions and 49 deletions

View File

@@ -213,7 +213,7 @@ function _handlePending(req: any, res: any, ctx: HttpBridgeContext) {
}
// "Run" button → step_probe handles these with full command detail
// Only let through if session is stalled AND step_probe hasn't created a pending yet
if (/^Run\b/i.test(cmd)) {
if (/^(?:Always\s*)?Run\b/i.test(cmd)) {
if (!ctx.sessionStalled || ctx.lastPendingStepIndex >= 0) {
ctx.logToFile(`[HTTP] filtered "Run" — ${!ctx.sessionStalled ? 'not stalled' : 'step_probe pending exists'}`);
res.writeHead(200, { 'Content-Type': 'application/json' });