diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-25 10:42:53 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-25 10:42:53 +0300 |
| commit | dd146c20086e95d388e22cbca907dbf68364628b (patch) | |
| tree | a7d7be73d3c2448aad53eb14a303dcc0f675c878 /lib/hyperstack/watcher.rb | |
| parent | 7e7f545112e918451320a87922ab6b34461ed3c5 (diff) | |
fix(loop-scheduler): defer agent_busy reset after agent_end instead of isIdle polling
The agent_end handler receives ExtensionContext, not the command variant,
so ctx.waitForIdle() was never available (TypeError). The previous fix
replaced it with an isIdle() polling loop, but isIdle() remains false
while any agent_end listener is still executing (finishRun() completes
only after listeners settle). This caused a 30-second busy-wait on every
turn, leaving the UI stuck on 'Working...'.
Defer resetting agentBusy and draining pending jobs via setTimeout(..., 0)
so the work happens in a macrotask after finishRun() has completed and the
agent is genuinely idle.
Diffstat (limited to 'lib/hyperstack/watcher.rb')
0 files changed, 0 insertions, 0 deletions
