@liuchen64/pi-footer-status
Pi 扩展 - Footer 状态栏,显示 token 用量、速率、缓存命中率、上下文比例
Package details
Install @liuchen64/pi-footer-status from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@liuchen64/pi-footer-status- Package
@liuchen64/pi-footer-status- Version
0.8.0- Published
- Aug 27, 2026
- Downloads
- 1,397/mo · 859/wk
- Author
- liuchen64
- License
- MIT
- Types
- extension
- Size
- 72.8 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@liuchen64/pi-footer-status
Pi Footer 状态栏扩展,在终端底部显示实时 token 用量信息。
显示内容
| 指标 | 说明 | 示例 |
|---|---|---|
| 输入 tok | 当前会话累计输入 token 数 | ↓12.5k |
| 输出 tok | 当前会话累计输出 token 数 | ↑3.2k |
| tok/s 速率 | 实时输出速率(流式更新) | ⚡45.2t/s |
| 缓存命中率 | prompt cache 命中比例 | 缓存65% |
| 上下文比例 | 已使用上下文窗口比例 | 上下文32% |
安装
pi install ./packages/footer-status
效果预览
↓12.5k | ↑3.2k | ⚡45.2t/s | 缓存65% | 上下文32%
实时更新
- ⚡ 标记:表示当前正在流式输出,速率实时更新
- 通过监听
message_update事件实现 - 每个 token 到达时都会更新显示
颜色说明
- 输入 token:蓝色 (accent)
- 输出 token:绿色 (success)
- 速率:黄色 (warning)
- 缓存/低上下文:灰色 (dim)
- 高上下文 (>50%):黄色警告
- 超高上下文 (>80%):红色错误