pi-session-name-border

Show the current Pi session name on the prompt editor border.

Packages

Package details

extension

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

$ pi install npm:pi-session-name-border
Package
pi-session-name-border
Version
0.2.2
Published
May 11, 2026
Downloads
15/mo · 2/wk
Author
rxreyn3
License
MIT
Types
extension
Size
10.1 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-border

Show the current Pi session name on the prompt editor's horizontal border.

This is especially useful with pi-session-auto-rename, which automatically calls pi.setSessionName(...) after the first prompt. This extension reads that same public session name with pi.getSessionName() and displays it on the editor border:

──────────────────────────── Refactor Auth Module
<editor input area>
──────────────────────────────────────────────────

No Pi core/source changes are required.

Features

  • Displays the current session name on Pi's prompt editor border instead of in the bottom footer.
  • Works with names generated by pi-session-auto-rename or any extension that calls pi.setSessionName(...).
  • Refreshes from Pi lifecycle events or /session-name-status refresh; no periodic polling loop or slash-command guessing is used.
  • Includes /session-name-status to hide, show, toggle, or force refresh the border label.

Install

Local development install

From the parent directory containing this package:

pi install ./pi-session-name-border

Or run Pi with the extension for only the current invocation:

pi -e ./pi-session-name-border

GitHub install

pi install git:github.com/rxreyn3/pi-session-name-border

You can also pin a tag or branch:

pi install git:github.com/rxreyn3/pi-session-name-border@v0.2.2

npm install

pi install npm:pi-session-name-border

Pairing with pi-session-auto-rename

Install both packages:

pi install npm:pi-session-auto-rename
pi install npm:pi-session-name-border

Then start a new Pi session and send a prompt. Once pi-session-auto-rename generates a title during normal message flow, this extension will show it on the editor border.

Pi does not currently expose a dedicated session-name-changed event to extensions, so this extension refreshes from lifecycle events. If another extension changes the session name outside normal message flow, run /session-name-status refresh to force the border label to update.

Command

/session-name-status [on|off|toggle|refresh]

Examples:

/session-name-status off
/session-name-status on
/session-name-status refresh

With no argument, the command toggles visibility.

Notes

This extension uses Pi's public ctx.ui.setEditorComponent(...) API. Like other custom-editor extensions, it may conflict with extensions that also replace the editor component; whichever extension sets the editor last wins. If the label disappears after enabling another custom-editor extension, reinstall/reorder this extension or disable the other editor replacement.

Visibility changes from /session-name-status off, on, or toggle persist for the current Pi process only.

Publishing checklist

To make this available to other users and eligible for discovery on https://pi.dev/packages:

  1. Ensure package.json includes the pi-package keyword and a pi.extensions manifest.

  2. Commit the package to git.

  3. Create/push the public GitHub repository at github.com/rxreyn3/pi-session-name-border.

  4. Verify GitHub install:

    pi install git:github.com/rxreyn3/pi-session-name-border
    
  5. Publish to npm:

    npm pack --dry-run
    npm publish --access public
    
  6. Verify npm install:

    pi install npm:pi-session-name-border
    

The Pi package gallery displays packages tagged with pi-package; publishing publicly via npm is the best path for broad package-gallery discoverability.

License

MIT