minimax-status 1.1.6 → 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.
- package/cli/renderer.js +9 -1
- 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(
|
|
98
|
+
let branchStr = branchColor(displayBranchName);
|
|
91
99
|
|
|
92
100
|
// 未提交更改用 * 标记
|
|
93
101
|
if (hasChanges) {
|