mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-23 03:24:42 -07:00
feat(headless): gate diagnostic output behind --debug flag
Diagnostic monitoring data (auth_method, user_tier, api_requests, api_errors, retry_count, RETRY events, LOOP_DETECTED events, and stderr warnings) is now only emitted when --debug / -d is passed. Without the flag, headless output is identical to before — no new fields, no new events, no stderr noise. This keeps default output clean for piped workflows while making diagnostics available on demand.
This commit is contained in:
@@ -96,8 +96,8 @@ for model in "${MODELS[@]}"; do
|
||||
STDERRFILE=$(mktemp)
|
||||
exit_code=0
|
||||
|
||||
echo -e " ${DIM}Running with -o stream-json ...${RESET}"
|
||||
node "$CLI" -p "$PROMPT" -y -m "$model" -o stream-json \
|
||||
echo -e " ${DIM}Running with -o stream-json -d ...${RESET}"
|
||||
node "$CLI" -p "$PROMPT" -y -m "$model" -o stream-json -d \
|
||||
>"$TMPFILE" 2>"$STDERRFILE" || exit_code=$?
|
||||
|
||||
if [[ $exit_code -ne 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user