mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
update codex_plugins_beta_setting (from workspace settings) (#20250)
update the name after rename internally see https://github.com/openai/openai/pull/871006
This commit is contained in:
committed by
GitHub
Unverified
parent
515aa9a4fb
commit
8b07132e09
@@ -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
|
||||
}
|
||||
})))
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user