mirror of
https://github.com/openai/codex.git
synced 2026-05-04 11:26:33 +00:00
[codex-analytics] remove ga flag (#19863)
This commit is contained in:
@@ -79,24 +79,6 @@ async fn app_server_default_analytics_enabled_with_flag() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) async fn enable_analytics_capture(server: &MockServer, codex_home: &Path) -> Result<()> {
|
||||
let config_path = codex_home.join("config.toml");
|
||||
let config_toml = std::fs::read_to_string(&config_path)?;
|
||||
if !config_toml.contains("[features]") {
|
||||
std::fs::write(
|
||||
&config_path,
|
||||
format!("{config_toml}\n[features]\ngeneral_analytics = true\n"),
|
||||
)?;
|
||||
} else if !config_toml.contains("general_analytics") {
|
||||
std::fs::write(
|
||||
&config_path,
|
||||
config_toml.replace("[features]\n", "[features]\ngeneral_analytics = true\n"),
|
||||
)?;
|
||||
}
|
||||
|
||||
mount_analytics_capture(server, codex_home).await
|
||||
}
|
||||
|
||||
pub(crate) async fn mount_analytics_capture(server: &MockServer, codex_home: &Path) -> Result<()> {
|
||||
Mock::given(method("POST"))
|
||||
.and(path("/codex/analytics-events/events"))
|
||||
|
||||
Reference in New Issue
Block a user