MCPcopy Index your code
hub / github.com/HazAT/pi-smart-sessions

github.com/HazAT/pi-smart-sessions @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1 symbols 3 edges 1 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

pi-smart-sessions

npm version

A Pi extension that automatically names your sessions with AI-generated summaries. No more scrolling through a wall of skill tags in your session list.

Before

Every skill session looks the same — impossible to tell them apart:

Before — all sessions show raw skill tags

After

Each session gets a short, meaningful name:

After — sessions have AI-generated summaries

The name is a skill prefix plus a 5–10 word summary of your prompt:

Session name close-up

How it works

  1. Detects when you start a session with /skill:name your prompt here
  2. Immediately sets a temporary name with the first 60 characters
  3. Calls a cheap model (Codex mini → Haiku → current model) to summarize your prompt in 5–10 words
  4. Updates the session name with the AI summary, prefixed by the skill name

The summarization happens in the background — no delay to your workflow. If the model call fails, the truncated name is kept as a fallback.

Install

pi install npm:pi-smart-sessions

Or try it without installing:

pi -e npm:pi-smart-sessions

You can also install from git:

pi install git:github.com/HazAT/pi-smart-sessions

Tips

  • Existing sessions can be renamed manually with Ctrl+R in the session selector
  • The extension only names the first skill-based prompt per session — it won't overwrite names you set yourself
  • Works with any skill, not just brainstorm

License

MIT

Core symbols most depended-on inside this repo

pickCheapModel
called by 1
extensions/smart-sessions.ts

Shape

Function 1

Languages

TypeScript100%

Modules by API surface

extensions/smart-sessions.ts1 symbols

For agents

$ claude mcp add pi-smart-sessions \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact