feat: add debug logging for session directory and file in review script

Includes additional diagnostic outputs for PI_DEBUG mode: contents of the session directory and the selected session file.
This commit is contained in:
Markus Hofstetter
2026-06-13 11:42:04 +02:00
parent cd77158577
commit 32829ae8ba
+5
View File
@@ -255,9 +255,14 @@ if [ ! -s /tmp/pi-review.md ]; then
exit 1
fi
echo "Debug mode: PI_DEBUG=${PI_DEBUG}"
# If debug mode, extract tool calls from session and append to review
if [ "${PI_DEBUG}" = "true" ]; then
echo "Session dir contents:"
find /tmp/pi-session -type f 2>/dev/null || echo " (none)"
SESSION_FILE=$(find /tmp/pi-session -name '*.jsonl' -type f 2>/dev/null | head -1)
echo "Session file: ${SESSION_FILE:-<none found>}"
TOOL_LOG=""
if [ -n "${SESSION_FILE}" ]; then