mirror of
https://github.com/openai/codex.git
synced 2026-05-04 13:21:54 +03:00
Handle "Don't Trust" directory selection in onboarding (#4941)
Fixes #4940 Fixes #4892 When selecting "No, ask me to approve edits and commands" during onboarding, the code wasn't applying the correct approval policy, causing Codex to block all write operations instead of requesting approval. This PR fixes the issue by persisting the "DontTrust" decision in config.toml as `trust_level = "untrusted"` and handling it in the sandbox and approval policy logic, so Codex correctly asks for approval before making changes. ## Before (bug) <img width="709" height="500" alt="bef" src="https://github.com/user-attachments/assets/5aced26d-d810-4754-879a-89d9e4e0073b" /> ## After (fixed) <img width="713" height="359" alt="aft" src="https://github.com/user-attachments/assets/9887bbcb-a9a5-4e54-8e76-9125a782226b" /> --------- Co-authored-by: Eric Traut <etraut@openai.com>
This commit is contained in:
committed by
GitHub
parent
018a2d2e50
commit
89ecc00b79
@@ -98,3 +98,13 @@ pub enum ForcedLoginMethod {
|
||||
Chatgpt,
|
||||
Api,
|
||||
}
|
||||
|
||||
/// Represents the trust level for a project directory.
|
||||
/// This determines the approval policy and sandbox mode applied.
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Display, JsonSchema, TS)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
#[strum(serialize_all = "lowercase")]
|
||||
pub enum TrustLevel {
|
||||
Trusted,
|
||||
Untrusted,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user