Click Replay to stream the turn again
One turn: reasoning, tool calls, answer, footer
A user bubble and an assistant reply that renders reasoning, tool calls and Markdown in the order the model wrote them.
Replay streams one turn. The answer fades in as Markdown with a copy button on code. When the turn ends a footer shows copy, feedback, model, tokens and time. Stop ends the turn early and shows a notice.
Options for the assembled component.
message*AssistantMessageContent blocks, stop reason, model, usage and duration.
index*TranscriptIndexTool results and live slots keyed by tool call id.
streaming*booleanTrue for the partial message that is still being written.
_pi-ui/messages/user-message.tsxRight-aligned bubble for text and image attachments. Long text is clamped.
_pi-ui/messages/assistant-message.tsxWalks the content blocks in order and groups neighbouring tool calls into one list.
_pi-ui/blocks/text-block.tsxStreaming Markdown. Raw HTML and remote images are dropped.
_pi-ui/blocks/thinking-block.tsxThe reasoning row, see the Reasoning example.
_pi-ui/blocks/tool-steps.tsxThe tool rows, see the Tool Steps example.
_pi-ui/messages/message-actions.tsxCopy, good response and bad response.
_pi-ui/ai-message-bubble.cssEvery color, size and gap of a reply as tokens on one class.
Ported from the agent-builder Pi chat components.
Click Replay to stream the turn again
Why does the queue strip flicker when a reply finishes?
One turn: reasoning, tool calls, answer, footer