03. Giving the Assistant Context
Paste and chips
A large paste should not flood the prompt. Matcha CLI folds it into a chip you can reopen.
Concept
Short pastes land as ordinary text. A paste that is four or more lines (two or more in compact mode) or larger than 10 KB becomes an atomic chip instead:
[Pasted: 12 lines]
[Pasted: 24 KB]
[Pasted: 1.0 MB]The label uses a line count for ordinary multi-line pastes and a decimal size (1000-based KB / MB) once the payload is large, even if it has many lines.
The full text is still in the prompt. The chip is a fold, not a discard. When you send, the assistant receives the complete paste.
Why this matters
Error logs, diffs, and JSON blobs are useful context and terrible draft text. A chip keeps the composer readable, lets you check what you pasted, and still sends every line.
Paste into the prompt when the content is already on the clipboard. Use @ when the content already lives in the repo.
How to paste
| Action | macOS | Linux | Windows |
|---|---|---|---|
| Paste from the clipboard | Cmd+V | Ctrl+V | Ctrl+V |
| Screenshot / “Copy Image” | Cmd+V | Ctrl+V | Alt+V (see Images) |
Many terminals also accept their own paste chord (Shift+Insert, right-click). Those arrive as bracketed paste and take the same chip path.
On Linux X11 / XWayland, Ctrl+V reads CLIPBOARD (explicit copy). An unmodified middle click reads PRIMARY (the current mouse selection) when DISPLAY is set. Over SSH, prefer the terminal’s Shift+Insert so the local terminal sends the text.
Reopen a chip
| Where the caret is | Enter | Paste the same text again | Double-click |
|---|---|---|---|
| On the chip | Expands to the raw text | Expands | Expands |
| Just after the chip (the usual spot after a paste) | Sends the prompt | Expands | Expands (the click moves onto the chip first) |
A preview of the pasted text appears while the caret is on the chip or right after it. The hint matches the table: enter when Enter would expand, paste again when Enter would send.
“Paste again” expands only when the new paste is byte-for-byte the same as the chip (after Matcha CLI normalizes bare \r line breaks the way some terminals send them). A different paste inserts a second chip. Moving away from the chip and pasting the same text also inserts a second chip.
Repeated and split pastes
Windows and some terminals can split one paste into several batches. Trailing newlines on a short paste stay in the buffer so those batches join correctly instead of losing a blank line.
Empty clipboard content is ignored.