Refactor usage statistics to be a top-level setting (#1363)

This commit refactors the `usageStatisticsEnabled` setting from a sub-property of the `telemetry` configuration to a top-level setting. This change simplifies the configuration by decoupling usage statistics from the telemetry settings.

The documentation has also been updated to reflect this change.
This commit is contained in:
Jerop Kipruto
2025-06-23 20:29:31 -04:00
committed by GitHub
parent b3741f7016
commit aca034fdfe
5 changed files with 17 additions and 23 deletions

View File

@@ -226,9 +226,8 @@ export async function loadCliConfig(
process.env.OTEL_EXPORTER_OTLP_ENDPOINT ??
settings.telemetry?.otlpEndpoint,
logPrompts: argv.telemetryLogPrompts ?? settings.telemetry?.logPrompts,
usageStatisticsEnabled:
settings.telemetry?.usageStatisticsEnabled ?? true,
},
usageStatisticsEnabled: settings.usageStatisticsEnabled ?? true,
// Git-aware file filtering settings
fileFiltering: {
respectGitIgnore: settings.fileFiltering?.respectGitIgnore,

View File

@@ -49,6 +49,7 @@ export interface Settings {
contextFileName?: string | string[];
accessibility?: AccessibilitySettings;
telemetry?: TelemetrySettings;
usageStatisticsEnabled?: boolean;
preferredEditor?: string;
bugCommand?: BugCommandSettings;
checkpointing?: CheckpointingSettings;