- Notifications
You must be signed in to change notification settings - Fork1.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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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 theget_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 |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
❤️
d15026b
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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="/"