-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: support line range regardless of max line read #8500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention.
${isMultipleReadsEnabled ? `**IMPORTANT: You can read a maximum of ${maxConcurrentReads} files in a single request.** If you need to read more files, use multiple sequential read_file requests.` : "**IMPORTANT: Multiple file reads are currently disabled. You can only read one file at a time.**"} | ||
${args.partialReadsEnabled ? `By specifying line ranges, you can efficiently read specific portions of large files without loading the entire file into memory.` : ""} | ||
${args.partialReadsEnabled ? `**Line ranges bypass the "Always read entire file" setting** - when you specify explicit line ranges, you can read any lines from any file regardless of the maxReadFileLine configuration. This is useful for targeted work based on tool outputs that reference specific line numbers (e.g., linters, search results, diffs).` : ""} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] Docs alignment: New line‑range behavior is clear. While touching this doc, consider updating the earlier supported-formats sentence to reflect current code — it still says "PDF and DOCX" only, but the code also supports IPYNB. For consistency with implementation, mention all three, e.g. "PDF, DOCX, and IPYNB". See src/integrations/misc/extract-text.ts.
Related GitHub Issue
Closes: #8077
Roo Code Task Context (Optional)
Description
This PR tells the model to support line-range read even when max line read is enabled.
Test Procedure
Added 3 more test cases to cover other use cases in the test file.
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
@elianiva
Important
Enhance
read_file
tool to support line ranges regardless ofmaxReadFileLine
setting, with updated tests to verify behavior.read-file.ts
: Line ranges now bypassmaxReadFileLine
setting, allowing specific line reads regardless of the limit.Task.ts
: Always enable partial reads by settingpartialReadsEnabled
totrue
.readFileTool.spec.ts
: Add tests to verify line ranges bypassmaxReadFileLine
in various scenarios, including when set to 0, -1, or a positive number.This description was created by
for 0b4df8e. You can customize this summary. It will automatically update as commits are pushed.