@urizafrir/pi-reader
v0.1.0
Published
Browse files pi has read during the session.
Maintainers
Readme
pi-reader
Browse files pi has read during the session.
The extension tracks every file the assistant reads via the read tool and lets you
review them in a split-pane TUI viewer (file list on the left, content on the right),
wrapped in a border.
Usage
Run the command in an interactive session:
/readerup/down(ork/j) — navigate the file listPgUp/PgDn— page through the list or contentleft/right(orh/l) — switch focus between the file list and content panesCtrl+←/Ctrl+→— resize the splitEnter— send the selected file back into the conversationEsc— close
Pass a path to also track a specific file before opening:
/reader path/to/file.tsHow it works
- On
tool_callforread, the file path is recorded in an in-memory map and appended to the session as areader-fileentry, so it survives/reloadand session restore. - On
session_start, the tracked set is rebuilt from the session branch (bothreader-filecustom entries and historicalreadtool calls).
Layout
pi-reader/
├── index.ts # thin entry: re-exports src/index.ts (for auto-discovery)
├── package.json # extension metadata + dev deps for typechecking
├── tsconfig.json
└── src/
├── index.ts # event hooks + /reader command
├── state.ts # tracked-file map + session rebuild
└── viewer.ts # BorderFrame + FileViewer split-pane componentDevelopment
Typecheck against the installed pi packages:
npm install --ignore-scripts
npm run typecheck