A2UIProps
Props for the all-in-one A2UI ReactLynx renderer.
属性
catalogs
Components the renderer is allowed to instantiate. Each item is either
a bare component (name read from displayName ?? name) or a tuple
[component, manifest] where the manifest is the JSON the extractor
emits at dist/catalog/<Name>/catalog.json.
定义于
@lynx-js/genui/a2ui/src/react/A2UI.tsx:57
className?
Optional class name applied to the top-level surface-${surfaceId}
view for the active surface. Use this when theme switching is
expressed as surface-level classes.
定义于
@lynx-js/genui/a2ui/src/react/A2UI.tsx:70
messageStore
The raw-message buffer the developer pushes protocol messages into.
<A2UI> subscribes via useSyncExternalStore and processes new
messages incrementally.
The internal MessageProcessor (surfaces, signals, resources) is
created once per mount and is not reset if messageStore is
later replaced with a different instance. Pass a key prop derived
from the store's identity if you want a fresh session, e.g.
<A2UI key={turnId} messageStore={turnStore} ... />.
定义于
@lynx-js/genui/a2ui/src/react/A2UI.tsx:50
onAction()?
Called when a user action fires inside the rendered tree (button
tap, etc.). Forward to your agent and push the response messages
back into the same messageStore to update the UI. Fire-and-forget;
the renderer never awaits this.
参数
返回
void
定义于
@lynx-js/genui/a2ui/src/react/A2UI.tsx:64
renderEmpty()?
Render before the first beginRendering arrives from the buffer.
返回
ReactNode
定义于
@lynx-js/genui/a2ui/src/react/A2UI.tsx:80
renderError()?
Render when the active resource fails.