Member Junction
    Preparing search index...

    Event data for message lifecycle callbacks.

    type MessageLifecycleEvent = {
        message: AgentChatMessage;
        messageIndex: number;
        reason: string;
        tokensSaved?: number;
        turn: number;
        type: MessageLifecycleEventType;
    }
    Index

    Properties

    The message that was affected

    messageIndex: number

    Index of the message in the conversation array

    reason: string

    Human-readable reason for the event

    tokensSaved?: number

    Number of tokens saved (for compaction events)

    turn: number

    Turn number when the event occurred

    Type of lifecycle event