Handle telemetry in non-interactive mode (#1002)

Changes:
- Ensure proper shutdown in non-interactive mode
- Ensures the initial user prompt is logged in non-interactive mode
- Improve telemetry for streaming - handle chunks and input token count is now alongside other token counts in response

To test:
- Follow instructions in https://github.com/google-gemini/gemini-cli/blob/main/docs/core/telemetry.md#google-cloud
- Run CLI in non-interactive mode and observe logs/metrics in GCP Logs Explorer and Metrics Explorer

#750
This commit is contained in:
Jerop Kipruto
2025-06-13 03:44:17 -04:00
committed by GitHub
parent 8bb6eca915
commit b20c8389f3
10 changed files with 126 additions and 89 deletions

View File

@@ -16,6 +16,7 @@ export {
logApiRequest,
logApiError,
logApiResponse,
combinedUsageMetadata,
} from './loggers.js';
export {
UserPromptEvent,