KQ-756 · CONTEXT/CHIPS
Context Chips
What the model can see, as a strip of chips at the head of a composer: one per context item with a glyph for its kind, its name and its size. An added chip slides in from eight pixels on snap — one crisp overshoot, a chip landing — and a removed one leaves on the exit ease while the row beneath is measured, so the strip's height glides on glide to the rows it needs with nothing reserved. Hovering or focusing a chip rises a preview of the first lines on snap; Enter or Space pins it and Escape closes it. With a budget, a hairline bar fills by the total's share on glide and turns warn past 80 percent, and a status line announces each arrival and removal on settle.
Pull the sync fix notes together for the crews.
Fernworks Model 3
Add the plan, the release notes and the retry code, and I will write the crew note from those.
Nothing in context yet
Empty · add context
Install
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/context-chips
Props
- items
- ContextItem[]
- default —
- { id, kind, name, size, preview } — kind is file, page or selection; size in bytes; preview is the first lines of the content.
- budget
- number
- default —
- Bytes the model can take; prints the budget line and the bar when set.
- onRemove
- (id: string) => void
- default —
- Fires from a chip's remove button.
- onPreview
- (id: string | null) => void
- default —
- Fires when a preview opens or closes, with the item's id or null.
- format
- (bytes: number) => string
- default formatSize
- Formats every size; the default prints B, KB or MB.
- label
- string
- default —
- Names the strip as a group.
| Prop | Type | Default | Description |
|---|---|---|---|
| items | ContextItem[] | — | { id, kind, name, size, preview } — kind is file, page or selection; size in bytes; preview is the first lines of the content. |
| budget | number | — | Bytes the model can take; prints the budget line and the bar when set. |
| onRemove | (id: string) => void | — | Fires from a chip's remove button. |
| onPreview | (id: string | null) => void | — | Fires when a preview opens or closes, with the item's id or null. |
| format | (bytes: number) => string | formatSize | Formats every size; the default prints B, KB or MB. |
| label | string | — | Names the strip as a group. |