aihezu 2.8.6 → 2.8.7

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.
Files changed (2) hide show
  1. package/commands/usage.js +7 -11
  2. package/package.json +1 -1
package/commands/usage.js CHANGED
@@ -434,11 +434,13 @@ function displayUsageStats(stats, origin, source) {
434
434
  return l - c;
435
435
  })();
436
436
 
437
- // 提取请求次数和 Token 用量
438
- const currentDailyRequests = (stats.currentDailyRequests !== undefined) ? stats.currentDailyRequests : limits.currentDailyRequests;
439
- const currentDailyTokens = (stats.currentDailyTokens !== undefined) ? stats.currentDailyTokens : limits.currentDailyTokens;
440
- const currentWindowRequests = (stats.currentWindowRequests !== undefined) ? stats.currentWindowRequests : limits.currentWindowRequests;
441
- const currentWindowTokens = (stats.currentWindowTokens !== undefined) ? stats.currentWindowTokens : limits.currentWindowTokens;
437
+ // 提取日请求次数和 Token 用量(API 中 currentWindowRequests/Tokens 实际为日数据)
438
+ const currentDailyRequests = (stats.currentDailyRequests !== undefined) ? stats.currentDailyRequests
439
+ : (limits.currentDailyRequests !== undefined) ? limits.currentDailyRequests
440
+ : (stats.currentWindowRequests !== undefined) ? stats.currentWindowRequests : limits.currentWindowRequests;
441
+ const currentDailyTokens = (stats.currentDailyTokens !== undefined) ? stats.currentDailyTokens
442
+ : (limits.currentDailyTokens !== undefined) ? limits.currentDailyTokens
443
+ : (stats.currentWindowTokens !== undefined) ? stats.currentWindowTokens : limits.currentWindowTokens;
442
444
 
443
445
  console.log(`域名: ${origin}`);
444
446
  console.log(`来源: ${source}`);
@@ -465,12 +467,6 @@ function displayUsageStats(stats, origin, source) {
465
467
  if (windowRemaining !== null) {
466
468
  console.log(`窗口剩余: ${formatCost(windowRemaining)}`);
467
469
  }
468
- if (asNumber(currentWindowRequests) !== null || asNumber(currentWindowTokens) !== null) {
469
- const parts = [];
470
- if (asNumber(currentWindowRequests) !== null) parts.push(`请求 ${formatNumber(currentWindowRequests)} 次`);
471
- if (asNumber(currentWindowTokens) !== null) parts.push(`Token ${formatCompactNumber(currentWindowTokens)}`);
472
- console.log(`窗口统计: ${parts.join(' | ')}`);
473
- }
474
470
  const windowStartText = formatDateTime(windowStartTime);
475
471
  const windowEndText = formatDateTime(windowEndTime);
476
472
  if (windowStartText !== '-' || windowEndText !== '-') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aihezu",
3
- "version": "2.8.6",
3
+ "version": "2.8.7",
4
4
  "description": "AI 开发环境配置工具 - 支持 Claude Code, Codex, Google Gemini 的本地化配置、代理设置与缓存清理",
5
5
  "main": "bin/aihezu.js",
6
6
  "bin": {