Make the ReadManyFiles tool share the "DEFAULT_MAX_LINES_TEXT_FILE=2000" limit across files.

The current implementation can return 2000 x N lines when reading N files, such a length can be either extremely slow or infeasible for LLMs to process.
This commit is contained in:
Tao Zhu
2025-09-08 22:47:45 -07:00
parent e63233cefc
commit ac0a0e061e
2 changed files with 6 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ import mime from 'mime-types';
import { FileSystemService } from '../services/fileSystemService.js';
// Constants for text file processing
const DEFAULT_MAX_LINES_TEXT_FILE = 2000;
export const DEFAULT_MAX_LINES_TEXT_FILE = 2000;
const MAX_LINE_LENGTH_TEXT_FILE = 2000;
// Default values for encoding and separator format