pi-session-name-editor

Pi extension that shows a context-aware label in the editor border and a custom footer with token stats

Package details

extension

Install pi-session-name-editor from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-session-name-editor
Package
pi-session-name-editor
Version
1.0.0
Published
Apr 30, 2026
Downloads
not available
Author
ruliana
License
MIT
Types
extension
Size
10.8 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-session-name-editor

A pi extension that replaces the default editor border and footer with context-aware versions.

Editor Label

Displays a label in the top-right corner of the editor border, resolved in priority order:

  1. Session name — if set via pi.setSessionName()
  2. Git branch — if inside a repo and not on main/master
  3. Folder name — current working directory basename

Custom Footer

Replaces the default footer. Shows the same token stats, cost, context usage, and model info — but removes the session name from the path line (since it's already visible in the editor label).

Footer layout:

~/path/to/project (branch)
↑12.3k ↓4.5k R100k W8.2k $0.042  model-id • thinking-level
  • Token counts: input (↑), output (↓), cache read (R), cache write (W)
  • Cost with subscription indicator when applicable
  • Context usage as percentage with color coding (>70% warning, >90% error)

Installation

Copy or symlink the folder into your pi extensions directory:

# symlink
ln -s /path/to/session-name-editor ~/.pi/agent/extensions/session-name-editor

# or copy
cp -r /path/to/session-name-editor ~/.pi/agent/extensions/

Pi auto-discovers extensions in ~/.pi/agent/extensions/ via the pi.extensions field in package.json.

Usage

No configuration needed — the extension activates automatically on session start. The editor label updates when the git branch changes or a session name is set.

License

MIT