Stream thinking and text from Claude
This commit is contained in:
@@ -41,7 +41,7 @@ STREAM_FILE="$(mktemp)"
|
|||||||
claude --print --dangerously-skip-permissions \
|
claude --print --dangerously-skip-permissions \
|
||||||
--output-format stream-json --verbose "${FINAL_PROMPT}" \
|
--output-format stream-json --verbose "${FINAL_PROMPT}" \
|
||||||
| tee "${STREAM_FILE}" \
|
| tee "${STREAM_FILE}" \
|
||||||
| jq -r --unbuffered '[.type, (.message.content[]?.name // empty)] | join(" ")'
|
| jq -r --unbuffered '.message.content[]? | .thinking // .text // .name // empty'
|
||||||
|
|
||||||
jq -r 'select(.type == "result") | .result // ("Bot failed: " + .subtype)' "${STREAM_FILE}" \
|
jq -r 'select(.type == "result") | .result // ("Bot failed: " + .subtype)' "${STREAM_FILE}" \
|
||||||
| ansifilter > "${COMMENT_FILE}"
|
| ansifilter > "${COMMENT_FILE}"
|
||||||
|
|||||||
Reference in New Issue
Block a user