Skip to content
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

this enabled /read-only /path/to/sources.jar!/org/subdir/Component.java to be used. #2379

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

sannysanoff
Copy link

@sannysanoff sannysanoff commented Nov 15, 2024

This PR adds support for reading files from within JAR archives (Java library files) into the context. This is useful when passing Java API documentation to LLMs, as source files are often bundled in JARs, which are essentially ZIP files.

Changes:

  • Extended the /read-only command to support reading files within JARs
  • Added compatible implementations of io.exists, io.is_file, and io.read_text that maintain existing functionality while adding JAR support
  • Added test coverage for JAR file reading
  • All tests passing
  • This also contains fix for non-working /drop of readonly file outside of the repo.

NB aider has been used to produce 95% of this patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant