Improve context by providing a repo map; Add Vertex AI integration; Add Greedy action parser for more robust code block action syntax #373
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.
I've been experimenting with the SWE-Agent and made some improvements on the go that I thought would be worth considering adding to the project
What does this implement?
Repo map
When using the agent on an existing codebase I encountered the issue where the agent starts to reimplement existing code, to give the LLM context for avoiding this I have added the repo map code from Aider
The Repo map feature adds a snippet like this to the first user message
Google Vertex AI integration
Added a Vertex AI integration for access to 1M context window models
Greedy parser
When the agent tried to write documentation in markdown files I encountered the issue of the action parser failing to read file with triple backtick (```) blocks. To fix this I added the ThoughtActionGreedyParser class that parses the string between the outer backticks as the only action, as multiple action outputs seem to be unsupported. I know that a workaround would be using an xml-agent, but that might be too complex syntax for smaller LLMs
Any other comments?
I hope any of these features would be of use. Let me know if you would like me to cherry-pick and polish any of them to a separate PR
I have not had the time to write tests and make sure these features smoothly integrate with everything else
🧡 Thanks for contributing!