add --telemetry-outfile flag (#4689)

This commit is contained in:
smhendrickson
2025-07-23 17:48:24 -04:00
committed by GitHub
parent 209c8783b4
commit 9d3164621a
5 changed files with 133 additions and 6 deletions

View File

@@ -73,6 +73,7 @@ export interface TelemetrySettings {
target?: TelemetryTarget;
otlpEndpoint?: string;
logPrompts?: boolean;
outfile?: string;
}
export interface GeminiCLIExtension {
@@ -255,6 +256,7 @@ export class Config {
target: params.telemetry?.target ?? DEFAULT_TELEMETRY_TARGET,
otlpEndpoint: params.telemetry?.otlpEndpoint ?? DEFAULT_OTLP_ENDPOINT,
logPrompts: params.telemetry?.logPrompts ?? true,
outfile: params.telemetry?.outfile,
};
this.usageStatisticsEnabled = params.usageStatisticsEnabled ?? true;
@@ -468,6 +470,10 @@ export class Config {
return this.telemetrySettings.target ?? DEFAULT_TELEMETRY_TARGET;
}
getTelemetryOutfile(): string | undefined {
return this.telemetrySettings.outfile;
}
getGeminiClient(): GeminiClient {
return this.geminiClient;
}