When offset or limit are specified, use Node.js readline streaming instead of loading the entire file into memory. This fixes the truncation issue for large files (>50KB) where the read tool would return truncated content even when requesting a small slice. - Add readLinesStreamed() for memory-efficient line reading - Add countLines() for total line count without full read - Use streaming path when offset !== undefined || limit !== undefined - Keep existing full-file read path when no offset/limit specified - Add tests for streaming behavior with large files Fixes the long-standing issue where reading large files like src/headless.ts (~50KB) with offset/limit would still hit truncation limits. |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| package.json | ||
| tsconfig.json | ||