@matheusbbarni/pi-copy-button
v0.1.2
Published
A Pi extension that adds a copy button to each message and copies the text as shown.
Maintainers
Readme
@matheusbbarni/pi-copy-button
Copy any Pi message as it appears in the terminal.
Every user message, assistant reply, tool box, and bash result gets a ⧉ control in the top-right. Click it to copy the visible text: rendered markdown, checkmarks, collapsed previews — not the raw session payload.
$ rtk git commit --no-verify -m "test: add failing parseFollows" ⧉
✓ okFeatures
- Adds a copy control to user, assistant, tool, custom, and bash messages
- Copies the rendered TUI text, including collapsed tool previews
- Click-to-copy in the fullscreen TUI; Cmd/Ctrl-click in the inline TUI
/copy-textand/copy-text pickwhen you would rather use the keyboard
Install
pi install npm:@matheusbbarni/pi-copy-buttonFrom this repo:
pi -e ./pi-copy-buttonOr as a local package:
pi install ./pi-copy-button[!TIP] If Pi is already open, run
/reload.
Usage
| Action | Result |
| --- | --- |
| Click ⧉ in fullscreen | Copy that message as shown |
| Cmd-click / Ctrl-click ⧉ inline | Same, via OSC 8 |
| /copy-text | Copy the last shown message |
| /copy-text pick | Choose from recent messages |
[!NOTE] Built-in
/copyandCtrl+Xstill copy the last assistant message's source text. This package copies whatever is currently on screen.Collapsed tool output copies the preview. Expand it first if you want the full dump.
Development
npm install
npm test
npm run typecheck