Skip to main content

Module buffer

Module buffer 

Source

Structs§

FormattedInterjection
A drained entry, wrapped and ready to emit as a synthetic user message.
PendingInterjection
A buffered mid-turn interjection awaiting the next safe drain point. Attachment is host-defined (inline images, asset IDs); core never reads it.

Functions§

drain_formatted
Drain buffer, framing each entry as a synthetic user message (FIFO, one message per entry, never merged). sanitize_text runs on the raw text first (hosts strip artifacts like image placeholder paths; pass std::convert::identity if none).

Type Aliases§

InterjectionBuffer
A queue of pending interjections — just an EventQueue of PendingInterjection. Use drain_formatted to drain + frame them as synthetic user messages.