ghReadFileImpl
ghReadFileImpl(
args,context,maxBytes?):Promise<string>
Defined in: _worktrees/docs-release/gaunt-sloth/packages/review/src/tools/ghReadFileTool.ts:162
Fetches the full contents of a single file from GitHub via the gh api CLI and decodes it.
Returns the decoded text, or a human/agent-readable explanation string on any failure
(graceful skip — never throws). owner/repo/ref come from the resolved PR context, not the LLM.
CFG-52 — the decoded text is capped at maxBytes. Over the cap it is truncated rather than
refused (a truncated file still reviews better than no file), and the result says so in its
heading AND in a trailing marker naming the tool and the cap, so the model cannot silently
reason about a file it only half received.
Parameters
Section titled “Parameters”string = ...
context
Section titled “context”maxBytes?
Section titled “maxBytes?”number = GH_READ_FILE_DEFAULT_MAX_BYTES
Returns
Section titled “Returns”Promise<string>