ModelMessageEvent
Defined in: src/hooks/events.ts:524
Event triggered when the model completes a full message. Wraps the assembled message and stop reason after model streaming finishes.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ModelMessageEvent(data): ModelMessageEvent;Defined in: src/hooks/events.ts:531
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; message: Message; stopReason: StopReason; invocationState: InvocationState; } |
data.agent | LocalAgent |
data.message | Message |
data.stopReason | StopReason |
data.invocationState | InvocationState |
Returns
Section titled “Returns”ModelMessageEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”readonly type: "modelMessageEvent";Defined in: src/hooks/events.ts:525
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:526
message
Section titled “message”readonly message: Message;Defined in: src/hooks/events.ts:527
stopReason
Section titled “stopReason”readonly stopReason: StopReason;Defined in: src/hooks/events.ts:528
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:529
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<ModelMessageEvent, "type" | "message" | "stopReason">;Defined in: src/hooks/events.ts:543
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<ModelMessageEvent, "type" | "message" | "stopReason">