@miloya/oc-minimax-status 0.0.6 → 0.0.8

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
@@ -23,7 +23,7 @@
23
23
  ## 安装
24
24
 
25
25
  ```bash
26
- npm install @miloya/oc-minimax-status
26
+ npm install -g @miloya/oc-minimax-status
27
27
  ```
28
28
 
29
29
  安装过程会自动:
@@ -58,19 +58,20 @@ npm install @miloya/oc-minimax-status
58
58
 
59
59
  在 OpenCode 对话框中直接说**自然语言**即可(不是命令行),插件会自动识别并调用对应功能:
60
60
 
61
- ### 查询用量(自然语言)
61
+ ### 查询用量(自然语言或命令)
62
62
  ```
63
63
  查看 minimax 用量
64
64
  我的用量还有多少
65
65
  minimax 状态
66
66
  /minimax
67
67
  ```
68
-
69
- ### 管理认证(自然语言)
70
- ```
71
- 查看 minimax 认证
72
- 设置 minimax 认证 tokenxxx groupIdxxx
73
- ```
68
+
69
+ ### 管理认证(自然语言或命令)
70
+ ```
71
+ 查看 minimax 认证
72
+ 设置 minimax 认证 tokenxxx groupIdxxx
73
+ /minimax set tokenxxx groupIdxxx
74
+ ```
74
75
 
75
76
  ### 直接调用工具名
76
77
  ```
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Set MiniMax API credentials (token and groupId)
3
+ ---
4
+
5
+ The user wants to set their MiniMax API credentials.
6
+
7
+ Extract token and groupId from the user's message, then use the minimax_auth tool with action=set.
8
+
9
+ Example: "token xxx groupId xxx" -> minimax_auth action=set token=xxx groupId=xxx
package/index.js CHANGED
@@ -86,17 +86,17 @@ function parseUsageData(apiData) {
86
86
  function formatOutput(data) {
87
87
  const { modelName, used, total, remaining, percentage, resetTime, hours, minutes } = data;
88
88
 
89
- const bar = "#".repeat(Math.floor(percentage / 10)) + "-".repeat(10 - Math.floor(percentage / 10));
90
- const timeText = hours > 0 ? `${hours}h ${minutes}m` : `${minutes}min`;
89
+ const bar = "".repeat(Math.floor(percentage / 10)) + "".repeat(10 - Math.floor(percentage / 10));
90
+ const timeText = hours > 0 ? `${hours}小时${minutes}分钟` : `${minutes}分钟`;
91
91
 
92
- return `MiniMax Claude Code 用量状态
93
- ==============================
94
- Model: ${modelName}
92
+ return `MiniMax Coding Plan 用量状态
93
+ ----------------------------------------
94
+ 模型: ${modelName}
95
95
  已用: ${used.toLocaleString()} / ${total.toLocaleString()}
96
96
  进度: [${bar}] ${percentage}%
97
- 剩余: ${remaining.toLocaleString()}
98
- 重置: ${resetTime} (${timeText})
99
- ==============================`;
97
+ 剩余: ${remaining.toLocaleString()}
98
+ 重置: ${resetTime} (约${timeText})
99
+ ----------------------------------------`;
100
100
  }
101
101
 
102
102
  export const MiniMaxStatusPlugin = async (ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miloya/oc-minimax-status",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "MiniMax Coding Plan 用量查询插件 for OpenCode - 一键安装自动配置",
5
5
  "main": "index.js",
6
6
  "type": "module",