mirror of
https://github.com/openai/codex.git
synced 2026-11-22 15:15:18 +00:00
Add managed gates for in-app chat and dictation (#39045)
## What changed - Register `in_app_chat` and `in_app_dictation` as stable, default-enabled feature gates for desktop apps. - Allow requirements to disable either capability and expose both keys in the generated configuration schema. ## Testing - Add configuration tests that verify enterprise requirements can disable each gate. GitOrigin-RevId: 5bba35d710fb0b6924aa55df98b2e013fa288f6d
This commit is contained in:
1 parent
0f21cb3413
commit
06418909a0
3 files changed
+76
No files matched your search
@@ -603,6 +603,12 @@
|
|||||||
"in_app_browser": {
|
"in_app_browser": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"in_app_chat": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"in_app_dictation": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"in_app_updates": {
|
"in_app_updates": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
@@ -5382,6 +5388,12 @@
|
|||||||
"in_app_browser": {
|
"in_app_browser": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"in_app_chat": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"in_app_dictation": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"in_app_updates": {
|
"in_app_updates": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10655,6 +10655,50 @@ browser_use_full_cdp_access = false
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn in_app_chat_feature_requirements_are_valid() -> std::io::Result<()> {
|
||||||
|
let codex_home = TempDir::new()?;
|
||||||
|
|
||||||
|
let config = ConfigBuilder::without_managed_config_for_tests()
|
||||||
|
.codex_home(codex_home.path().to_path_buf())
|
||||||
|
.cloud_config_bundle(
|
||||||
|
CloudConfigBundleFixture::loader_with_enterprise_requirement(
|
||||||
|
r#"
|
||||||
|
[features]
|
||||||
|
in_app_chat = false
|
||||||
|
"#,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
assert!(!config.features.enabled(Feature::InAppChat));
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn in_app_dictation_feature_requirements_are_valid() -> std::io::Result<()> {
|
||||||
|
let codex_home = TempDir::new()?;
|
||||||
|
|
||||||
|
let config = ConfigBuilder::without_managed_config_for_tests()
|
||||||
|
.codex_home(codex_home.path().to_path_buf())
|
||||||
|
.cloud_config_bundle(
|
||||||
|
CloudConfigBundleFixture::loader_with_enterprise_requirement(
|
||||||
|
r#"
|
||||||
|
[features]
|
||||||
|
in_app_dictation = false
|
||||||
|
"#,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
assert!(!config.features.enabled(Feature::InAppDictation));
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn explicit_feature_config_is_normalized_by_requirements() -> std::io::Result<()> {
|
async fn explicit_feature_config_is_normalized_by_requirements() -> std::io::Result<()> {
|
||||||
let codex_home = TempDir::new()?;
|
let codex_home = TempDir::new()?;
|
||||||
|
|||||||
@@ -206,6 +206,14 @@ pub enum Feature {
|
|||||||
///
|
///
|
||||||
/// Requirements-only gate: this should be set from requirements, not user config.
|
/// Requirements-only gate: this should be set from requirements, not user config.
|
||||||
InAppBrowser,
|
InAppBrowser,
|
||||||
|
/// Allow the in-app chat pane in desktop apps.
|
||||||
|
///
|
||||||
|
/// Requirements-only gate: this should be set from requirements, not user config.
|
||||||
|
InAppChat,
|
||||||
|
/// Allow in-app dictation in desktop apps.
|
||||||
|
///
|
||||||
|
/// Requirements-only gate: this should be set from requirements, not user config.
|
||||||
|
InAppDictation,
|
||||||
/// Allow desktop apps to perform in-app updates.
|
/// Allow desktop apps to perform in-app updates.
|
||||||
///
|
///
|
||||||
/// Requirements-only gate: this should be set from requirements, not user config.
|
/// Requirements-only gate: this should be set from requirements, not user config.
|
||||||
@@ -1210,6 +1218,18 @@ pub const FEATURES: &[FeatureSpec] = &[
|
|||||||
stage: Stage::Stable,
|
stage: Stage::Stable,
|
||||||
default_enabled: true,
|
default_enabled: true,
|
||||||
},
|
},
|
||||||
|
FeatureSpec {
|
||||||
|
id: Feature::InAppChat,
|
||||||
|
key: "in_app_chat",
|
||||||
|
stage: Stage::Stable,
|
||||||
|
default_enabled: true,
|
||||||
|
},
|
||||||
|
FeatureSpec {
|
||||||
|
id: Feature::InAppDictation,
|
||||||
|
key: "in_app_dictation",
|
||||||
|
stage: Stage::Stable,
|
||||||
|
default_enabled: true,
|
||||||
|
},
|
||||||
FeatureSpec {
|
FeatureSpec {
|
||||||
id: Feature::InAppUpdates,
|
id: Feature::InAppUpdates,
|
||||||
key: "in_app_updates",
|
key: "in_app_updates",
|
||||||
|
|||||||
Reference in new issue
Block a user