@heykb/pi-tree-time
v0.1.0
Published
Show a timestamp on every row of pi's built-in session tree view
Maintainers
Readme
@heykb/pi-tree-time
Show a timestamp on every row of pi's built-in session tree view — not just labeled entries.
Open /tree like you always do. Every entry now carries the time it happened:

Install
pi install npm:@heykb/pi-tree-timeRestart pi. That's it — no new commands, no keybindings to learn.
Why
pi's session tree already shows timestamps for labeled entries (press shift+t), but unlabeled rows — most of your actual work — show nothing. When you resume a session from yesterday and ask "what did I do at 3pm?", you're blind.
This extension fixes that by decorating every row with its entry time, using pi's own timestamp formatting:
- today →
HH:mm - this year →
M/D HH:mm - older →
YY/M/D HH:mm
How it works
~40 lines, zero dependencies. It reaches the internal TreeList prototype behind TreeSelectorComponent (via its public getTreeList()) and wraps getEntryDisplayText, prefixing each row with the entry's timestamp.
It's a monkey-patch over internals, so:
- If pi upgrades and renames things, the patch silently no-ops — your tree view just goes back to normal. Nothing crashes.
- Tested against pi
0.84.x.
Compatibility notes
- The tree's incremental search also matches the time prefix, so typing digits can match times. Harmless in practice.
- Timestamps render in ANSI gray, independent of your theme.
License
MIT
