-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: get_file_contents use "/" for root #666
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue with the get_file_contents
function where agents couldn't access the root directory due to unclear parameter documentation. The fix clarifies that root directory access requires using "/" as the path parameter.
- Updated parameter description to explicitly mention root directory handling
- Ensured consistency across code documentation and README
- Fixed agent confusion about empty string vs "/" for root directory access
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
pkg/github/repositories.go | Updated path parameter description to clarify root directory usage |
pkg/github/toolsnaps/get_file_contents.snap | Updated test snapshot to reflect new parameter description |
README.md | Updated documentation to match the corrected parameter description |
Thank you @tonytrg. I've decided to go your suggestion of making the path optional with "/" default - I think this most reliable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Problem: To get root directory, agent was calling
get_file_contents
with path""
which is not allowed for a required param.Fix: Changed
path
to an optional and set a default of"/"
(root)Screenshot
Tested with: Sonnet-3.5, Sonnet-4, GPT-o4-mini, GPT-4o
Check the tool is called with path="/"