DataPartView

@Composable
fun DataPartView(part: DataPart, modifier: Modifier = Modifier, renderers: Map<String, @Composable (DataPart) -> Unit> = emptyMap())(source)

Renders an agent-streamed data-* part. Built-in shapes:

  • data-plan {title, description?, streaming?, steps: [{label, status?}]} → Plan

  • data-task {title, items: [{label, status?, files?: [..]}]} → Task

  • data-chain-of-thought {title?, steps: [{label, description?, status?, badges?}]} → ChainOfThought

  • state (AG-UI STATE_SNAPSHOT / STATE_DELTA, already patched): its plan, task and chain-of-thought keys render as above, other keys as JSON

status is pending | active | complete. Names match case-insensitively (AG-UI ACTIVITY_* parts are named by their activityType). Anything else falls back to a JSON card; pass renderers to map your own part names.