This introduces a much-needed "profile" concept where users can specify a collection of options under one name and then pass that via `--profile` to the CLI. This PR introduces the `ConfigProfile` struct and makes it a field of `CargoToml`. It further updates `Config::load_from_base_config_with_overrides()` to respect `ConfigProfile`, overriding default values where appropriate. A detailed unit test is added at the end of `config.rs` to verify this behavior. Details on how to use this feature have also been added to `codex-rs/README.md`.
15 lines
280 B
Rust
15 lines
280 B
Rust
use std::collections::HashMap;
|
|
|
|
use serde::Deserialize;
|
|
|
|
#[derive(Deserialize, Debug, Clone, PartialEq)]
|
|
pub struct McpServerConfig {
|
|
pub command: String,
|
|
|
|
#[serde(default)]
|
|
pub args: Vec<String>,
|
|
|
|
#[serde(default)]
|
|
pub env: Option<HashMap<String, String>>,
|
|
}
|