minimax-status 1.1.14 → 1.2.0

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 (3) hide show
  1. package/README.md +15 -21
  2. package/cli/api.js +13 -11
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -134,10 +134,10 @@ npm run package
134
134
  集成成功后,底部状态栏将显示:
135
135
 
136
136
  ```
137
- my-app main * MiniMax-M2 205K │ Usage ██████░░░░ 60% (2700/4500) 1h20m 到期 5天
137
+ my-app main * MiniMax-M2 60% (2700/4500) 1h20m 5天
138
138
  ```
139
139
 
140
- 显示格式:`目录 分支 模型 上下文 │ Usage 进度条 百分比(剩余/总数) 倒计时 到期 天数`
140
+ 显示格式:`目录 分支 模型 百分比(剩余/总数) 倒计时 到期天数`
141
141
 
142
142
  **颜色说明**:
143
143
 
@@ -219,18 +219,10 @@ my-app │ main * │ ...
219
219
  集成成功后,底部状态栏将显示:
220
220
 
221
221
  ```
222
- minimax-status main * Usage █░░░░░░░░ 10% (4047/4500) 12m 到期 21天
222
+ minimax-status main * 10% (4047/4500) 12m 21天
223
223
  ```
224
224
 
225
- 显示格式:`目录 分支 Usage 进度条 百分比(剩余/总数) 倒计时 到期 天数`
226
-
227
- ### 进度条风格
228
-
229
- 使用 `█` 和 `░` 字符显示进度条:
230
-
231
- - `█░░░░░░░░` - 10% 使用量
232
- - `█████░░░░` - 50% 使用量
233
- - `██████████` - 100% 使用量
225
+ 显示格式:`目录 分支 百分比(剩余/总数) 倒计时 到期天数`
234
226
 
235
227
  **颜色说明**:
236
228
 
@@ -277,6 +269,16 @@ minimax-status │ main * │ Usage █░░░░░░░░ 10% (4047/4500)
277
269
  [● MiniMax-M2 27% • 3307/4500 • 1h26m ⚡
278
270
  ```
279
271
 
272
+ ## 截图演示
273
+
274
+ ### Claude Code 集成
275
+
276
+ ![Claude Code StatusBar](./images/claude%20code.png)
277
+
278
+ ### Droid 集成
279
+
280
+ ![Droid StatusBar](./images/droid.png)
281
+
280
282
  ## 命令说明
281
283
 
282
284
  | 命令 | 描述 | 示例 |
@@ -297,18 +299,10 @@ minimax-status │ main * │ Usage █░░░░░░░░ 10% (4047/4500)
297
299
  | 分支 | Git 分支名称 |
298
300
  | 模型 | MiniMax 模型名称 |
299
301
  | 上下文 | 上下文窗口使用率 |
300
- | Usage | 使用量进度条和百分比(剩余/总数) |
302
+ | Usage | 使用量百分比(剩余/总数) |
301
303
  | ⏱ | 额度重置倒计时 |
302
304
  | 到期 | 订阅到期时间(颜色动态变化) |
303
305
 
304
- ### 进度条
305
-
306
- 使用 `█` 和 `░` 字符显示进度条:
307
-
308
- - `█░░░░░░░░` - 10% 使用量
309
- - `█████░░░░░` - 50% 使用量
310
- - `██████████` - 100% 使用量
311
-
312
306
  ### 颜色规则
313
307
 
314
308
  | 场景 | 颜色 | 说明 |
package/cli/api.js CHANGED
@@ -80,7 +80,7 @@ class MinimaxAPI {
80
80
 
81
81
  try {
82
82
  const response = await axios.get(
83
- `https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains`,
83
+ `https://www.minimaxi.com/v1/token_plan/remains`,
84
84
  {
85
85
  headers: {
86
86
  Authorization: `Bearer ${this.token}`,
@@ -295,9 +295,9 @@ class MinimaxAPI {
295
295
  const endTime = new Date(modelData.end_time);
296
296
 
297
297
  // Calculate counts
298
- // 注意:current_interval_usage_count 实际是剩余次数,不是已用次数
299
- const remainingCount = modelData.current_interval_usage_count;
300
- const usedCount = modelData.current_interval_total_count - remainingCount;
298
+ // 新接口 usage_count 是已使用次数(正确值)
299
+ const usedCount = modelData.current_interval_usage_count;
300
+ const remainingCount = modelData.current_interval_total_count - usedCount;
301
301
 
302
302
  // Calculate percentage - 基于已使用次数的百分比
303
303
  const usedPercentage = Math.round(
@@ -310,7 +310,7 @@ class MinimaxAPI {
310
310
  const minutes = Math.floor((remainingMs % (1000 * 60 * 60)) / (1000 * 60));
311
311
 
312
312
  // Calculate weekly usage data
313
- const weeklyUsed = modelData.current_weekly_total_count - modelData.current_weekly_usage_count;
313
+ const weeklyUsed = modelData.current_weekly_usage_count;
314
314
  const weeklyTotal = modelData.current_weekly_total_count;
315
315
  const weeklyPercentage = weeklyTotal > 0 ? Math.floor((weeklyUsed / weeklyTotal) * 100) : 0;
316
316
  const weeklyRemainingMs = modelData.weekly_remains_time;
@@ -382,8 +382,8 @@ class MinimaxAPI {
382
382
  : `${minutes} 分钟后重置`,
383
383
  },
384
384
  usage: {
385
- used: usedCount, // 修复:显示已使用次数,不是剩余次数
386
- remaining: remainingCount, // 新增:剩余次数
385
+ used: usedCount,
386
+ remaining: remainingCount,
387
387
  total: modelData.current_interval_total_count,
388
388
  percentage: usedPercentage,
389
389
  },
@@ -415,13 +415,15 @@ class MinimaxAPI {
415
415
 
416
416
  return apiData.model_remains.map(modelData => {
417
417
  const totalCount = modelData.current_interval_total_count;
418
- const remainingCount = modelData.current_interval_usage_count;
419
- const usedCount = totalCount - remainingCount;
418
+ // 新接口 usage_count 是已使用次数(正确值)
419
+ const usedCount = modelData.current_interval_usage_count;
420
+ const remainingCount = totalCount - usedCount;
420
421
  const usedPercentage = totalCount > 0 ? Math.round((usedCount / totalCount) * 100) : 0;
421
422
 
422
423
  // Weekly data
423
424
  const weeklyTotal = modelData.current_weekly_total_count || 0;
424
- const weeklyUsed = weeklyTotal > 0 ? (modelData.current_weekly_total_count - modelData.current_weekly_usage_count) : 0;
425
+ const weeklyUsed = modelData.current_weekly_usage_count || 0;
426
+ const weeklyRemainingCount = weeklyTotal - weeklyUsed;
425
427
  const weeklyPercentage = weeklyTotal > 0 ? Math.floor((weeklyUsed / weeklyTotal) * 100) : 0;
426
428
 
427
429
  return {
@@ -433,7 +435,7 @@ class MinimaxAPI {
433
435
  unlimited: weeklyTotal === 0,
434
436
  weeklyPercentage,
435
437
  weeklyTotal,
436
- weeklyRemainingCount: modelData.current_weekly_usage_count || 0,
438
+ weeklyRemainingCount,
437
439
  };
438
440
  });
439
441
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minimax-status",
3
- "version": "1.1.14",
3
+ "version": "1.2.0",
4
4
  "description": "MiniMax Claude Code 使用状态监控工具",
5
5
  "bin": {
6
6
  "minimax-status": "cli/index.js",