fix: a new message goes behind queued entries, not ahead of them
Co-Authored-By: Ovis Fast (Claude) <[email protected]>
This commit is contained in:
1 parent
cb7f7b58f5
commit
2dbb3fe23e
3 files changed
+32
-4
No files matched your search
@@ -130,6 +130,17 @@ export function shouldStartCountdown({ status, queue, gateOpen, stopped }) {
|
||||
return queue.some((item) => item.state === "queued");
|
||||
}
|
||||
|
||||
/**
|
||||
* Does a message wait in the queue (`queued`, or counting down)? Then a new
|
||||
* message does not go out ahead of it - it takes its place at the end.
|
||||
*
|
||||
* @param {QueueItem[]|undefined} queue
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function queueBlocksDirectSend(queue) {
|
||||
return (Array.isArray(queue) ? queue : []).some((item) => item.state === "queued" || item.state === "countdown");
|
||||
}
|
||||
|
||||
/**
|
||||
* The turn gate: the next message goes out only after a whole turn was seen -
|
||||
* the agent was working and then came back to idle/done. Without that
|
||||
|
||||
Reference in new issue
Block a user