omp packages

@jocax/session-replay0.1.1

Scrollable timeline overlay for reviewing session history — navigate messages with keyboard controls

jocax Published 4 days ago MIT ~156 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@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/