Lynx

Home > @lynx-js/genui-a2ui > prepareMessagesForProcessing

prepareMessagesForProcessing() function

Tag messages with the given messageId and report whether any of them carries a non-empty updateComponents. Also dedupes createSurface messages against the set of currently-active surfaces.

Signature:

export declare function prepareMessagesForProcessing(
  rawMessages: ServerToClientMessage[],
  messageId: string,
  activeSurfaceIds: Set<string>,
): {
  messages: ServerToClientMessage[];
  hasComponentUpdate: boolean;
};

Parameters

Parameter

Type

Description

rawMessages

ServerToClientMessage[]

messageId

string

activeSurfaceIds

Set<string>

Returns:

{ messages: ServerToClientMessage[]; hasComponentUpdate: boolean; }

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