KQ-814 · SUMMARY/FOLD
Summary Fold
A block of older messages that folds into a summary card. The block and the summary share one grid cell and are each measured by their own ResizeObserver, so the frame animates its height on glide between the two measurements while the leaving face fades on the exit ease and the arriving face fades in on a fast tween, a surface shrinking onto its summary rather than a swap. Two hairline sheets under the card say that messages sit beneath it; the fold control is a disclosure button that names what it will do, and Enter or Space toggles it.
Summarised by Fernworks Model 3
6 messagesDuplicate charge of 84.00 on 3 Mar confirmed; refund raised to the Coldbrook Bank card ending 2210; three to five days.
Folded · 6 messages in the summary
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/summary-fold
Props
- messages
- FoldMessage[]
- default —
- The older block oldest first: id, role of user or assistant, and text.
- summary
- string
- default —
- The summary text the host produced for the block.
- folded / defaultFolded
- boolean
- default true
- Controlled or initial folded state.
- onFoldedChange
- (folded: boolean) => void
- default —
- Fires from the fold control with the state it asks for.
- assistantName
- string
- default "Assistant"
- Name printed on assistant rows and on the summary card's heading line; invented names only.
- label
- string
- default —
- Names the region for assistive technology.
| Prop | Type | Default | Description |
|---|---|---|---|
| messages | FoldMessage[] | — | The older block oldest first: id, role of user or assistant, and text. |
| summary | string | — | The summary text the host produced for the block. |
| folded / defaultFolded | boolean | true | Controlled or initial folded state. |
| onFoldedChange | (folded: boolean) => void | — | Fires from the fold control with the state it asks for. |
| assistantName | string | "Assistant" | Name printed on assistant rows and on the summary card's heading line; invented names only. |
| label | string | — | Names the region for assistive technology. |