mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
Introduce a new codex-tui2 crate that re-exports the existing interactive TUI surface and delegates run_main directly to codex-tui. This keeps behavior identical while giving tui2 its own crate for future viewport work. Wire the codex CLI to select the frontend via the tui2 feature flag. When the merged CLI overrides include features.tui2=true (e.g. via --enable tui2), interactive runs are routed through codex_tui2::run_main; otherwise they continue to use the original codex_tui::run_main. Register Feature::Tui2 in the core feature registry and add the tui2 crate and dependency entries so the new frontend builds alongside the existing TUI. This is a stub that only wires up the feature flag for this. <img width="619" height="364" alt="image" src="https://github.com/user-attachments/assets/4893f030-932f-471e-a443-63fe6b5d8ed9" />
25 lines
788 B
Rust
25 lines
788 B
Rust
#![deny(clippy::print_stdout, clippy::print_stderr)]
|
|
#![deny(clippy::disallowed_methods)]
|
|
|
|
use std::path::PathBuf;
|
|
|
|
pub use codex_tui::AppExitInfo;
|
|
pub use codex_tui::Cli;
|
|
pub use codex_tui::update_action;
|
|
|
|
/// Entry point for the experimental TUI v2 crate.
|
|
///
|
|
/// Currently this is a thin shim that delegates to the existing `codex-tui`
|
|
/// implementation so behavior and rendering remain identical while the new
|
|
/// viewport is developed behind a feature toggle.
|
|
pub async fn run_main(
|
|
cli: Cli,
|
|
codex_linux_sandbox_exe: Option<PathBuf>,
|
|
) -> std::io::Result<AppExitInfo> {
|
|
#[allow(clippy::print_stdout)] // for now
|
|
{
|
|
println!("Note: You are running the experimental TUI v2 implementation.");
|
|
}
|
|
codex_tui::run_main(cli, codex_linux_sandbox_exe).await
|
|
}
|