TurnSummary

Close a turn with one muted line: how long the agent worked, tokens used (against a budget when tokenBudget is set) and how many background tasks are still running. While background tasks run, the clock icon becomes a small loader. Labels are functions, so you can change wording and pluralization. MessageList renders it automatically for a { type: "turn-summary", durationMs, tokens?, tokenBudget?, backgroundTasks? } part. The line does not wrap, so keep labels short in narrow widgets. Related helper: getTurnSummarySegments, which returns the text segments if you build your own layout.

Getting Started
$pnpm add @sinups/ai-kit @mantine/core @mantine/hooks @tabler/icons-react
Examples
Variants
API reference
Prop
Type
Required
labels
Partial<TurnSummaryLabels>
No
Overrides of the default English labels
className
string
No
Class name added to the root element
style
React.CSSProperties
No
Inline styles added to the root element
durationMs
number
Yes
Time the turn took in ms
tokens
number
No
Tokens used by the turn
tokenBudget
number
No
Token budget of the turn or session
backgroundTasks
number
No
Background tasks still running after the turn ended