feat: add debug mode to capture agent tool log

When debug: true, the review comment includes a collapsible section
showing which files the agent read, grep patterns used, etc.
Also prints agent log on failure for easier troubleshooting.
This commit is contained in:
Markus Hofstetter
2026-05-18 23:14:51 +02:00
parent c2f0d7f43f
commit 3654e36a7b
3 changed files with 28 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ export PI_REVIEW_PROMPT="${INPUT_REVIEW_PROMPT:-}"
export PI_EXCLUDE="${INPUT_EXCLUDE_PATTERNS:-*.lock package-lock.json yarn.lock pnpm-lock.yaml *.min.js *.min.css *.map}"
export PI_MAX_DIFF="${INPUT_MAX_DIFF_BYTES:-80000}"
export PI_TOKEN="${INPUT_TOKEN}"
export PI_DEBUG="${INPUT_DEBUG:-false}"
# The calling repo is mounted at GITHUB_WORKSPACE by both GitHub and Gitea.
# cd into it so git commands work against the right repo.