chore: config editor (#5878)

The goal is to have a single place where we actually write files

In a follow-up PR, will move everything config related in a dedicated
module and move the helpers in a dedicated file
This commit is contained in:
jif-oai
2025-10-29 20:52:46 +00:00
committed by GitHub
parent 2b20cd66af
commit db31f6966d
8 changed files with 976 additions and 1056 deletions

View File

@@ -1,6 +1,6 @@
use std::path::PathBuf;
use codex_core::config::set_windows_wsl_setup_acknowledged;
use codex_core::config_edit::ConfigEditsBuilder;
use crossterm::event::KeyCode;
use crossterm::event::KeyEvent;
use crossterm::event::KeyEventKind;
@@ -66,7 +66,10 @@ impl WindowsSetupWidget {
fn handle_continue(&mut self) {
self.highlighted = WindowsSetupSelection::Continue;
match set_windows_wsl_setup_acknowledged(&self.codex_home, true) {
match ConfigEditsBuilder::new(&self.codex_home)
.set_windows_wsl_setup_acknowledged(true)
.apply_blocking()
{
Ok(()) => {
self.selection = Some(WindowsSetupSelection::Continue);
self.exit_requested = false;