Install
Install with PiG
pig install npm:@celljs/ta-usageInstall with Pi
pi install npm:@celljs/ta-usageReview before installing
Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"web": [
"./web/index.js"
],
"host": "./host/index.mjs",
"icon": "Gauge",
"sync": [
"metrics.daily"
],
"group": "tools",
"title": {
"en": "Usage",
"ja-JP": "使用量",
"zh-CN": "用量",
"zh-TW": "用量"
},
"summary": {
"en": "The Usage page under Discover: the tokens and the cost of your conversations by day, by model and by conversation, read from the conversations on this computer.",
"ja-JP": "「見つける」の「使用量」ページ:日別・モデル別・会話別のトークン数と費用を、このコンピューターの会話記録から集計します。",
"zh-CN": "\"用量\"页,在\"发现\"里:按天、按模型、按对话看 tokens 和花费,从这台电脑上的对话记录统计。",
"zh-TW": "「用量」頁,在「發現」裡:按天、按模型、按對話看 tokens 和花費,從這台電腦上的對話紀錄統計。"
},
"permissions": {
"host": {
"*": "chat.view",
"errors": "settings.manage",
"metrics": "settings.manage",
"running": "settings.manage",
"clearMetrics": "settings.manage",
"metricsStorage": "settings.manage",
"setMetricsSettings": "settings.manage"
}
},
"webActivation": "open"
}README
Written by the package's publisher, shown as published in version 4.35.0 (README.md). PiG does not review it.
Cell - Ta Usage
Ta 自带的 pi 包(默认开启,可在 Web 客户端的 设置 → 扩展 关闭):用量。
- "用量"页:在"发现"和快捷打开里(按需启动:点开才加载)。最近 7 天、30 天或 90 天的 tokens(输入、输出、缓存命中)和花费,每天一根柱子;按模型列出各自的 tokens、花费和调用次数;用得最多的对话列在最后,点一下就打开。
- 数据来自这台电脑上 Ta 的对话记录(
~/.ta/agent/sessions),由包的服务端读取,按文件的修改时间缓存,只读不写。花费是模型服务给出的价格,没有价格的模型只计 tokens。