diff options
| author | Jerop Kipruto <[email protected]> | 2025-06-13 03:44:17 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-13 03:44:17 -0400 |
| commit | b20c8389f3f483f3972c254ec97fff4004b7c75f (patch) | |
| tree | 2afe57f8f7232e3ba7c9dde4cdfd3ee510bb994a /packages/core/src/utils/requestUtils.ts | |
| parent | 8bb6eca91548330f03feeedfa36372edf8aca1c6 (diff) | |
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
Diffstat (limited to 'packages/core/src/utils/requestUtils.ts')
| -rw-r--r-- | packages/core/src/utils/requestUtils.ts | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/packages/core/src/utils/requestUtils.ts b/packages/core/src/utils/requestUtils.ts deleted file mode 100644 index 4978e968..00000000 --- a/packages/core/src/utils/requestUtils.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -import { Content } from '@google/genai'; - -export function getRequestTextFromContents(contents: Content[]): string { - return contents - .flatMap((content) => content.parts ?? []) - .map((part) => part.text) - .filter(Boolean) - .join(''); -} |
