Refactor config types into a separate crate (#16962)

Move config types into a separate crate because their macros expand into
a lot of new code.
This commit is contained in:
pakrym-oai
2026-04-06 17:32:41 -07:00
committed by GitHub
parent d2df7c54b2
commit 1f2411629f
90 changed files with 1356 additions and 1261 deletions

View File

@@ -198,16 +198,11 @@ fn enable_fanout_normalization_enables_multi_agent_one_way() {
#[test]
fn apps_require_feature_flag_and_chatgpt_auth() {
let mut features = Features::with_defaults();
assert!(!features.apps_enabled_for_auth(/*auth*/ None));
assert!(!features.apps_enabled_for_auth(/*has_chatgpt_auth*/ false));
features.enable(Feature::Apps);
assert!(!features.apps_enabled_for_auth(/*auth*/ None));
let api_key_auth = codex_login::CodexAuth::from_api_key("test-api-key");
assert!(!features.apps_enabled_for_auth(Some(&api_key_auth)));
let chatgpt_auth = codex_login::CodexAuth::create_dummy_chatgpt_auth_for_testing();
assert!(features.apps_enabled_for_auth(Some(&chatgpt_auth)));
assert!(!features.apps_enabled_for_auth(/*has_chatgpt_auth*/ false));
assert!(features.apps_enabled_for_auth(/*has_chatgpt_auth*/ true));
}
#[test]