For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/genui/a2ui/functions/normalizePayloadToMessages.md.
Lynx
  • English
  • Function: normalizePayloadToMessages()

    normalizePayloadToMessages(payload: unknown): ServerToClientMessage[]

    Normalize an arbitrary payload (string, array, object) into a flat list of ServerToClientMessage records. Pass-through for already-structured messages; falls back to wrapping plain text in a Text/Card surface.

    Parameters

    ParameterType
    payloadunknown

    Returns

    ServerToClientMessage[]

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.