#[non_exhaustive]pub struct CodexConfig {
pub path: PathBuf,
pub model: Option<String>,
pub approval_policy: Option<String>,
pub sandbox_mode: Option<String>,
pub web_search: Option<String>,
pub features: BTreeMap<String, bool>,
pub project_trust: BTreeMap<String, String>,
pub profiles: Vec<String>,
pub legacy_profiles: Vec<String>,
pub raw: Table,
}Expand description
The parsed contents of config.toml, plus the profiles beside it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: PathBufThe file this was read from.
model: Option<String>Default model (model).
approval_policy: Option<String>When the model asks for approval (approval_policy).
sandbox_mode: Option<String>Sandbox policy (sandbox_mode).
web_search: Option<String>Web search mode (web_search).
features: BTreeMap<String, bool>Feature flags under [features], for the ones with boolean values.
project_trust: BTreeMap<String, String>Per-directory trust, from [projects."<path>"] tables.
This is what decides the Not inside a trusted directory refusal that
crate::Error::NotTrustedDirectory classifies.
profiles: Vec<String>Profile names, from the <name>.config.toml files beside this one.
legacy_profiles: Vec<String>Names from a legacy [profiles] table, if the file still has one.
The CLI no longer writes these. Present so an old config is visible rather than silently ignored.
raw: TableEverything in the file, including the keys typed above.
Trait Implementations§
Source§impl Clone for CodexConfig
impl Clone for CodexConfig
Source§fn clone(&self) -> CodexConfig
fn clone(&self) -> CodexConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodexConfig
impl Debug for CodexConfig
Source§impl PartialEq for CodexConfig
impl PartialEq for CodexConfig
impl StructuralPartialEq for CodexConfig
Auto Trait Implementations§
impl Freeze for CodexConfig
impl RefUnwindSafe for CodexConfig
impl Send for CodexConfig
impl Sync for CodexConfig
impl Unpin for CodexConfig
impl UnsafeUnpin for CodexConfig
impl UnwindSafe for CodexConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more