PastedTextAttachment

A chip for a large paste that was collapsed out of the composer. It looks like a file attachment, shows Pasted text #1 and the line count, opens a read-only preview on click and has a remove button when onRemove is set. InputBar does this automatically: pastes at or above pasteCollapseThreshold (10,000 characters or 50 lines by default, false to turn off) become a [Pasted text #N] placeholder plus this chip, and onSend receives the expanded text. Render the chip yourself only in a custom composer, together with the helpers shouldCollapsePaste, insertPastePlaceholder, expandPastedText, prunePastes, removePastePlaceholder and formatPasteLabel.

Getting Started
$pnpm add @sinups/ai-kit @mantine/core @mantine/hooks @tabler/icons-react
Examples
Chips
API reference
Prop
Type
Required
paste
PastedText
Yes
Collapsed paste
onRemove
() => void
No
Renders the remove button when set
labels
Partial<PastedTextAttachmentLabels>
No
Overrides of the default English labels