diff options
| author | user <user@clank> | 2026-08-12 16:28:43 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-12 19:34:35 +0200 |
| commit | 402c20c344435ff0dbd736f654601d1ad53de954 (patch) | |
| tree | a136d0ab205c865c7a2c0f4cff88a27c2b4307a6 /cli/src | |
| parent | add answer-picker: clickable preset answers in the pane frame (OSC 5577) (diff) | |
| download | sl0ppi-402c20c344435ff0dbd736f654601d1ad53de954.tar.gz sl0ppi-402c20c344435ff0dbd736f654601d1ad53de954.tar.xz sl0ppi-402c20c344435ff0dbd736f654601d1ad53de954.zip | |
add pir: fuzzy-find and resume pi sessions for the current dir
`pi -c` blindly grabs the newest session, and the alternative is digging
through ~/.pi/agent/sessions/--home-user-dev-foo--/ for a UUID by hand.
This lists every session for the cwd in an fzf picker with a live transcript
preview and execs `pi --session <file>` on the pick.
pir pick a session for this dir
pir -a pick across every project dir
pir <query...> start fzf with an initial query
pir -g TEXT only sessions whose full transcript contains TEXT
The -g pass exists because the fzf query matches the list line -- title and
id -- not deep history, so "the session where I fixed the mouse bug" is
unfindable without it. It shells out to rg when available and falls back to
grep.
In the picker: enter resumes, ctrl-f forks instead (execs --fork, leaving the
original untouched), ctrl-o prints the path and exits without launching,
ctrl-a toggles current-dir vs all-dirs, ctrl-s toggles recent vs longest.
The toggles are fzf --bind=reload of this same script, which is what --list
and --preview are for -- they are internal modes invoked by fzf, not user
entry points.
Session directory resolution mirrors pi's own getDefaultSessionDirPath()
encoding, and honours PI_APP_NAME / <APP>_CODING_AGENT_DIR, so a renamed or
relocated agent dir still resolves. Forked sessions are detected from the
header's parentSession and marked in the list.
Requires fzf; checked up front with a clear error rather than failing inside
a pipeline.
Diffstat (limited to 'cli/src')
0 files changed, 0 insertions, 0 deletions
