injectMessageMetadata(
stream: AnyStream,
messageId: string | Signal<string | undefined> | () => | Name | Type | Description |
|---|---|---|
stream* | AnyStream | |
messageId* | string | Signal<string | undefined> | () => string | undefined | undefined |
Read metadata recorded for a specific message id — today exposes
parentCheckpointId, the checkpoint the message was first seen on.
Designed for fork / edit flows:
readonly meta = injectMessageMetadata(this.stream, () => this.msg().id);
// meta()?.parentCheckpointId
messageId accepts a raw string, a Signal<string | undefined>,
or a plain getter — the binding re-evaluates whenever the id
changes.
Returns undefined when the id isn't known yet (e.g. the server
hasn't emitted parent_checkpoint for that message, or the message
arrived via messages-channel deltas only and no values snapshot
has landed for it yet).