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.
Type Parameters
Section titled “Type Parameters”Message
Section titled “Message”Message
Snapshot
Section titled “Snapshot”Snapshot
Parameters
Section titled “Parameters”options
Section titled “options”BotMessageTargetOptions<Message, Snapshot>
Returns
Section titled “Returns”BotMessageTarget<Message, Snapshot>