omp packages

@pixu1980/pi-sessions0.1.18

Session history overlay for pi.dev - browse, search, and restore past sessions with auto-naming based on chat content

pixu1980 Published 18 days ago MIT ~821 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

pi-sessions - browse and restore conversation history

pi-sessions

Session history overlay for pi.dev. Browse, search, and restore past sessions with auto-naming based on chat content.

Screenshot idea: A centered modal listing past sessions with auto-names, dates, message counts, and model info.

Features

  • ๐Ÿ“‹ Session browser - Centered modal, matching /mcp, shows all past sessions
  • ๐Ÿ“ Project overview - /projects groups sessions by project directory with aggregated metadata
  • ๐Ÿท๏ธ Auto-naming - Sessions are named from the first user message content
  • ๐Ÿ” Search/filter - Type to filter by name, model, or project path
  • โ†•๏ธ Keyboard navigation - โ†‘โ†“ arrows, Home/End, PageUp/PageDown
  • โช One-click restore - Select a session to load it with full context
  • ๐Ÿ“Š Session details - Date, message count, model used, provider
  • ๐Ÿ“ Folder first - Each session shows the project directory prominently
  • ๐Ÿ’ฌ Last message - Shows the last user message instead of just the first one

Install

pi install npm:@pixu1980/pi-sessions

Usage

Session list

/sessions

Shows all sessions in a flat list with folder, last message, and metadata.

Project overview (drill-down)

/projects

Shows sessions grouped by project directory with aggregated info:

  • Project path, latest message, session count, total messages, model used
  • Select a project โ†’ drill-down to individual sessions
  • Esc in drill-down returns to project list

Navigation

Key Action
โ†‘ / โ†“ Navigate
Enter Select session (flat) / Drill down (projects)
Type text Filter by project, message, model
Backspace Clear filter
Home / End Jump to first/last
PageUp / PageDown Scroll page
Esc Close overlay / Go back (projects drill-down)

Auto-naming

The extension automatically names each session from the first user message, truncated to 60 characters.

Each session entry shows:

  • ๐Ÿ“ Folder - Project directory path
  • ๐Ÿ’ฌ Last message - Last user message content (truncated)
  • ๐Ÿ“Š Metadata - Relative date, message count, model, provider

Project overview (/projects)

Groups sessions by project directory. Each project shows:

  • ๐Ÿ“ Project path - Project directory
  • ๐Ÿ’ฌ Latest message - Last user message from the most recent session
  • ๐Ÿ“Š Aggregated metadata - Session count, total messages, latest model

Select a project to drill down into its individual sessions.

How it works

  1. Opens a centered loading modal immediately
  2. Scans ~/.pi/agent/sessions/ asynchronously with bounded concurrency
  3. Parses each session to extract message previews, counts, model and provider
  4. Reuses the same modal for search and selection
  5. On selection, uses ctx.switchSession() to load the session

License

MIT

Author

Emiliano 'pixu1980' Pisu