-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor(read_file): Codex-inspired read_file refactor #10981
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
Open
hannesrudolph
wants to merge
4
commits into
main
Choose a base branch
from
read-file-refactor-codex
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,919
−4,641
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Replace multi-file read_file with single-file-per-call design - Add two reading modes: slice (default) and indentation - Implement bidirectional expansion algorithm for indentation mode - Add line truncation (500 chars) and limit (2000 lines default) - Remove legacy token-budget-based reading approach - Remove maxReadFileLine setting (replaced by limit parameter) - Add new IndentationParams and ReadFileParams types - Clean up stale FileEntry/LineRange types and helpers Known limitations: - Lines >500 chars are truncated (content lost) - No server-side max limit enforcement
Contributor
Re-review complete. No new issues found in the latest commit.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
This setting was never used after removing the batch file reading system. Removes dead code from UI, state management, and types.
- Fix formatPathTooltip to add space before additionalContent (fixes display bug where 'index.ts' + 'up to 50 lines' showed as 'index.tsup to 50 lines') - Add startLine field to ClineSayTool type for read_file operations - Update ReadFileTool to include startLine in the message - Update ChatRow to pass startLine to openFile for navigation to the correct line
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What This Means for Users
Simplified Configuration
Two settings removed from Settings UI:
Smarter File Reading
The
read_filetool now uses indentation-aware reading that understands code structure:Per-Request Control
Instead of a global setting, the agent can now specify limits per request when needed:
What Changed Technically
read_filetool redesigned to use single-file API with indentation mode (adapted from Codex CLI)maxReadFileLineglobal setting (replaced by per-calllimitparameter)maxConcurrentFileReadssetting and plumbingBreaking Changes
maxReadFileLinewill need to rely on the new intelligent defaults