codebuddy-stats 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  一个用于分析 CodeBuddy 系列产品使用成本的命令行工具,支持交互式 TUI 界面和纯文本输出。
4
4
 
5
+ ![](./assets/README-1.jpg)
6
+
5
7
  ## 功能特性
6
8
 
7
9
  - **双数据源支持** - 同时支持 CodeBuddy Code 和 CodeBuddy IDE(VS Code 扩展)
@@ -68,7 +70,7 @@ cbs --help
68
70
  按项目分类的费用统计,方便了解不同项目的 AI 使用成本。
69
71
 
70
72
  工具会自动将项目标识解析为可读路径:
71
- - **Code 模式**: 将 `Users-anoti-Documents-project-xxx` 还原为 `~/Documents/project/xxx`
73
+ - **Code 模式**: 将 `Users-foo-Documents-project-xxx` 还原为 `~/Documents/project/xxx`
72
74
  - **IDE 模式**: 将 MD5 hash 映射为实际工作区路径
73
75
 
74
76
  ### Daily
package/dist/index.js CHANGED
@@ -146,7 +146,7 @@ function renderOverview(box, data, width, note) {
146
146
  content += '─'.repeat(summaryWidth) + '\n';
147
147
  if (width >= 80) {
148
148
  // 双列布局
149
- content += `{green-fg}Total cost:{/green-fg} ${formatCost(grandTotal.cost).padStart(12)} `;
149
+ content += `{green-fg}~Total cost:{/green-fg} ${formatCost(grandTotal.cost).padStart(12)} `;
150
150
  content += `{green-fg}Active days:{/green-fg} ${String(activeDays).padStart(8)}\n`;
151
151
  content += `{green-fg}Total tokens:{/green-fg} ${formatTokens(grandTotal.tokens).padStart(12)} `;
152
152
  content += `{green-fg}Total requests:{/green-fg} ${formatNumber(grandTotal.requests).padStart(8)}\n`;
@@ -155,7 +155,7 @@ function renderOverview(box, data, width, note) {
155
155
  }
156
156
  else {
157
157
  // 单列布局
158
- content += `{green-fg}Total cost:{/green-fg} ${formatCost(grandTotal.cost)}\n`;
158
+ content += `{green-fg}~Total cost:{/green-fg} ${formatCost(grandTotal.cost)}\n`;
159
159
  content += `{green-fg}Total tokens:{/green-fg} ${formatTokens(grandTotal.tokens)}\n`;
160
160
  content += `{green-fg}Total requests:{/green-fg} ${formatNumber(grandTotal.requests)}\n`;
161
161
  content += `{green-fg}Active days:{/green-fg} ${activeDays}\n`;
@@ -480,8 +480,8 @@ function pathExistsSync(p) {
480
480
  * 尝试将 CodeBuddy Code 的项目名(路径中 / 替换为 -)还原为真实路径
481
481
  * 使用回溯搜索,因为目录名本身可能包含 -
482
482
  *
483
- * 例如: "Users-anoti-Documents-project-codebudy-cost-analyzer"
484
- * -> "/Users/anoti/Documents/project/codebudy-cost-analyzer"
483
+ * 例如: "Users-foo-Documents-project-codebudy-cost-analyzer"
484
+ * -> "/Users/foo/Documents/project/codebudy-cost-analyzer"
485
485
  */
486
486
  function tryResolveCodePath(name) {
487
487
  // 检查缓存
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebuddy-stats",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "files": [