AIAssistantMessage

fun AIAssistantMessage(text: String, modifier: Modifier = Modifier, isGenerating: Boolean = false, parts: List<AIMessagePart> = emptyList(), attachments: List<AIMessageAttachment> = emptyList(), approver: AIToolApprover? = null, reasoningText: (AIReasoningPart) -> String? = { null })

A reply from the agent: the steps it took, then its answer, written out as it arrives, and then its attachments, across the whole width.

AIAssistantMessage(text = reply.text, isGenerating = reply.isGenerating, parts = reply.parts)

Reasoning shows with StreamingReasoning, open while the model thinks, and other steps with AIMessagePartItem, which asks this person about a tool call that waits for their approval. The answer shows with StreamingText. Each attachment shows through ChatAiComponentFactory.AIConversationAttachment, which renders AIMessageAttachmentItem by default.

Parameters

text

The answer, in Markdown.

modifier

The modifier to apply to the reply.

isGenerating

Whether the agent is still writing it.

parts

The steps the agent took, in order.

attachments

What the agent sent with it, such as images and files.

approver

Who answers tool calls' questions and sign-ins on this device, to ask them.

reasoningText

The whole of a reasoning step's thinking, when the app has it. Without it, the step shows its own excerpt.