| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The content parameter is passed to the API as plain text and the server base64-encodes it, but the description said only "Content of the file". The REST endpoint this wraps documents its own content field as base64, so a model reading the tool description has a strong reason to encode the content itself. When it does, the server encodes again and the file is committed containing base64 text. Every layer reports success. Describe the value by how it should end up on disk rather than by what not to do, so a file whose contents are legitimately base64 is still unambiguous, and name the encoding step so the conflict with the REST API docs is resolved rather than merely overridden.
There was a problem hiding this comment.
Clarifies that create_or_update_file accepts content exactly as it should appear on disk, preventing accidental double base64 encoding.
Changes:
| File | Description |
|---|---|
| README.md | Updates generated tool documentation. |
| pkg/github/repositories.go | Clarifies the content input contract. |
| pkg/github/__toolsnaps__/create_or_update_file.snap | Updates the tool schema snapshot. |
Sorry, something went wrong.
/ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes the ambiguity reported in #2981.
content is passed to the API as plain text and this server base64-encodes it, but the description said only "Content of the file". The REST endpoint this wraps documents its content field as base64, so a model reading the tool description has a strong reason to encode the value itself. When it does, the server encodes again and the file is committed containing base64 text, with success reported at every layer.
The new description says how the value should end up on disk rather than only what not to do, so a file whose contents are legitimately base64 stays unambiguous. It also names the encoding step, so the conflict with the REST API docs is resolved rather than merely overridden.
Scoped to create_or_update_file only. push_files and the gist tools pass content through without encoding, so this bug does not apply to them (see the follow-up comment on #2981).
Regenerated toolsnaps and README per CONTRIBUTING. go test ./... and script/lint both pass.