Install
Install with PiG
pig install npm:@jocax/session-replayInstall with Pi
pi install npm:@jocax/session-replayPackages 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": [
"./dist/index.js"
]
}README
Written by the package's publisher, shown as published in version 0.1.1 (README.md). PiG does not review it.
@jocax/session-replay
Scrollable timeline overlay for reviewing session history — navigate your conversation with keyboard controls.
What
Session Replay adds a /replay command that opens an overlay dialog showing the current session's full message history as a scrollable timeline. Each entry shows:
- 👤 User Prompts (green) — All messages you sent
- 🤖 Assistant Messages (cyan) — All AI responses
- 🛠️ Tool Results (yellow) — Tool calls with their results
Navigate with arrow keys, expand entries with Enter to see full Markdown content, and close with Escape.
Why
Long pi sessions generate dozens of messages. Scrolling back through the terminal to find a specific exchange is tedious. Session Replay gives you a clean, organized timeline with timestamps and elapsed times — perfect for reviewing what happened, finding a specific message, or auditing a session.
Install
Install the package from npm:
{
"source": "npm:@jocax/session-replay"
}
Usage
Type /replay at any time during a session to open the timeline overlay.
Keyboard Shortcuts
| Key | Action |
|---|---|
| ↑ | Move selection up |
| ↓ | Move selection down |
| Enter | Expand/collapse selected entry (shows full Markdown) |
| Esc | Close the overlay |
Features
- Color-coded entries — Instantly distinguish user prompts, assistant responses, and tool results
- Timestamps — Each entry shows HH:MM:SS time and elapsed time since the previous entry
- Markdown rendering — Expanded entries render full Markdown including code blocks, lists, and formatting
- Scroll management — Large sessions are scrollable; selection automatically stays visible
- Overlay UI — Centered dialog at 80% width, doesn't disrupt your workspace
Examples
Run the standalone demo (no install required):
pi -e software/packages/session-replay/examples/basic.ts
Then type /replay to see your session history.
Run the demo
just demo session-replay
A herdr workspace opens with pi, this extension and a disposable copy of the
small-app sandbox. The agent lists the files, reads each one and runs the
tests, which fills the session with entries. Then:
| Step | Do this | Watch |
|---|---|---|
| 1 | Wait for the first turn to finish | The agent's reads and its npm test run are now session history |
| 2 | Type /replay | A centered overlay at 80% width lists every entry: 👤 user, 🤖 assistant, 🛠️ tool, each with [HH:MM:SS] and the time since the previous entry |
| 3 | Press ↑ / ↓ | The selection moves; long timelines scroll |
| 4 | Press Enter | The selected entry expands and renders its full Markdown |
| 5 | Press Esc | The overlay closes; the session is untouched |
/replay reads the running session, not a file, so the timeline is exactly what
this demo produced. Send the follow-up prompt the demo suggests and reopen it to
see the new entries.
Needs herdr 0.9.3 or newer and one reachable model provider — see demo-kit.
Development
# Type-check
npx tsc --noEmit --skipLibCheck -p software/packages/session-replay/tsconfig.json
# Run tests
npx vitest run software/packages/session-replay/tests/