minimax-status 1.1.5 → 1.1.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/cli/renderer.js +10 -2
  2. package/package.json +1 -1
package/cli/renderer.js CHANGED
@@ -86,8 +86,16 @@ class Renderer {
86
86
  const isMainBranch = name === 'main' || name === 'master';
87
87
  const branchColor = isMainBranch ? chalk.green : chalk.white;
88
88
 
89
+ // 分支名截断处理:超过20字符时截断并省略中间部分
90
+ let displayBranchName = name;
91
+ if (name.length > 20) {
92
+ const prefixLength = 10;
93
+ const suffixLength = 7;
94
+ displayBranchName = name.substring(0, prefixLength) + '…' + name.substring(name.length - suffixLength);
95
+ }
96
+
89
97
  // 构建分支显示字符串
90
- let branchStr = branchColor(name);
98
+ let branchStr = branchColor(displayBranchName);
91
99
 
92
100
  // 未提交更改用 * 标记
93
101
  if (hasChanges) {
@@ -104,7 +112,7 @@ class Renderer {
104
112
  if (contextUsage !== null && contextUsage !== undefined) {
105
113
  const contextPercent = Math.round((contextUsage / contextSize) * 100);
106
114
  const contextColor = this.getStatusColor(contextPercent);
107
- parts.push(`${contextColor(contextPercent + '%')} ${chalk.gray(this.formatTokens(contextUsage))}`);
115
+ parts.push(`${contextColor(contextPercent + '%')} ${contextColor('·')} ${contextColor(this.formatTokens(contextUsage) + ' tokens')}`);
108
116
  } else {
109
117
  parts.push(chalk.cyan(this.formatContextSize(contextSize)));
110
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minimax-status",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "MiniMax Claude Code 使用状态监控工具",
5
5
  "bin": {
6
6
  "minimax-status": "cli/index.js",