Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Count TUI launches by fullscreen transcript configuration (#46879)

Eric Traut8b79d8a5f537
diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs
index 3161e6e2c4..1c9714ae49 100644
--- a/codex-rs/tui/src/lib.rs
+++ b/codex-rs/tui/src/lib.rs
@@ -1841,6 +1841,18 @@ async fn run_ratatui_app(
}
startup_draft.apply_config(&config);
+ // Count launches that reach final config resolution, regardless of screen policy.
+ if config.analytics_enabled != Some(false)
+ && config.otel.metrics_exporter != codex_config::types::OtelExporterKind::None
+ && let Some(metrics) = codex_otel::global()
+ {
+ let _ = metrics.counter(
+ "codex.tui.fullscreen_transcript",
+ /*inc*/ 1,
+ &[("enabled", &config.tui_fullscreen_transcript.to_string())],
+ );
+ }
+
// Cloud configuration and session selection can change screen policy after first paint.
let use_alt_screen = determine_alt_screen_mode(cli.no_alt_screen, config.tui_alternate_screen);
let mode = crate::transcript_mode::TranscriptMode::resolve(