@ww_nero/mini-cli 1.0.70 → 1.0.72
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/package.json +1 -1
- package/src/chat.js +2 -2
- package/src/utils/renderer.js +1 -1
- package/src/utils/think.js +4 -1
package/package.json
CHANGED
package/src/chat.js
CHANGED
|
@@ -87,10 +87,10 @@ const formatWriteOutput = (result) => {
|
|
|
87
87
|
}
|
|
88
88
|
const content = result.content || '';
|
|
89
89
|
const lines = content.split('\n');
|
|
90
|
-
if (lines.length <=
|
|
90
|
+
if (lines.length <= 20) {
|
|
91
91
|
return content;
|
|
92
92
|
}
|
|
93
|
-
return lines.slice(0,
|
|
93
|
+
return lines.slice(0, 20).join('\n') + '\n...(更多内容)';
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
const formatReplaceOutput = (result) => {
|
package/src/utils/renderer.js
CHANGED
|
@@ -22,7 +22,7 @@ const countLines = (text = '') => {
|
|
|
22
22
|
const formatWriteHeader = (args = {}) => {
|
|
23
23
|
const filePath = args.filePath || '';
|
|
24
24
|
const lineCount = countLines(args.content);
|
|
25
|
-
return ` (${filePath},
|
|
25
|
+
return ` (${filePath}, ${chalk.green(`+${lineCount}`)})`;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const formatReplaceHeader = (args = {}) => {
|
package/src/utils/think.js
CHANGED
|
@@ -194,10 +194,13 @@ const splitThinkContent = (text = '') => {
|
|
|
194
194
|
return { content, reasoning };
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
-
const summarizeReasoning = (text = '') => {
|
|
197
|
+
const summarizeReasoning = (text = '', maxLength = 100) => {
|
|
198
198
|
if (!text) return '';
|
|
199
199
|
const normalized = text.replace(/\s+/g, ' ').trim();
|
|
200
200
|
if (!normalized) return '';
|
|
201
|
+
if (normalized.length > maxLength) {
|
|
202
|
+
return normalized.substring(0, maxLength) + '...';
|
|
203
|
+
}
|
|
201
204
|
return normalized;
|
|
202
205
|
};
|
|
203
206
|
|