Skip to content

makeBotMessageTarget

makeBotMessageTarget<Message, Snapshot>(options): BotMessageTarget<Message, Snapshot>

Defined in: packages/core/src/message/target.ts:127

Creates the shared lifecycle for a platform message target.

Renderers can commit faster than a chat platform accepts edits, so the target keeps only the newest snapshot and drains it after the in-flight request. This gives last-write-wins semantics without overlapping requests.

The send lifecycle is the explicit idle -> sending -> idle machine from state-machine/index.ts. lastSent is only advanced after a successful send, so a failed edit can be retried by queuing the same snapshot again.

Message

Snapshot

BotMessageTargetOptions<Message, Snapshot>

BotMessageTarget<Message, Snapshot>