Cap sessions_history payloads to prevent context overflow (#10000)

* Cap sessions_history payloads to prevent context overflow

* fix: harden sessions_history payload caps

* fix: cap sessions_history payloads to prevent context overflow (#10000) (thanks @gut-puncture)

---------

Co-authored-by: Shailesh Rana <shaileshrana@ShaileshMM.local>
Co-authored-by: George Pickett <gpickett00@gmail.com>
This commit is contained in:
Shailesh
2026-02-06 07:20:57 +05:30
committed by GitHub
parent 328b69be17
commit bccdc95a9b
4 changed files with 271 additions and 3 deletions

View File

@@ -1123,7 +1123,8 @@ function formatCodeSafetyDetails(findings: SkillScanFinding[], rootDir: string):
relPath && relPath !== "." && !relPath.startsWith("..")
? relPath
: path.basename(finding.file);
return ` - [${finding.ruleId}] ${finding.message} (${filePath}:${finding.line})`;
const normalizedPath = filePath.replaceAll("\\", "/");
return ` - [${finding.ruleId}] ${finding.message} (${normalizedPath}:${finding.line})`;
})
.join("\n");
}