AAI SDK
    Preparing search index...

    Type Alias ChatMessage

    A chat message exchanged between user and assistant.

    role is "user" | "assistant" only — unlike the SDK's Message, there is no "tool" role here. Tool activity never arrives as messages: it is surfaced via SessionSnapshot.toolCalls (or useEvent for ctx.send events).

    type ChatMessage = {
        content: string;
        id: number;
        role: "user" | "assistant";
    }
    Index
    content: string

    The text content of the message.

    id: number

    Monotonically increasing, session-unique message id assigned at append time. Stable across snapshot updates and window slides — use it as a render key.

    role: "user" | "assistant"

    The sender of the message.