codebuddy-stats 1.1.5 → 1.1.6
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/dist/index.js +5 -5
- package/dist/lib/workspace-resolver.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -26,9 +26,9 @@ function parseArgs() {
|
|
|
26
26
|
}
|
|
27
27
|
else if (args[i] === '--help' || args[i] === '-h') {
|
|
28
28
|
console.log(`
|
|
29
|
-
CodeBuddy
|
|
29
|
+
CodeBuddy Stats
|
|
30
30
|
|
|
31
|
-
Usage:
|
|
31
|
+
Usage: codebuddy-stats [options]
|
|
32
32
|
|
|
33
33
|
Options:
|
|
34
34
|
--days <n> 只显示最近 n 天的数据
|
|
@@ -323,7 +323,7 @@ function renderDaily(box, data, scrollOffset = 0, width, note) {
|
|
|
323
323
|
// 纯文本输出模式
|
|
324
324
|
function printTextReport(data) {
|
|
325
325
|
const { modelTotals, projectTotals, grandTotal, topModel, topProject, cacheHitRate, activeDays } = data;
|
|
326
|
-
console.log('\n🤖 CodeBuddy
|
|
326
|
+
console.log('\n🤖 CodeBuddy Stats Report');
|
|
327
327
|
console.log('='.repeat(50));
|
|
328
328
|
console.log(`\nTotal cost: ${formatCost(grandTotal.cost)}`);
|
|
329
329
|
console.log(`Total tokens: ${formatTokens(grandTotal.tokens)}`);
|
|
@@ -366,7 +366,7 @@ async function main() {
|
|
|
366
366
|
// 创建 TUI
|
|
367
367
|
const screen = blessed.screen({
|
|
368
368
|
smartCSR: true,
|
|
369
|
-
title: 'CodeBuddy
|
|
369
|
+
title: 'CodeBuddy Stats',
|
|
370
370
|
forceUnicode: true,
|
|
371
371
|
fullUnicode: true,
|
|
372
372
|
});
|
|
@@ -424,7 +424,7 @@ async function main() {
|
|
|
424
424
|
screen.append(statusBar);
|
|
425
425
|
// 更新 Tab 栏
|
|
426
426
|
function updateTabBar() {
|
|
427
|
-
let content = '
|
|
427
|
+
let content = ' CodeBuddy Stats ';
|
|
428
428
|
content += '{gray-fg}Source:{/gray-fg} ';
|
|
429
429
|
if (currentSource === 'code') {
|
|
430
430
|
content += '{black-fg}{green-bg} Code {/green-bg}{/black-fg} ';
|
|
@@ -480,8 +480,8 @@ function pathExistsSync(p) {
|
|
|
480
480
|
* 尝试将 CodeBuddy Code 的项目名(路径中 / 替换为 -)还原为真实路径
|
|
481
481
|
* 使用回溯搜索,因为目录名本身可能包含 -
|
|
482
482
|
*
|
|
483
|
-
* 例如: "Users-foo-Documents-project-
|
|
484
|
-
* -> "/Users/foo/Documents/project/
|
|
483
|
+
* 例如: "Users-foo-Documents-project-codebuddy-stats"
|
|
484
|
+
* -> "/Users/foo/Documents/project/codebuddy-stats"
|
|
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.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"author": "AnotiaWang",
|
|
38
38
|
"license": "ISC",
|
|
39
39
|
"packageManager": "pnpm@9.15.1",
|
|
40
|
-
"description": "CodeBuddy AI
|
|
40
|
+
"description": "CodeBuddy AI usage statistics with terminal UI",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"blessed": "^0.1.81"
|
|
43
43
|
},
|