-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,11 @@ Description: Request to read the contents of ${isMultipleReadsEnabled ? "one or | |
|
||
${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 commentThe 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. |
||
Parameters: | ||
- args: Contains one or more file elements, where each file contains: | ||
- path: (required) File path (relative to workspace directory ${args.cwd}) | ||
${args.partialReadsEnabled ? `- line_range: (optional) One or more line range elements in format "start-end" (1-based, inclusive)` : ""} | ||
${args.partialReadsEnabled ? `- line_range: (optional) One or more line range elements in format "start-end" (1-based, inclusive). Line ranges always bypass maxReadFileLine restrictions.` : ""} | ||
elianiva marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Usage: | ||
<read_file> | ||
|
Uh oh!
There was an error while loading. Please reload this page.