@miloya/oc-minimax-status 0.0.6 → 0.0.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.
- package/README.md +9 -8
- package/commands/minimax-set.md +9 -0
- package/index.js +8 -8
- package/package.json +1 -1
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 = "
|
|
90
|
-
const timeText = hours > 0 ? `${hours}
|
|
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
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
return `MiniMax Coding Plan 用量状态
|
|
93
|
+
----------------------------------------
|
|
94
|
+
模型: ${modelName}
|
|
95
95
|
已用: ${used.toLocaleString()} / ${total.toLocaleString()}
|
|
96
96
|
进度: [${bar}] ${percentage}%
|
|
97
|
-
剩余: ${remaining.toLocaleString()}
|
|
98
|
-
重置: ${resetTime} (
|
|
99
|
-
|
|
97
|
+
剩余: ${remaining.toLocaleString()} 次
|
|
98
|
+
重置: ${resetTime} (约${timeText})
|
|
99
|
+
----------------------------------------`;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export const MiniMaxStatusPlugin = async (ctx) => {
|