mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-10 17:27:10 +00:00
waitForPendingRewrites snapshotted pendingRewrites via Promise.allSettled then reassigned the field to []. A flushTurn that landed during the await appended to the array and was discarded by the reassignment, so its rewrite was no longer awaited before session end. Drain in a loop instead: take the current batch, clear the queue so concurrent pushes go into a fresh array, await it, and repeat until empty. |
||
|---|---|---|
| .. | ||
| src | ||
| index.ts | ||
| package.json | ||
| test-setup.ts | ||
| tsconfig.json | ||
| vitest.config.ts | ||