TextPart

data class TextPart(val id: String, val text: String, val messageId: String, val streaming: Boolean = false) : UiPart

Assistant or user prose.

Constructors

Link copied to clipboard
constructor(id: String, text: String, messageId: String, streaming: Boolean = false)

Properties

Link copied to clipboard
open override val id: String

Stable across the whole life of the part, including while it streams.

Link copied to clipboard

the protocol message id this run of text was streamed under. Kept because a single UiMessage can hold several text runs -- an agent that speaks, calls a tool, then speaks again emits two text messages with two ids -- and a renderer or a resend needs to know which is which.

Link copied to clipboard

true between TEXT_MESSAGE_START and TEXT_MESSAGE_END. A renderer shows a caret while it is set.

Link copied to clipboard