Start TUI on embedded app server (#14512)

This PR is part of the effort to move the TUI on top of the app server.
In a previous PR, we introduced an in-process app server and moved
`exec` on top of it.

For the TUI, we want to do the migration in stages. The app server
doesn't currently expose all of the functionality required by the TUI,
so we're going to need to support a hybrid approach as we make the
transition.

This PR changes the TUI initialization to instantiate an in-process app
server and access its `AuthManager` and `ThreadManager` rather than
constructing its own copies. It also adds a placeholder TUI event
handler that will eventually translate app server events into TUI
events. App server notifications are accepted but ignored for now. It
also adds proper shutdown of the app server when the TUI terminates.
This commit is contained in:
Eric Traut
2026-03-13 12:04:41 -06:00
committed by GitHub
parent 8567e3a5c7
commit 9dba7337f2
13 changed files with 556 additions and 110 deletions

View File

@@ -976,7 +976,12 @@ async fn run_interactive_tui(
}
}
codex_tui::run_main(interactive, arg0_paths).await
codex_tui::run_main(
interactive,
arg0_paths,
codex_core::config_loader::LoaderOverrides::default(),
)
.await
}
fn confirm(prompt: &str) -> std::io::Result<bool> {