Draft: Add read-only stub files feature #3056
Open
+250
−75
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.
Add Read-Only Stub Files Feature
📝 Draft PR: This PR is currently in the idea/prototype phase. Feedback is welcome!
⚠ Unit tests are pending: This proof of concept currently lacks unit tests, which will be added upon merge approval. The build may fail due to this.
see also Navigating Large Codebases: Aider's Read-Only Stub Solution for a deeper explanation
Overview
This PR adds support for read-only stub files, which show only the structural outline of source files rather than their full content. This helps reduce context window usage while maintaining awareness of code structure.
Key Changes
/read-only-stub
command to add files as read-only stubsImplementation Details
abs_read_only_stubs_fnames
to track stub filesTesting
The changes have been tested for:
Documentation
The new
/read-only-stub
command is self-documenting via the help system.Related Issues
This feature helps address context window management for large codebases by providing a way to include structural information about files without their full content.