mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
improve read-many-files output (#596)
This commit is contained in:
@@ -293,9 +293,7 @@ describe('ReadManyFilesTool', () => {
|
|||||||
(c) => typeof c === 'string' && c.includes('--- notes.txt ---'),
|
(c) => typeof c === 'string' && c.includes('--- notes.txt ---'),
|
||||||
),
|
),
|
||||||
).toBe(true);
|
).toBe(true);
|
||||||
expect(result.returnDisplay).toContain(
|
expect(result.returnDisplay).toContain('**Skipped 1 item(s):**');
|
||||||
'**Skipped 1 item(s) (up to 5 shown):**',
|
|
||||||
);
|
|
||||||
expect(result.returnDisplay).toContain(
|
expect(result.returnDisplay).toContain(
|
||||||
'- `document.pdf` (Reason: asset file (image/pdf) was not explicitly requested by name or extension)',
|
'- `document.pdf` (Reason: asset file (image/pdf) was not explicitly requested by name or extension)',
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -402,7 +402,11 @@ Use this tool when the user's query implies needing the content of several files
|
|||||||
if (processedFilesRelativePaths.length === 0) {
|
if (processedFilesRelativePaths.length === 0) {
|
||||||
displayMessage += `No files were read and concatenated based on the criteria.\n`;
|
displayMessage += `No files were read and concatenated based on the criteria.\n`;
|
||||||
}
|
}
|
||||||
displayMessage += `\n**Skipped ${skippedFiles.length} item(s) (up to 5 shown):**\n`;
|
if (skippedFiles.length <= 5) {
|
||||||
|
displayMessage += `\n**Skipped ${skippedFiles.length} item(s):**\n`;
|
||||||
|
} else {
|
||||||
|
displayMessage += `\n**Skipped ${skippedFiles.length} item(s) (first 5 shown):**\n`;
|
||||||
|
}
|
||||||
skippedFiles
|
skippedFiles
|
||||||
.slice(0, 5)
|
.slice(0, 5)
|
||||||
.forEach(
|
.forEach(
|
||||||
|
|||||||
Reference in New Issue
Block a user