Delete and undo entries in your pi session tree.
pi install git:github.com/possibly/pi-tree-deleteOr try without installing:
pi -e git:github.com/possibly/pi-tree-deleteFor development, clone and use:
pi -e ./pi-tree-delete/index.tsType /treed to open the session tree navigator with delete support.
| Key | Action |
|---|---|
↑ / ↓ |
Navigate (same as /tree) |
← / → |
Page up/down |
d |
Splice highlighted entry (children reparented to its parent) |
ctrl+d |
Set/complete range mark — first press drops ▶ marker, second press splices all entries between marker and current position |
r |
Undo last deletion (per-session snapshot stack) |
Enter |
Navigate to highlighted entry |
Esc |
If marker is active, cancel it; otherwise exit |
Delete one entry:
- Navigate to an entry
- Press
d - Its children move up to become children of its parent
Delete a range:
- Navigate to start position, press
ctrl+d(marker drops:▶) - Navigate to end position, press
ctrl+dord(range deleted) - Children of deleted entries are reparented to the first surviving ancestor
Undo:
- Press
rto restore the last deletion - Undo stack is per-session and cleared when you exit
/treed
- Tree is read directly from the JSONL file on each iteration, so deletions/undos are reflected immediately
- Deletions splice entries (reparent children) rather than delete entire subtrees, preserving conversation history
- Labels on deleted entries are dropped; children of deleted entries are reparented to the nearest surviving ancestor
- Cursor automatically lands at position +1 after each deletion for smooth navigation
MIT