← Catalog

pi-copy-reply

Copy any past assistant reply to the clipboard from Pi (/copy-reply two-pane picker, last, or Nth-newest)

Extension

Install

Install with PiG

pig install npm:pi-copy-reply

Install with Pi

pi install npm:pi-copy-reply
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./copy-reply.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.4.1 (README.md). PiG does not review it.

English · 简体中文

pi-copy-reply

Copy the final reply of any past turn to the system clipboard.

Pi's built-in Ctrl+X and /copy (Pi 1.4+) copy the last message, and /tree + Ctrl+X reaches any single message. What had no shortcut was a turn's final answer — the reply the agent hands back after its tool calls. This tiny extension adds a picker over recent turns; Enter copies the highlighted turn's final reply (mid-turn progress notes are skipped).

Usage

/copy-reply     open a picker (newest first): list pane + live preview of the
               highlighted turn; Enter copies its final reply
/copy-reply last  copy the final reply of the most recent turn
/copy-reply 3     copy the final reply of the 3rd-most-recent turn

Picker keys: ↑↓/PgUp/PgDn move · Enter copy · v full view (scrollable, keeps blank lines and indentation) · Esc cancel/back. Mouse: wheel moves (or scrolls in full view), click selects, double-click copies. Numbering is "1 = newest" everywhere — picker rows, /copy-reply N, and last all agree. On Pi versions without ctx.ui.custom() the picker falls back to a plain one-line list.

  • Copies raw Markdown (code fences, lists), not rendered screen text
  • Prefers Pi's native clipboard helper; falls back to wl-copy / xsel
  • Zero dependencies, zero configuration

Install

pi install npm:pi-copy-reply

Or try it once without installing:

pi -e git:github.com/codelllc09/pi-copy-reply

License

MIT — see LICENSE.