INNER CODE UNIT · TypeScript
readCache
NVIDIA/NemoClaw · .dsh/tools/carry_nemoclaw_cached_review_recommendations/index.ts:83
const readCache = async (path) => {
const result = await tools.bash({
command: "cat " + quote(path),
workdir: input.workdir,
description: "Read cached review recommendation",
timeoutMs: 10000,
});
if (result.kind !== "foreground") throw new Error("Cache read did not finish");
return { exists: result.exitCode === 0, text: result.stdout.text };
};
const blobAt = async (file, ref) => {
const encodedFile = file.split("/").map(encodeURIComponent).join("/");
const result = await tools.run_github_cli({
workdir: input.workdir,
args: [
"api",
`repos/${repo}/contents/${encodedFile}?ref=${encodeURIComponent(ref)}`,
"--method",