renderParts

fun Message.renderParts(separator: String = ""): String

Renders a message's parts as a single human-readable line.

Unlike Message.textContent, which only concatenates text parts, this also renders tool calls and tool results, so a rendered trace does not silently lose the tool interactions that make up most of an agent conversation.