For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/genui/a2ui/functions/prepareMessagesForProcessing.md.
Lynx
  • 简体中文
  • 函数: prepareMessagesForProcessing()

    prepareMessagesForProcessing(rawMessages: ServerToClientMessage[], messageId: string, activeSurfaceIds: Set<string>): object

    为消息打上给定的 messageId 标记,并报告其中是否有消息携带了 非空的 updateComponents。同时会根据当前活跃的 surface 集合对 createSurface 消息去重。

    参数

    参数类型
    rawMessagesServerToClientMessage[]
    messageIdstring
    activeSurfaceIdsSet<string>

    返回

    object

    hasComponentUpdate

    hasComponentUpdate: boolean

    messages

    messages: ServerToClientMessage[]

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。