mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
Fixed sandbox mode inconsistency if untrusted is selected (#10415)
This PR addresses #10395 When a user is asked to pick the trust level of a project, the code currently reloads the config if they select "trusted". It doesn't reload the config in the "untrusted" case but should. This causes the sandbox mode to be reported incorrectly in `/status` during the first run (it's displayed as `read-only` even though it acts as though it's `workspace-write`).
This commit is contained in:
@@ -114,7 +114,6 @@ mod wrapping;
|
||||
#[cfg(test)]
|
||||
pub mod test_backend;
|
||||
|
||||
use crate::onboarding::TrustDirectorySelection;
|
||||
use crate::onboarding::onboarding_screen::OnboardingScreenArgs;
|
||||
use crate::onboarding::onboarding_screen::run_onboarding_app;
|
||||
use crate::tui::Tui;
|
||||
@@ -494,12 +493,9 @@ async fn run_ratatui_app(
|
||||
exit_reason: ExitReason::UserRequested,
|
||||
});
|
||||
}
|
||||
// if the user acknowledged windows or made an explicit decision ato trust the directory, reload the config accordingly
|
||||
if onboarding_result
|
||||
.directory_trust_decision
|
||||
.map(|d| d == TrustDirectorySelection::Trust)
|
||||
.unwrap_or(false)
|
||||
{
|
||||
// If the user made an explicit trust decision, reload config so current
|
||||
// process state reflects what was persisted to config.toml.
|
||||
if onboarding_result.directory_trust_decision.is_some() {
|
||||
load_config_or_exit(
|
||||
cli_kv_overrides.clone(),
|
||||
overrides.clone(),
|
||||
|
||||
Reference in New Issue
Block a user