mirror of
https://github.com/openai/codex.git
synced 2026-11-18 07:00:27 +00:00
Honor cloud-managed requirements in feature listings (#38581)
## What changed - Load configuration for `codex features list` through the shared cloud-aware loader so managed feature requirements are reflected in the reported state. - Reuse that loader for MCP commands. ## Testing - Add an integration test showing that a cloud-managed requirement can disable `fast_mode` in `codex features list` without rewriting the user's `config.toml`. GitOrigin-RevId: 2bdbc76dfa40ceb29e8293556f4b56cabbd2c43f
This commit is contained in:
1 parent
2a452d7dc1
commit
7c194ff24b
4 files changed
+114
-23
No files matched your search
@@ -40,10 +40,9 @@ use codex_rmcp_client::perform_oauth_login;
|
||||
use codex_utils_cli::CliConfigOverrides;
|
||||
use codex_utils_cli::format_env_display;
|
||||
|
||||
use crate::cloud_config;
|
||||
use crate::plugin_cmd::load_cli_auth_mode;
|
||||
|
||||
mod cloud_config;
|
||||
|
||||
/// Subcommands:
|
||||
/// - `list` — list configured servers (with `--json`)
|
||||
/// - `get` — show a single server (with `--json`)
|
||||
@@ -227,13 +226,11 @@ impl McpCli {
|
||||
|
||||
match subcommand {
|
||||
McpSubcommand::List(args) => {
|
||||
let config =
|
||||
cloud_config::load_mcp_config(&config_overrides, loader_overrides).await?;
|
||||
let config = cloud_config::load_config(&config_overrides, loader_overrides).await?;
|
||||
run_list(&config, args).await?;
|
||||
}
|
||||
McpSubcommand::Get(args) => {
|
||||
let config =
|
||||
cloud_config::load_mcp_config(&config_overrides, loader_overrides).await?;
|
||||
let config = cloud_config::load_config(&config_overrides, loader_overrides).await?;
|
||||
run_get(&config, args).await?;
|
||||
}
|
||||
McpSubcommand::Add(args) => {
|
||||
@@ -243,13 +240,11 @@ impl McpCli {
|
||||
run_remove(&config_overrides, args).await?;
|
||||
}
|
||||
McpSubcommand::Login(args) => {
|
||||
let config =
|
||||
cloud_config::load_mcp_config(&config_overrides, loader_overrides).await?;
|
||||
let config = cloud_config::load_config(&config_overrides, loader_overrides).await?;
|
||||
run_login(&config, args).await?;
|
||||
}
|
||||
McpSubcommand::Logout(args) => {
|
||||
let config =
|
||||
cloud_config::load_mcp_config(&config_overrides, loader_overrides).await?;
|
||||
let config = cloud_config::load_config(&config_overrides, loader_overrides).await?;
|
||||
run_logout(&config, args).await?;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user