Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

update codex_plugins_beta_setting (from workspace settings) (#20250)

Alex Zamoshchin8b07132e09ca
diff --git a/codex-rs/app-server/tests/suite/v2/app_list.rs b/codex-rs/app-server/tests/suite/v2/app_list.rs
index 335489929d..395dff5668 100644
--- a/codex-rs/app-server/tests/suite/v2/app_list.rs
+++ b/codex-rs/app-server/tests/suite/v2/app_list.rs
@@ -1582,7 +1582,7 @@ async fn workspace_settings_response(
} else {
Ok(Json(json!({
"beta_settings": {
- "plugins": state.workspace_plugins_enabled
+ "enable_plugins": state.workspace_plugins_enabled
}
})))
}
diff --git a/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs b/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
index 54b1f319e9..a186485df6 100644
--- a/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
+++ b/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
@@ -125,7 +125,8 @@ async fn experimental_feature_list_marks_apps_and_plugins_disabled_by_workspace_
.and(header("authorization", "Bearer chatgpt-token"))
.and(header("chatgpt-account-id", "account-123"))
.respond_with(
- ResponseTemplate::new(200).set_body_string(r#"{"beta_settings":{"plugins":false}}"#),
+ ResponseTemplate::new(200)
+ .set_body_string(r#"{"beta_settings":{"enable_plugins":false}}"#),
)
.mount(&server)
.await;
diff --git a/codex-rs/app-server/tests/suite/v2/plugin_install.rs b/codex-rs/app-server/tests/suite/v2/plugin_install.rs
index a115c83077..1b8069c7b5 100644
--- a/codex-rs/app-server/tests/suite/v2/plugin_install.rs
+++ b/codex-rs/app-server/tests/suite/v2/plugin_install.rs
@@ -448,7 +448,8 @@ async fn plugin_install_rejects_when_workspace_codex_plugins_disabled() -> Resul
.and(header("authorization", "Bearer chatgpt-token"))
.and(header("chatgpt-account-id", "account-123"))
.respond_with(
- ResponseTemplate::new(200).set_body_string(r#"{"beta_settings":{"plugins":false}}"#),
+ ResponseTemplate::new(200)
+ .set_body_string(r#"{"beta_settings":{"enable_plugins":false}}"#),
)
.mount(&server)
.await;
diff --git a/codex-rs/app-server/tests/suite/v2/plugin_list.rs b/codex-rs/app-server/tests/suite/v2/plugin_list.rs
index 51e5d8dd88..09dd59f620 100644
--- a/codex-rs/app-server/tests/suite/v2/plugin_list.rs
+++ b/codex-rs/app-server/tests/suite/v2/plugin_list.rs
@@ -302,7 +302,8 @@ async fn plugin_list_returns_empty_when_workspace_codex_plugins_disabled() -> Re
.and(header("authorization", "Bearer chatgpt-token"))
.and(header("chatgpt-account-id", "account-123"))
.respond_with(
- ResponseTemplate::new(200).set_body_string(r#"{"beta_settings":{"plugins":false}}"#),
+ ResponseTemplate::new(200)
+ .set_body_string(r#"{"beta_settings":{"enable_plugins":false}}"#),
)
.mount(&server)
.await;
@@ -391,7 +392,8 @@ async fn plugin_list_reuses_cached_workspace_codex_plugins_setting() -> Result<(
.and(header("authorization", "Bearer chatgpt-token"))
.and(header("chatgpt-account-id", "account-123"))
.respond_with(
- ResponseTemplate::new(200).set_body_string(r#"{"beta_settings":{"plugins":true}}"#),
+ ResponseTemplate::new(200)
+ .set_body_string(r#"{"beta_settings":{"enable_plugins":true}}"#),
)
.mount(&server)
.await;
diff --git a/codex-rs/app-server/tests/suite/v2/skills_list.rs b/codex-rs/app-server/tests/suite/v2/skills_list.rs
index 1105df37ca..32f1945447 100644
--- a/codex-rs/app-server/tests/suite/v2/skills_list.rs
+++ b/codex-rs/app-server/tests/suite/v2/skills_list.rs
@@ -376,7 +376,8 @@ async fn skills_list_excludes_plugin_skills_when_workspace_codex_plugins_disable
.and(header("authorization", "Bearer chatgpt-token"))
.and(header("chatgpt-account-id", "account-123"))
.respond_with(
- ResponseTemplate::new(200).set_body_string(r#"{"beta_settings":{"plugins":false}}"#),
+ ResponseTemplate::new(200)
+ .set_body_string(r#"{"beta_settings":{"enable_plugins":false}}"#),
)
.mount(&server)
.await;
diff --git a/codex-rs/chatgpt/src/workspace_settings.rs b/codex-rs/chatgpt/src/workspace_settings.rs
index 86e1a40871..a177215518 100644
--- a/codex-rs/chatgpt/src/workspace_settings.rs
+++ b/codex-rs/chatgpt/src/workspace_settings.rs
@@ -12,7 +12,7 @@ use crate::chatgpt_client::chatgpt_get_request_with_timeout;
const WORKSPACE_SETTINGS_TIMEOUT: Duration = Duration::from_secs(10);
const WORKSPACE_SETTINGS_CACHE_TTL: Duration = Duration::from_secs(15 * 60);
-const CODEX_PLUGINS_BETA_SETTING: &str = "plugins";
+const CODEX_PLUGINS_BETA_SETTING: &str = "enable_plugins";
#[derive(Debug, Deserialize)]
struct WorkspaceSettingsResponse {