a2uiRenderer
fun a2uiRenderer(catalog: A2uiCatalog = A2uiCatalog.Basic, catalogs: List<A2uiCatalog> = emptyList(), capacity: Int = 32, onAction: (A2uiAction) -> Unit): DataRenderer(source)
Renders the chat's A2UI parts (DataPart.A2UI, whatever transport brought them) natively. Register it with AiElementsRenderers(data = mapOf(DataPart.A2UI to a2uiRenderer { chat.send(it) })).
One A2UI session per part: when a part grows (the agent streams more messages) only the new ones are applied, so what the user typed stays; a part that is replaced by a different list starts over. Sessions live in the renderer, not in the composition, so a form keeps its input while it scrolls out of sight (the most recent capacity parts are kept). A part holding {"status": "building" | "retrying" | "failed"} (the AG-UI middleware's pre-paint lifecycle) shows as a placeholder.