UiTranscript

data class UiTranscript(val messages: List<UiMessage> = emptyList(), val run: RunState = RunState.Idle, val sharedState: JsonElement = JsonObject(emptyMap()), val steps: List<String> = emptyList())

Everything a renderer needs to draw one conversation, at one instant.

Immutable and replaced wholesale on every change rather than mutated. A Compose renderer recomposes on identity, and the parts that did not change keep their instances, so replacing the transcript costs a diff of the list rather than a redraw of it.

Constructors

Link copied to clipboard
constructor(messages: List<UiMessage> = emptyList(), run: RunState = RunState.Idle, sharedState: JsonElement = JsonObject(emptyMap()), steps: List<String> = emptyList())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sharedState: JsonElement

the agent's STATE_SNAPSHOT with every STATE_DELTA applied. Shared with the agent in both directions, which is why it is here and not inside a message.

Link copied to clipboard

the STEP_STARTED / STEP_FINISHED names still open, oldest first.