AIMessageParts
The steps an AI agent took while replying, in order. Show it before the reply's text.
AIMessageParts(parts = parts)Each step shows through AIMessagePartItem: reasoning, tool calls, and a neutral placeholder for kinds this SDK doesn't know. With an AIToolApprover, a call waiting for this person's approval shows its question under it, and with its AIToolAuthorizer, a call waiting for them to sign in shows the sign-in, through ChatAiComponentFactory.AIToolAuthorizationContent. To show some steps your own way, such as reasoning you stream separately or a kind of your own, use the overload that takes content and fall back to AIMessagePartItem for the rest.
Parameters
The reply's steps, from AIMessagePart.parts.
The modifier to apply to the list.
Who answers calls' questions on this device, to ask them.
The style of the steps.
The palette of reasoning steps.
The palette of tool calls and of the placeholder for unknown steps.
The palette of calls' questions and sign-ins.
The steps an AI agent took while replying, in order, each shown by content.
AIMessageParts(parts = parts) { part ->
val reasoning = part.reasoning
if (reasoning != null) {
StreamingReasoning(part = reasoning, text = liveText[reasoning.id])
} else {
AIMessagePartItem(part = part)
}
}Parameters
The reply's steps, from AIMessagePart.parts.
The modifier to apply to the list.
Shows one step. Steps are keyed by their ID, so a step keeps its state as the reply updates.