diff --git a/.gitea/workflows/scripts/build-activity-log.sh b/.gitea/workflows/scripts/build-activity-log.sh index ef266a5..bd92c51 100755 --- a/.gitea/workflows/scripts/build-activity-log.sh +++ b/.gitea/workflows/scripts/build-activity-log.sh @@ -13,7 +13,13 @@ jq -r ' def trunc(n): if length > n then (.[0:n] + "…") else . end; select(.type=="tool_use" or .type=="text") | if .type=="text" then - "💬 " + ((.part.text // "") | trunc(4000)) + # Drop the PR-description block from the reasoning trail — it is already published verbatim as + # the PR description, so repeating it here is redundant noise. Skip a text part that is nothing + # but that block (would otherwise be an empty "💬 " entry). + ((.part.text // "") + | gsub("BEGIN_PR_DESCRIPTION.*?END_PR_DESCRIPTION"; ""; "m") + | gsub("\\A[[:space:]]+|[[:space:]]+\\z"; "")) as $t | + if $t == "" then empty else "💬 " + ($t | trunc(4000)) end else (.part.tool // "?") as $t | ((.part.state.title // (.part.state.input | tojson | trunc(160)) // "")) as $title |