Repository navigation
fix(agent): keep queued inputs in native order when switching queues - #25
rajnishmanitiwari wants to merge 1 commit into
Conversation
requeue() rebuilt each queue from the tracked Map, so switching one queued input reordered the others into Map insertion order. Each queue is now restored in the order clearQueue returned it: tracked entries keep their native slots (with images), unmatched entries stay where they were, and the switched input joins its new queue last. An input pi already took is still dropped and still reports false. Fixes w01fb0ss#20. Signed-off-by: Rajnish Mani Tiwari <76885104+rajnishmanitiwari@users.noreply.github.com>
|
Thanks for the fix and the tests — rebuilding each queue from One case it still misses: two queued inputs with the same text (e.g. "continue" sent twice). Heads-up: #21 by @agooll targets the same issue (#20) and is waiting on a similar change. We'll merge whichever lands a complete fix first, and credit both of you in the release notes. |
|
Thanks a lot for working on this, and for the tests. #21 fixes the same queue-switching bug and now also covers the duplicate-text case, and its checks pass, so I'm closing this one in favour of it. #21 had already taken the same approach — rebuilding the queues from |
Signed-off-by: leen.zhou <leen.zhou.cn@gmail.com>
Signed-off-by: leen.zhou <leen.zhou.cn@gmail.com>
Fixes #20.
requeue() rebuilt each queue from the tracked Map, so switching one queued input reordered the others into Map insertion order. Each queue is now restored in the order clearQueue returned it: tracked entries keep their native slots (with images), unmatched entries stay where they were, and the switched input joins its new queue last. An input pi already took is still dropped and still reports false.
Tests: new packages/agent/test/session-additions.test.ts, 3 tests, all pass; the two order tests fail without the fix (sensitivity checked); full @pibot/agent suite 66/66 pass; package typecheck clean; Biome check clean on both touched files.