@rakshazi/tab-title0.1.0
Show session state in the terminal title
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.
Reports 0
No reports yet.
Readme
tab-title: session state in the terminal title
Install with pi install npm:@rakshazi/tab-title.
The terminal title shows one glyph and the session name, so a row of tabs tells which agent is working, which one waits for you and which one is done.
<glyph> <session name>
The name is the Pi session name. A session without one shows the basename of the working directory.
States
| State | Glyph | When |
|---|---|---|
| idle | nf-md-sleep |
A fresh session, or a run the user aborted |
| working | a braille spinner, one frame every 80 ms | A run is active, or a compaction is in progress |
| blocked | nf-md-alert |
Pi is showing a prompt and waits for an answer |
| done | nf-md-check |
The last run ended normally |
| error | nf-md-close |
The last assistant message stopped on an error, or a compaction failed |
Blocked wins over working, and working wins over the resting states.
Requirements
A terminal font with the Nerd Font Material Design glyphs. Without one, the resting states show as missing-glyph boxes; the spinner is plain Unicode braille and works in any font.
Limits
- TUI sessions only. Print, JSON and RPC runs leave the title alone.
- After a session starts, the title is set again every 500 ms, 11 times (
SETTLE_MS,SETTLE_ATTEMPTS). - No configuration and no tests. The glyphs and timings are constants at the top of
index.ts.