fix(activity-log): strip PR-description block from reasoning trail #49
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user