Expand description
Message queueing: follow-ups typed while a reply runs.
While a chat is busy, crate::ClientMsg::SendMessage appends to that chat’s queue in the
engine instead of being refused. When the running turn ends normally the engine starts the
first queued message as the next turn, and so on. A turn that is stopped or fails pauses the
queue (ChatQueue::paused); it stays, untouched, until a client resumes it
(crate::ClientMsg::ResumeQueue), sends one item now (crate::ClientMsg::SendQueuedNow)
or retries the failed reply. A turn waiting for an approval simply keeps the queue waiting.
The queue lives in the engine (so every client of the chat sees the same one, and it survives a closed window or tab) but only in memory: it is gone after an engine restart. Queued messages are not part of the transcript until they are sent.
Structs§
- Chat
Queue - The queue of the chat a client looks at (
chat: Nonefor a new chat: always empty). Sent aftercrate::ServerMsg::Transcriptand whenever it changes; replaces the client’s copy. - Queued
Message - A message waiting to be sent.
Enums§
- Queue
Pause - Why a queue stopped moving on.
Constants§
- MAX_
QUEUED - Most messages queued in one chat.
- MAX_
QUEUED_ TEXT_ BYTES - Most bytes of text in one queued message.
- MAX_
QUEUE_ BYTES - Most bytes of text in one chat’s whole queue.