fix(bridge): fix Discord signal relay false-positives and empty body logic

This commit is contained in:
Variet Worker
2026-04-10 00:12:01 +09:00
parent 22e1799d66
commit fadd39424b
6 changed files with 35 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
/**
/**
* Step Probe Module - SDK polling, response handling, approval strategies.
* All shared state accessed through BridgeContext.
* Extracted from extension.ts.
@@ -269,8 +269,8 @@ function setupMonitor() {
activeTrajectoryId = (bestSession as any).trajectoryId || '';
activeSessionTitle = currentTitle;
lastKnownStepCount = currentCount;
lastNotifyStepIndex = bestSession.latestNotifyUserStep?.stepIndex ?? -1;
lastTaskStepIndex = bestSession.latestTaskBoundaryStep?.stepIndex ?? -1;
lastNotifyStepIndex = -1;
lastTaskStepIndex = -1;
lastUserInputStepIdx = bestSession.lastUserInputStepIndex ?? -1;
lastResponseCaptureStep = currentCount; // don't re-relay old responses
ctx.lastPendingStepIndex = -1;