diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index ce03a430fc..ebf55649b8 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -25,3 +25,4 @@ jobs: uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2 with: ignore_words_file: .codespellignore + skip: frame*.txt diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index 3955f79f10..81fc8683cb 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -212,6 +212,50 @@ dependencies = [ "term", ] +[[package]] +name = "askama" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28" +dependencies = [ + "askama_derive", + "askama_escape", + "humansize", + "num-traits", + "percent-encoding", +] + +[[package]] +name = "askama_derive" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83" +dependencies = [ + "askama_parser", + "basic-toml", + "mime", + "mime_guess", + "proc-macro2", + "quote", + "serde", + "syn 2.0.104", +] + +[[package]] +name = "askama_escape" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" + +[[package]] +name = "askama_parser" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0" +dependencies = [ + "nom", +] + [[package]] name = "assert-json-diff" version = "2.0.2" @@ -305,6 +349,15 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "basic-toml" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" +dependencies = [ + "serde", +] + [[package]] name = "beef" version = "0.5.2" @@ -354,7 +407,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", - "regex-automata 0.4.9", + "regex-automata", "serde", ] @@ -572,6 +625,7 @@ name = "codex-cli" version = "0.0.0" dependencies = [ "anyhow", + "assert_cmd", "clap", "clap_complete", "codex-arg0", @@ -584,7 +638,10 @@ dependencies = [ "codex-protocol", "codex-protocol-ts", "codex-tui", + "predicates", + "pretty_assertions", "serde_json", + "tempfile", "tokio", "tracing", "tracing-subscriber", @@ -606,12 +663,14 @@ name = "codex-core" version = "0.0.0" dependencies = [ "anyhow", + "askama", "assert_cmd", "async-channel", "base64", "bytes", "chrono", "codex-apply-patch", + "codex-file-search", "codex-mcp-client", "codex-protocol", "core_test_support", @@ -679,6 +738,8 @@ dependencies = [ "tokio", "tracing", "tracing-subscriber", + "uuid", + "walkdir", "wiremock", ] @@ -860,6 +921,7 @@ dependencies = [ "color-eyre", "crossterm", "diffy", + "dirs", "image", "insta", "itertools 0.14.0", @@ -1266,7 +1328,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b545b8c50194bdd008283985ab0b31dba153cfd5b3066a92770634fbc0d7d291" dependencies = [ - "nu-ansi-term 0.50.1", + "nu-ansi-term", ] [[package]] @@ -1848,7 +1910,7 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.9", + "regex-automata", "regex-syntax 0.8.5", ] @@ -1981,6 +2043,15 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humansize" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" +dependencies = [ + "libm", +] + [[package]] name = "hyper" version = "1.7.0" @@ -2254,7 +2325,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.9", + "regex-automata", "same-file", "walkdir", "winapi-util", @@ -2536,6 +2607,12 @@ version = "0.2.175" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + [[package]] name = "libredox" version = "0.1.6" @@ -2633,11 +2710,11 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -2811,16 +2888,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - [[package]] name = "nu-ansi-term" version = "0.50.1" @@ -3059,12 +3126,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owo-colors" version = "4.2.2" @@ -3527,19 +3588,10 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", + "regex-automata", "regex-syntax 0.8.5", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - [[package]] name = "regex-automata" version = "0.4.9" @@ -3874,18 +3926,28 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.219" +version = "1.0.224" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "6aaeb1e94f53b16384af593c71e20b095e958dab1d26939c1b70645c5cfbcc0b" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.224" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f39390fa6346e24defbcdd3d9544ba8a19985d0af74df8501fbfe9a64341ab" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.224" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "87ff78ab5e8561c9a675bfc1785cb07ae721f0ee53329a595cefd8c04c2ac4e0" dependencies = [ "proc-macro2", "quote", @@ -3905,15 +3967,16 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.143" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "indexmap 2.10.0", "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] @@ -4100,9 +4163,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" @@ -4834,14 +4897,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", - "nu-ansi-term 0.46.0", + "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -5229,9 +5292,9 @@ dependencies = [ [[package]] name = "wildmatch" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ce1ab1f8c62655ebe1350f589c61e505cf94d385bc6a12899442d9081e71fd" +checksum = "39b7d07a236abaef6607536ccfaf19b396dbe3f5110ddb73d39f4562902ed382" [[package]] name = "winapi" diff --git a/codex-rs/apply-patch/src/lib.rs b/codex-rs/apply-patch/src/lib.rs index de22173c26..5bda31c4c2 100644 --- a/codex-rs/apply-patch/src/lib.rs +++ b/codex-rs/apply-patch/src/lib.rs @@ -40,6 +40,11 @@ pub enum ApplyPatchError { /// Error that occurs while computing replacements when applying patch chunks #[error("{0}")] ComputeReplacements(String), + /// A raw patch body was provided without an explicit `apply_patch` invocation. + #[error( + "patch detected without explicit call to apply_patch. Rerun as [\"apply_patch\", \"\"]" + )] + ImplicitInvocation, } impl From for ApplyPatchError { @@ -93,10 +98,12 @@ pub struct ApplyPatchArgs { pub fn maybe_parse_apply_patch(argv: &[String]) -> MaybeApplyPatch { match argv { + // Direct invocation: apply_patch [cmd, body] if APPLY_PATCH_COMMANDS.contains(&cmd.as_str()) => match parse_patch(body) { Ok(source) => MaybeApplyPatch::Body(source), Err(e) => MaybeApplyPatch::PatchParseError(e), }, + // Bash heredoc form: (optional `cd &&`) apply_patch <<'EOF' ... [bash, flag, script] if bash == "bash" && flag == "-lc" => { match extract_apply_patch_from_bash(script) { Ok((body, workdir)) => match parse_patch(&body) { @@ -207,6 +214,26 @@ impl ApplyPatchAction { /// cwd must be an absolute path so that we can resolve relative paths in the /// patch. pub fn maybe_parse_apply_patch_verified(argv: &[String], cwd: &Path) -> MaybeApplyPatchVerified { + // Detect a raw patch body passed directly as the command or as the body of a bash -lc + // script. In these cases, report an explicit error rather than applying the patch. + match argv { + [body] => { + if parse_patch(body).is_ok() { + return MaybeApplyPatchVerified::CorrectnessError( + ApplyPatchError::ImplicitInvocation, + ); + } + } + [bash, flag, script] if bash == "bash" && flag == "-lc" => { + if parse_patch(script).is_ok() { + return MaybeApplyPatchVerified::CorrectnessError( + ApplyPatchError::ImplicitInvocation, + ); + } + } + _ => {} + } + match maybe_parse_apply_patch(argv) { MaybeApplyPatch::Body(ApplyPatchArgs { patch, @@ -875,6 +902,28 @@ mod tests { )); } + #[test] + fn test_implicit_patch_single_arg_is_error() { + let patch = "*** Begin Patch\n*** Add File: foo\n+hi\n*** End Patch".to_string(); + let args = vec![patch]; + let dir = tempdir().unwrap(); + assert!(matches!( + maybe_parse_apply_patch_verified(&args, dir.path()), + MaybeApplyPatchVerified::CorrectnessError(ApplyPatchError::ImplicitInvocation) + )); + } + + #[test] + fn test_implicit_patch_bash_script_is_error() { + let script = "*** Begin Patch\n*** Add File: foo\n+hi\n*** End Patch"; + let args = args_bash(script); + let dir = tempdir().unwrap(); + assert!(matches!( + maybe_parse_apply_patch_verified(&args, dir.path()), + MaybeApplyPatchVerified::CorrectnessError(ApplyPatchError::ImplicitInvocation) + )); + } + #[test] fn test_literal() { let args = strs_to_strings(&[ diff --git a/codex-rs/cli/Cargo.toml b/codex-rs/cli/Cargo.toml index f7af3349e0..291ef47748 100644 --- a/codex-rs/cli/Cargo.toml +++ b/codex-rs/cli/Cargo.toml @@ -36,5 +36,11 @@ tokio = { version = "1", features = [ "signal", ] } tracing = "0.1.41" -tracing-subscriber = "0.3.19" +tracing-subscriber = "0.3.20" codex-protocol-ts = { path = "../protocol-ts" } + +[dev-dependencies] +assert_cmd = "2" +predicates = "3" +pretty_assertions = "1" +tempfile = "3" diff --git a/codex-rs/cli/src/main.rs b/codex-rs/cli/src/main.rs index 2acc3d84c5..7ce98a3937 100644 --- a/codex-rs/cli/src/main.rs +++ b/codex-rs/cli/src/main.rs @@ -17,6 +17,9 @@ use codex_exec::Cli as ExecCli; use codex_tui::Cli as TuiCli; use std::path::PathBuf; +mod mcp_cmd; + +use crate::mcp_cmd::McpCli; use crate::proto::ProtoCli; /// Codex CLI @@ -56,8 +59,8 @@ enum Subcommand { /// Remove stored authentication credentials. Logout(LogoutCommand), - /// Experimental: run Codex as an MCP server. - Mcp, + /// [experimental] Run Codex as an MCP server and manage MCP servers. + Mcp(McpCli), /// Run the Protocol stream via stdin/stdout #[clap(visible_alias = "p")] @@ -73,6 +76,9 @@ enum Subcommand { #[clap(visible_alias = "a")] Apply(ApplyCommand), + /// Resume a previous interactive session (picker by default; use --last to continue the most recent). + Resume(ResumeCommand), + /// Internal: generate TypeScript protocol bindings. #[clap(hide = true)] GenerateTs(GenerateTsCommand), @@ -85,6 +91,21 @@ struct CompletionCommand { shell: Shell, } +#[derive(Debug, Parser)] +struct ResumeCommand { + /// Conversation/session id (UUID). When provided, resumes this session. + /// If omitted, use --last to pick the most recent recorded session. + #[arg(value_name = "SESSION_ID")] + session_id: Option, + + /// Continue the most recent session without showing the picker. + #[arg(long = "last", default_value_t = false, conflicts_with = "session_id")] + last: bool, + + #[clap(flatten)] + config_overrides: TuiCli, +} + #[derive(Debug, Parser)] struct DebugArgs { #[command(subcommand)] @@ -143,26 +164,54 @@ fn main() -> anyhow::Result<()> { } async fn cli_main(codex_linux_sandbox_exe: Option) -> anyhow::Result<()> { - let cli = MultitoolCli::parse(); + let MultitoolCli { + config_overrides: root_config_overrides, + mut interactive, + subcommand, + } = MultitoolCli::parse(); - match cli.subcommand { + match subcommand { None => { - let mut tui_cli = cli.interactive; - prepend_config_flags(&mut tui_cli.config_overrides, cli.config_overrides); - let usage = codex_tui::run_main(tui_cli, codex_linux_sandbox_exe).await?; + prepend_config_flags( + &mut interactive.config_overrides, + root_config_overrides.clone(), + ); + let usage = codex_tui::run_main(interactive, codex_linux_sandbox_exe).await?; if !usage.is_zero() { println!("{}", codex_core::protocol::FinalOutput::from(usage)); } } Some(Subcommand::Exec(mut exec_cli)) => { - prepend_config_flags(&mut exec_cli.config_overrides, cli.config_overrides); + prepend_config_flags( + &mut exec_cli.config_overrides, + root_config_overrides.clone(), + ); codex_exec::run_main(exec_cli, codex_linux_sandbox_exe).await?; } - Some(Subcommand::Mcp) => { - codex_mcp_server::run_main(codex_linux_sandbox_exe, cli.config_overrides).await?; + Some(Subcommand::Mcp(mut mcp_cli)) => { + // Propagate any root-level config overrides (e.g. `-c key=value`). + prepend_config_flags(&mut mcp_cli.config_overrides, root_config_overrides.clone()); + mcp_cli.run(codex_linux_sandbox_exe).await?; + } + Some(Subcommand::Resume(ResumeCommand { + session_id, + last, + config_overrides, + })) => { + interactive = finalize_resume_interactive( + interactive, + root_config_overrides.clone(), + session_id, + last, + config_overrides, + ); + codex_tui::run_main(interactive, codex_linux_sandbox_exe).await?; } Some(Subcommand::Login(mut login_cli)) => { - prepend_config_flags(&mut login_cli.config_overrides, cli.config_overrides); + prepend_config_flags( + &mut login_cli.config_overrides, + root_config_overrides.clone(), + ); match login_cli.action { Some(LoginSubcommand::Status) => { run_login_status(login_cli.config_overrides).await; @@ -177,11 +226,17 @@ async fn cli_main(codex_linux_sandbox_exe: Option) -> anyhow::Result<() } } Some(Subcommand::Logout(mut logout_cli)) => { - prepend_config_flags(&mut logout_cli.config_overrides, cli.config_overrides); + prepend_config_flags( + &mut logout_cli.config_overrides, + root_config_overrides.clone(), + ); run_logout(logout_cli.config_overrides).await; } Some(Subcommand::Proto(mut proto_cli)) => { - prepend_config_flags(&mut proto_cli.config_overrides, cli.config_overrides); + prepend_config_flags( + &mut proto_cli.config_overrides, + root_config_overrides.clone(), + ); proto::run_main(proto_cli).await?; } Some(Subcommand::Completion(completion_cli)) => { @@ -189,7 +244,10 @@ async fn cli_main(codex_linux_sandbox_exe: Option) -> anyhow::Result<() } Some(Subcommand::Debug(debug_args)) => match debug_args.cmd { DebugCommand::Seatbelt(mut seatbelt_cli) => { - prepend_config_flags(&mut seatbelt_cli.config_overrides, cli.config_overrides); + prepend_config_flags( + &mut seatbelt_cli.config_overrides, + root_config_overrides.clone(), + ); codex_cli::debug_sandbox::run_command_under_seatbelt( seatbelt_cli, codex_linux_sandbox_exe, @@ -197,7 +255,10 @@ async fn cli_main(codex_linux_sandbox_exe: Option) -> anyhow::Result<() .await?; } DebugCommand::Landlock(mut landlock_cli) => { - prepend_config_flags(&mut landlock_cli.config_overrides, cli.config_overrides); + prepend_config_flags( + &mut landlock_cli.config_overrides, + root_config_overrides.clone(), + ); codex_cli::debug_sandbox::run_command_under_landlock( landlock_cli, codex_linux_sandbox_exe, @@ -206,7 +267,10 @@ async fn cli_main(codex_linux_sandbox_exe: Option) -> anyhow::Result<() } }, Some(Subcommand::Apply(mut apply_cli)) => { - prepend_config_flags(&mut apply_cli.config_overrides, cli.config_overrides); + prepend_config_flags( + &mut apply_cli.config_overrides, + root_config_overrides.clone(), + ); run_apply_command(apply_cli, None).await?; } Some(Subcommand::GenerateTs(gen_cli)) => { @@ -228,8 +292,208 @@ fn prepend_config_flags( .splice(0..0, cli_config_overrides.raw_overrides); } +/// Build the final `TuiCli` for a `codex resume` invocation. +fn finalize_resume_interactive( + mut interactive: TuiCli, + root_config_overrides: CliConfigOverrides, + session_id: Option, + last: bool, + resume_cli: TuiCli, +) -> TuiCli { + // Start with the parsed interactive CLI so resume shares the same + // configuration surface area as `codex` without additional flags. + let resume_session_id = session_id; + interactive.resume_picker = resume_session_id.is_none() && !last; + interactive.resume_last = last; + interactive.resume_session_id = resume_session_id; + + // Merge resume-scoped flags and overrides with highest precedence. + merge_resume_cli_flags(&mut interactive, resume_cli); + + // Propagate any root-level config overrides (e.g. `-c key=value`). + prepend_config_flags(&mut interactive.config_overrides, root_config_overrides); + + interactive +} + +/// Merge flags provided to `codex resume` so they take precedence over any +/// root-level flags. Only overrides fields explicitly set on the resume-scoped +/// CLI. Also appends `-c key=value` overrides with highest precedence. +fn merge_resume_cli_flags(interactive: &mut TuiCli, resume_cli: TuiCli) { + if let Some(model) = resume_cli.model { + interactive.model = Some(model); + } + if resume_cli.oss { + interactive.oss = true; + } + if let Some(profile) = resume_cli.config_profile { + interactive.config_profile = Some(profile); + } + if let Some(sandbox) = resume_cli.sandbox_mode { + interactive.sandbox_mode = Some(sandbox); + } + if let Some(approval) = resume_cli.approval_policy { + interactive.approval_policy = Some(approval); + } + if resume_cli.full_auto { + interactive.full_auto = true; + } + if resume_cli.dangerously_bypass_approvals_and_sandbox { + interactive.dangerously_bypass_approvals_and_sandbox = true; + } + if let Some(cwd) = resume_cli.cwd { + interactive.cwd = Some(cwd); + } + if resume_cli.web_search { + interactive.web_search = true; + } + if !resume_cli.images.is_empty() { + interactive.images = resume_cli.images; + } + if let Some(prompt) = resume_cli.prompt { + interactive.prompt = Some(prompt); + } + + interactive + .config_overrides + .raw_overrides + .extend(resume_cli.config_overrides.raw_overrides); +} + fn print_completion(cmd: CompletionCommand) { let mut app = MultitoolCli::command(); let name = "codex"; generate(cmd.shell, &mut app, name, &mut std::io::stdout()); } + +#[cfg(test)] +mod tests { + use super::*; + + fn finalize_from_args(args: &[&str]) -> TuiCli { + let cli = MultitoolCli::try_parse_from(args).expect("parse"); + let MultitoolCli { + interactive, + config_overrides: root_overrides, + subcommand, + } = cli; + + let Subcommand::Resume(ResumeCommand { + session_id, + last, + config_overrides: resume_cli, + }) = subcommand.expect("resume present") + else { + unreachable!() + }; + + finalize_resume_interactive(interactive, root_overrides, session_id, last, resume_cli) + } + + #[test] + fn resume_model_flag_applies_when_no_root_flags() { + let interactive = finalize_from_args(["codex", "resume", "-m", "gpt-5-test"].as_ref()); + + assert_eq!(interactive.model.as_deref(), Some("gpt-5-test")); + assert!(interactive.resume_picker); + assert!(!interactive.resume_last); + assert_eq!(interactive.resume_session_id, None); + } + + #[test] + fn resume_picker_logic_none_and_not_last() { + let interactive = finalize_from_args(["codex", "resume"].as_ref()); + assert!(interactive.resume_picker); + assert!(!interactive.resume_last); + assert_eq!(interactive.resume_session_id, None); + } + + #[test] + fn resume_picker_logic_last() { + let interactive = finalize_from_args(["codex", "resume", "--last"].as_ref()); + assert!(!interactive.resume_picker); + assert!(interactive.resume_last); + assert_eq!(interactive.resume_session_id, None); + } + + #[test] + fn resume_picker_logic_with_session_id() { + let interactive = finalize_from_args(["codex", "resume", "1234"].as_ref()); + assert!(!interactive.resume_picker); + assert!(!interactive.resume_last); + assert_eq!(interactive.resume_session_id.as_deref(), Some("1234")); + } + + #[test] + fn resume_merges_option_flags_and_full_auto() { + let interactive = finalize_from_args( + [ + "codex", + "resume", + "sid", + "--oss", + "--full-auto", + "--search", + "--sandbox", + "workspace-write", + "--ask-for-approval", + "on-request", + "-m", + "gpt-5-test", + "-p", + "my-profile", + "-C", + "/tmp", + "-i", + "/tmp/a.png,/tmp/b.png", + ] + .as_ref(), + ); + + assert_eq!(interactive.model.as_deref(), Some("gpt-5-test")); + assert!(interactive.oss); + assert_eq!(interactive.config_profile.as_deref(), Some("my-profile")); + assert!(matches!( + interactive.sandbox_mode, + Some(codex_common::SandboxModeCliArg::WorkspaceWrite) + )); + assert!(matches!( + interactive.approval_policy, + Some(codex_common::ApprovalModeCliArg::OnRequest) + )); + assert!(interactive.full_auto); + assert_eq!( + interactive.cwd.as_deref(), + Some(std::path::Path::new("/tmp")) + ); + assert!(interactive.web_search); + let has_a = interactive + .images + .iter() + .any(|p| p == std::path::Path::new("/tmp/a.png")); + let has_b = interactive + .images + .iter() + .any(|p| p == std::path::Path::new("/tmp/b.png")); + assert!(has_a && has_b); + assert!(!interactive.resume_picker); + assert!(!interactive.resume_last); + assert_eq!(interactive.resume_session_id.as_deref(), Some("sid")); + } + + #[test] + fn resume_merges_dangerously_bypass_flag() { + let interactive = finalize_from_args( + [ + "codex", + "resume", + "--dangerously-bypass-approvals-and-sandbox", + ] + .as_ref(), + ); + assert!(interactive.dangerously_bypass_approvals_and_sandbox); + assert!(interactive.resume_picker); + assert!(!interactive.resume_last); + assert_eq!(interactive.resume_session_id, None); + } +} diff --git a/codex-rs/cli/src/mcp_cmd.rs b/codex-rs/cli/src/mcp_cmd.rs new file mode 100644 index 0000000000..437511ad57 --- /dev/null +++ b/codex-rs/cli/src/mcp_cmd.rs @@ -0,0 +1,370 @@ +use std::collections::BTreeMap; +use std::collections::HashMap; +use std::path::PathBuf; + +use anyhow::Context; +use anyhow::Result; +use anyhow::anyhow; +use anyhow::bail; +use codex_common::CliConfigOverrides; +use codex_core::config::Config; +use codex_core::config::ConfigOverrides; +use codex_core::config::find_codex_home; +use codex_core::config::load_global_mcp_servers; +use codex_core::config::write_global_mcp_servers; +use codex_core::config_types::McpServerConfig; + +/// [experimental] Launch Codex as an MCP server or manage configured MCP servers. +/// +/// Subcommands: +/// - `serve` — run the MCP server on stdio +/// - `list` — list configured servers (with `--json`) +/// - `get` — show a single server (with `--json`) +/// - `add` — add a server launcher entry to `~/.codex/config.toml` +/// - `remove` — delete a server entry +#[derive(Debug, clap::Parser)] +pub struct McpCli { + #[clap(flatten)] + pub config_overrides: CliConfigOverrides, + + #[command(subcommand)] + pub cmd: Option, +} + +#[derive(Debug, clap::Subcommand)] +pub enum McpSubcommand { + /// [experimental] Run the Codex MCP server (stdio transport). + Serve, + + /// [experimental] List configured MCP servers. + List(ListArgs), + + /// [experimental] Show details for a configured MCP server. + Get(GetArgs), + + /// [experimental] Add a global MCP server entry. + Add(AddArgs), + + /// [experimental] Remove a global MCP server entry. + Remove(RemoveArgs), +} + +#[derive(Debug, clap::Parser)] +pub struct ListArgs { + /// Output the configured servers as JSON. + #[arg(long)] + pub json: bool, +} + +#[derive(Debug, clap::Parser)] +pub struct GetArgs { + /// Name of the MCP server to display. + pub name: String, + + /// Output the server configuration as JSON. + #[arg(long)] + pub json: bool, +} + +#[derive(Debug, clap::Parser)] +pub struct AddArgs { + /// Name for the MCP server configuration. + pub name: String, + + /// Environment variables to set when launching the server. + #[arg(long, value_parser = parse_env_pair, value_name = "KEY=VALUE")] + pub env: Vec<(String, String)>, + + /// Command to launch the MCP server. + #[arg(trailing_var_arg = true, num_args = 1..)] + pub command: Vec, +} + +#[derive(Debug, clap::Parser)] +pub struct RemoveArgs { + /// Name of the MCP server configuration to remove. + pub name: String, +} + +impl McpCli { + pub async fn run(self, codex_linux_sandbox_exe: Option) -> Result<()> { + let McpCli { + config_overrides, + cmd, + } = self; + let subcommand = cmd.unwrap_or(McpSubcommand::Serve); + + match subcommand { + McpSubcommand::Serve => { + codex_mcp_server::run_main(codex_linux_sandbox_exe, config_overrides).await?; + } + McpSubcommand::List(args) => { + run_list(&config_overrides, args)?; + } + McpSubcommand::Get(args) => { + run_get(&config_overrides, args)?; + } + McpSubcommand::Add(args) => { + run_add(&config_overrides, args)?; + } + McpSubcommand::Remove(args) => { + run_remove(&config_overrides, args)?; + } + } + + Ok(()) + } +} + +fn run_add(config_overrides: &CliConfigOverrides, add_args: AddArgs) -> Result<()> { + // Validate any provided overrides even though they are not currently applied. + config_overrides.parse_overrides().map_err(|e| anyhow!(e))?; + + let AddArgs { name, env, command } = add_args; + + validate_server_name(&name)?; + + let mut command_parts = command.into_iter(); + let command_bin = command_parts + .next() + .ok_or_else(|| anyhow!("command is required"))?; + let command_args: Vec = command_parts.collect(); + + let env_map = if env.is_empty() { + None + } else { + let mut map = HashMap::new(); + for (key, value) in env { + map.insert(key, value); + } + Some(map) + }; + + let codex_home = find_codex_home().context("failed to resolve CODEX_HOME")?; + let mut servers = load_global_mcp_servers(&codex_home) + .with_context(|| format!("failed to load MCP servers from {}", codex_home.display()))?; + + let new_entry = McpServerConfig { + command: command_bin, + args: command_args, + env: env_map, + startup_timeout_ms: None, + }; + + servers.insert(name.clone(), new_entry); + + write_global_mcp_servers(&codex_home, &servers) + .with_context(|| format!("failed to write MCP servers to {}", codex_home.display()))?; + + println!("Added global MCP server '{name}'."); + + Ok(()) +} + +fn run_remove(config_overrides: &CliConfigOverrides, remove_args: RemoveArgs) -> Result<()> { + config_overrides.parse_overrides().map_err(|e| anyhow!(e))?; + + let RemoveArgs { name } = remove_args; + + validate_server_name(&name)?; + + let codex_home = find_codex_home().context("failed to resolve CODEX_HOME")?; + let mut servers = load_global_mcp_servers(&codex_home) + .with_context(|| format!("failed to load MCP servers from {}", codex_home.display()))?; + + let removed = servers.remove(&name).is_some(); + + if removed { + write_global_mcp_servers(&codex_home, &servers) + .with_context(|| format!("failed to write MCP servers to {}", codex_home.display()))?; + } + + if removed { + println!("Removed global MCP server '{name}'."); + } else { + println!("No MCP server named '{name}' found."); + } + + Ok(()) +} + +fn run_list(config_overrides: &CliConfigOverrides, list_args: ListArgs) -> Result<()> { + let overrides = config_overrides.parse_overrides().map_err(|e| anyhow!(e))?; + let config = Config::load_with_cli_overrides(overrides, ConfigOverrides::default()) + .context("failed to load configuration")?; + + let mut entries: Vec<_> = config.mcp_servers.iter().collect(); + entries.sort_by(|(a, _), (b, _)| a.cmp(b)); + + if list_args.json { + let json_entries: Vec<_> = entries + .into_iter() + .map(|(name, cfg)| { + let env = cfg.env.as_ref().map(|env| { + env.iter() + .map(|(k, v)| (k.clone(), v.clone())) + .collect::>() + }); + serde_json::json!({ + "name": name, + "command": cfg.command, + "args": cfg.args, + "env": env, + "startup_timeout_ms": cfg.startup_timeout_ms, + }) + }) + .collect(); + let output = serde_json::to_string_pretty(&json_entries)?; + println!("{output}"); + return Ok(()); + } + + if entries.is_empty() { + println!("No MCP servers configured yet. Try `codex mcp add my-tool -- my-command`."); + return Ok(()); + } + + let mut rows: Vec<[String; 4]> = Vec::new(); + for (name, cfg) in entries { + let args = if cfg.args.is_empty() { + "-".to_string() + } else { + cfg.args.join(" ") + }; + + let env = match cfg.env.as_ref() { + None => "-".to_string(), + Some(map) if map.is_empty() => "-".to_string(), + Some(map) => { + let mut pairs: Vec<_> = map.iter().collect(); + pairs.sort_by(|(a, _), (b, _)| a.cmp(b)); + pairs + .into_iter() + .map(|(k, v)| format!("{k}={v}")) + .collect::>() + .join(", ") + } + }; + + rows.push([name.clone(), cfg.command.clone(), args, env]); + } + + let mut widths = ["Name".len(), "Command".len(), "Args".len(), "Env".len()]; + for row in &rows { + for (i, cell) in row.iter().enumerate() { + widths[i] = widths[i].max(cell.len()); + } + } + + println!( + "{: Result<()> { + let overrides = config_overrides.parse_overrides().map_err(|e| anyhow!(e))?; + let config = Config::load_with_cli_overrides(overrides, ConfigOverrides::default()) + .context("failed to load configuration")?; + + let Some(server) = config.mcp_servers.get(&get_args.name) else { + bail!("No MCP server named '{name}' found.", name = get_args.name); + }; + + if get_args.json { + let env = server.env.as_ref().map(|env| { + env.iter() + .map(|(k, v)| (k.clone(), v.clone())) + .collect::>() + }); + let output = serde_json::to_string_pretty(&serde_json::json!({ + "name": get_args.name, + "command": server.command, + "args": server.args, + "env": env, + "startup_timeout_ms": server.startup_timeout_ms, + }))?; + println!("{output}"); + return Ok(()); + } + + println!("{}", get_args.name); + println!(" command: {}", server.command); + let args = if server.args.is_empty() { + "-".to_string() + } else { + server.args.join(" ") + }; + println!(" args: {args}"); + let env_display = match server.env.as_ref() { + None => "-".to_string(), + Some(map) if map.is_empty() => "-".to_string(), + Some(map) => { + let mut pairs: Vec<_> = map.iter().collect(); + pairs.sort_by(|(a, _), (b, _)| a.cmp(b)); + pairs + .into_iter() + .map(|(k, v)| format!("{k}={v}")) + .collect::>() + .join(", ") + } + }; + println!(" env: {env_display}"); + if let Some(timeout) = server.startup_timeout_ms { + println!(" startup_timeout_ms: {timeout}"); + } + println!(" remove: codex mcp remove {}", get_args.name); + + Ok(()) +} + +fn parse_env_pair(raw: &str) -> Result<(String, String), String> { + let mut parts = raw.splitn(2, '='); + let key = parts + .next() + .map(str::trim) + .filter(|s| !s.is_empty()) + .ok_or_else(|| "environment entries must be in KEY=VALUE form".to_string())?; + let value = parts + .next() + .map(str::to_string) + .ok_or_else(|| "environment entries must be in KEY=VALUE form".to_string())?; + + Ok((key.to_string(), value)) +} + +fn validate_server_name(name: &str) -> Result<()> { + let is_valid = !name.is_empty() + && name + .chars() + .all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_'); + + if is_valid { + Ok(()) + } else { + bail!("invalid server name '{name}' (use letters, numbers, '-', '_')"); + } +} diff --git a/codex-rs/cli/tests/mcp_add_remove.rs b/codex-rs/cli/tests/mcp_add_remove.rs new file mode 100644 index 0000000000..9e54f0d867 --- /dev/null +++ b/codex-rs/cli/tests/mcp_add_remove.rs @@ -0,0 +1,86 @@ +use std::path::Path; + +use anyhow::Result; +use codex_core::config::load_global_mcp_servers; +use predicates::str::contains; +use pretty_assertions::assert_eq; +use tempfile::TempDir; + +fn codex_command(codex_home: &Path) -> Result { + let mut cmd = assert_cmd::Command::cargo_bin("codex")?; + cmd.env("CODEX_HOME", codex_home); + Ok(cmd) +} + +#[test] +fn add_and_remove_server_updates_global_config() -> Result<()> { + let codex_home = TempDir::new()?; + + let mut add_cmd = codex_command(codex_home.path())?; + add_cmd + .args(["mcp", "add", "docs", "--", "echo", "hello"]) + .assert() + .success() + .stdout(contains("Added global MCP server 'docs'.")); + + let servers = load_global_mcp_servers(codex_home.path())?; + assert_eq!(servers.len(), 1); + let docs = servers.get("docs").expect("server should exist"); + assert_eq!(docs.command, "echo"); + assert_eq!(docs.args, vec!["hello".to_string()]); + assert!(docs.env.is_none()); + + let mut remove_cmd = codex_command(codex_home.path())?; + remove_cmd + .args(["mcp", "remove", "docs"]) + .assert() + .success() + .stdout(contains("Removed global MCP server 'docs'.")); + + let servers = load_global_mcp_servers(codex_home.path())?; + assert!(servers.is_empty()); + + let mut remove_again_cmd = codex_command(codex_home.path())?; + remove_again_cmd + .args(["mcp", "remove", "docs"]) + .assert() + .success() + .stdout(contains("No MCP server named 'docs' found.")); + + let servers = load_global_mcp_servers(codex_home.path())?; + assert!(servers.is_empty()); + + Ok(()) +} + +#[test] +fn add_with_env_preserves_key_order_and_values() -> Result<()> { + let codex_home = TempDir::new()?; + + let mut add_cmd = codex_command(codex_home.path())?; + add_cmd + .args([ + "mcp", + "add", + "envy", + "--env", + "FOO=bar", + "--env", + "ALPHA=beta", + "--", + "python", + "server.py", + ]) + .assert() + .success(); + + let servers = load_global_mcp_servers(codex_home.path())?; + let envy = servers.get("envy").expect("server should exist"); + let env = envy.env.as_ref().expect("env should be present"); + + assert_eq!(env.len(), 2); + assert_eq!(env.get("FOO"), Some(&"bar".to_string())); + assert_eq!(env.get("ALPHA"), Some(&"beta".to_string())); + + Ok(()) +} diff --git a/codex-rs/cli/tests/mcp_list.rs b/codex-rs/cli/tests/mcp_list.rs new file mode 100644 index 0000000000..e53f42cc8f --- /dev/null +++ b/codex-rs/cli/tests/mcp_list.rs @@ -0,0 +1,106 @@ +use std::path::Path; + +use anyhow::Result; +use predicates::str::contains; +use pretty_assertions::assert_eq; +use serde_json::Value as JsonValue; +use tempfile::TempDir; + +fn codex_command(codex_home: &Path) -> Result { + let mut cmd = assert_cmd::Command::cargo_bin("codex")?; + cmd.env("CODEX_HOME", codex_home); + Ok(cmd) +} + +#[test] +fn list_shows_empty_state() -> Result<()> { + let codex_home = TempDir::new()?; + + let mut cmd = codex_command(codex_home.path())?; + let output = cmd.args(["mcp", "list"]).output()?; + assert!(output.status.success()); + let stdout = String::from_utf8(output.stdout)?; + assert!(stdout.contains("No MCP servers configured yet.")); + + Ok(()) +} + +#[test] +fn list_and_get_render_expected_output() -> Result<()> { + let codex_home = TempDir::new()?; + + let mut add = codex_command(codex_home.path())?; + add.args([ + "mcp", + "add", + "docs", + "--env", + "TOKEN=secret", + "--", + "docs-server", + "--port", + "4000", + ]) + .assert() + .success(); + + let mut list_cmd = codex_command(codex_home.path())?; + let list_output = list_cmd.args(["mcp", "list"]).output()?; + assert!(list_output.status.success()); + let stdout = String::from_utf8(list_output.stdout)?; + assert!(stdout.contains("Name")); + assert!(stdout.contains("docs")); + assert!(stdout.contains("docs-server")); + assert!(stdout.contains("TOKEN=secret")); + + let mut list_json_cmd = codex_command(codex_home.path())?; + let json_output = list_json_cmd.args(["mcp", "list", "--json"]).output()?; + assert!(json_output.status.success()); + let stdout = String::from_utf8(json_output.stdout)?; + let parsed: JsonValue = serde_json::from_str(&stdout)?; + let array = parsed.as_array().expect("expected array"); + assert_eq!(array.len(), 1); + let entry = &array[0]; + assert_eq!(entry.get("name"), Some(&JsonValue::String("docs".into()))); + assert_eq!( + entry.get("command"), + Some(&JsonValue::String("docs-server".into())) + ); + + let args = entry + .get("args") + .and_then(|v| v.as_array()) + .expect("args array"); + assert_eq!( + args, + &vec![ + JsonValue::String("--port".into()), + JsonValue::String("4000".into()) + ] + ); + + let env = entry + .get("env") + .and_then(|v| v.as_object()) + .expect("env map"); + assert_eq!(env.get("TOKEN"), Some(&JsonValue::String("secret".into()))); + + let mut get_cmd = codex_command(codex_home.path())?; + let get_output = get_cmd.args(["mcp", "get", "docs"]).output()?; + assert!(get_output.status.success()); + let stdout = String::from_utf8(get_output.stdout)?; + assert!(stdout.contains("docs")); + assert!(stdout.contains("command: docs-server")); + assert!(stdout.contains("args: --port 4000")); + assert!(stdout.contains("env: TOKEN=secret")); + assert!(stdout.contains("remove: codex mcp remove docs")); + + let mut get_json_cmd = codex_command(codex_home.path())?; + get_json_cmd + .args(["mcp", "get", "docs", "--json"]) + .assert() + .success() + .stdout(contains("\"name\": \"docs\"")); + + Ok(()) +} diff --git a/codex-rs/common/src/config_summary.rs b/codex-rs/common/src/config_summary.rs index 39d524731f..dabc606ce1 100644 --- a/codex-rs/common/src/config_summary.rs +++ b/codex-rs/common/src/config_summary.rs @@ -17,7 +17,10 @@ pub fn create_config_summary_entries(config: &Config) -> Vec<(&'static str, Stri { entries.push(( "reasoning effort", - config.model_reasoning_effort.to_string(), + config + .model_reasoning_effort + .map(|effort| effort.to_string()) + .unwrap_or_else(|| "none".to_string()), )); entries.push(( "reasoning summaries", diff --git a/codex-rs/common/src/elapsed.rs b/codex-rs/common/src/elapsed.rs index 3cc3d547ce..297832b1ec 100644 --- a/codex-rs/common/src/elapsed.rs +++ b/codex-rs/common/src/elapsed.rs @@ -2,7 +2,7 @@ use std::time::Duration; use std::time::Instant; /// Returns a string representing the elapsed time since `start_time` like -/// "1m15s" or "1.50s". +/// "1m 15s" or "1.50s". pub fn format_elapsed(start_time: Instant) -> String { format_duration(start_time.elapsed()) } @@ -12,7 +12,7 @@ pub fn format_elapsed(start_time: Instant) -> String { /// Formatting rules: /// * < 1 s -> "{milli}ms" /// * < 60 s -> "{sec:.2}s" (two decimal places) -/// * >= 60 s -> "{min}m{sec:02}s" +/// * >= 60 s -> "{min}m {sec:02}s" pub fn format_duration(duration: Duration) -> String { let millis = duration.as_millis() as i64; format_elapsed_millis(millis) @@ -26,7 +26,7 @@ fn format_elapsed_millis(millis: i64) -> String { } else { let minutes = millis / 60_000; let seconds = (millis % 60_000) / 1000; - format!("{minutes}m{seconds:02}s") + format!("{minutes}m {seconds:02}s") } } @@ -61,12 +61,18 @@ mod tests { fn test_format_duration_minutes() { // Durations ≥ 1 minute should be printed mmss. let dur = Duration::from_millis(75_000); // 1m15s - assert_eq!(format_duration(dur), "1m15s"); + assert_eq!(format_duration(dur), "1m 15s"); let dur_exact = Duration::from_millis(60_000); // 1m0s - assert_eq!(format_duration(dur_exact), "1m00s"); + assert_eq!(format_duration(dur_exact), "1m 00s"); let dur_long = Duration::from_millis(3_601_000); - assert_eq!(format_duration(dur_long), "60m01s"); + assert_eq!(format_duration(dur_long), "60m 01s"); + } + + #[test] + fn test_format_duration_one_hour_has_space() { + let dur_hour = Duration::from_millis(3_600_000); + assert_eq!(format_duration(dur_hour), "60m 00s"); } } diff --git a/codex-rs/common/src/model_presets.rs b/codex-rs/common/src/model_presets.rs index 2b6e5dfb92..065bb1e340 100644 --- a/codex-rs/common/src/model_presets.rs +++ b/codex-rs/common/src/model_presets.rs @@ -1,4 +1,6 @@ +use codex_core::config::GPT_5_CODEX_MEDIUM_MODEL; use codex_core::protocol_config_types::ReasoningEffort; +use codex_protocol::mcp_protocol::AuthMode; /// A simple preset pairing a model slug with a reasoning effort. #[derive(Debug, Clone, Copy)] @@ -12,50 +14,68 @@ pub struct ModelPreset { /// Model slug (e.g., "gpt-5"). pub model: &'static str, /// Reasoning effort to apply for this preset. - pub effort: ReasoningEffort, + pub effort: Option, } -/// Built-in list of model presets that pair a model with a reasoning effort. -/// -/// Keep this UI-agnostic so it can be reused by both TUI and MCP server. -pub fn builtin_model_presets() -> &'static [ModelPreset] { - // Order reflects effort from minimal to high. - const PRESETS: &[ModelPreset] = &[ - ModelPreset { - id: "gpt-5-minimal", - label: "gpt-5 minimal", - description: "— fastest responses with limited reasoning; ideal for coding, instructions, or lightweight tasks", - model: "gpt-5", - effort: ReasoningEffort::Minimal, - }, - ModelPreset { - id: "gpt-5-low", - label: "gpt-5 low", - description: "— balances speed with some reasoning; useful for straightforward queries and short explanations", - model: "gpt-5", - effort: ReasoningEffort::Low, - }, - ModelPreset { - id: "gpt-5-medium", - label: "gpt-5 medium", - description: "— default setting; provides a solid balance of reasoning depth and latency for general-purpose tasks", - model: "gpt-5", - effort: ReasoningEffort::Medium, - }, - ModelPreset { - id: "gpt-5-high", - label: "gpt-5 high", - description: "— maximizes reasoning depth for complex or ambiguous problems", - model: "gpt-5", - effort: ReasoningEffort::High, - }, - ModelPreset { - id: "gpt-5-high-new", - label: "gpt-5 high new", - description: "— our latest release tuned to rely on the model's built-in reasoning defaults", - model: "gpt-5-high-new", - effort: ReasoningEffort::Medium, - }, - ]; - PRESETS +const PRESETS: &[ModelPreset] = &[ + ModelPreset { + id: "gpt-5-codex-low", + label: "gpt-5-codex low", + description: "", + model: "gpt-5-codex", + effort: Some(ReasoningEffort::Low), + }, + ModelPreset { + id: "gpt-5-codex-medium", + label: "gpt-5-codex medium", + description: "", + model: "gpt-5-codex", + effort: None, + }, + ModelPreset { + id: "gpt-5-codex-high", + label: "gpt-5-codex high", + description: "", + model: "gpt-5-codex", + effort: Some(ReasoningEffort::High), + }, + ModelPreset { + id: "gpt-5-minimal", + label: "gpt-5 minimal", + description: "— fastest responses with limited reasoning; ideal for coding, instructions, or lightweight tasks", + model: "gpt-5", + effort: Some(ReasoningEffort::Minimal), + }, + ModelPreset { + id: "gpt-5-low", + label: "gpt-5 low", + description: "— balances speed with some reasoning; useful for straightforward queries and short explanations", + model: "gpt-5", + effort: Some(ReasoningEffort::Low), + }, + ModelPreset { + id: "gpt-5-medium", + label: "gpt-5 medium", + description: "— default setting; provides a solid balance of reasoning depth and latency for general-purpose tasks", + model: "gpt-5", + effort: Some(ReasoningEffort::Medium), + }, + ModelPreset { + id: "gpt-5-high", + label: "gpt-5 high", + description: "— maximizes reasoning depth for complex or ambiguous problems", + model: "gpt-5", + effort: Some(ReasoningEffort::High), + }, +]; + +pub fn builtin_model_presets(auth_mode: Option) -> Vec { + match auth_mode { + Some(AuthMode::ApiKey) => PRESETS + .iter() + .copied() + .filter(|p| p.model != GPT_5_CODEX_MEDIUM_MODEL) + .collect(), + _ => PRESETS.to_vec(), + } } diff --git a/codex-rs/core/Cargo.toml b/codex-rs/core/Cargo.toml index 69ef7bc449..b4ed4a937a 100644 --- a/codex-rs/core/Cargo.toml +++ b/codex-rs/core/Cargo.toml @@ -13,11 +13,13 @@ workspace = true [dependencies] anyhow = "1" +askama = "0.12" async-channel = "2.3.1" base64 = "0.22" bytes = "1.10.1" chrono = { version = "0.4", features = ["serde"] } codex-apply-patch = { path = "../apply-patch" } +codex-file-search = { path = "../file-search" } codex-mcp-client = { path = "../mcp-client" } codex-protocol = { path = "../protocol" } dirs = "6" @@ -55,7 +57,7 @@ tree-sitter = "0.25.9" tree-sitter-bash = "0.25.0" uuid = { version = "1", features = ["serde", "v4"] } which = "6" -wildmatch = "2.4.0" +wildmatch = "2.5.0" [target.'cfg(target_os = "linux")'.dependencies] diff --git a/codex-rs/core/gpt_5_codex_prompt.md b/codex-rs/core/gpt_5_codex_prompt.md new file mode 100644 index 0000000000..2c49fafec6 --- /dev/null +++ b/codex-rs/core/gpt_5_codex_prompt.md @@ -0,0 +1,100 @@ +You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer. + +## General + +- The arguments to `shell` will be passed to execvp(). Most terminal commands should be prefixed with ["bash", "-lc"]. +- Always set the `workdir` param when using the shell function. Do not use `cd` unless absolutely necessary. +- When searching for text or files, prefer using `rg` or `rg --files` respectively because `rg` is much faster than alternatives like `grep`. (If the `rg` command is not found, then use alternatives.) + +## Editing constraints + +- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them. +- Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare. +- You may be in a dirty git worktree. + * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user. + * If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes. + * If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them. + * If the changes are in unrelated files, just ignore them and don't revert them. +- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed. + +## Plan tool + +When using the planning tool: +- Skip using the planning tool for straightforward tasks (roughly the easiest 25%). +- Do not make single-step plans. +- When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan. + +## Codex CLI harness, sandboxing, and approvals + +The Codex CLI harness supports several different sandboxing, and approval configurations that the user can choose from. + +Filesystem sandboxing defines which files can be read or written. The options are: +- **read-only**: You can only read files. +- **workspace-write**: You can read files. You can write to files in this folder, but not outside it. +- **danger-full-access**: No filesystem sandboxing. + +Network sandboxing defines whether network can be accessed without approval. Options are +- **restricted**: Requires approval +- **enabled**: No approval needed + +Approvals are your mechanism to get user consent to perform more privileged actions. Although they introduce friction to the user because your work is paused until the user responds, you should leverage them to accomplish your important work. Do not let these settings or the sandbox deter you from attempting to accomplish the user's task unless it is set to "never", in which case never ask for approvals. + +Approval options are +- **untrusted**: The harness will escalate most commands for user approval, apart from a limited allowlist of safe "read" commands. +- **on-failure**: The harness will allow all commands to run in the sandbox (if enabled), and failures will be escalated to the user for approval to run again without the sandbox. +- **on-request**: Commands will be run in the sandbox by default, and you can specify in your tool call if you want to escalate a command to run without sandboxing. (Note that this mode is not always available. If it is, you'll see parameters for it in the `shell` command description.) +- **never**: This is a non-interactive mode where you may NEVER ask the user for approval to run commands. Instead, you must always persist and work around constraints to solve the task for the user. You MUST do your utmost best to finish the task and validate your work before yielding. If this mode is paired with `danger-full-access`, take advantage of it to deliver the best outcome for the user. Further, in this mode, your default testing philosophy is overridden: Even if you don't see local patterns for testing, you may add tests and scripts to validate your work. Just remove them before yielding. + +When you are running with approvals `on-request`, and sandboxing enabled, here are scenarios where you'll need to request approval: +- You need to run a command that writes to a directory that requires it (e.g. running tests that write to /tmp) +- You need to run a GUI app (e.g., open/xdg-open/osascript) to open browsers or files. +- You are running sandboxed and need to run a command that requires network access (e.g. installing packages) +- If you run a command that is important to solving the user's query, but it fails because of sandboxing, rerun the command with approval. +- You are about to take a potentially destructive action such as an `rm` or `git reset` that the user did not explicitly ask for +- (for all of these, you should weigh alternative paths that do not require approval) + +When sandboxing is set to read-only, you'll need to request approval for any command that isn't a read. + +You will be told what filesystem sandboxing, network sandboxing, and approval mode are active in a developer or user message. If you are not told about this, assume that you are running with workspace-write, network sandboxing enabled, and approval on-failure. + +## Special user requests + +- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as `date`), you should do so. +- If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps. + +## Presenting your work and final message + +You are producing plain text that will later be styled by the CLI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value. + +- Default: be very concise; friendly coding teammate tone. +- Ask only when needed; suggest ideas; mirror the user's style. +- For substantial work, summarize clearly; follow final‑answer formatting. +- Skip heavy formatting for simple confirmations. +- Don't dump large files you've written; reference paths only. +- No "save/copy this file" - User is on the same machine. +- Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something. +- For code changes: + * Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with "summary", just jump right in. + * If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps. + * When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number. +- The user does not command execution outputs. When asked to show the output of a command (e.g. `git show`), relay the important details in your answer or summarize the key lines so the user understands the result. + +### Final answer structure and style guidelines + +- Plain text; CLI handles styling. Use structure only when it helps scanability. +- Headers: optional; short Title Case (1-3 words) wrapped in **…**; no blank line before the first bullet; add only if they truly help. +- Bullets: use - ; merge related points; keep to one line when possible; 4–6 per list ordered by importance; keep phrasing consistent. +- Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with **. +- Code samples or multi-line snippets should be wrapped in fenced code blocks; add a language hint whenever obvious. +- Structure: group related bullets; order sections general → specific → supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task. +- Tone: collaborative, concise, factual; present tense, active voice; self‑contained; no "above/below"; parallel wording. +- Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short—wrap/reformat if long; avoid naming formatting styles in answers. +- Adaptation: code explanations → precise, structured with code refs; simple tasks → lead with outcome; big changes → logical walkthrough + rationale + next actions; casual one-offs → plain sentences, no headers/bullets. +- File References: When referencing files in your response, make sure to include the relevant start line and always follow the below rules: + * Use inline code to make file paths clickable. + * Each reference should have a stand alone path. Even if it's the same file. + * Accepted: absolute, workspace‑relative, a/ or b/ diff prefixes, or bare filename/suffix. + * Line/column (1‑based, optional): :line[:column] or #Lline[Ccolumn] (column defaults to 1). + * Do not use URIs like file://, vscode://, or https://. + * Do not provide range of lines + * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\repo\project\main.rs:12:5 diff --git a/codex-rs/core/prompt.md b/codex-rs/core/prompt.md index e18327b46b..e4590c386d 100644 --- a/codex-rs/core/prompt.md +++ b/codex-rs/core/prompt.md @@ -251,6 +251,16 @@ You are producing plain text that will later be styled by the CLI. Follow these - Apply to inline examples and to bullet keywords if the keyword itself is a literal file/command. - Never mix monospace and bold markers; choose one based on whether it’s a keyword (`**`) or inline code/path (`` ` ``). +**File References** +When referencing files in your response, make sure to include the relevant start line and always follow the below rules: + * Use inline code to make file paths clickable. + * Each reference should have a stand alone path. Even if it's the same file. + * Accepted: absolute, workspace‑relative, a/ or b/ diff prefixes, or bare filename/suffix. + * Line/column (1‑based, optional): :line[:column] or #Lline[Ccolumn] (column defaults to 1). + * Do not use URIs like file://, vscode://, or https://. + * Do not provide range of lines + * Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\repo\project\main.rs:12:5 + **Structure** - Place related bullets together; don’t mix unrelated concepts in the same section. diff --git a/codex-rs/core/review_prompt.md b/codex-rs/core/review_prompt.md new file mode 100644 index 0000000000..01d93598a7 --- /dev/null +++ b/codex-rs/core/review_prompt.md @@ -0,0 +1,87 @@ +# Review guidelines: + +You are acting as a reviewer for a proposed code change made by another engineer. + +Below are some default guidelines for determining whether the original author would appreciate the issue being flagged. + +These are not the final word in determining whether an issue is a bug. In many cases, you will encounter other, more specific guidelines. These may be present elsewhere in a developer message, a user message, a file, or even elsewhere in this system message. +Those guidelines should be considered to override these general instructions. + +Here are the general guidelines for determining whether something is a bug and should be flagged. + +1. It meaningfully impacts the accuracy, performance, security, or maintainability of the code. +2. The bug is discrete and actionable (i.e. not a general issue with the codebase or a combination of multiple issues). +3. Fixing the bug does not demand a level of rigor that is not present in the rest of the codebase (e.g. one doesn't need very detailed comments and input validation in a repository of one-off scripts in personal projects) +4. The bug was introduced in the commit (pre-existing bugs should not be flagged). +5. The author of the original PR would likely fix the issue if they were made aware of it. +6. The bug does not rely on unstated assumptions about the codebase or author's intent. +7. It is not enough to speculate that a change may disrupt another part of the codebase, to be considered a bug, one must identify the other parts of the code that are provably affected. +8. The bug is clearly not just an intentional change by the original author. + +When flagging a bug, you will also provide an accompanying comment. Once again, these guidelines are not the final word on how to construct a comment -- defer to any subsequent guidelines that you encounter. + +1. The comment should be clear about why the issue is a bug. +2. The comment should appropriately communicate the severity of the issue. It should not claim that an issue is more severe than it actually is. +3. The comment should be brief. The body should be at most 1 paragraph. It should not introduce line breaks within the natural language flow unless it is necessary for the code fragment. +4. The comment should not include any chunks of code longer than 3 lines. Any code chunks should be wrapped in markdown inline code tags or a code block. +5. The comment should clearly and explicitly communicate the scenarios, environments, or inputs that are necessary for the bug to arise. The comment should immediately indicate that the issue's severity depends on these factors. +6. The comment's tone should be matter-of-fact and not accusatory or overly positive. It should read as a helpful AI assistant suggestion without sounding too much like a human reviewer. +7. The comment should be written such that the original author can immediately grasp the idea without close reading. +8. The comment should avoid excessive flattery and comments that are not helpful to the original author. The comment should avoid phrasing like "Great job ...", "Thanks for ...". + +Below are some more detailed guidelines that you should apply to this specific review. + +HOW MANY FINDINGS TO RETURN: + +Output all findings that the original author would fix if they knew about it. If there is no finding that a person would definitely love to see and fix, prefer outputting no findings. Do not stop at the first qualifying finding. Continue until you've listed every qualifying finding. + +GUIDELINES: + +- Ignore trivial style unless it obscures meaning or violates documented standards. +- Use one comment per distinct issue (or a multi-line range if necessary). +- Use ```suggestion blocks ONLY for concrete replacement code (minimal lines; no commentary inside the block). +- In every ```suggestion block, preserve the exact leading whitespace of the replaced lines (spaces vs tabs, number of spaces). +- Do NOT introduce or remove outer indentation levels unless that is the actual fix. + +The comments will be presented in the code review as inline comments. You should avoid providing unnecessary location details in the comment body. Always keep the line range as short as possible for interpreting the issue. Avoid ranges longer than 5–10 lines; instead, choose the most suitable subrange that pinpoints the problem. + +At the beginning of the finding title, tag the bug with priority level. For example "[P1] Un-padding slices along wrong tensor dimensions". [P0] – Drop everything to fix. Blocking release, operations, or major usage. Only use for universal issues that do not depend on any assumptions about the inputs. · [P1] – Urgent. Should be addressed in the next cycle · [P2] – Normal. To be fixed eventually · [P3] – Low. Nice to have. + +Additionally, include a numeric priority field in the JSON output for each finding: set "priority" to 0 for P0, 1 for P1, 2 for P2, or 3 for P3. If a priority cannot be determined, omit the field or use null. + +At the end of your findings, output an "overall correctness" verdict of whether or not the patch should be considered "correct". +Correct implies that existing code and tests will not break, and the patch is free of bugs and other blocking issues. +Ignore non-blocking issues such as style, formatting, typos, documentation, and other nits. + +FORMATTING GUIDELINES: +The finding description should be one paragraph. + +OUTPUT FORMAT: + +## Output schema — MUST MATCH *exactly* + +```json +{ + "findings": [ + { + "title": "<≤ 80 chars, imperative>", + "body": "", + "confidence_score": , + "priority": , + "code_location": { + "absolute_file_path": "", + "line_range": {"start": , "end": } + } + } + ], + "overall_correctness": "patch is correct" | "patch is incorrect", + "overall_explanation": "<1-3 sentence explanation justifying the overall_correctness verdict>", + "overall_confidence_score": +} +``` + +* **Do not** wrap the JSON in markdown fences or extra prose. +* The code_location field is required and must include absolute_file_path and line_range. +*Line ranges must be as short as possible for interpreting the issue (avoid ranges over 5–10 lines; pick the most suitable subrange). +* The code_location should overlap with the diff. +* Do not generate a PR fix. \ No newline at end of file diff --git a/codex-rs/core/src/auth.rs b/codex-rs/core/src/auth.rs index 09ad13b4f7..a2158310dc 100644 --- a/codex-rs/core/src/auth.rs +++ b/codex-rs/core/src/auth.rs @@ -408,6 +408,32 @@ mod tests { assert_eq!(auth_dot_json, same_auth_dot_json); } + #[test] + fn login_with_api_key_overwrites_existing_auth_json() { + let dir = tempdir().unwrap(); + let auth_path = dir.path().join("auth.json"); + let stale_auth = json!({ + "OPENAI_API_KEY": "sk-old", + "tokens": { + "id_token": "stale.header.payload", + "access_token": "stale-access", + "refresh_token": "stale-refresh", + "account_id": "stale-acc" + } + }); + std::fs::write( + &auth_path, + serde_json::to_string_pretty(&stale_auth).unwrap(), + ) + .unwrap(); + + super::login_with_api_key(dir.path(), "sk-new").expect("login_with_api_key should succeed"); + + let auth = super::try_read_auth_json(&auth_path).expect("auth.json should parse"); + assert_eq!(auth.openai_api_key.as_deref(), Some("sk-new")); + assert!(auth.tokens.is_none(), "tokens should be cleared"); + } + #[tokio::test] async fn pro_account_with_no_api_key_uses_chatgpt_auth() { let codex_home = tempdir().unwrap(); diff --git a/codex-rs/core/src/client.rs b/codex-rs/core/src/client.rs index e6e21df396..055c3afa87 100644 --- a/codex-rs/core/src/client.rs +++ b/codex-rs/core/src/client.rs @@ -72,7 +72,7 @@ pub struct ModelClient { client: reqwest::Client, provider: ModelProviderInfo, conversation_id: ConversationId, - effort: ReasoningEffortConfig, + effort: Option, summary: ReasoningSummaryConfig, } @@ -81,7 +81,7 @@ impl ModelClient { config: Arc, auth_manager: Option>, provider: ModelProviderInfo, - effort: ReasoningEffortConfig, + effort: Option, summary: ReasoningSummaryConfig, conversation_id: ConversationId, ) -> Self { @@ -104,6 +104,12 @@ impl ModelClient { .or_else(|| get_model_info(&self.config.model_family).map(|info| info.context_window)) } + pub fn get_auto_compact_token_limit(&self) -> Option { + self.config.model_auto_compact_token_limit.or_else(|| { + get_model_info(&self.config.model_family).and_then(|info| info.auto_compact_token_limit) + }) + } + /// Dispatches to either the Responses or Chat implementation depending on /// the provider config. Public callers always invoke `stream()` – the /// specialised helpers are private to avoid accidental misuse. @@ -187,6 +193,15 @@ impl ModelClient { None }; + // In general, we want to explicitly send `store: false` when using the Responses API, + // but in practice, the Azure Responses API rejects `store: false`: + // + // - If store = false and id is sent an error is thrown that ID is not found + // - If store = false and id is not sent an error is thrown that ID is required + // + // For Azure, we send `store: true` and preserve reasoning item IDs. + let azure_workaround = self.provider.is_azure_responses_endpoint(); + let payload = ResponsesApiRequest { model: &self.config.model, instructions: &full_instructions, @@ -195,13 +210,19 @@ impl ModelClient { tool_choice: "auto", parallel_tool_calls: false, reasoning, - store: false, + store: azure_workaround, stream: true, include, prompt_cache_key: Some(self.conversation_id.to_string()), text, }; + let mut payload_json = serde_json::to_value(&payload)?; + if azure_workaround { + attach_item_ids(&mut payload_json, &input_with_instructions); + } + let payload_body = serde_json::to_string(&payload_json)?; + let mut attempt = 0; let max_retries = self.provider.request_max_retries(); @@ -214,7 +235,7 @@ impl ModelClient { trace!( "POST to {}: {}", self.provider.get_full_url(&auth), - serde_json::to_string(&payload)? + payload_body.as_str() ); let mut req_builder = self @@ -228,7 +249,7 @@ impl ModelClient { .header("conversation_id", self.conversation_id.to_string()) .header("session_id", self.conversation_id.to_string()) .header(reqwest::header::ACCEPT, "text/event-stream") - .json(&payload); + .json(&payload_json); if let Some(auth) = auth.as_ref() && auth.mode == AuthMode::ChatGPT @@ -356,7 +377,7 @@ impl ModelClient { } /// Returns the current reasoning effort setting. - pub fn get_reasoning_effort(&self) -> ReasoningEffortConfig { + pub fn get_reasoning_effort(&self) -> Option { self.effort } @@ -425,6 +446,33 @@ struct ResponseCompletedOutputTokensDetails { reasoning_tokens: u64, } +fn attach_item_ids(payload_json: &mut Value, original_items: &[ResponseItem]) { + let Some(input_value) = payload_json.get_mut("input") else { + return; + }; + let serde_json::Value::Array(items) = input_value else { + return; + }; + + for (value, item) in items.iter_mut().zip(original_items.iter()) { + if let ResponseItem::Reasoning { id, .. } + | ResponseItem::Message { id: Some(id), .. } + | ResponseItem::WebSearchCall { id: Some(id), .. } + | ResponseItem::FunctionCall { id: Some(id), .. } + | ResponseItem::LocalShellCall { id: Some(id), .. } + | ResponseItem::CustomToolCall { id: Some(id), .. } = item + { + if id.is_empty() { + continue; + } + + if let Some(obj) = value.as_object_mut() { + obj.insert("id".to_string(), Value::String(id.clone())); + } + } + } +} + async fn process_sse( stream: S, tx_event: mpsc::Sender>, diff --git a/codex-rs/core/src/client_common.rs b/codex-rs/core/src/client_common.rs index 2f849239ab..eead654b9e 100644 --- a/codex-rs/core/src/client_common.rs +++ b/codex-rs/core/src/client_common.rs @@ -10,14 +10,14 @@ use codex_protocol::models::ResponseItem; use futures::Stream; use serde::Serialize; use std::borrow::Cow; +use std::ops::Deref; use std::pin::Pin; use std::task::Context; use std::task::Poll; use tokio::sync::mpsc; -/// The `instructions` field in the payload sent to a model should always start -/// with this content. -const BASE_INSTRUCTIONS: &str = include_str!("../prompt.md"); +/// Review thread system prompt. Edit `core/src/review_prompt.md` to customize. +pub const REVIEW_PROMPT: &str = include_str!("../review_prompt.md"); /// API request payload for a single model turn #[derive(Default, Debug, Clone)] @@ -38,11 +38,12 @@ impl Prompt { let base = self .base_instructions_override .as_deref() - .unwrap_or(BASE_INSTRUCTIONS); + .unwrap_or(model.base_instructions.deref()); let mut sections: Vec<&str> = vec![base]; - // When there are no custom instructions, add apply_patch_tool_instructions if either: - // - the model needs special instructions (4.1), or + // When there are no custom instructions, add apply_patch_tool_instructions if: + // - the model needs special instructions (4.1) + // AND // - there is no apply_patch tool present let is_apply_patch_tool_present = self.tools.iter().any(|tool| match tool { OpenAiTool::Function(f) => f.name == "apply_patch", @@ -50,7 +51,8 @@ impl Prompt { _ => false, }); if self.base_instructions_override.is_none() - && (model.needs_special_apply_patch_instructions || !is_apply_patch_tool_present) + && model.needs_special_apply_patch_instructions + && !is_apply_patch_tool_present { sections.push(APPLY_PATCH_TOOL_INSTRUCTIONS); } @@ -81,8 +83,10 @@ pub enum ResponseEvent { #[derive(Debug, Serialize)] pub(crate) struct Reasoning { - pub(crate) effort: ReasoningEffortConfig, - pub(crate) summary: ReasoningSummaryConfig, + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) effort: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub(crate) summary: Option, } /// Controls under the `text` field in the Responses API for GPT-5. @@ -136,14 +140,17 @@ pub(crate) struct ResponsesApiRequest<'a> { pub(crate) fn create_reasoning_param_for_request( model_family: &ModelFamily, - effort: ReasoningEffortConfig, + effort: Option, summary: ReasoningSummaryConfig, ) -> Option { - if model_family.supports_reasoning_summaries { - Some(Reasoning { effort, summary }) - } else { - None + if !model_family.supports_reasoning_summaries { + return None; } + + Some(Reasoning { + effort, + summary: Some(summary), + }) } pub(crate) fn create_text_param_for_request( @@ -169,18 +176,64 @@ impl Stream for ResponseStream { #[cfg(test)] mod tests { use crate::model_family::find_family_for_model; + use pretty_assertions::assert_eq; use super::*; + struct InstructionsTestCase { + pub slug: &'static str, + pub expects_apply_patch_instructions: bool, + } #[test] fn get_full_instructions_no_user_content() { let prompt = Prompt { ..Default::default() }; - let expected = format!("{BASE_INSTRUCTIONS}\n{APPLY_PATCH_TOOL_INSTRUCTIONS}"); - let model_family = find_family_for_model("gpt-4.1").expect("known model slug"); - let full = prompt.get_full_instructions(&model_family); - assert_eq!(full, expected); + let test_cases = vec![ + InstructionsTestCase { + slug: "gpt-3.5", + expects_apply_patch_instructions: true, + }, + InstructionsTestCase { + slug: "gpt-4.1", + expects_apply_patch_instructions: true, + }, + InstructionsTestCase { + slug: "gpt-4o", + expects_apply_patch_instructions: true, + }, + InstructionsTestCase { + slug: "gpt-5", + expects_apply_patch_instructions: true, + }, + InstructionsTestCase { + slug: "codex-mini-latest", + expects_apply_patch_instructions: true, + }, + InstructionsTestCase { + slug: "gpt-oss:120b", + expects_apply_patch_instructions: false, + }, + InstructionsTestCase { + slug: "gpt-5-codex", + expects_apply_patch_instructions: false, + }, + ]; + for test_case in test_cases { + let model_family = find_family_for_model(test_case.slug).expect("known model slug"); + let expected = if test_case.expects_apply_patch_instructions { + format!( + "{}\n{}", + model_family.clone().base_instructions, + APPLY_PATCH_TOOL_INSTRUCTIONS + ) + } else { + model_family.clone().base_instructions + }; + + let full = prompt.get_full_instructions(&model_family); + assert_eq!(full, expected); + } } #[test] diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index f77e6a40c3..375183ab82 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -9,9 +9,7 @@ use std::sync::atomic::AtomicU64; use std::time::Duration; use crate::AuthManager; -use crate::config_edit::CONFIG_KEY_EFFORT; -use crate::config_edit::CONFIG_KEY_MODEL; -use crate::config_edit::persist_non_null_overrides; +use crate::client_common::REVIEW_PROMPT; use crate::event_mapping::map_response_item_to_event_messages; use async_channel::Receiver; use async_channel::Sender; @@ -19,8 +17,9 @@ use codex_apply_patch::ApplyPatchAction; use codex_apply_patch::MaybeApplyPatchVerified; use codex_apply_patch::maybe_parse_apply_patch_verified; use codex_protocol::mcp_protocol::ConversationId; -use codex_protocol::protocol::CompactedItem; use codex_protocol::protocol::ConversationPathResponseEvent; +use codex_protocol::protocol::ExitedReviewModeEvent; +use codex_protocol::protocol::ReviewRequest; use codex_protocol::protocol::RolloutItem; use codex_protocol::protocol::TaskStartedEvent; use codex_protocol::protocol::TurnAbortReason; @@ -80,7 +79,6 @@ use crate::parse_command::parse_command; use crate::plan_tool::handle_update_plan; use crate::project_doc::get_user_instructions; use crate::protocol::AgentMessageDeltaEvent; -use crate::protocol::AgentMessageEvent; use crate::protocol::AgentReasoningDeltaEvent; use crate::protocol::AgentReasoningRawContentDeltaEvent; use crate::protocol::AgentReasoningSectionBreakEvent; @@ -100,11 +98,13 @@ use crate::protocol::Op; use crate::protocol::PatchApplyBeginEvent; use crate::protocol::PatchApplyEndEvent; use crate::protocol::ReviewDecision; +use crate::protocol::ReviewOutputEvent; use crate::protocol::SandboxPolicy; use crate::protocol::SessionConfiguredEvent; use crate::protocol::StreamErrorEvent; use crate::protocol::Submission; use crate::protocol::TaskCompleteEvent; +use crate::protocol::TokenUsage; use crate::protocol::TokenUsageInfo; use crate::protocol::TurnDiffEvent; use crate::protocol::WebSearchBeginEvent; @@ -130,6 +130,10 @@ use codex_protocol::models::ResponseItem; use codex_protocol::models::ShellToolCallParams; use codex_protocol::protocol::InitialHistory; +mod compact; +use self::compact::build_compacted_history; +use self::compact::collect_user_messages; + // A convenience extension trait for acquiring mutex locks where poisoning is // unrecoverable and should abort the program. This avoids scattered `.unwrap()` // calls on `lock()` while still surfacing a clear panic message when a lock is @@ -204,7 +208,7 @@ impl Codex { config.clone(), auth_manager.clone(), tx_event.clone(), - conversation_history.clone(), + conversation_history, ) .await .map_err(|e| { @@ -267,6 +271,7 @@ struct State { pending_input: Vec, history: ConversationHistory, token_info: Option, + next_internal_sub_id: u64, } /// Context for an initialized model agent @@ -308,6 +313,7 @@ pub(crate) struct TurnContext { pub(crate) sandbox_policy: SandboxPolicy, pub(crate) shell_environment_policy: ShellEnvironmentPolicy, pub(crate) tools_config: ToolsConfig, + pub(crate) is_review_mode: bool, } impl TurnContext { @@ -326,7 +332,7 @@ struct ConfigureSession { /// If not specified, server will use its default model. model: String, - model_reasoning_effort: ReasoningEffortConfig, + model_reasoning_effort: Option, model_reasoning_summary: ReasoningSummaryConfig, /// Model instructions that are appended to the base instructions. @@ -479,6 +485,7 @@ impl Session { sandbox_policy, shell_environment_policy: config.shell_environment_policy.clone(), cwd, + is_review_mode: false, }; let sess = Arc::new(Session { conversation_id, @@ -537,6 +544,13 @@ impl Session { } } + fn next_internal_sub_id(&self) -> String { + let mut state = self.state.lock_unchecked(); + let id = state.next_internal_sub_id; + state.next_internal_sub_id += 1; + format!("auto-compact-{id}") + } + async fn record_initial_history( &self, turn_context: &TurnContext, @@ -553,9 +567,10 @@ impl Session { let persist = matches!(conversation_history, InitialHistory::Forked(_)); // Always add response items to conversation history - let response_items = conversation_history.get_response_items(); - if !response_items.is_empty() { - self.record_into_history(&response_items); + let reconstructed_history = + self.reconstruct_history_from_rollout(turn_context, &rollout_items); + if !reconstructed_history.is_empty() { + self.record_into_history(&reconstructed_history); } // If persisting, persist all rollout items as-is (recorder filters) @@ -667,6 +682,33 @@ impl Session { self.persist_rollout_response_items(items).await; } + fn reconstruct_history_from_rollout( + &self, + turn_context: &TurnContext, + rollout_items: &[RolloutItem], + ) -> Vec { + let mut history = ConversationHistory::new(); + for item in rollout_items { + match item { + RolloutItem::ResponseItem(response_item) => { + history.record_items(std::iter::once(response_item)); + } + RolloutItem::Compacted(compacted) => { + let snapshot = history.contents(); + let user_messages = collect_user_messages(&snapshot); + let rebuilt = build_compacted_history( + self.build_initial_context(turn_context), + &user_messages, + &compacted.message, + ); + history.replace(rebuilt); + } + _ => {} + } + } + history.contents() + } + /// Append ResponseItems to the in-memory conversation history only. fn record_into_history(&self, items: &[ResponseItem]) { self.state @@ -710,6 +752,21 @@ impl Session { } } + fn update_token_usage_info( + &self, + turn_context: &TurnContext, + token_usage: &Option, + ) -> Option { + let mut state = self.state.lock_unchecked(); + let info = TokenUsageInfo::new_or_append( + &state.token_info, + token_usage, + turn_context.client.get_model_context_window(), + ); + state.token_info = info.clone(); + info + } + /// Record a user input item to conversation history and also persist a /// corresponding UserMessage EventMsg to rollout. async fn record_input_and_rollout_usermsg(&self, response_input: &ResponseInputItem) { @@ -789,6 +846,7 @@ impl Session { aggregated_output, duration, exit_code, + timed_out: _, } = output; // Send full stdout/stderr to clients; do not truncate. let stdout = stdout.text.clone(); @@ -864,6 +922,7 @@ impl Session { let output_stderr; let borrowed: &ExecToolCallOutput = match &result { Ok(output) => output, + Err(CodexErr::Sandbox(SandboxErr::Timeout { output })) => output, Err(e) => { output_stderr = ExecToolCallOutput { exit_code: -1, @@ -871,6 +930,7 @@ impl Session { stderr: StreamOutput::new(get_error_message_ui(e)), aggregated_output: StreamOutput::new(get_error_message_ui(e)), duration: Duration::default(), + timed_out: false, }; &output_stderr } @@ -1011,11 +1071,19 @@ pub(crate) struct ApplyPatchCommandContext { pub(crate) changes: HashMap, } +#[derive(Clone, Debug, Eq, PartialEq)] +enum AgentTaskKind { + Regular, + Review, + Compact, +} + /// A series of Turns in response to user input. pub(crate) struct AgentTask { sess: Arc, sub_id: String, handle: AbortHandle, + kind: AgentTaskKind, } impl AgentTask { @@ -1029,13 +1097,33 @@ impl AgentTask { let sess = sess.clone(); let sub_id = sub_id.clone(); let tc = Arc::clone(&turn_context); - tokio::spawn(async move { run_task(sess, tc.as_ref(), sub_id, input).await }) - .abort_handle() + tokio::spawn(async move { run_task(sess, tc, sub_id, input).await }).abort_handle() }; Self { sess, sub_id, handle, + kind: AgentTaskKind::Regular, + } + } + + fn review( + sess: Arc, + turn_context: Arc, + sub_id: String, + input: Vec, + ) -> Self { + let handle = { + let sess = sess.clone(); + let sub_id = sub_id.clone(); + let tc = Arc::clone(&turn_context); + tokio::spawn(async move { run_task(sess, tc, sub_id, input).await }).abort_handle() + }; + Self { + sess, + sub_id, + handle, + kind: AgentTaskKind::Review, } } @@ -1051,7 +1139,7 @@ impl AgentTask { let sub_id = sub_id.clone(); let tc = Arc::clone(&turn_context); tokio::spawn(async move { - run_compact_task(sess, tc.as_ref(), sub_id, input, compact_instructions).await + compact::run_compact_task(sess, tc, sub_id, input, compact_instructions).await }) .abort_handle() }; @@ -1059,12 +1147,20 @@ impl AgentTask { sess, sub_id, handle, + kind: AgentTaskKind::Compact, } } fn abort(self, reason: TurnAbortReason) { // TOCTOU? if !self.handle.is_finished() { + if self.kind == AgentTaskKind::Review { + let sess = self.sess.clone(); + let sub_id = self.sub_id.clone(); + tokio::spawn(async move { + exit_review_mode(sess, sub_id, None).await; + }); + } self.handle.abort(); let event = Event { id: self.sub_id, @@ -1164,27 +1260,13 @@ async fn submission_loop( sandbox_policy: new_sandbox_policy.clone(), shell_environment_policy: prev.shell_environment_policy.clone(), cwd: new_cwd.clone(), + is_review_mode: false, }; // Install the new persistent context for subsequent tasks/turns. turn_context = Arc::new(new_turn_context); // Optionally persist changes to model / effort - let effort_str = effort.map(|_| effective_effort.to_string()); - - if let Err(e) = persist_non_null_overrides( - &config.codex_home, - config.active_profile.as_deref(), - &[ - (&[CONFIG_KEY_MODEL], model.as_deref()), - (&[CONFIG_KEY_EFFORT], effort_str.as_deref()), - ], - ) - .await - { - warn!("failed to persist overrides: {e:#}"); - } - if cwd.is_some() || approval_policy.is_some() || sandbox_policy.is_some() { sess.record_conversation_items(&[ResponseItem::from(EnvironmentContext::new( cwd, @@ -1264,6 +1346,7 @@ async fn submission_loop( sandbox_policy, shell_environment_policy: turn_context.shell_environment_policy.clone(), cwd, + is_review_mode: false, }; // TODO: record the new environment context in the conversation history // no current task, spawn a new one with the per‑turn context @@ -1360,21 +1443,16 @@ async fn submission_loop( sess.send_event(event).await; } Op::Compact => { - // Create a summarization request as user input - const SUMMARIZATION_PROMPT: &str = include_str!("prompt_for_compact_command.md"); - // Attempt to inject input into current task if let Err(items) = sess.inject_input(vec![InputItem::Text { - text: "Start Summarization".to_string(), + text: compact::COMPACT_TRIGGER_TEXT.to_string(), }]) { - let task = AgentTask::compact( + compact::spawn_compact_task( sess.clone(), Arc::clone(&turn_context), sub.id, items, - SUMMARIZATION_PROMPT.to_string(), ); - sess.set_task(task); } } Op::Shutdown => { @@ -1430,6 +1508,16 @@ async fn submission_loop( }; sess.send_event(event).await; } + Op::Review { review_request } => { + spawn_review_thread( + sess.clone(), + config.clone(), + turn_context.clone(), + sub.id, + review_request, + ) + .await; + } _ => { // Ignore unknown ops; enum is non_exhaustive to allow extensions. } @@ -1438,6 +1526,82 @@ async fn submission_loop( debug!("Agent loop exited"); } +/// Spawn a review thread using the given prompt. +async fn spawn_review_thread( + sess: Arc, + config: Arc, + parent_turn_context: Arc, + sub_id: String, + review_request: ReviewRequest, +) { + let model = config.review_model.clone(); + let review_model_family = find_family_for_model(&model) + .unwrap_or_else(|| parent_turn_context.client.get_model_family()); + let tools_config = ToolsConfig::new(&ToolsConfigParams { + model_family: &review_model_family, + approval_policy: parent_turn_context.approval_policy, + sandbox_policy: parent_turn_context.sandbox_policy.clone(), + include_plan_tool: false, + include_apply_patch_tool: config.include_apply_patch_tool, + include_web_search_request: false, + use_streamable_shell_tool: false, + include_view_image_tool: false, + experimental_unified_exec_tool: config.use_experimental_unified_exec_tool, + }); + + let base_instructions = Some(REVIEW_PROMPT.to_string()); + let provider = parent_turn_context.client.get_provider(); + let auth_manager = parent_turn_context.client.get_auth_manager(); + let model_family = review_model_family.clone(); + + // Build per‑turn client with the requested model/family. + let mut per_turn_config = (*config).clone(); + per_turn_config.model = model.clone(); + per_turn_config.model_family = model_family.clone(); + if let Some(model_info) = get_model_info(&model_family) { + per_turn_config.model_context_window = Some(model_info.context_window); + } + + let client = ModelClient::new( + Arc::new(per_turn_config), + auth_manager, + provider, + parent_turn_context.client.get_reasoning_effort(), + parent_turn_context.client.get_reasoning_summary(), + sess.conversation_id, + ); + + let review_turn_context = TurnContext { + client, + tools_config, + user_instructions: None, + base_instructions, + approval_policy: parent_turn_context.approval_policy, + sandbox_policy: parent_turn_context.sandbox_policy.clone(), + shell_environment_policy: parent_turn_context.shell_environment_policy.clone(), + cwd: parent_turn_context.cwd.clone(), + is_review_mode: true, + }; + + // Seed the child task with the review prompt as the initial user message. + let input: Vec = vec![InputItem::Text { + text: review_request.prompt.clone(), + }]; + let tc = Arc::new(review_turn_context); + + // Clone sub_id for the upcoming announcement before moving it into the task. + let sub_id_for_event = sub_id.clone(); + let task = AgentTask::review(sess.clone(), tc.clone(), sub_id, input); + sess.set_task(task); + + // Announce entering review mode so UIs can switch modes. + sess.send_event(Event { + id: sub_id_for_event, + msg: EventMsg::EnteredReviewMode(review_request), + }) + .await; +} + /// Takes a user message as input and runs a loop where, at each turn, the model /// replies with either: /// @@ -1451,9 +1615,13 @@ async fn submission_loop( /// back to the model in the next turn. /// - If the model sends only an assistant message, we record it in the /// conversation history and consider the task complete. +/// +/// Review mode: when `turn_context.is_review_mode` is true, the turn runs in an +/// isolated in-memory thread without the parent session's prior history or +/// user_instructions. Emits ExitedReviewMode upon final review message. async fn run_task( sess: Arc, - turn_context: &TurnContext, + turn_context: Arc, sub_id: String, input: Vec, ) { @@ -1469,13 +1637,23 @@ async fn run_task( sess.send_event(event).await; let initial_input_for_turn: ResponseInputItem = ResponseInputItem::from(input); - sess.record_input_and_rollout_usermsg(&initial_input_for_turn) - .await; + // For review threads, keep an isolated in-memory history so the + // model sees a fresh conversation without the parent session's history. + // For normal turns, continue recording to the session history as before. + let is_review_mode = turn_context.is_review_mode; + let mut review_thread_history: Vec = Vec::new(); + if is_review_mode { + review_thread_history.push(initial_input_for_turn.into()); + } else { + sess.record_input_and_rollout_usermsg(&initial_input_for_turn) + .await; + } let mut last_agent_message: Option = None; // Although from the perspective of codex.rs, TurnDiffTracker has the lifecycle of a Task which contains // many turns, from the perspective of the user, it is a single turn. let mut turn_diff_tracker = TurnDiffTracker::new(); + let mut auto_compact_recently_attempted = false; loop { // Note that pending_input would be something like a message the user @@ -1486,14 +1664,26 @@ async fn run_task( .into_iter() .map(ResponseItem::from) .collect::>(); - sess.record_conversation_items(&pending_input).await; - // Construct the input that we will send to the model. When using the - // Chat completions API (or ZDR clients), the model needs the full - // conversation history on each turn. The rollout file, however, should - // only record the new items that originated in this turn so that it - // represents an append-only log without duplicates. - let turn_input: Vec = sess.turn_input_with_history(pending_input); + // Construct the input that we will send to the model. + // + // - For review threads, use the isolated in-memory history so the + // model sees a fresh conversation (no parent history/user_instructions). + // + // - For normal turns, use the session's full history. When using the + // chat completions API (or ZDR clients), the model needs the full + // conversation history on each turn. The rollout file, however, should + // only record the new items that originated in this turn so that it + // represents an append-only log without duplicates. + let turn_input: Vec = if is_review_mode { + if !pending_input.is_empty() { + review_thread_history.extend(pending_input); + } + review_thread_history.clone() + } else { + sess.record_conversation_items(&pending_input).await; + sess.turn_input_with_history(pending_input) + }; let turn_input_messages: Vec = turn_input .iter() @@ -1510,7 +1700,7 @@ async fn run_task( .collect(); match run_turn( &sess, - turn_context, + turn_context.as_ref(), &mut turn_diff_tracker, sub_id.clone(), turn_input, @@ -1518,9 +1708,23 @@ async fn run_task( .await { Ok(turn_output) => { + let TurnRunResult { + processed_items, + total_token_usage, + } = turn_output; + let limit = turn_context + .client + .get_auto_compact_token_limit() + .unwrap_or(i64::MAX); + let total_usage_tokens = total_token_usage + .as_ref() + .map(|usage| usage.tokens_in_context_window()); + let token_limit_reached = total_usage_tokens + .map(|tokens| (tokens as i64) >= limit) + .unwrap_or(false); let mut items_to_record_in_conversation_history = Vec::::new(); let mut responses = Vec::::new(); - for processed_response_item in turn_output { + for processed_response_item in processed_items { let ProcessedResponseItem { item, response } = processed_response_item; match (&item, &response) { (ResponseItem::Message { role, .. }, None) if role == "assistant" => { @@ -1613,12 +1817,40 @@ async fn run_task( // Only attempt to take the lock if there is something to record. if !items_to_record_in_conversation_history.is_empty() { - sess.record_conversation_items(&items_to_record_in_conversation_history) - .await; + if is_review_mode { + review_thread_history + .extend(items_to_record_in_conversation_history.clone()); + } else { + sess.record_conversation_items(&items_to_record_in_conversation_history) + .await; + } } + if token_limit_reached { + if auto_compact_recently_attempted { + let limit_str = limit.to_string(); + let current_tokens = total_usage_tokens + .map(|tokens| tokens.to_string()) + .unwrap_or_else(|| "unknown".to_string()); + let event = Event { + id: sub_id.clone(), + msg: EventMsg::Error(ErrorEvent { + message: format!( + "Conversation is still above the token limit after automatic summarization (limit {limit_str}, current {current_tokens}). Please start a new session or trim your input." + ), + }), + }; + sess.send_event(event).await; + break; + } + auto_compact_recently_attempted = true; + compact::run_inline_auto_compact_task(sess.clone(), turn_context.clone()).await; + continue; + } + + auto_compact_recently_attempted = false; + if responses.is_empty() { - debug!("Turn completed"); last_agent_message = get_last_assistant_message_from_turn( &items_to_record_in_conversation_history, ); @@ -1629,6 +1861,7 @@ async fn run_task( }); break; } + continue; } Err(e) => { info!("Turn error: {e:#}"); @@ -1644,6 +1877,23 @@ async fn run_task( } } } + + // If this was a review thread and we have a final assistant message, + // try to parse it as a ReviewOutput. + // + // If parsing fails, construct a minimal ReviewOutputEvent using the plain + // text as the overall explanation. Else, just exit review mode with None. + // + // Emits an ExitedReviewMode event with the parsed review output. + if turn_context.is_review_mode { + exit_review_mode( + sess.clone(), + sub_id.clone(), + last_agent_message.as_deref().map(parse_review_output_event), + ) + .await; + } + sess.remove_task(&sub_id); let event = Event { id: sub_id, @@ -1652,13 +1902,38 @@ async fn run_task( sess.send_event(event).await; } +/// Parse the review output; when not valid JSON, build a structured +/// fallback that carries the plain text as the overall explanation. +/// +/// Returns: a ReviewOutputEvent parsed from JSON or a fallback populated from text. +fn parse_review_output_event(text: &str) -> ReviewOutputEvent { + // Try direct parse first + if let Ok(ev) = serde_json::from_str::(text) { + return ev; + } + // If wrapped in markdown fences or extra prose, attempt to extract the first JSON object + if let (Some(start), Some(end)) = (text.find('{'), text.rfind('}')) + && start < end + && let Some(slice) = text.get(start..=end) + && let Ok(ev) = serde_json::from_str::(slice) + { + return ev; + } + // Not JSON – return a structured ReviewOutputEvent that carries + // the plain text as the overall explanation. + ReviewOutputEvent { + overall_explanation: text.to_string(), + ..Default::default() + } +} + async fn run_turn( sess: &Session, turn_context: &TurnContext, turn_diff_tracker: &mut TurnDiffTracker, sub_id: String, input: Vec, -) -> CodexResult> { +) -> CodexResult { let tools = get_openai_tools( &turn_context.tools_config, Some(sess.mcp_connection_manager.list_all_tools()), @@ -1722,13 +1997,19 @@ struct ProcessedResponseItem { response: Option, } +#[derive(Debug)] +struct TurnRunResult { + processed_items: Vec, + total_token_usage: Option, +} + async fn try_run_turn( sess: &Session, turn_context: &TurnContext, turn_diff_tracker: &mut TurnDiffTracker, sub_id: &str, prompt: &Prompt, -) -> CodexResult> { +) -> CodexResult { // call_ids that are part of this response. let completed_call_ids = prompt .input @@ -1846,16 +2127,7 @@ async fn try_run_turn( response_id: _, token_usage, } => { - let info = { - let mut st = sess.state.lock_unchecked(); - let info = TokenUsageInfo::new_or_append( - &st.token_info, - &token_usage, - turn_context.client.get_model_context_window(), - ); - st.token_info = info.clone(); - info - }; + let info = sess.update_token_usage_info(turn_context, &token_usage); let _ = sess .send_event(Event { id: sub_id.to_string(), @@ -1873,14 +2145,25 @@ async fn try_run_turn( sess.send_event(event).await; } - return Ok(output); + let result = TurnRunResult { + processed_items: output, + total_token_usage: token_usage.clone(), + }; + + return Ok(result); } ResponseEvent::OutputTextDelta(delta) => { - let event = Event { - id: sub_id.to_string(), - msg: EventMsg::AgentMessageDelta(AgentMessageDeltaEvent { delta }), - }; - sess.send_event(event).await; + // In review child threads, suppress assistant text deltas; the + // UI will show a selection popup from the final ReviewOutput. + if !turn_context.is_review_mode { + let event = Event { + id: sub_id.to_string(), + msg: EventMsg::AgentMessageDelta(AgentMessageDeltaEvent { delta }), + }; + sess.send_event(event).await; + } else { + trace!("suppressing OutputTextDelta in review mode"); + } } ResponseEvent::ReasoningSummaryDelta(delta) => { let event = Event { @@ -1911,95 +2194,6 @@ async fn try_run_turn( } } -async fn run_compact_task( - sess: Arc, - turn_context: &TurnContext, - sub_id: String, - input: Vec, - compact_instructions: String, -) { - let model_context_window = turn_context.client.get_model_context_window(); - let start_event = Event { - id: sub_id.clone(), - msg: EventMsg::TaskStarted(TaskStartedEvent { - model_context_window, - }), - }; - sess.send_event(start_event).await; - - let initial_input_for_turn: ResponseInputItem = ResponseInputItem::from(input); - let turn_input: Vec = - sess.turn_input_with_history(vec![initial_input_for_turn.clone().into()]); - - let prompt = Prompt { - input: turn_input, - tools: Vec::new(), - base_instructions_override: Some(compact_instructions.clone()), - }; - - let max_retries = turn_context.client.get_provider().stream_max_retries(); - let mut retries = 0; - - loop { - let attempt_result = drain_to_completed(&sess, turn_context, &sub_id, &prompt).await; - - match attempt_result { - Ok(()) => break, - Err(CodexErr::Interrupted) => return, - Err(e) => { - if retries < max_retries { - retries += 1; - let delay = backoff(retries); - sess.notify_stream_error( - &sub_id, - format!( - "stream error: {e}; retrying {retries}/{max_retries} in {delay:?}…" - ), - ) - .await; - tokio::time::sleep(delay).await; - continue; - } else { - let event = Event { - id: sub_id.clone(), - msg: EventMsg::Error(ErrorEvent { - message: e.to_string(), - }), - }; - sess.send_event(event).await; - return; - } - } - } - } - - sess.remove_task(&sub_id); - - let rollout_item = { - let mut state = sess.state.lock_unchecked(); - state.history.keep_last_messages(1); - RolloutItem::Compacted(CompactedItem { - message: state.history.last_agent_message(), - }) - }; - sess.persist_rollout_items(&[rollout_item]).await; - - let event = Event { - id: sub_id.clone(), - msg: EventMsg::AgentMessage(AgentMessageEvent { - message: "Compact task completed".to_string(), - }), - }; - sess.send_event(event).await; - let event = Event { - id: sub_id.clone(), - msg: EventMsg::TaskComplete(TaskCompleteEvent { - last_agent_message: None, - }), - }; - sess.send_event(event).await; -} - async fn handle_response_item( sess: &Session, turn_context: &TurnContext, @@ -2101,7 +2295,15 @@ async fn handle_response_item( ResponseItem::Message { .. } | ResponseItem::Reasoning { .. } | ResponseItem::WebSearchCall { .. } => { - let msgs = map_response_item_to_event_messages(&item, sess.show_raw_agent_reasoning); + // In review child threads, suppress assistant message events but + // keep reasoning/web search. + let msgs = match &item { + ResponseItem::Message { .. } if turn_context.is_review_mode => { + trace!("suppressing assistant Message in review mode"); + Vec::new() + } + _ => map_response_item_to_event_messages(&item, sess.show_raw_agent_reasoning), + }; for msg in msgs { let event = Event { id: sub_id.to_string(), @@ -2719,15 +2921,12 @@ async fn handle_sandbox_error( let sub_id = exec_command_context.sub_id.clone(); let cwd = exec_command_context.cwd.clone(); - // if the command timed out, we can simply return this failure to the model - if matches!(error, SandboxErr::Timeout) { + if let SandboxErr::Timeout { output } = &error { + let content = format_exec_output(output); return ResponseInputItem::FunctionCallOutput { call_id, output: FunctionCallOutputPayload { - content: format!( - "command timed out after {} milliseconds", - params.timeout_duration().as_millis() - ), + content, success: Some(false), }, }; @@ -2852,7 +3051,17 @@ fn format_exec_output_str(exec_output: &ExecToolCallOutput) -> String { // Head+tail truncation for the model: show the beginning and end with an elision. // Clients still receive full streams; only this formatted summary is capped. - let s = aggregated_output.text.as_str(); + let mut s = &aggregated_output.text; + let prefixed_str: String; + + if exec_output.timed_out { + prefixed_str = format!( + "command timed out after {} milliseconds\n", + exec_output.duration.as_millis() + ) + s; + s = &prefixed_str; + } + let total_lines = s.lines().count(); if s.len() <= MODEL_FORMAT_MAX_BYTES && total_lines <= MODEL_FORMAT_MAX_LINES { return s.to_string(); @@ -2895,6 +3104,7 @@ fn format_exec_output_str(exec_output: &ExecToolCallOutput) -> String { // Build final string respecting byte budgets let head_part = take_bytes_at_char_boundary(&head_lines_text, head_budget); let mut result = String::with_capacity(MODEL_FORMAT_MAX_BYTES.min(s.len())); + result.push_str(head_part); result.push_str(&marker); @@ -2982,7 +3192,7 @@ fn format_exec_output(exec_output: &ExecToolCallOutput) -> String { serde_json::to_string(&payload).expect("serialize ExecOutput") } -fn get_last_assistant_message_from_turn(responses: &[ResponseItem]) -> Option { +pub(super) fn get_last_assistant_message_from_turn(responses: &[ResponseItem]) -> Option { responses.iter().rev().find_map(|item| { if let ResponseItem::Message { role, content, .. } = item { if role == "assistant" { @@ -3001,68 +3211,6 @@ fn get_last_assistant_message_from_turn(responses: &[ResponseItem]) -> Option CodexResult<()> { - let rollout_item = RolloutItem::TurnContext(TurnContextItem { - cwd: turn_context.cwd.clone(), - approval_policy: turn_context.approval_policy, - sandbox_policy: turn_context.sandbox_policy.clone(), - model: turn_context.client.get_model(), - effort: turn_context.client.get_reasoning_effort(), - summary: turn_context.client.get_reasoning_summary(), - }); - sess.persist_rollout_items(&[rollout_item]).await; - let mut stream = turn_context.client.clone().stream(prompt).await?; - loop { - let maybe_event = stream.next().await; - let Some(event) = maybe_event else { - return Err(CodexErr::Stream( - "stream closed before response.completed".into(), - None, - )); - }; - match event { - Ok(ResponseEvent::OutputItemDone(item)) => { - // Record only to in-memory conversation history; avoid state snapshot. - let mut state = sess.state.lock_unchecked(); - state.history.record_items(std::slice::from_ref(&item)); - } - Ok(ResponseEvent::Completed { - response_id: _, - token_usage, - }) => { - let info = { - let mut st = sess.state.lock_unchecked(); - let info = TokenUsageInfo::new_or_append( - &st.token_info, - &token_usage, - turn_context.client.get_model_context_window(), - ); - st.token_info = info.clone(); - info - }; - - sess.tx_event - .send(Event { - id: sub_id.to_string(), - msg: EventMsg::TokenCount(crate::protocol::TokenCountEvent { info }), - }) - .await - .ok(); - - return Ok(()); - } - Ok(_) => continue, - Err(e) => return Err(e), - } - } -} - fn convert_call_tool_result_to_function_call_output_payload( call_tool_result: &CallToolResult, ) -> FunctionCallOutputPayload { @@ -3098,21 +3246,75 @@ fn convert_call_tool_result_to_function_call_output_payload( } } +/// Emits an ExitedReviewMode Event with optional ReviewOutput. +async fn exit_review_mode( + session: Arc, + task_sub_id: String, + review_output: Option, +) { + let event = Event { + id: task_sub_id, + msg: EventMsg::ExitedReviewMode(ExitedReviewModeEvent { review_output }), + }; + session.send_event(event).await; +} + #[cfg(test)] mod tests { use super::*; + use crate::config::ConfigOverrides; + use crate::config::ConfigToml; + use crate::protocol::CompactedItem; + use crate::protocol::InitialHistory; + use crate::protocol::ResumedHistory; + use codex_protocol::models::ContentItem; use mcp_types::ContentBlock; use mcp_types::TextContent; use pretty_assertions::assert_eq; use serde_json::json; + use std::path::PathBuf; + use std::sync::Arc; use std::time::Duration as StdDuration; - fn text_block(s: &str) -> ContentBlock { - ContentBlock::TextContent(TextContent { - annotations: None, - text: s.to_string(), - r#type: "text".to_string(), - }) + #[test] + fn reconstruct_history_matches_live_compactions() { + let (session, turn_context) = make_session_and_context(); + let (rollout_items, expected) = sample_rollout(&session, &turn_context); + + let reconstructed = session.reconstruct_history_from_rollout(&turn_context, &rollout_items); + + assert_eq!(expected, reconstructed); + } + + #[test] + fn record_initial_history_reconstructs_resumed_transcript() { + let (session, turn_context) = make_session_and_context(); + let (rollout_items, expected) = sample_rollout(&session, &turn_context); + + tokio_test::block_on(session.record_initial_history( + &turn_context, + InitialHistory::Resumed(ResumedHistory { + conversation_id: ConversationId::default(), + history: rollout_items, + rollout_path: PathBuf::from("/tmp/resume.jsonl"), + }), + )); + + let actual = session.state.lock_unchecked().history.contents(); + assert_eq!(expected, actual); + } + + #[test] + fn record_initial_history_reconstructs_forked_transcript() { + let (session, turn_context) = make_session_and_context(); + let (rollout_items, expected) = sample_rollout(&session, &turn_context); + + tokio_test::block_on( + session.record_initial_history(&turn_context, InitialHistory::Forked(rollout_items)), + ); + + let actual = session.state.lock_unchecked().history.contents(); + assert_eq!(expected, actual); } #[test] @@ -3152,6 +3354,7 @@ mod tests { stderr: StreamOutput::new(String::new()), aggregated_output: StreamOutput::new(full), duration: StdDuration::from_secs(1), + timed_out: false, }; let out = format_exec_output_str(&exec); @@ -3194,6 +3397,7 @@ mod tests { stderr: StreamOutput::new(String::new()), aggregated_output: StreamOutput::new(full.clone()), duration: StdDuration::from_secs(1), + timed_out: false, }; let out = format_exec_output_str(&exec); @@ -3216,6 +3420,25 @@ mod tests { ); } + #[test] + fn includes_timed_out_message() { + let exec = ExecToolCallOutput { + exit_code: 0, + stdout: StreamOutput::new(String::new()), + stderr: StreamOutput::new(String::new()), + aggregated_output: StreamOutput::new("Command output".to_string()), + duration: StdDuration::from_secs(1), + timed_out: true, + }; + + let out = format_exec_output_str(&exec); + + assert_eq!( + out, + "command timed out after 1000 milliseconds\nCommand output" + ); + } + #[test] fn falls_back_to_content_when_structured_is_null() { let ctr = CallToolResult { @@ -3267,4 +3490,174 @@ mod tests { assert_eq!(expected, got); } + + fn text_block(s: &str) -> ContentBlock { + ContentBlock::TextContent(TextContent { + annotations: None, + text: s.to_string(), + r#type: "text".to_string(), + }) + } + + fn make_session_and_context() -> (Session, TurnContext) { + let (tx_event, _rx_event) = async_channel::unbounded(); + let codex_home = tempfile::tempdir().expect("create temp dir"); + let config = Config::load_from_base_config_with_overrides( + ConfigToml::default(), + ConfigOverrides::default(), + codex_home.path().to_path_buf(), + ) + .expect("load default test config"); + let config = Arc::new(config); + let conversation_id = ConversationId::default(); + let client = ModelClient::new( + config.clone(), + None, + config.model_provider.clone(), + config.model_reasoning_effort, + config.model_reasoning_summary, + conversation_id, + ); + let tools_config = ToolsConfig::new(&ToolsConfigParams { + model_family: &config.model_family, + approval_policy: config.approval_policy, + sandbox_policy: config.sandbox_policy.clone(), + include_plan_tool: config.include_plan_tool, + include_apply_patch_tool: config.include_apply_patch_tool, + include_web_search_request: config.tools_web_search_request, + use_streamable_shell_tool: config.use_experimental_streamable_shell_tool, + include_view_image_tool: config.include_view_image_tool, + experimental_unified_exec_tool: config.use_experimental_unified_exec_tool, + }); + let turn_context = TurnContext { + client, + cwd: config.cwd.clone(), + base_instructions: config.base_instructions.clone(), + user_instructions: config.user_instructions.clone(), + approval_policy: config.approval_policy, + sandbox_policy: config.sandbox_policy.clone(), + shell_environment_policy: config.shell_environment_policy.clone(), + tools_config, + is_review_mode: false, + }; + let session = Session { + conversation_id, + tx_event, + mcp_connection_manager: McpConnectionManager::default(), + session_manager: ExecSessionManager::default(), + unified_exec_manager: UnifiedExecSessionManager::default(), + notify: None, + rollout: Mutex::new(None), + state: Mutex::new(State { + history: ConversationHistory::new(), + ..Default::default() + }), + codex_linux_sandbox_exe: None, + user_shell: shell::Shell::Unknown, + show_raw_agent_reasoning: config.show_raw_agent_reasoning, + }; + (session, turn_context) + } + + fn sample_rollout( + session: &Session, + turn_context: &TurnContext, + ) -> (Vec, Vec) { + let mut rollout_items = Vec::new(); + let mut live_history = ConversationHistory::new(); + + let initial_context = session.build_initial_context(turn_context); + for item in &initial_context { + rollout_items.push(RolloutItem::ResponseItem(item.clone())); + } + live_history.record_items(initial_context.iter()); + + let user1 = ResponseItem::Message { + id: None, + role: "user".to_string(), + content: vec![ContentItem::InputText { + text: "first user".to_string(), + }], + }; + live_history.record_items(std::iter::once(&user1)); + rollout_items.push(RolloutItem::ResponseItem(user1.clone())); + + let assistant1 = ResponseItem::Message { + id: None, + role: "assistant".to_string(), + content: vec![ContentItem::OutputText { + text: "assistant reply one".to_string(), + }], + }; + live_history.record_items(std::iter::once(&assistant1)); + rollout_items.push(RolloutItem::ResponseItem(assistant1.clone())); + + let summary1 = "summary one"; + let snapshot1 = live_history.contents(); + let user_messages1 = collect_user_messages(&snapshot1); + let rebuilt1 = build_compacted_history( + session.build_initial_context(turn_context), + &user_messages1, + summary1, + ); + live_history.replace(rebuilt1); + rollout_items.push(RolloutItem::Compacted(CompactedItem { + message: summary1.to_string(), + })); + + let user2 = ResponseItem::Message { + id: None, + role: "user".to_string(), + content: vec![ContentItem::InputText { + text: "second user".to_string(), + }], + }; + live_history.record_items(std::iter::once(&user2)); + rollout_items.push(RolloutItem::ResponseItem(user2.clone())); + + let assistant2 = ResponseItem::Message { + id: None, + role: "assistant".to_string(), + content: vec![ContentItem::OutputText { + text: "assistant reply two".to_string(), + }], + }; + live_history.record_items(std::iter::once(&assistant2)); + rollout_items.push(RolloutItem::ResponseItem(assistant2.clone())); + + let summary2 = "summary two"; + let snapshot2 = live_history.contents(); + let user_messages2 = collect_user_messages(&snapshot2); + let rebuilt2 = build_compacted_history( + session.build_initial_context(turn_context), + &user_messages2, + summary2, + ); + live_history.replace(rebuilt2); + rollout_items.push(RolloutItem::Compacted(CompactedItem { + message: summary2.to_string(), + })); + + let user3 = ResponseItem::Message { + id: None, + role: "user".to_string(), + content: vec![ContentItem::InputText { + text: "third user".to_string(), + }], + }; + live_history.record_items(std::iter::once(&user3)); + rollout_items.push(RolloutItem::ResponseItem(user3.clone())); + + let assistant3 = ResponseItem::Message { + id: None, + role: "assistant".to_string(), + content: vec![ContentItem::OutputText { + text: "assistant reply three".to_string(), + }], + }; + live_history.record_items(std::iter::once(&assistant3)); + rollout_items.push(RolloutItem::ResponseItem(assistant3.clone())); + + (rollout_items, live_history.contents()) + } } diff --git a/codex-rs/core/src/codex/compact.rs b/codex-rs/core/src/codex/compact.rs new file mode 100644 index 0000000000..a465f937d4 --- /dev/null +++ b/codex-rs/core/src/codex/compact.rs @@ -0,0 +1,400 @@ +use std::sync::Arc; + +use super::AgentTask; +use super::MutexExt; +use super::Session; +use super::TurnContext; +use super::get_last_assistant_message_from_turn; +use crate::Prompt; +use crate::client_common::ResponseEvent; +use crate::error::CodexErr; +use crate::error::Result as CodexResult; +use crate::protocol::AgentMessageEvent; +use crate::protocol::CompactedItem; +use crate::protocol::ErrorEvent; +use crate::protocol::Event; +use crate::protocol::EventMsg; +use crate::protocol::InputItem; +use crate::protocol::InputMessageKind; +use crate::protocol::TaskCompleteEvent; +use crate::protocol::TaskStartedEvent; +use crate::protocol::TurnContextItem; +use crate::util::backoff; +use askama::Template; +use codex_protocol::models::ContentItem; +use codex_protocol::models::ResponseInputItem; +use codex_protocol::models::ResponseItem; +use codex_protocol::protocol::RolloutItem; +use futures::prelude::*; + +pub(super) const COMPACT_TRIGGER_TEXT: &str = "Start Summarization"; +const SUMMARIZATION_PROMPT: &str = include_str!("../../templates/compact/prompt.md"); + +#[derive(Template)] +#[template(path = "compact/history_bridge.md", escape = "none")] +struct HistoryBridgeTemplate<'a> { + user_messages_text: &'a str, + summary_text: &'a str, +} + +pub(super) fn spawn_compact_task( + sess: Arc, + turn_context: Arc, + sub_id: String, + input: Vec, +) { + let task = AgentTask::compact( + sess.clone(), + turn_context, + sub_id, + input, + SUMMARIZATION_PROMPT.to_string(), + ); + sess.set_task(task); +} + +pub(super) async fn run_inline_auto_compact_task( + sess: Arc, + turn_context: Arc, +) { + let sub_id = sess.next_internal_sub_id(); + let input = vec![InputItem::Text { + text: COMPACT_TRIGGER_TEXT.to_string(), + }]; + run_compact_task_inner( + sess, + turn_context, + sub_id, + input, + SUMMARIZATION_PROMPT.to_string(), + false, + ) + .await; +} + +pub(super) async fn run_compact_task( + sess: Arc, + turn_context: Arc, + sub_id: String, + input: Vec, + compact_instructions: String, +) { + run_compact_task_inner( + sess, + turn_context, + sub_id, + input, + compact_instructions, + true, + ) + .await; +} + +async fn run_compact_task_inner( + sess: Arc, + turn_context: Arc, + sub_id: String, + input: Vec, + compact_instructions: String, + remove_task_on_completion: bool, +) { + let model_context_window = turn_context.client.get_model_context_window(); + let start_event = Event { + id: sub_id.clone(), + msg: EventMsg::TaskStarted(TaskStartedEvent { + model_context_window, + }), + }; + sess.send_event(start_event).await; + + let initial_input_for_turn: ResponseInputItem = ResponseInputItem::from(input); + let instructions_override = compact_instructions; + let turn_input = sess.turn_input_with_history(vec![initial_input_for_turn.clone().into()]); + + let prompt = Prompt { + input: turn_input, + tools: Vec::new(), + base_instructions_override: Some(instructions_override), + }; + + let max_retries = turn_context.client.get_provider().stream_max_retries(); + let mut retries = 0; + + let rollout_item = RolloutItem::TurnContext(TurnContextItem { + cwd: turn_context.cwd.clone(), + approval_policy: turn_context.approval_policy, + sandbox_policy: turn_context.sandbox_policy.clone(), + model: turn_context.client.get_model(), + effort: turn_context.client.get_reasoning_effort(), + summary: turn_context.client.get_reasoning_summary(), + }); + sess.persist_rollout_items(&[rollout_item]).await; + + loop { + let attempt_result = drain_to_completed(&sess, turn_context.as_ref(), &prompt).await; + + match attempt_result { + Ok(()) => { + break; + } + Err(CodexErr::Interrupted) => { + return; + } + Err(e) => { + if retries < max_retries { + retries += 1; + let delay = backoff(retries); + sess.notify_stream_error( + &sub_id, + format!( + "stream error: {e}; retrying {retries}/{max_retries} in {delay:?}…" + ), + ) + .await; + tokio::time::sleep(delay).await; + continue; + } else { + let event = Event { + id: sub_id.clone(), + msg: EventMsg::Error(ErrorEvent { + message: e.to_string(), + }), + }; + sess.send_event(event).await; + return; + } + } + } + } + + if remove_task_on_completion { + sess.remove_task(&sub_id); + } + let history_snapshot = { + let state = sess.state.lock_unchecked(); + state.history.contents() + }; + let summary_text = get_last_assistant_message_from_turn(&history_snapshot).unwrap_or_default(); + let user_messages = collect_user_messages(&history_snapshot); + let initial_context = sess.build_initial_context(turn_context.as_ref()); + let new_history = build_compacted_history(initial_context, &user_messages, &summary_text); + { + let mut state = sess.state.lock_unchecked(); + state.history.replace(new_history); + } + + let rollout_item = RolloutItem::Compacted(CompactedItem { + message: summary_text.clone(), + }); + sess.persist_rollout_items(&[rollout_item]).await; + + let event = Event { + id: sub_id.clone(), + msg: EventMsg::AgentMessage(AgentMessageEvent { + message: "Compact task completed".to_string(), + }), + }; + sess.send_event(event).await; + let event = Event { + id: sub_id.clone(), + msg: EventMsg::TaskComplete(TaskCompleteEvent { + last_agent_message: None, + }), + }; + sess.send_event(event).await; +} + +fn content_items_to_text(content: &[ContentItem]) -> Option { + let mut pieces = Vec::new(); + for item in content { + match item { + ContentItem::InputText { text } | ContentItem::OutputText { text } => { + if !text.is_empty() { + pieces.push(text.as_str()); + } + } + ContentItem::InputImage { .. } => {} + } + } + if pieces.is_empty() { + None + } else { + Some(pieces.join("\n")) + } +} + +pub(crate) fn collect_user_messages(items: &[ResponseItem]) -> Vec { + items + .iter() + .filter_map(|item| match item { + ResponseItem::Message { role, content, .. } if role == "user" => { + content_items_to_text(content) + } + _ => None, + }) + .filter(|text| !is_session_prefix_message(text)) + .collect() +} + +fn is_session_prefix_message(text: &str) -> bool { + matches!( + InputMessageKind::from(("user", text)), + InputMessageKind::UserInstructions | InputMessageKind::EnvironmentContext + ) +} + +pub(crate) fn build_compacted_history( + initial_context: Vec, + user_messages: &[String], + summary_text: &str, +) -> Vec { + let mut history = initial_context; + let user_messages_text = if user_messages.is_empty() { + "(none)".to_string() + } else { + user_messages.join("\n\n") + }; + let summary_text = if summary_text.is_empty() { + "(no summary available)".to_string() + } else { + summary_text.to_string() + }; + let Ok(bridge) = HistoryBridgeTemplate { + user_messages_text: &user_messages_text, + summary_text: &summary_text, + } + .render() else { + return vec![]; + }; + history.push(ResponseItem::Message { + id: None, + role: "user".to_string(), + content: vec![ContentItem::InputText { text: bridge }], + }); + history +} + +async fn drain_to_completed( + sess: &Session, + turn_context: &TurnContext, + prompt: &Prompt, +) -> CodexResult<()> { + let mut stream = turn_context.client.clone().stream(prompt).await?; + loop { + let maybe_event = stream.next().await; + let Some(event) = maybe_event else { + return Err(CodexErr::Stream( + "stream closed before response.completed".into(), + None, + )); + }; + match event { + Ok(ResponseEvent::OutputItemDone(item)) => { + let mut state = sess.state.lock_unchecked(); + state.history.record_items(std::slice::from_ref(&item)); + } + Ok(ResponseEvent::Completed { .. }) => { + return Ok(()); + } + Ok(_) => continue, + Err(e) => return Err(e), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use pretty_assertions::assert_eq; + + #[test] + fn content_items_to_text_joins_non_empty_segments() { + let items = vec![ + ContentItem::InputText { + text: "hello".to_string(), + }, + ContentItem::OutputText { + text: String::new(), + }, + ContentItem::OutputText { + text: "world".to_string(), + }, + ]; + + let joined = content_items_to_text(&items); + + assert_eq!(Some("hello\nworld".to_string()), joined); + } + + #[test] + fn content_items_to_text_ignores_image_only_content() { + let items = vec![ContentItem::InputImage { + image_url: "file://image.png".to_string(), + }]; + + let joined = content_items_to_text(&items); + + assert_eq!(None, joined); + } + + #[test] + fn collect_user_messages_extracts_user_text_only() { + let items = vec![ + ResponseItem::Message { + id: Some("assistant".to_string()), + role: "assistant".to_string(), + content: vec![ContentItem::OutputText { + text: "ignored".to_string(), + }], + }, + ResponseItem::Message { + id: Some("user".to_string()), + role: "user".to_string(), + content: vec![ + ContentItem::InputText { + text: "first".to_string(), + }, + ContentItem::OutputText { + text: "second".to_string(), + }, + ], + }, + ResponseItem::Other, + ]; + + let collected = collect_user_messages(&items); + + assert_eq!(vec!["first\nsecond".to_string()], collected); + } + + #[test] + fn collect_user_messages_filters_session_prefix_entries() { + let items = vec![ + ResponseItem::Message { + id: None, + role: "user".to_string(), + content: vec![ContentItem::InputText { + text: "do things".to_string(), + }], + }, + ResponseItem::Message { + id: None, + role: "user".to_string(), + content: vec![ContentItem::InputText { + text: "cwd=/tmp".to_string(), + }], + }, + ResponseItem::Message { + id: None, + role: "user".to_string(), + content: vec![ContentItem::InputText { + text: "real user message".to_string(), + }], + }, + ]; + + let collected = collect_user_messages(&items); + + assert_eq!(vec!["real user message".to_string()], collected); + } +} diff --git a/codex-rs/core/src/config.rs b/codex-rs/core/src/config.rs index d6edf62d77..cdd97be333 100644 --- a/codex-rs/core/src/config.rs +++ b/codex-rs/core/src/config.rs @@ -1,6 +1,7 @@ use crate::config_profile::ConfigProfile; use crate::config_types::History; use crate::config_types::McpServerConfig; +use crate::config_types::Notifications; use crate::config_types::ReasoningSummaryFormat; use crate::config_types::SandboxWorkspaceWrite; use crate::config_types::ShellEnvironmentPolicy; @@ -9,6 +10,7 @@ use crate::config_types::Tui; use crate::config_types::UriBasedFileOpener; use crate::git_info::resolve_root_git_project_for_trust; use crate::model_family::ModelFamily; +use crate::model_family::derive_default_model_family; use crate::model_family::find_family_for_model; use crate::model_provider_info::ModelProviderInfo; use crate::model_provider_info::built_in_model_providers; @@ -24,15 +26,20 @@ use codex_protocol::mcp_protocol::Tools; use codex_protocol::mcp_protocol::UserSavedConfig; use dirs::home_dir; use serde::Deserialize; +use std::collections::BTreeMap; use std::collections::HashMap; use std::path::Path; use std::path::PathBuf; use tempfile::NamedTempFile; use toml::Value as TomlValue; +use toml_edit::Array as TomlArray; use toml_edit::DocumentMut; +use toml_edit::Item as TomlItem; +use toml_edit::Table as TomlTable; const OPENAI_DEFAULT_MODEL: &str = "gpt-5"; -pub const GPT5_HIGH_MODEL: &str = "gpt-5-high"; +const OPENAI_DEFAULT_REVIEW_MODEL: &str = "gpt-5"; +pub const GPT_5_CODEX_MEDIUM_MODEL: &str = "gpt-5-codex"; /// Maximum number of bytes of the documentation that will be embedded. Larger /// files are *silently truncated* to this size so we do not take up too much of @@ -47,6 +54,9 @@ pub struct Config { /// Optional override of model selection. pub model: String, + /// Model used specifically for review sessions. Defaults to "gpt-5". + pub review_model: String, + pub model_family: ModelFamily, /// Size of the context window for the model, in tokens. @@ -55,6 +65,9 @@ pub struct Config { /// Maximum number of output tokens. pub model_max_output_tokens: Option, + /// Token usage threshold triggering auto-compaction of conversation history. + pub model_auto_compact_token_limit: Option, + /// Key into the model_providers map that specifies which provider to use. pub model_provider_id: String, @@ -105,6 +118,10 @@ pub struct Config { /// If unset the feature is disabled. pub notify: Option>, + /// TUI notifications preference. When set, the TUI will send OSC 9 notifications on approvals + /// and turn completions when not focused. + pub tui_notifications: Notifications, + /// The directory that should be treated as the current working directory /// for the session. All relative paths inside the business-logic layer are /// resolved against this path. @@ -140,7 +157,7 @@ pub struct Config { /// Value to use for `reasoning.effort` when making a request using the /// Responses API. - pub model_reasoning_effort: ReasoningEffort, + pub model_reasoning_effort: Option, /// If not "none", the value to use for `reasoning.summary` when making a /// request using the Responses API. @@ -152,9 +169,6 @@ pub struct Config { /// Base URL for requests to ChatGPT (as opposed to the OpenAI API). pub chatgpt_base_url: String, - /// Experimental rollout resume path (absolute path to .jsonl; undocumented). - pub experimental_resume: Option, - /// Include an experimental plan tool that the model can use to update its current plan and status of each step. pub include_plan_tool: bool, @@ -259,6 +273,88 @@ pub fn load_config_as_toml(codex_home: &Path) -> std::io::Result { } } +pub fn load_global_mcp_servers( + codex_home: &Path, +) -> std::io::Result> { + let root_value = load_config_as_toml(codex_home)?; + let Some(servers_value) = root_value.get("mcp_servers") else { + return Ok(BTreeMap::new()); + }; + + servers_value + .clone() + .try_into() + .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e)) +} + +pub fn write_global_mcp_servers( + codex_home: &Path, + servers: &BTreeMap, +) -> std::io::Result<()> { + let config_path = codex_home.join(CONFIG_TOML_FILE); + let mut doc = match std::fs::read_to_string(&config_path) { + Ok(contents) => contents + .parse::() + .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e))?, + Err(e) if e.kind() == std::io::ErrorKind::NotFound => DocumentMut::new(), + Err(e) => return Err(e), + }; + + doc.as_table_mut().remove("mcp_servers"); + + if !servers.is_empty() { + let mut table = TomlTable::new(); + table.set_implicit(true); + doc["mcp_servers"] = TomlItem::Table(table); + + for (name, config) in servers { + let mut entry = TomlTable::new(); + entry.set_implicit(false); + entry["command"] = toml_edit::value(config.command.clone()); + + if !config.args.is_empty() { + let mut args = TomlArray::new(); + for arg in &config.args { + args.push(arg.clone()); + } + entry["args"] = TomlItem::Value(args.into()); + } + + if let Some(env) = &config.env + && !env.is_empty() + { + let mut env_table = TomlTable::new(); + env_table.set_implicit(false); + let mut pairs: Vec<_> = env.iter().collect(); + pairs.sort_by(|(a, _), (b, _)| a.cmp(b)); + for (key, value) in pairs { + env_table.insert(key, toml_edit::value(value.clone())); + } + entry["env"] = TomlItem::Table(env_table); + } + + if let Some(timeout) = config.startup_timeout_ms { + let timeout = i64::try_from(timeout).map_err(|_| { + std::io::Error::new( + std::io::ErrorKind::InvalidData, + "startup_timeout_ms exceeds supported range", + ) + })?; + entry["startup_timeout_ms"] = toml_edit::value(timeout); + } + + doc["mcp_servers"][name.as_str()] = TomlItem::Table(entry); + } + } + + std::fs::create_dir_all(codex_home)?; + let tmp_file = NamedTempFile::new_in(codex_home)?; + std::fs::write(tmp_file.path(), doc.to_string())?; + tmp_file.persist(config_path).map_err(|err| err.error)?; + + Ok(()) +} + fn set_project_trusted_inner(doc: &mut DocumentMut, project_path: &Path) -> anyhow::Result<()> { // Ensure we render a human-friendly structure: // @@ -423,14 +519,24 @@ pub async fn persist_model_selection( if let Some(profile_name) = active_profile { let profile_table = ensure_profile_table(&mut doc, profile_name)?; profile_table["model"] = toml_edit::value(model); - if let Some(effort) = effort { - profile_table["model_reasoning_effort"] = toml_edit::value(effort.to_string()); + match effort { + Some(effort) => { + profile_table["model_reasoning_effort"] = toml_edit::value(effort.to_string()); + } + None => { + profile_table.remove("model_reasoning_effort"); + } } } else { let table = doc.as_table_mut(); table["model"] = toml_edit::value(model); - if let Some(effort) = effort { - table["model_reasoning_effort"] = toml_edit::value(effort.to_string()); + match effort { + Some(effort) => { + table["model_reasoning_effort"] = toml_edit::value(effort.to_string()); + } + None => { + table.remove("model_reasoning_effort"); + } } } @@ -499,6 +605,8 @@ fn apply_toml_override(root: &mut TomlValue, path: &str, value: TomlValue) { pub struct ConfigToml { /// Optional override of model selection. pub model: Option, + /// Review model override used by the `/review` feature. + pub review_model: Option, /// Provider to use from the model_providers map. pub model_provider: Option, @@ -509,6 +617,9 @@ pub struct ConfigToml { /// Maximum number of output tokens. pub model_max_output_tokens: Option, + /// Token usage threshold triggering auto-compaction of conversation history. + pub model_auto_compact_token_limit: Option, + /// Default approval policy for executing commands. pub approval_policy: Option, @@ -579,9 +690,6 @@ pub struct ConfigToml { /// Base URL for requests to ChatGPT (as opposed to the OpenAI API). pub chatgpt_base_url: Option, - /// Experimental rollout resume path (absolute path to .jsonl; undocumented). - pub experimental_resume: Option, - /// Experimental path to a file whose contents replace the built-in BASE_INSTRUCTIONS. pub experimental_instructions_file: Option, @@ -724,6 +832,7 @@ impl ConfigToml { #[derive(Default, Debug, Clone)] pub struct ConfigOverrides { pub model: Option, + pub review_model: Option, pub cwd: Option, pub approval_policy: Option, pub sandbox_mode: Option, @@ -751,6 +860,7 @@ impl Config { // Destructure ConfigOverrides fully to ensure all overrides are applied. let ConfigOverrides { model, + review_model: override_review_model, cwd, approval_policy, sandbox_mode, @@ -842,15 +952,8 @@ impl Config { .or(cfg.model) .unwrap_or_else(default_model); - let mut model_family = find_family_for_model(&model).unwrap_or_else(|| ModelFamily { - slug: model.clone(), - family: model.clone(), - needs_special_apply_patch_instructions: false, - supports_reasoning_summaries: false, - reasoning_summary_format: ReasoningSummaryFormat::None, - uses_local_shell_tool: false, - apply_patch_tool_type: None, - }); + let mut model_family = + find_family_for_model(&model).unwrap_or_else(|| derive_default_model_family(&model)); if let Some(supports_reasoning_summaries) = cfg.model_supports_reasoning_summaries { model_family.supports_reasoning_summaries = supports_reasoning_summaries; @@ -868,8 +971,11 @@ impl Config { .as_ref() .map(|info| info.max_output_tokens) }); - - let experimental_resume = cfg.experimental_resume; + let model_auto_compact_token_limit = cfg.model_auto_compact_token_limit.or_else(|| { + openai_model_info + .as_ref() + .and_then(|info| info.auto_compact_token_limit) + }); // Load base instructions override from a file if specified. If the // path is relative, resolve it against the effective cwd so the @@ -882,11 +988,18 @@ impl Config { Self::get_base_instructions(experimental_instructions_path, &resolved_cwd)?; let base_instructions = base_instructions.or(file_base_instructions); + // Default review model when not set in config; allow CLI override to take precedence. + let review_model = override_review_model + .or(cfg.review_model) + .unwrap_or_else(default_review_model); + let config = Self { model, + review_model, model_family, model_context_window, model_max_output_tokens, + model_auto_compact_token_limit, model_provider_id, model_provider, cwd: resolved_cwd, @@ -914,8 +1027,7 @@ impl Config { .unwrap_or(false), model_reasoning_effort: config_profile .model_reasoning_effort - .or(cfg.model_reasoning_effort) - .unwrap_or_default(), + .or(cfg.model_reasoning_effort), model_reasoning_summary: config_profile .model_reasoning_summary .or(cfg.model_reasoning_summary) @@ -925,8 +1037,6 @@ impl Config { .chatgpt_base_url .or(cfg.chatgpt_base_url) .unwrap_or("https://chatgpt.com/backend-api/".to_string()), - - experimental_resume, include_plan_tool: include_plan_tool.unwrap_or(false), include_apply_patch_tool: include_apply_patch_tool.unwrap_or(false), tools_web_search_request, @@ -939,6 +1049,11 @@ impl Config { include_view_image_tool, active_profile: active_profile_name, disable_paste_burst: cfg.disable_paste_burst.unwrap_or(false), + tui_notifications: cfg + .tui + .as_ref() + .map(|t| t.notifications.clone()) + .unwrap_or_default(), }; Ok(config) } @@ -1007,6 +1122,10 @@ fn default_model() -> String { OPENAI_DEFAULT_MODEL.to_string() } +fn default_review_model() -> String { + OPENAI_DEFAULT_REVIEW_MODEL.to_string() +} + /// Returns the path to the Codex configuration directory, which can be /// specified by the `CODEX_HOME` environment variable. If not set, defaults to /// `~/.codex`. @@ -1139,6 +1258,47 @@ exclude_slash_tmp = true ); } + #[test] + fn load_global_mcp_servers_returns_empty_if_missing() -> anyhow::Result<()> { + let codex_home = TempDir::new()?; + + let servers = load_global_mcp_servers(codex_home.path())?; + assert!(servers.is_empty()); + + Ok(()) + } + + #[test] + fn write_global_mcp_servers_round_trips_entries() -> anyhow::Result<()> { + let codex_home = TempDir::new()?; + + let mut servers = BTreeMap::new(); + servers.insert( + "docs".to_string(), + McpServerConfig { + command: "echo".to_string(), + args: vec!["hello".to_string()], + env: None, + startup_timeout_ms: None, + }, + ); + + write_global_mcp_servers(codex_home.path(), &servers)?; + + let loaded = load_global_mcp_servers(codex_home.path())?; + assert_eq!(loaded.len(), 1); + let docs = loaded.get("docs").expect("docs entry"); + assert_eq!(docs.command, "echo"); + assert_eq!(docs.args, vec!["hello".to_string()]); + + let empty = BTreeMap::new(); + write_global_mcp_servers(codex_home.path(), &empty)?; + let loaded = load_global_mcp_servers(codex_home.path())?; + assert!(loaded.is_empty()); + + Ok(()) + } + #[tokio::test] async fn persist_model_selection_updates_defaults() -> anyhow::Result<()> { let codex_home = TempDir::new()?; @@ -1146,7 +1306,7 @@ exclude_slash_tmp = true persist_model_selection( codex_home.path(), None, - "gpt-5-high-new", + "gpt-5-codex", Some(ReasoningEffort::High), ) .await?; @@ -1155,7 +1315,7 @@ exclude_slash_tmp = true tokio::fs::read_to_string(codex_home.path().join(CONFIG_TOML_FILE)).await?; let parsed: ConfigToml = toml::from_str(&serialized)?; - assert_eq!(parsed.model.as_deref(), Some("gpt-5-high-new")); + assert_eq!(parsed.model.as_deref(), Some("gpt-5-codex")); assert_eq!(parsed.model_reasoning_effort, Some(ReasoningEffort::High)); Ok(()) @@ -1209,8 +1369,8 @@ model = "gpt-4.1" persist_model_selection( codex_home.path(), Some("dev"), - "gpt-5-high-new", - Some(ReasoningEffort::Low), + "gpt-5-codex", + Some(ReasoningEffort::Medium), ) .await?; @@ -1222,8 +1382,11 @@ model = "gpt-4.1" .get("dev") .expect("profile should be created"); - assert_eq!(profile.model.as_deref(), Some("gpt-5-high-new")); - assert_eq!(profile.model_reasoning_effort, Some(ReasoningEffort::Low)); + assert_eq!(profile.model.as_deref(), Some("gpt-5-codex")); + assert_eq!( + profile.model_reasoning_effort, + Some(ReasoningEffort::Medium) + ); Ok(()) } @@ -1419,9 +1582,11 @@ model_verbosity = "high" assert_eq!( Config { model: "o3".to_string(), + review_model: "gpt-5".to_string(), model_family: find_family_for_model("o3").expect("known model slug"), model_context_window: Some(200_000), model_max_output_tokens: Some(100_000), + model_auto_compact_token_limit: None, model_provider_id: "openai".to_string(), model_provider: fixture.openai_provider.clone(), approval_policy: AskForApproval::Never, @@ -1439,11 +1604,10 @@ model_verbosity = "high" codex_linux_sandbox_exe: None, hide_agent_reasoning: false, show_raw_agent_reasoning: false, - model_reasoning_effort: ReasoningEffort::High, + model_reasoning_effort: Some(ReasoningEffort::High), model_reasoning_summary: ReasoningSummary::Detailed, model_verbosity: None, chatgpt_base_url: "https://chatgpt.com/backend-api/".to_string(), - experimental_resume: None, base_instructions: None, include_plan_tool: false, include_apply_patch_tool: false, @@ -1453,6 +1617,7 @@ model_verbosity = "high" include_view_image_tool: true, active_profile: Some("o3".to_string()), disable_paste_burst: false, + tui_notifications: Default::default(), }, o3_profile_config ); @@ -1475,9 +1640,11 @@ model_verbosity = "high" )?; let expected_gpt3_profile_config = Config { model: "gpt-3.5-turbo".to_string(), + review_model: "gpt-5".to_string(), model_family: find_family_for_model("gpt-3.5-turbo").expect("known model slug"), model_context_window: Some(16_385), model_max_output_tokens: Some(4_096), + model_auto_compact_token_limit: None, model_provider_id: "openai-chat-completions".to_string(), model_provider: fixture.openai_chat_completions_provider.clone(), approval_policy: AskForApproval::UnlessTrusted, @@ -1495,11 +1662,10 @@ model_verbosity = "high" codex_linux_sandbox_exe: None, hide_agent_reasoning: false, show_raw_agent_reasoning: false, - model_reasoning_effort: ReasoningEffort::default(), + model_reasoning_effort: None, model_reasoning_summary: ReasoningSummary::default(), model_verbosity: None, chatgpt_base_url: "https://chatgpt.com/backend-api/".to_string(), - experimental_resume: None, base_instructions: None, include_plan_tool: false, include_apply_patch_tool: false, @@ -1509,6 +1675,7 @@ model_verbosity = "high" include_view_image_tool: true, active_profile: Some("gpt3".to_string()), disable_paste_burst: false, + tui_notifications: Default::default(), }; assert_eq!(expected_gpt3_profile_config, gpt3_profile_config); @@ -1546,9 +1713,11 @@ model_verbosity = "high" )?; let expected_zdr_profile_config = Config { model: "o3".to_string(), + review_model: "gpt-5".to_string(), model_family: find_family_for_model("o3").expect("known model slug"), model_context_window: Some(200_000), model_max_output_tokens: Some(100_000), + model_auto_compact_token_limit: None, model_provider_id: "openai".to_string(), model_provider: fixture.openai_provider.clone(), approval_policy: AskForApproval::OnFailure, @@ -1566,11 +1735,10 @@ model_verbosity = "high" codex_linux_sandbox_exe: None, hide_agent_reasoning: false, show_raw_agent_reasoning: false, - model_reasoning_effort: ReasoningEffort::default(), + model_reasoning_effort: None, model_reasoning_summary: ReasoningSummary::default(), model_verbosity: None, chatgpt_base_url: "https://chatgpt.com/backend-api/".to_string(), - experimental_resume: None, base_instructions: None, include_plan_tool: false, include_apply_patch_tool: false, @@ -1580,6 +1748,7 @@ model_verbosity = "high" include_view_image_tool: true, active_profile: Some("zdr".to_string()), disable_paste_burst: false, + tui_notifications: Default::default(), }; assert_eq!(expected_zdr_profile_config, zdr_profile_config); @@ -1603,9 +1772,11 @@ model_verbosity = "high" )?; let expected_gpt5_profile_config = Config { model: "gpt-5".to_string(), + review_model: "gpt-5".to_string(), model_family: find_family_for_model("gpt-5").expect("known model slug"), model_context_window: Some(272_000), model_max_output_tokens: Some(128_000), + model_auto_compact_token_limit: None, model_provider_id: "openai".to_string(), model_provider: fixture.openai_provider.clone(), approval_policy: AskForApproval::OnFailure, @@ -1623,11 +1794,10 @@ model_verbosity = "high" codex_linux_sandbox_exe: None, hide_agent_reasoning: false, show_raw_agent_reasoning: false, - model_reasoning_effort: ReasoningEffort::High, + model_reasoning_effort: Some(ReasoningEffort::High), model_reasoning_summary: ReasoningSummary::Detailed, model_verbosity: Some(Verbosity::High), chatgpt_base_url: "https://chatgpt.com/backend-api/".to_string(), - experimental_resume: None, base_instructions: None, include_plan_tool: false, include_apply_patch_tool: false, @@ -1637,6 +1807,7 @@ model_verbosity = "high" include_view_image_tool: true, active_profile: Some("gpt5".to_string()), disable_paste_burst: false, + tui_notifications: Default::default(), }; assert_eq!(expected_gpt5_profile_config, gpt5_profile_config); @@ -1740,3 +1911,46 @@ trust_level = "trusted" Ok(()) } } + +#[cfg(test)] +mod notifications_tests { + use crate::config_types::Notifications; + use serde::Deserialize; + + #[derive(Deserialize, Debug, PartialEq)] + struct TuiTomlTest { + notifications: Notifications, + } + + #[derive(Deserialize, Debug, PartialEq)] + struct RootTomlTest { + tui: TuiTomlTest, + } + + #[test] + fn test_tui_notifications_true() { + let toml = r#" + [tui] + notifications = true + "#; + let parsed: RootTomlTest = toml::from_str(toml).expect("deserialize notifications=true"); + assert!(matches!( + parsed.tui.notifications, + Notifications::Enabled(true) + )); + } + + #[test] + fn test_tui_notifications_custom_array() { + let toml = r#" + [tui] + notifications = ["foo"] + "#; + let parsed: RootTomlTest = + toml::from_str(toml).expect("deserialize notifications=[\"foo\"]"); + assert!(matches!( + parsed.tui.notifications, + Notifications::Custom(ref v) if v == &vec!["foo".to_string()] + )); + } +} diff --git a/codex-rs/core/src/config_edit.rs b/codex-rs/core/src/config_edit.rs index ae41ebcb40..4b3a5cbdb0 100644 --- a/codex-rs/core/src/config_edit.rs +++ b/codex-rs/core/src/config_edit.rs @@ -7,6 +7,12 @@ use toml_edit::DocumentMut; pub const CONFIG_KEY_MODEL: &str = "model"; pub const CONFIG_KEY_EFFORT: &str = "model_reasoning_effort"; +#[derive(Copy, Clone)] +enum NoneBehavior { + Skip, + Remove, +} + /// Persist overrides into `config.toml` using explicit key segments per /// override. This avoids ambiguity with keys that contain dots or spaces. pub async fn persist_overrides( @@ -14,47 +20,12 @@ pub async fn persist_overrides( profile: Option<&str>, overrides: &[(&[&str], &str)], ) -> Result<()> { - let config_path = codex_home.join(CONFIG_TOML_FILE); + let with_options: Vec<(&[&str], Option<&str>)> = overrides + .iter() + .map(|(segments, value)| (*segments, Some(*value))) + .collect(); - let mut doc = match tokio::fs::read_to_string(&config_path).await { - Ok(s) => s.parse::()?, - Err(e) if e.kind() == std::io::ErrorKind::NotFound => { - tokio::fs::create_dir_all(codex_home).await?; - DocumentMut::new() - } - Err(e) => return Err(e.into()), - }; - - let effective_profile = if let Some(p) = profile { - Some(p.to_owned()) - } else { - doc.get("profile") - .and_then(|i| i.as_str()) - .map(|s| s.to_string()) - }; - - for (segments, val) in overrides.iter().copied() { - let value = toml_edit::value(val); - if let Some(ref name) = effective_profile { - if segments.first().copied() == Some("profiles") { - apply_toml_edit_override_segments(&mut doc, segments, value); - } else { - let mut seg_buf: Vec<&str> = Vec::with_capacity(2 + segments.len()); - seg_buf.push("profiles"); - seg_buf.push(name.as_str()); - seg_buf.extend_from_slice(segments); - apply_toml_edit_override_segments(&mut doc, &seg_buf, value); - } - } else { - apply_toml_edit_override_segments(&mut doc, segments, value); - } - } - - let tmp_file = NamedTempFile::new_in(codex_home)?; - tokio::fs::write(tmp_file.path(), doc.to_string()).await?; - tmp_file.persist(config_path)?; - - Ok(()) + persist_overrides_with_behavior(codex_home, profile, &with_options, NoneBehavior::Skip).await } /// Persist overrides where values may be optional. Any entries with `None` @@ -65,16 +36,17 @@ pub async fn persist_non_null_overrides( profile: Option<&str>, overrides: &[(&[&str], Option<&str>)], ) -> Result<()> { - let filtered: Vec<(&[&str], &str)> = overrides - .iter() - .filter_map(|(k, v)| v.map(|vv| (*k, vv))) - .collect(); + persist_overrides_with_behavior(codex_home, profile, overrides, NoneBehavior::Skip).await +} - if filtered.is_empty() { - return Ok(()); - } - - persist_overrides(codex_home, profile, &filtered).await +/// Persist overrides where `None` values clear any existing values from the +/// configuration file. +pub async fn persist_overrides_and_clear_if_none( + codex_home: &Path, + profile: Option<&str>, + overrides: &[(&[&str], Option<&str>)], +) -> Result<()> { + persist_overrides_with_behavior(codex_home, profile, overrides, NoneBehavior::Remove).await } /// Apply a single override onto a `toml_edit` document while preserving @@ -121,6 +93,125 @@ fn apply_toml_edit_override_segments( current[last] = value; } +async fn persist_overrides_with_behavior( + codex_home: &Path, + profile: Option<&str>, + overrides: &[(&[&str], Option<&str>)], + none_behavior: NoneBehavior, +) -> Result<()> { + if overrides.is_empty() { + return Ok(()); + } + + let should_skip = match none_behavior { + NoneBehavior::Skip => overrides.iter().all(|(_, value)| value.is_none()), + NoneBehavior::Remove => false, + }; + + if should_skip { + return Ok(()); + } + + let config_path = codex_home.join(CONFIG_TOML_FILE); + + let read_result = tokio::fs::read_to_string(&config_path).await; + let mut doc = match read_result { + Ok(contents) => contents.parse::()?, + Err(e) if e.kind() == std::io::ErrorKind::NotFound => { + if overrides + .iter() + .all(|(_, value)| value.is_none() && matches!(none_behavior, NoneBehavior::Remove)) + { + return Ok(()); + } + + tokio::fs::create_dir_all(codex_home).await?; + DocumentMut::new() + } + Err(e) => return Err(e.into()), + }; + + let effective_profile = if let Some(p) = profile { + Some(p.to_owned()) + } else { + doc.get("profile") + .and_then(|i| i.as_str()) + .map(|s| s.to_string()) + }; + + let mut mutated = false; + + for (segments, value) in overrides.iter().copied() { + let mut seg_buf: Vec<&str> = Vec::new(); + let segments_to_apply: &[&str]; + + if let Some(ref name) = effective_profile { + if segments.first().copied() == Some("profiles") { + segments_to_apply = segments; + } else { + seg_buf.reserve(2 + segments.len()); + seg_buf.push("profiles"); + seg_buf.push(name.as_str()); + seg_buf.extend_from_slice(segments); + segments_to_apply = seg_buf.as_slice(); + } + } else { + segments_to_apply = segments; + } + + match value { + Some(v) => { + let item_value = toml_edit::value(v); + apply_toml_edit_override_segments(&mut doc, segments_to_apply, item_value); + mutated = true; + } + None => { + if matches!(none_behavior, NoneBehavior::Remove) + && remove_toml_edit_segments(&mut doc, segments_to_apply) + { + mutated = true; + } + } + } + } + + if !mutated { + return Ok(()); + } + + let tmp_file = NamedTempFile::new_in(codex_home)?; + tokio::fs::write(tmp_file.path(), doc.to_string()).await?; + tmp_file.persist(config_path)?; + + Ok(()) +} + +fn remove_toml_edit_segments(doc: &mut DocumentMut, segments: &[&str]) -> bool { + use toml_edit::Item; + + if segments.is_empty() { + return false; + } + + let mut current = doc.as_table_mut(); + for seg in &segments[..segments.len() - 1] { + let Some(item) = current.get_mut(seg) else { + return false; + }; + + match item { + Item::Table(table) => { + current = table; + } + _ => { + return false; + } + } + } + + current.remove(segments[segments.len() - 1]).is_some() +} + #[cfg(test)] mod tests { use super::*; @@ -574,6 +665,81 @@ model = "o3" assert_eq!(contents, expected); } + #[tokio::test] + async fn persist_clear_none_removes_top_level_value() { + let tmpdir = tempdir().expect("tmp"); + let codex_home = tmpdir.path(); + + let seed = r#"model = "gpt-5" +model_reasoning_effort = "medium" +"#; + tokio::fs::write(codex_home.join(CONFIG_TOML_FILE), seed) + .await + .expect("seed write"); + + persist_overrides_and_clear_if_none( + codex_home, + None, + &[ + (&[CONFIG_KEY_MODEL], None), + (&[CONFIG_KEY_EFFORT], Some("high")), + ], + ) + .await + .expect("persist"); + + let contents = read_config(codex_home).await; + let expected = "model_reasoning_effort = \"high\"\n"; + assert_eq!(contents, expected); + } + + #[tokio::test] + async fn persist_clear_none_respects_active_profile() { + let tmpdir = tempdir().expect("tmp"); + let codex_home = tmpdir.path(); + + let seed = r#"profile = "team" + +[profiles.team] +model = "gpt-4" +model_reasoning_effort = "minimal" +"#; + tokio::fs::write(codex_home.join(CONFIG_TOML_FILE), seed) + .await + .expect("seed write"); + + persist_overrides_and_clear_if_none( + codex_home, + None, + &[ + (&[CONFIG_KEY_MODEL], None), + (&[CONFIG_KEY_EFFORT], Some("high")), + ], + ) + .await + .expect("persist"); + + let contents = read_config(codex_home).await; + let expected = r#"profile = "team" + +[profiles.team] +model_reasoning_effort = "high" +"#; + assert_eq!(contents, expected); + } + + #[tokio::test] + async fn persist_clear_none_noop_when_file_missing() { + let tmpdir = tempdir().expect("tmp"); + let codex_home = tmpdir.path(); + + persist_overrides_and_clear_if_none(codex_home, None, &[(&[CONFIG_KEY_MODEL], None)]) + .await + .expect("persist"); + + assert!(!codex_home.join(CONFIG_TOML_FILE).exists()); + } + // Test helper moved to bottom per review guidance. async fn read_config(codex_home: &Path) -> String { let p = codex_home.join(CONFIG_TOML_FILE); diff --git a/codex-rs/core/src/config_types.rs b/codex-rs/core/src/config_types.rs index 0722dfc0ea..ec8e8e67c6 100644 --- a/codex-rs/core/src/config_types.rs +++ b/codex-rs/core/src/config_types.rs @@ -76,9 +76,26 @@ pub enum HistoryPersistence { None, } +#[derive(Debug, Clone, PartialEq, Eq, Deserialize)] +#[serde(untagged)] +pub enum Notifications { + Enabled(bool), + Custom(Vec), +} + +impl Default for Notifications { + fn default() -> Self { + Self::Enabled(false) + } +} + /// Collection of settings that are specific to the TUI. #[derive(Deserialize, Debug, Clone, PartialEq, Default)] -pub struct Tui {} +pub struct Tui { + /// Enable desktop notifications from the TUI when the terminal is unfocused. + /// Defaults to `false`. + pub notifications: Notifications, +} #[derive(Deserialize, Debug, Clone, PartialEq, Default)] pub struct SandboxWorkspaceWrite { diff --git a/codex-rs/core/src/conversation_history.rs b/codex-rs/core/src/conversation_history.rs index 3cdbbb33c7..891a2ea472 100644 --- a/codex-rs/core/src/conversation_history.rs +++ b/codex-rs/core/src/conversation_history.rs @@ -1,4 +1,3 @@ -use codex_protocol::models::ContentItem; use codex_protocol::models::ResponseItem; /// Transcript of conversation history @@ -33,52 +32,8 @@ impl ConversationHistory { } } - pub(crate) fn keep_last_messages(&mut self, n: usize) { - if n == 0 { - self.items.clear(); - return; - } - - // Collect the last N message items (assistant/user), newest to oldest. - let mut kept: Vec = Vec::with_capacity(n); - for item in self.items.iter().rev() { - if let ResponseItem::Message { role, content, .. } = item { - kept.push(ResponseItem::Message { - // we need to remove the id or the model will complain that messages are sent without - // their reasonings - id: None, - role: role.clone(), - content: content.clone(), - }); - if kept.len() == n { - break; - } - } - } - - // Preserve chronological order (oldest to newest) within the kept slice. - kept.reverse(); - self.items = kept; - } - - pub(crate) fn last_agent_message(&self) -> String { - for item in self.items.iter().rev() { - if let ResponseItem::Message { role, content, .. } = item - && role == "assistant" - { - return content - .iter() - .find_map(|ci| { - if let ContentItem::OutputText { text } = ci { - Some(text.clone()) - } else { - None - } - }) - .unwrap_or_default(); - } - } - String::new() + pub(crate) fn replace(&mut self, items: Vec) { + self.items = items; } } diff --git a/codex-rs/core/src/conversation_manager.rs b/codex-rs/core/src/conversation_manager.rs index a5f66d4553..7147eca233 100644 --- a/codex-rs/core/src/conversation_manager.rs +++ b/codex-rs/core/src/conversation_manager.rs @@ -59,21 +59,11 @@ impl ConversationManager { config: Config, auth_manager: Arc, ) -> CodexResult { - // TO BE REFACTORED: use the config experimental_resume field until we have a mainstream way. - if let Some(resume_path) = config.experimental_resume.as_ref() { - let initial_history = RolloutRecorder::get_rollout_history(resume_path).await?; - let CodexSpawnOk { - codex, - conversation_id, - } = Codex::spawn(config, auth_manager, initial_history).await?; - self.finalize_spawn(codex, conversation_id).await - } else { - let CodexSpawnOk { - codex, - conversation_id, - } = Codex::spawn(config, auth_manager, InitialHistory::New).await?; - self.finalize_spawn(codex, conversation_id).await - } + let CodexSpawnOk { + codex, + conversation_id, + } = Codex::spawn(config, auth_manager, InitialHistory::New).await?; + self.finalize_spawn(codex, conversation_id).await } async fn finalize_spawn( diff --git a/codex-rs/core/src/error.rs b/codex-rs/core/src/error.rs index b1cda02420..77b447e5cf 100644 --- a/codex-rs/core/src/error.rs +++ b/codex-rs/core/src/error.rs @@ -1,3 +1,4 @@ +use crate::exec::ExecToolCallOutput; use crate::token_data::KnownPlan; use crate::token_data::PlanType; use codex_protocol::mcp_protocol::ConversationId; @@ -13,8 +14,11 @@ pub type Result = std::result::Result; #[derive(Error, Debug)] pub enum SandboxErr { /// Error from sandbox execution - #[error("sandbox denied exec error, exit code: {0}, stdout: {1}, stderr: {2}")] - Denied(i32, String, String), + #[error( + "sandbox denied exec error, exit code: {}, stdout: {}, stderr: {}", + .output.exit_code, .output.stdout.text, .output.stderr.text + )] + Denied { output: Box }, /// Error from linux seccomp filter setup #[cfg(target_os = "linux")] @@ -28,7 +32,7 @@ pub enum SandboxErr { /// Command timed out #[error("command timed out")] - Timeout, + Timeout { output: Box }, /// Command was killed by a signal #[error("command was killed by a signal")] @@ -245,9 +249,12 @@ impl CodexErr { pub fn get_error_message_ui(e: &CodexErr) -> String { match e { - CodexErr::Sandbox(SandboxErr::Denied(_, _, stderr)) => stderr.to_string(), + CodexErr::Sandbox(SandboxErr::Denied { output }) => output.stderr.text.clone(), // Timeouts are not sandbox errors from a UX perspective; present them plainly - CodexErr::Sandbox(SandboxErr::Timeout) => "error: command timed out".to_string(), + CodexErr::Sandbox(SandboxErr::Timeout { output }) => format!( + "error: command timed out after {} ms", + output.duration.as_millis() + ), _ => e.to_string(), } } diff --git a/codex-rs/core/src/exec.rs b/codex-rs/core/src/exec.rs index 3b40766764..8fecb16fc3 100644 --- a/codex-rs/core/src/exec.rs +++ b/codex-rs/core/src/exec.rs @@ -34,6 +34,7 @@ const DEFAULT_TIMEOUT_MS: u64 = 10_000; const SIGKILL_CODE: i32 = 9; const TIMEOUT_CODE: i32 = 64; const EXIT_CODE_SIGNAL_BASE: i32 = 128; // conventional shell: 128 + signal +const EXEC_TIMEOUT_EXIT_CODE: i32 = 124; // conventional timeout exit code // I/O buffer sizing const READ_CHUNK_SIZE: usize = 8192; // bytes per read @@ -86,11 +87,12 @@ pub async fn process_exec_tool_call( ) -> Result { let start = Instant::now(); + let timeout_duration = params.timeout_duration(); + let raw_output_result: std::result::Result = match sandbox_type { SandboxType::None => exec(params, sandbox_policy, stdout_stream.clone()).await, SandboxType::MacosSeatbelt => { - let timeout = params.timeout_duration(); let ExecParams { command, cwd, env, .. } = params; @@ -102,10 +104,9 @@ pub async fn process_exec_tool_call( env, ) .await?; - consume_truncated_output(child, timeout, stdout_stream.clone()).await + consume_truncated_output(child, timeout_duration, stdout_stream.clone()).await } SandboxType::LinuxSeccomp => { - let timeout = params.timeout_duration(); let ExecParams { command, cwd, env, .. } = params; @@ -123,41 +124,56 @@ pub async fn process_exec_tool_call( ) .await?; - consume_truncated_output(child, timeout, stdout_stream).await + consume_truncated_output(child, timeout_duration, stdout_stream).await } }; let duration = start.elapsed(); match raw_output_result { Ok(raw_output) => { - let stdout = raw_output.stdout.from_utf8_lossy(); - let stderr = raw_output.stderr.from_utf8_lossy(); + #[allow(unused_mut)] + let mut timed_out = raw_output.timed_out; #[cfg(target_family = "unix")] - match raw_output.exit_status.signal() { - Some(TIMEOUT_CODE) => return Err(CodexErr::Sandbox(SandboxErr::Timeout)), - Some(signal) => { - return Err(CodexErr::Sandbox(SandboxErr::Signal(signal))); + { + if let Some(signal) = raw_output.exit_status.signal() { + if signal == TIMEOUT_CODE { + timed_out = true; + } else { + return Err(CodexErr::Sandbox(SandboxErr::Signal(signal))); + } } - None => {} } - let exit_code = raw_output.exit_status.code().unwrap_or(-1); - - if exit_code != 0 && is_likely_sandbox_denied(sandbox_type, exit_code) { - return Err(CodexErr::Sandbox(SandboxErr::Denied( - exit_code, - stdout.text, - stderr.text, - ))); + let mut exit_code = raw_output.exit_status.code().unwrap_or(-1); + if timed_out { + exit_code = EXEC_TIMEOUT_EXIT_CODE; } - Ok(ExecToolCallOutput { + let stdout = raw_output.stdout.from_utf8_lossy(); + let stderr = raw_output.stderr.from_utf8_lossy(); + let aggregated_output = raw_output.aggregated_output.from_utf8_lossy(); + let exec_output = ExecToolCallOutput { exit_code, stdout, stderr, - aggregated_output: raw_output.aggregated_output.from_utf8_lossy(), + aggregated_output, duration, - }) + timed_out, + }; + + if timed_out { + return Err(CodexErr::Sandbox(SandboxErr::Timeout { + output: Box::new(exec_output), + })); + } + + if exit_code != 0 && is_likely_sandbox_denied(sandbox_type, exit_code) { + return Err(CodexErr::Sandbox(SandboxErr::Denied { + output: Box::new(exec_output), + })); + } + + Ok(exec_output) } Err(err) => { tracing::error!("exec error: {err}"); @@ -197,6 +213,7 @@ struct RawExecToolCallOutput { pub stdout: StreamOutput>, pub stderr: StreamOutput>, pub aggregated_output: StreamOutput>, + pub timed_out: bool, } impl StreamOutput { @@ -229,6 +246,7 @@ pub struct ExecToolCallOutput { pub stderr: StreamOutput, pub aggregated_output: StreamOutput, pub duration: Duration, + pub timed_out: bool, } async fn exec( @@ -298,22 +316,24 @@ async fn consume_truncated_output( Some(agg_tx.clone()), )); - let exit_status = tokio::select! { + let (exit_status, timed_out) = tokio::select! { result = tokio::time::timeout(timeout, child.wait()) => { match result { - Ok(Ok(exit_status)) => exit_status, - Ok(e) => e?, + Ok(status_result) => { + let exit_status = status_result?; + (exit_status, false) + } Err(_) => { // timeout child.start_kill()?; // Debatable whether `child.wait().await` should be called here. - synthetic_exit_status(EXIT_CODE_SIGNAL_BASE + TIMEOUT_CODE) + (synthetic_exit_status(EXIT_CODE_SIGNAL_BASE + TIMEOUT_CODE), true) } } } _ = tokio::signal::ctrl_c() => { child.start_kill()?; - synthetic_exit_status(EXIT_CODE_SIGNAL_BASE + SIGKILL_CODE) + (synthetic_exit_status(EXIT_CODE_SIGNAL_BASE + SIGKILL_CODE), false) } }; @@ -336,6 +356,7 @@ async fn consume_truncated_output( stdout, stderr, aggregated_output, + timed_out, }) } diff --git a/codex-rs/core/src/exec_command/exec_command_session.rs b/codex-rs/core/src/exec_command/exec_command_session.rs index b524506eaf..31b3c929b2 100644 --- a/codex-rs/core/src/exec_command/exec_command_session.rs +++ b/codex-rs/core/src/exec_command/exec_command_session.rs @@ -38,16 +38,20 @@ impl ExecCommandSession { writer_handle: JoinHandle<()>, wait_handle: JoinHandle<()>, exit_status: std::sync::Arc, - ) -> Self { - Self { - writer_tx, - output_tx, - killer: StdMutex::new(Some(killer)), - reader_handle: StdMutex::new(Some(reader_handle)), - writer_handle: StdMutex::new(Some(writer_handle)), - wait_handle: StdMutex::new(Some(wait_handle)), - exit_status, - } + ) -> (Self, broadcast::Receiver>) { + let initial_output_rx = output_tx.subscribe(); + ( + Self { + writer_tx, + output_tx, + killer: StdMutex::new(Some(killer)), + reader_handle: StdMutex::new(Some(reader_handle)), + writer_handle: StdMutex::new(Some(writer_handle)), + wait_handle: StdMutex::new(Some(wait_handle)), + exit_status, + }, + initial_output_rx, + ) } pub(crate) fn writer_sender(&self) -> mpsc::Sender> { diff --git a/codex-rs/core/src/exec_command/session_manager.rs b/codex-rs/core/src/exec_command/session_manager.rs index 9578610cc7..61c70f0cc2 100644 --- a/codex-rs/core/src/exec_command/session_manager.rs +++ b/codex-rs/core/src/exec_command/session_manager.rs @@ -93,18 +93,16 @@ impl SessionManager { .fetch_add(1, std::sync::atomic::Ordering::SeqCst), ); - let (session, mut exit_rx) = - create_exec_command_session(params.clone()) - .await - .map_err(|err| { - format!( - "failed to create exec command session for session id {}: {err}", - session_id.0 - ) - })?; + let (session, mut output_rx, mut exit_rx) = create_exec_command_session(params.clone()) + .await + .map_err(|err| { + format!( + "failed to create exec command session for session id {}: {err}", + session_id.0 + ) + })?; // Insert into session map. - let mut output_rx = session.output_receiver(); self.sessions.lock().await.insert(session_id, session); // Collect output until either timeout expires or process exits. @@ -245,7 +243,11 @@ impl SessionManager { /// Spawn PTY and child process per spawn_exec_command_session logic. async fn create_exec_command_session( params: ExecCommandParams, -) -> anyhow::Result<(ExecCommandSession, oneshot::Receiver)> { +) -> anyhow::Result<( + ExecCommandSession, + tokio::sync::broadcast::Receiver>, + oneshot::Receiver, +)> { let ExecCommandParams { cmd, yield_time_ms: _, @@ -279,7 +281,6 @@ async fn create_exec_command_session( let (writer_tx, mut writer_rx) = mpsc::channel::>(128); // Broadcast for streaming PTY output to readers: subscribers receive from subscription time. let (output_tx, _) = tokio::sync::broadcast::channel::>(256); - // Reader task: drain PTY and forward chunks to output channel. let mut reader = pair.master.try_clone_reader()?; let output_tx_clone = output_tx.clone(); @@ -341,7 +342,7 @@ async fn create_exec_command_session( }); // Create and store the session with channels. - let session = ExecCommandSession::new( + let (session, initial_output_rx) = ExecCommandSession::new( writer_tx, output_tx, killer, @@ -350,7 +351,7 @@ async fn create_exec_command_session( wait_handle, exit_status, ); - Ok((session, exit_rx)) + Ok((session, initial_output_rx, exit_rx)) } #[cfg(test)] diff --git a/codex-rs/core/src/internal_storage.rs b/codex-rs/core/src/internal_storage.rs index f7d17e88f9..e8e0c09057 100644 --- a/codex-rs/core/src/internal_storage.rs +++ b/codex-rs/core/src/internal_storage.rs @@ -1,6 +1,7 @@ use anyhow::Context; use serde::Deserialize; use serde::Serialize; +use std::io::ErrorKind; use std::path::Path; use std::path::PathBuf; @@ -11,7 +12,7 @@ pub struct InternalStorage { #[serde(skip)] storage_path: PathBuf, #[serde(default)] - pub gpt_5_high_model_prompt_seen: bool, + pub gpt_5_codex_model_prompt_seen: bool, } // TODO(jif) generalise all the file writers and build proper async channel inserters. @@ -31,7 +32,14 @@ impl InternalStorage { } }, Err(error) => { - tracing::warn!("failed to read internal storage: {error:?}"); + if error.kind() == ErrorKind::NotFound { + tracing::debug!( + "internal storage not found at {}; initializing defaults", + storage_path.display() + ); + } else { + tracing::warn!("failed to read internal storage: {error:?}"); + } Self::empty(storage_path) } } diff --git a/codex-rs/core/src/lib.rs b/codex-rs/core/src/lib.rs index 55d0062454..7b9c3dc9f0 100644 --- a/codex-rs/core/src/lib.rs +++ b/codex-rs/core/src/lib.rs @@ -70,6 +70,7 @@ pub use rollout::ARCHIVED_SESSIONS_SUBDIR; pub use rollout::RolloutRecorder; pub use rollout::SESSIONS_SUBDIR; pub use rollout::SessionMeta; +pub use rollout::find_conversation_path_by_id_str; pub use rollout::list::ConversationItem; pub use rollout::list::ConversationsPage; pub use rollout::list::Cursor; diff --git a/codex-rs/core/src/model_family.rs b/codex-rs/core/src/model_family.rs index 59fd622f1c..54c18daec3 100644 --- a/codex-rs/core/src/model_family.rs +++ b/codex-rs/core/src/model_family.rs @@ -1,6 +1,11 @@ use crate::config_types::ReasoningSummaryFormat; use crate::tool_apply_patch::ApplyPatchToolType; +/// The `instructions` field in the payload sent to a model should always start +/// with this content. +const BASE_INSTRUCTIONS: &str = include_str!("../prompt.md"); +const GPT_5_CODEX_INSTRUCTIONS: &str = include_str!("../gpt_5_codex_prompt.md"); + /// A model family is a group of models that share certain characteristics. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ModelFamily { @@ -33,6 +38,9 @@ pub struct ModelFamily { /// Present if the model performs better when `apply_patch` is provided as /// a tool call instead of just a bash command pub apply_patch_tool_type: Option, + + // Instructions to use for querying the model + pub base_instructions: String, } macro_rules! model_family { @@ -48,6 +56,7 @@ macro_rules! model_family { reasoning_summary_format: ReasoningSummaryFormat::None, uses_local_shell_tool: false, apply_patch_tool_type: None, + base_instructions: BASE_INSTRUCTIONS.to_string(), }; // apply overrides $( @@ -57,22 +66,6 @@ macro_rules! model_family { }}; } -macro_rules! simple_model_family { - ( - $slug:expr, $family:expr - ) => {{ - Some(ModelFamily { - slug: $slug.to_string(), - family: $family.to_string(), - needs_special_apply_patch_instructions: false, - supports_reasoning_summaries: false, - reasoning_summary_format: ReasoningSummaryFormat::None, - uses_local_shell_tool: false, - apply_patch_tool_type: None, - }) - }}; -} - /// Returns a `ModelFamily` for the given model slug, or `None` if the slug /// does not match any known model family. pub fn find_family_for_model(slug: &str) -> Option { @@ -80,23 +73,20 @@ pub fn find_family_for_model(slug: &str) -> Option { model_family!( slug, "o3", supports_reasoning_summaries: true, + needs_special_apply_patch_instructions: true, ) } else if slug.starts_with("o4-mini") { model_family!( slug, "o4-mini", supports_reasoning_summaries: true, + needs_special_apply_patch_instructions: true, ) } else if slug.starts_with("codex-mini-latest") { model_family!( slug, "codex-mini-latest", supports_reasoning_summaries: true, uses_local_shell_tool: true, - ) - } else if slug.starts_with("codex-") { - model_family!( - slug, slug, - supports_reasoning_summaries: true, - reasoning_summary_format: ReasoningSummaryFormat::Experimental, + needs_special_apply_patch_instructions: true, ) } else if slug.starts_with("gpt-4.1") { model_family!( @@ -106,15 +96,36 @@ pub fn find_family_for_model(slug: &str) -> Option { } else if slug.starts_with("gpt-oss") || slug.starts_with("openai/gpt-oss") { model_family!(slug, "gpt-oss", apply_patch_tool_type: Some(ApplyPatchToolType::Function)) } else if slug.starts_with("gpt-4o") { - simple_model_family!(slug, "gpt-4o") + model_family!(slug, "gpt-4o", needs_special_apply_patch_instructions: true) } else if slug.starts_with("gpt-3.5") { - simple_model_family!(slug, "gpt-3.5") + model_family!(slug, "gpt-3.5", needs_special_apply_patch_instructions: true) + } else if slug.starts_with("codex-") || slug.starts_with("gpt-5-codex") { + model_family!( + slug, slug, + supports_reasoning_summaries: true, + reasoning_summary_format: ReasoningSummaryFormat::Experimental, + base_instructions: GPT_5_CODEX_INSTRUCTIONS.to_string(), + ) } else if slug.starts_with("gpt-5") { model_family!( slug, "gpt-5", supports_reasoning_summaries: true, + needs_special_apply_patch_instructions: true, ) } else { None } } + +pub fn derive_default_model_family(model: &str) -> ModelFamily { + ModelFamily { + slug: model.to_string(), + family: model.to_string(), + needs_special_apply_patch_instructions: false, + supports_reasoning_summaries: false, + reasoning_summary_format: ReasoningSummaryFormat::None, + uses_local_shell_tool: false, + apply_patch_tool_type: None, + base_instructions: BASE_INSTRUCTIONS.to_string(), + } +} diff --git a/codex-rs/core/src/model_provider_info.rs b/codex-rs/core/src/model_provider_info.rs index 7fca131cd8..2850996dcf 100644 --- a/codex-rs/core/src/model_provider_info.rs +++ b/codex-rs/core/src/model_provider_info.rs @@ -162,6 +162,21 @@ impl ModelProviderInfo { } } + pub(crate) fn is_azure_responses_endpoint(&self) -> bool { + if self.wire_api != WireApi::Responses { + return false; + } + + if self.name.eq_ignore_ascii_case("azure") { + return true; + } + + self.base_url + .as_ref() + .map(|base| matches_azure_responses_base_url(base)) + .unwrap_or(false) + } + /// Apply provider-specific HTTP headers (both static and environment-based) /// onto an existing `reqwest::RequestBuilder` and return the updated /// builder. @@ -329,6 +344,18 @@ pub fn create_oss_provider_with_base_url(base_url: &str) -> ModelProviderInfo { } } +fn matches_azure_responses_base_url(base_url: &str) -> bool { + let base = base_url.to_ascii_lowercase(); + const AZURE_MARKERS: [&str; 5] = [ + "openai.azure.", + "cognitiveservices.azure.", + "aoai.azure.", + "azure-api.", + "azurefd.", + ]; + AZURE_MARKERS.iter().any(|marker| base.contains(marker)) +} + #[cfg(test)] mod tests { use super::*; @@ -419,4 +446,69 @@ env_http_headers = { "X-Example-Env-Header" = "EXAMPLE_ENV_VAR" } let provider: ModelProviderInfo = toml::from_str(azure_provider_toml).unwrap(); assert_eq!(expected_provider, provider); } + + #[test] + fn detects_azure_responses_base_urls() { + fn provider_for(base_url: &str) -> ModelProviderInfo { + ModelProviderInfo { + name: "test".into(), + base_url: Some(base_url.into()), + env_key: None, + env_key_instructions: None, + wire_api: WireApi::Responses, + query_params: None, + http_headers: None, + env_http_headers: None, + request_max_retries: None, + stream_max_retries: None, + stream_idle_timeout_ms: None, + requires_openai_auth: false, + } + } + + let positive_cases = [ + "https://foo.openai.azure.com/openai", + "https://foo.openai.azure.us/openai/deployments/bar", + "https://foo.cognitiveservices.azure.cn/openai", + "https://foo.aoai.azure.com/openai", + "https://foo.openai.azure-api.net/openai", + "https://foo.z01.azurefd.net/", + ]; + for base_url in positive_cases { + let provider = provider_for(base_url); + assert!( + provider.is_azure_responses_endpoint(), + "expected {base_url} to be detected as Azure" + ); + } + + let named_provider = ModelProviderInfo { + name: "Azure".into(), + base_url: Some("https://example.com".into()), + env_key: None, + env_key_instructions: None, + wire_api: WireApi::Responses, + query_params: None, + http_headers: None, + env_http_headers: None, + request_max_retries: None, + stream_max_retries: None, + stream_idle_timeout_ms: None, + requires_openai_auth: false, + }; + assert!(named_provider.is_azure_responses_endpoint()); + + let negative_cases = [ + "https://api.openai.com/v1", + "https://example.com/openai", + "https://myproxy.azurewebsites.net/openai", + ]; + for base_url in negative_cases { + let provider = provider_for(base_url); + assert!( + !provider.is_azure_responses_endpoint(), + "expected {base_url} not to be detected as Azure" + ); + } + } } diff --git a/codex-rs/core/src/openai_model_info.rs b/codex-rs/core/src/openai_model_info.rs index 2f81619c66..6fbe99fffc 100644 --- a/codex-rs/core/src/openai_model_info.rs +++ b/codex-rs/core/src/openai_model_info.rs @@ -12,6 +12,19 @@ pub(crate) struct ModelInfo { /// Maximum number of output tokens that can be generated for the model. pub(crate) max_output_tokens: u64, + + /// Token threshold where we should automatically compact conversation history. + pub(crate) auto_compact_token_limit: Option, +} + +impl ModelInfo { + const fn new(context_window: u64, max_output_tokens: u64) -> Self { + Self { + context_window, + max_output_tokens, + auto_compact_token_limit: None, + } + } } pub(crate) fn get_model_info(model_family: &ModelFamily) -> Option { @@ -20,73 +33,37 @@ pub(crate) fn get_model_info(model_family: &ModelFamily) -> Option { // OSS models have a 128k shared token pool. // Arbitrarily splitting it: 3/4 input context, 1/4 output. // https://openai.com/index/gpt-oss-model-card/ - "gpt-oss-20b" => Some(ModelInfo { - context_window: 96_000, - max_output_tokens: 32_000, - }), - "gpt-oss-120b" => Some(ModelInfo { - context_window: 96_000, - max_output_tokens: 32_000, - }), + "gpt-oss-20b" => Some(ModelInfo::new(96_000, 32_000)), + "gpt-oss-120b" => Some(ModelInfo::new(96_000, 32_000)), // https://platform.openai.com/docs/models/o3 - "o3" => Some(ModelInfo { - context_window: 200_000, - max_output_tokens: 100_000, - }), + "o3" => Some(ModelInfo::new(200_000, 100_000)), // https://platform.openai.com/docs/models/o4-mini - "o4-mini" => Some(ModelInfo { - context_window: 200_000, - max_output_tokens: 100_000, - }), + "o4-mini" => Some(ModelInfo::new(200_000, 100_000)), // https://platform.openai.com/docs/models/codex-mini-latest - "codex-mini-latest" => Some(ModelInfo { - context_window: 200_000, - max_output_tokens: 100_000, - }), + "codex-mini-latest" => Some(ModelInfo::new(200_000, 100_000)), // As of Jun 25, 2025, gpt-4.1 defaults to gpt-4.1-2025-04-14. // https://platform.openai.com/docs/models/gpt-4.1 - "gpt-4.1" | "gpt-4.1-2025-04-14" => Some(ModelInfo { - context_window: 1_047_576, - max_output_tokens: 32_768, - }), + "gpt-4.1" | "gpt-4.1-2025-04-14" => Some(ModelInfo::new(1_047_576, 32_768)), // As of Jun 25, 2025, gpt-4o defaults to gpt-4o-2024-08-06. // https://platform.openai.com/docs/models/gpt-4o - "gpt-4o" | "gpt-4o-2024-08-06" => Some(ModelInfo { - context_window: 128_000, - max_output_tokens: 16_384, - }), + "gpt-4o" | "gpt-4o-2024-08-06" => Some(ModelInfo::new(128_000, 16_384)), // https://platform.openai.com/docs/models/gpt-4o?snapshot=gpt-4o-2024-05-13 - "gpt-4o-2024-05-13" => Some(ModelInfo { - context_window: 128_000, - max_output_tokens: 4_096, - }), + "gpt-4o-2024-05-13" => Some(ModelInfo::new(128_000, 4_096)), // https://platform.openai.com/docs/models/gpt-4o?snapshot=gpt-4o-2024-11-20 - "gpt-4o-2024-11-20" => Some(ModelInfo { - context_window: 128_000, - max_output_tokens: 16_384, - }), + "gpt-4o-2024-11-20" => Some(ModelInfo::new(128_000, 16_384)), // https://platform.openai.com/docs/models/gpt-3.5-turbo - "gpt-3.5-turbo" => Some(ModelInfo { - context_window: 16_385, - max_output_tokens: 4_096, - }), + "gpt-3.5-turbo" => Some(ModelInfo::new(16_385, 4_096)), - _ if slug.starts_with("gpt-5") => Some(ModelInfo { - context_window: 272_000, - max_output_tokens: 128_000, - }), + _ if slug.starts_with("gpt-5") => Some(ModelInfo::new(272_000, 128_000)), - _ if slug.starts_with("codex-") => Some(ModelInfo { - context_window: 272_000, - max_output_tokens: 128_000, - }), + _ if slug.starts_with("codex-") => Some(ModelInfo::new(272_000, 128_000)), _ => None, } diff --git a/codex-rs/core/src/openai_tools.rs b/codex-rs/core/src/openai_tools.rs index ec56fdfd2c..f4d724815e 100644 --- a/codex-rs/core/src/openai_tools.rs +++ b/codex-rs/core/src/openai_tools.rs @@ -273,7 +273,7 @@ fn create_shell_tool_for_sandbox(sandbox_policy: &SandboxPolicy) -> OpenAiTool { }, ); - if matches!(sandbox_policy, SandboxPolicy::WorkspaceWrite { .. }) { + if !matches!(sandbox_policy, SandboxPolicy::DangerFullAccess) { properties.insert( "with_escalated_permissions".to_string(), JsonSchema::Boolean { @@ -288,58 +288,9 @@ fn create_shell_tool_for_sandbox(sandbox_policy: &SandboxPolicy) -> OpenAiTool { ); } - let description = match sandbox_policy { - SandboxPolicy::WorkspaceWrite { - network_access, - .. - } => { - let network_line = if !network_access { - "\n - Commands that require network access" - } else { - "" - }; - - format!( - r#" -The shell tool is used to execute shell commands. -- When invoking the shell tool, your call will be running in a sandbox, and some shell commands will require escalated privileges: - - Types of actions that require escalated privileges: - - Writing files other than those in the writable roots (see the environment context for the allowed directories){network_line} - - Examples of commands that require escalated privileges: - - git commit - - npm install or pnpm install - - cargo build - - cargo test -- When invoking a command that will require escalated privileges: - - Provide the with_escalated_permissions parameter with the boolean value true - - Include a short, 1 sentence explanation for why we need to run with_escalated_permissions in the justification parameter."#, - ) - } - SandboxPolicy::DangerFullAccess => { - "Runs a shell command and returns its output.".to_string() - } - SandboxPolicy::ReadOnly => { - r#" -The shell tool is used to execute shell commands. -- When invoking the shell tool, your call will be running in a sandbox, and some shell commands (including apply_patch) will require escalated permissions: - - Types of actions that require escalated privileges: - - Writing files - - Applying patches - - Examples of commands that require escalated privileges: - - apply_patch - - git commit - - npm install or pnpm install - - cargo build - - cargo test -- When invoking a command that will require escalated privileges: - - Provide the with_escalated_permissions parameter with the boolean value true - - Include a short, 1 sentence explanation for why we need to run with_escalated_permissions in the justification parameter"#.to_string() - } - }; - OpenAiTool::Function(ResponsesApiTool { name: "shell".to_string(), - description, + description: "Runs a shell command and returns its output.".to_string(), strict: false, parameters: JsonSchema::Object { properties, @@ -1165,20 +1116,7 @@ mod tests { }; assert_eq!(name, "shell"); - let expected = r#" -The shell tool is used to execute shell commands. -- When invoking the shell tool, your call will be running in a sandbox, and some shell commands will require escalated privileges: - - Types of actions that require escalated privileges: - - Writing files other than those in the writable roots (see the environment context for the allowed directories) - - Commands that require network access - - Examples of commands that require escalated privileges: - - git commit - - npm install or pnpm install - - cargo build - - cargo test -- When invoking a command that will require escalated privileges: - - Provide the with_escalated_permissions parameter with the boolean value true - - Include a short, 1 sentence explanation for why we need to run with_escalated_permissions in the justification parameter."#; + let expected = "Runs a shell command and returns its output."; assert_eq!(description, expected); } @@ -1193,21 +1131,7 @@ The shell tool is used to execute shell commands. }; assert_eq!(name, "shell"); - let expected = r#" -The shell tool is used to execute shell commands. -- When invoking the shell tool, your call will be running in a sandbox, and some shell commands (including apply_patch) will require escalated permissions: - - Types of actions that require escalated privileges: - - Writing files - - Applying patches - - Examples of commands that require escalated privileges: - - apply_patch - - git commit - - npm install or pnpm install - - cargo build - - cargo test -- When invoking a command that will require escalated privileges: - - Provide the with_escalated_permissions parameter with the boolean value true - - Include a short, 1 sentence explanation for why we need to run with_escalated_permissions in the justification parameter"#; + let expected = "Runs a shell command and returns its output."; assert_eq!(description, expected); } diff --git a/codex-rs/core/src/prompt_for_compact_command.md b/codex-rs/core/src/prompt_for_compact_command.md deleted file mode 100644 index 5cdecdbf4c..0000000000 --- a/codex-rs/core/src/prompt_for_compact_command.md +++ /dev/null @@ -1,21 +0,0 @@ -You are a summarization assistant. A conversation follows between a user and a coding-focused AI (Codex). Your task is to generate a clear summary capturing: - -• High-level objective or problem being solved -• Key instructions or design decisions given by the user -• Main code actions or behaviors from the AI -• Important variables, functions, modules, or outputs discussed -• Any unresolved questions or next steps - -Produce the summary in a structured format like: - -**Objective:** … - -**User instructions:** … (bulleted) - -**AI actions / code behavior:** … (bulleted) - -**Important entities:** … (e.g. function names, variables, files) - -**Open issues / next steps:** … (if any) - -**Summary (concise):** (one or two sentences) diff --git a/codex-rs/core/src/rollout/list.rs b/codex-rs/core/src/rollout/list.rs index 3d6964512d..6f06709396 100644 --- a/codex-rs/core/src/rollout/list.rs +++ b/codex-rs/core/src/rollout/list.rs @@ -3,6 +3,10 @@ use std::io::{self}; use std::path::Path; use std::path::PathBuf; +use codex_file_search as file_search; +use std::num::NonZero; +use std::sync::Arc; +use std::sync::atomic::AtomicBool; use time::OffsetDateTime; use time::PrimitiveDateTime; use time::format_description::FormatItem; @@ -334,3 +338,48 @@ async fn read_head_and_flags( Ok((head, saw_session_meta, saw_user_event)) } + +/// Locate a recorded conversation rollout file by its UUID string using the existing +/// paginated listing implementation. Returns `Ok(Some(path))` if found, `Ok(None)` if not present +/// or the id is invalid. +pub async fn find_conversation_path_by_id_str( + codex_home: &Path, + id_str: &str, +) -> io::Result> { + // Validate UUID format early. + if Uuid::parse_str(id_str).is_err() { + return Ok(None); + } + + let mut root = codex_home.to_path_buf(); + root.push(SESSIONS_SUBDIR); + if !root.exists() { + return Ok(None); + } + // This is safe because we know the values are valid. + #[allow(clippy::unwrap_used)] + let limit = NonZero::new(1).unwrap(); + // This is safe because we know the values are valid. + #[allow(clippy::unwrap_used)] + let threads = NonZero::new(2).unwrap(); + let cancel = Arc::new(AtomicBool::new(false)); + let exclude: Vec = Vec::new(); + let compute_indices = false; + + let results = file_search::run( + id_str, + limit, + &root, + exclude, + threads, + cancel, + compute_indices, + ) + .map_err(|e| io::Error::other(format!("file search failed: {e}")))?; + + Ok(results + .matches + .into_iter() + .next() + .map(|m| root.join(m.path))) +} diff --git a/codex-rs/core/src/rollout/mod.rs b/codex-rs/core/src/rollout/mod.rs index 6bf1cf9429..3c4cb10535 100644 --- a/codex-rs/core/src/rollout/mod.rs +++ b/codex-rs/core/src/rollout/mod.rs @@ -8,6 +8,7 @@ pub(crate) mod policy; pub mod recorder; pub use codex_protocol::protocol::SessionMeta; +pub use list::find_conversation_path_by_id_str; pub use recorder::RolloutRecorder; pub use recorder::RolloutRecorderParams; diff --git a/codex-rs/core/src/rollout/policy.rs b/codex-rs/core/src/rollout/policy.rs index c1a5cb238d..0d8fee92b0 100644 --- a/codex-rs/core/src/rollout/policy.rs +++ b/codex-rs/core/src/rollout/policy.rs @@ -38,7 +38,10 @@ pub(crate) fn should_persist_event_msg(ev: &EventMsg) -> bool { | EventMsg::AgentMessage(_) | EventMsg::AgentReasoning(_) | EventMsg::AgentReasoningRawContent(_) - | EventMsg::TokenCount(_) => true, + | EventMsg::TokenCount(_) + | EventMsg::EnteredReviewMode(_) + | EventMsg::ExitedReviewMode(_) + | EventMsg::TurnAborted(_) => true, EventMsg::Error(_) | EventMsg::TaskStarted(_) | EventMsg::TaskComplete(_) @@ -65,7 +68,6 @@ pub(crate) fn should_persist_event_msg(ev: &EventMsg) -> bool { | EventMsg::McpListToolsResponse(_) | EventMsg::ListCustomPromptsResponse(_) | EventMsg::PlanUpdate(_) - | EventMsg::TurnAborted(_) | EventMsg::ShutdownComplete | EventMsg::ConversationPath(_) => false, } diff --git a/codex-rs/core/src/rollout/recorder.rs b/codex-rs/core/src/rollout/recorder.rs index 580a41ed37..6befdb1fe9 100644 --- a/codex-rs/core/src/rollout/recorder.rs +++ b/codex-rs/core/src/rollout/recorder.rs @@ -204,7 +204,6 @@ impl RolloutRecorder { pub(crate) async fn get_rollout_history(path: &Path) -> std::io::Result { info!("Resuming rollout from {path:?}"); - tracing::error!("Resuming rollout from {path:?}"); let text = tokio::fs::read_to_string(path).await?; if text.trim().is_empty() { return Err(IoError::other("empty session file")); @@ -254,7 +253,7 @@ impl RolloutRecorder { } } - tracing::error!( + info!( "Resumed rollout with {} items, conversation ID: {:?}", items.len(), conversation_id diff --git a/codex-rs/core/src/seatbelt_base_policy.sbpl b/codex-rs/core/src/seatbelt_base_policy.sbpl index f165f067c9..27b8252b2a 100644 --- a/codex-rs/core/src/seatbelt_base_policy.sbpl +++ b/codex-rs/core/src/seatbelt_base_policy.sbpl @@ -2,6 +2,7 @@ ; inspired by Chrome's sandbox policy: ; https://source.chromium.org/chromium/chromium/src/+/main:sandbox/policy/mac/common.sb;l=273-319;drc=7b3962fe2e5fc9e2ee58000dc8fbf3429d84d3bd +; https://source.chromium.org/chromium/chromium/src/+/main:sandbox/policy/mac/renderer.sb;l=64;drc=7b3962fe2e5fc9e2ee58000dc8fbf3429d84d3bd ; start with closed-by-default (deny default) @@ -9,7 +10,13 @@ ; child processes inherit the policy of their parent (allow process-exec) (allow process-fork) -(allow signal (target self)) +(allow signal (target same-sandbox)) + +; Allow cf prefs to work. +(allow user-preference-read) + +; process-info +(allow process-info* (target same-sandbox)) (allow file-write-data (require-all @@ -32,28 +39,22 @@ (sysctl-name "hw.l3cachesize_compat") (sysctl-name "hw.logicalcpu_max") (sysctl-name "hw.machine") + (sysctl-name "hw.memsize") (sysctl-name "hw.ncpu") (sysctl-name "hw.nperflevels") - (sysctl-name "hw.optional.arm.FEAT_BF16") - (sysctl-name "hw.optional.arm.FEAT_DotProd") - (sysctl-name "hw.optional.arm.FEAT_FCMA") - (sysctl-name "hw.optional.arm.FEAT_FHM") - (sysctl-name "hw.optional.arm.FEAT_FP16") - (sysctl-name "hw.optional.arm.FEAT_I8MM") - (sysctl-name "hw.optional.arm.FEAT_JSCVT") - (sysctl-name "hw.optional.arm.FEAT_LSE") - (sysctl-name "hw.optional.arm.FEAT_RDM") - (sysctl-name "hw.optional.arm.FEAT_SHA512") - (sysctl-name "hw.optional.armv8_2_sha512") - (sysctl-name "hw.memsize") - (sysctl-name "hw.pagesize") + ; Chrome locks these CPU feature detection down a bit more tightly, + ; but mostly for fingerprinting concerns which isn't an issue for codex. + (sysctl-name-prefix "hw.optional.arm.") + (sysctl-name-prefix "hw.optional.armv8_") (sysctl-name "hw.packages") (sysctl-name "hw.pagesize_compat") + (sysctl-name "hw.pagesize") (sysctl-name "hw.physicalcpu_max") (sysctl-name "hw.tbfrequency_compat") (sysctl-name "hw.vectorunit") (sysctl-name "kern.hostname") (sysctl-name "kern.maxfilesperproc") + (sysctl-name "kern.maxproc") (sysctl-name "kern.osproductversion") (sysctl-name "kern.osrelease") (sysctl-name "kern.ostype") @@ -63,14 +64,27 @@ (sysctl-name "kern.usrstack64") (sysctl-name "kern.version") (sysctl-name "sysctl.proc_cputype") + (sysctl-name "vm.loadavg") (sysctl-name-prefix "hw.perflevel") + (sysctl-name-prefix "kern.proc.pgrp.") + (sysctl-name-prefix "kern.proc.pid.") + (sysctl-name-prefix "net.routetable.") +) + +; IOKit +(allow iokit-open + (iokit-registry-entry-class "RootDomainUserClient") +) + +; needed to look up user info, see https://crbug.com/792228 +(allow mach-lookup + (global-name "com.apple.system.opendirectoryd.libinfo") ) ; Added on top of Chrome profile ; Needed for python multiprocessing on MacOS for the SemLock (allow ipc-posix-sem) -; needed to look up user info, see https://crbug.com/792228 (allow mach-lookup - (global-name "com.apple.system.opendirectoryd.libinfo") + (global-name "com.apple.PowerManagement.control") ) diff --git a/codex-rs/core/src/unified_exec/mod.rs b/codex-rs/core/src/unified_exec/mod.rs index 2fe8661f0e..99b19796b8 100644 --- a/codex-rs/core/src/unified_exec/mod.rs +++ b/codex-rs/core/src/unified_exec/mod.rs @@ -100,10 +100,13 @@ type OutputBuffer = Arc>; type OutputHandles = (OutputBuffer, Arc); impl ManagedUnifiedExecSession { - fn new(session: ExecCommandSession) -> Self { + fn new( + session: ExecCommandSession, + initial_output_rx: tokio::sync::broadcast::Receiver>, + ) -> Self { let output_buffer = Arc::new(Mutex::new(OutputBufferState::default())); let output_notify = Arc::new(Notify::new()); - let mut receiver = session.output_receiver(); + let mut receiver = initial_output_rx; let buffer_clone = Arc::clone(&output_buffer); let notify_clone = Arc::clone(&output_notify); let output_task = tokio::spawn(async move { @@ -193,8 +196,8 @@ impl UnifiedExecSessionManager { } else { let command = request.input_chunks.to_vec(); let new_id = self.next_session_id.fetch_add(1, Ordering::SeqCst); - let session = create_unified_exec_session(&command).await?; - let managed_session = ManagedUnifiedExecSession::new(session); + let (session, initial_output_rx) = create_unified_exec_session(&command).await?; + let managed_session = ManagedUnifiedExecSession::new(session, initial_output_rx); let (buffer, notify) = managed_session.output_handles(); writer_tx = managed_session.writer_sender(); output_buffer = buffer; @@ -297,7 +300,13 @@ impl UnifiedExecSessionManager { async fn create_unified_exec_session( command: &[String], -) -> Result { +) -> Result< + ( + ExecCommandSession, + tokio::sync::broadcast::Receiver>, + ), + UnifiedExecError, +> { if command.is_empty() { return Err(UnifiedExecError::MissingCommandLine); } @@ -380,7 +389,7 @@ async fn create_unified_exec_session( wait_exit_status.store(true, Ordering::SeqCst); }); - Ok(ExecCommandSession::new( + let (session, initial_output_rx) = ExecCommandSession::new( writer_tx, output_tx, killer, @@ -388,7 +397,8 @@ async fn create_unified_exec_session( writer_handle, wait_handle, exit_status, - )) + ); + Ok((session, initial_output_rx)) } #[cfg(test)] @@ -421,7 +431,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: None, input_chunks: &["bash".to_string(), "-i".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; let session_id = open_shell.session_id.expect("expected session_id"); @@ -441,7 +451,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: Some(session_id), input_chunks: &["echo $CODEX_INTERACTIVE_SHELL_VAR\n".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; assert!(out_2.output.contains("codex")); @@ -458,7 +468,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: None, input_chunks: &["/bin/bash".to_string(), "-i".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; let session_a = shell_a.session_id.expect("expected session id"); @@ -467,7 +477,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: Some(session_a), input_chunks: &["export CODEX_INTERACTIVE_SHELL_VAR=codex\n".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; @@ -478,7 +488,7 @@ mod tests { "echo".to_string(), "$CODEX_INTERACTIVE_SHELL_VAR\n".to_string(), ], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; assert!(!out_2.output.contains("codex")); @@ -487,7 +497,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: Some(session_a), input_chunks: &["echo $CODEX_INTERACTIVE_SHELL_VAR\n".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; assert!(out_3.output.contains("codex")); @@ -504,7 +514,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: None, input_chunks: &["bash".to_string(), "-i".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; let session_id = open_shell.session_id.expect("expected session id"); @@ -516,7 +526,7 @@ mod tests { "export".to_string(), "CODEX_INTERACTIVE_SHELL_VAR=codex\n".to_string(), ], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; @@ -574,7 +584,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: None, input_chunks: &["/bin/echo".to_string(), "codex".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; @@ -595,7 +605,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: None, input_chunks: &["/bin/bash".to_string(), "-i".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; let session_id = open_shell.session_id.expect("expected session id"); @@ -604,7 +614,7 @@ mod tests { .handle_request(UnifiedExecRequest { session_id: Some(session_id), input_chunks: &["exit\n".to_string()], - timeout_ms: Some(1_500), + timeout_ms: Some(2_500), }) .await?; diff --git a/codex-rs/core/templates/compact/history_bridge.md b/codex-rs/core/templates/compact/history_bridge.md new file mode 100644 index 0000000000..ef003440af --- /dev/null +++ b/codex-rs/core/templates/compact/history_bridge.md @@ -0,0 +1,7 @@ +You were originally given instructions from a user over one or more turns. Here were the user messages: + +{{ user_messages_text }} + +Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis: + +{{ summary_text }} \ No newline at end of file diff --git a/codex-rs/core/templates/compact/prompt.md b/codex-rs/core/templates/compact/prompt.md new file mode 100644 index 0000000000..47dfeaba5e --- /dev/null +++ b/codex-rs/core/templates/compact/prompt.md @@ -0,0 +1,5 @@ +You have exceeded the maximum number of tokens, please stop coding and instead write a short memento message for the next agent. Your note should: +- Summarize what you finished and what still needs work. If there was a recent update_plan call, repeat its steps verbatim. +- List outstanding TODOs with file paths / line numbers so they're easy to find. +- Flag code that needs more tests (edge cases, performance, integration, etc.). +- Record any open bugs, quirks, or setup steps that will make it easier for the next agent to pick up where you left off. \ No newline at end of file diff --git a/codex-rs/core/tests/suite/cli_stream.rs b/codex-rs/core/tests/suite/cli_stream.rs index 01b9d6bfc1..1a0c016272 100644 --- a/codex-rs/core/tests/suite/cli_stream.rs +++ b/codex-rs/core/tests/suite/cli_stream.rs @@ -420,12 +420,6 @@ async fn integration_creates_and_checks_session_file() { // Second run: resume should update the existing file. let marker2 = format!("integration-resume-{}", Uuid::new_v4()); let prompt2 = format!("echo {marker2}"); - // Cross‑platform safe resume override. On Windows, backslashes in a TOML string must be escaped - // or the parse will fail and the raw literal (including quotes) may be preserved all the way down - // to Config, which in turn breaks resume because the path is invalid. Normalize to forward slashes - // to sidestep the issue. - let resume_path_str = path.to_string_lossy().replace('\\', "/"); - let resume_override = format!("experimental_resume=\"{resume_path_str}\""); let mut cmd2 = AssertCommand::new("cargo"); cmd2.arg("run") .arg("-p") @@ -434,11 +428,11 @@ async fn integration_creates_and_checks_session_file() { .arg("--") .arg("exec") .arg("--skip-git-repo-check") - .arg("-c") - .arg(&resume_override) .arg("-C") .arg(env!("CARGO_MANIFEST_DIR")) - .arg(&prompt2); + .arg(&prompt2) + .arg("resume") + .arg("--last"); cmd2.env("CODEX_HOME", home.path()) .env("OPENAI_API_KEY", "dummy") .env("CODEX_RS_SSE_FIXTURE", &fixture) diff --git a/codex-rs/core/tests/suite/client.rs b/codex-rs/core/tests/suite/client.rs index 992679df7f..cfc6f5f40c 100644 --- a/codex-rs/core/tests/suite/client.rs +++ b/codex-rs/core/tests/suite/client.rs @@ -1,18 +1,32 @@ use codex_core::CodexAuth; +use codex_core::ContentItem; use codex_core::ConversationManager; +use codex_core::LocalShellAction; +use codex_core::LocalShellExecAction; +use codex_core::LocalShellStatus; +use codex_core::ModelClient; use codex_core::ModelProviderInfo; use codex_core::NewConversation; +use codex_core::Prompt; +use codex_core::ReasoningItemContent; +use codex_core::ResponseEvent; +use codex_core::ResponseItem; use codex_core::WireApi; use codex_core::built_in_model_providers; use codex_core::protocol::EventMsg; use codex_core::protocol::InputItem; use codex_core::protocol::Op; use codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR; +use codex_protocol::mcp_protocol::ConversationId; +use codex_protocol::models::ReasoningItemReasoningSummary; +use codex_protocol::models::WebSearchAction; use core_test_support::load_default_config_for_test; use core_test_support::load_sse_fixture_with_id; use core_test_support::wait_for_event; +use futures::StreamExt; use serde_json::json; use std::io::Write; +use std::sync::Arc; use tempfile::TempDir; use uuid::Uuid; use wiremock::Mock; @@ -222,20 +236,21 @@ async fn resume_includes_initial_messages_and_sends_prior_items() { let codex_home = TempDir::new().unwrap(); let mut config = load_default_config_for_test(&codex_home); config.model_provider = model_provider; - config.experimental_resume = Some(session_path.clone()); // Also configure user instructions to ensure they are NOT delivered on resume. config.user_instructions = Some("be nice".to_string()); let conversation_manager = ConversationManager::with_auth(CodexAuth::from_api_key("Test API Key")); + let auth_manager = + codex_core::AuthManager::from_auth_for_testing(CodexAuth::from_api_key("Test API Key")); let NewConversation { conversation: codex, session_configured, .. } = conversation_manager - .new_conversation(config) + .resume_conversation_from_rollout(config, session_path.clone(), auth_manager) .await - .expect("create new conversation"); + .expect("resume conversation"); // 1) Assert initial_messages only includes existing EventMsg entries; response items are not converted let initial_msgs = session_configured @@ -620,6 +635,147 @@ async fn includes_user_instructions_message_in_request() { assert_message_ends_with(&request_body["input"][1], ""); } +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn azure_responses_request_includes_store_and_reasoning_ids() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + let server = MockServer::start().await; + + let sse_body = concat!( + "data: {\"type\":\"response.created\",\"response\":{}}\n\n", + "data: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_1\"}}\n\n", + ); + + let template = ResponseTemplate::new(200) + .insert_header("content-type", "text/event-stream") + .set_body_raw(sse_body, "text/event-stream"); + + Mock::given(method("POST")) + .and(path("/openai/responses")) + .respond_with(template) + .expect(1) + .mount(&server) + .await; + + let provider = ModelProviderInfo { + name: "azure".into(), + base_url: Some(format!("{}/openai", server.uri())), + env_key: None, + env_key_instructions: None, + wire_api: WireApi::Responses, + query_params: None, + http_headers: None, + env_http_headers: None, + request_max_retries: Some(0), + stream_max_retries: Some(0), + stream_idle_timeout_ms: Some(5_000), + requires_openai_auth: false, + }; + + let codex_home = TempDir::new().unwrap(); + let mut config = load_default_config_for_test(&codex_home); + config.model_provider_id = provider.name.clone(); + config.model_provider = provider.clone(); + let effort = config.model_reasoning_effort; + let summary = config.model_reasoning_summary; + let config = Arc::new(config); + + let client = ModelClient::new( + Arc::clone(&config), + None, + provider, + effort, + summary, + ConversationId::new(), + ); + + let mut prompt = Prompt::default(); + prompt.input.push(ResponseItem::Reasoning { + id: "reasoning-id".into(), + summary: vec![ReasoningItemReasoningSummary::SummaryText { + text: "summary".into(), + }], + content: Some(vec![ReasoningItemContent::ReasoningText { + text: "content".into(), + }]), + encrypted_content: None, + }); + prompt.input.push(ResponseItem::Message { + id: Some("message-id".into()), + role: "assistant".into(), + content: vec![ContentItem::OutputText { + text: "message".into(), + }], + }); + prompt.input.push(ResponseItem::WebSearchCall { + id: Some("web-search-id".into()), + status: Some("completed".into()), + action: WebSearchAction::Search { + query: "weather".into(), + }, + }); + prompt.input.push(ResponseItem::FunctionCall { + id: Some("function-id".into()), + name: "do_thing".into(), + arguments: "{}".into(), + call_id: "function-call-id".into(), + }); + prompt.input.push(ResponseItem::LocalShellCall { + id: Some("local-shell-id".into()), + call_id: Some("local-shell-call-id".into()), + status: LocalShellStatus::Completed, + action: LocalShellAction::Exec(LocalShellExecAction { + command: vec!["echo".into(), "hello".into()], + timeout_ms: None, + working_directory: None, + env: None, + user: None, + }), + }); + prompt.input.push(ResponseItem::CustomToolCall { + id: Some("custom-tool-id".into()), + status: Some("completed".into()), + call_id: "custom-tool-call-id".into(), + name: "custom_tool".into(), + input: "{}".into(), + }); + + let mut stream = client + .stream(&prompt) + .await + .expect("responses stream to start"); + + while let Some(event) = stream.next().await { + if let Ok(ResponseEvent::Completed { .. }) = event { + break; + } + } + + let requests = server + .received_requests() + .await + .expect("mock server collected requests"); + assert_eq!(requests.len(), 1, "expected a single request"); + let body: serde_json::Value = requests[0] + .body_json() + .expect("request body to be valid JSON"); + + assert_eq!(body["store"], serde_json::Value::Bool(true)); + assert_eq!(body["stream"], serde_json::Value::Bool(true)); + assert_eq!(body["input"].as_array().map(Vec::len), Some(6)); + assert_eq!(body["input"][0]["id"].as_str(), Some("reasoning-id")); + assert_eq!(body["input"][1]["id"].as_str(), Some("message-id")); + assert_eq!(body["input"][2]["id"].as_str(), Some("web-search-id")); + assert_eq!(body["input"][3]["id"].as_str(), Some("function-id")); + assert_eq!(body["input"][4]["id"].as_str(), Some("local-shell-id")); + assert_eq!(body["input"][5]["id"].as_str(), Some("custom-tool-id")); +} + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn azure_overrides_assign_properties_used_for_responses_url() { let existing_env_var_with_random_value = if cfg!(windows) { "USERNAME" } else { "USER" }; diff --git a/codex-rs/core/tests/suite/compact.rs b/codex-rs/core/tests/suite/compact.rs index 524f819b3e..361315f724 100644 --- a/codex-rs/core/tests/suite/compact.rs +++ b/codex-rs/core/tests/suite/compact.rs @@ -5,6 +5,7 @@ use codex_core::ConversationManager; use codex_core::ModelProviderInfo; use codex_core::NewConversation; use codex_core::built_in_model_providers; +use codex_core::protocol::ErrorEvent; use codex_core::protocol::EventMsg; use codex_core::protocol::InputItem; use codex_core::protocol::Op; @@ -15,18 +16,25 @@ use core_test_support::load_default_config_for_test; use core_test_support::wait_for_event; use serde_json::Value; use tempfile::TempDir; +use wiremock::BodyPrintLimit; use wiremock::Mock; use wiremock::MockServer; +use wiremock::Request; +use wiremock::Respond; use wiremock::ResponseTemplate; use wiremock::matchers::method; use wiremock::matchers::path; use pretty_assertions::assert_eq; +use std::sync::Arc; +use std::sync::Mutex; +use std::sync::atomic::AtomicUsize; +use std::sync::atomic::Ordering; // --- Test helpers ----------------------------------------------------------- /// Build an SSE stream body from a list of JSON events. -fn sse(events: Vec) -> String { +pub(super) fn sse(events: Vec) -> String { use std::fmt::Write as _; let mut out = String::new(); for ev in events { @@ -42,7 +50,7 @@ fn sse(events: Vec) -> String { } /// Convenience: SSE event for a completed response with a specific id. -fn ev_completed(id: &str) -> Value { +pub(super) fn ev_completed(id: &str) -> Value { serde_json::json!({ "type": "response.completed", "response": { @@ -52,8 +60,24 @@ fn ev_completed(id: &str) -> Value { }) } +fn ev_completed_with_tokens(id: &str, total_tokens: u64) -> Value { + serde_json::json!({ + "type": "response.completed", + "response": { + "id": id, + "usage": { + "input_tokens": total_tokens, + "input_tokens_details": null, + "output_tokens": 0, + "output_tokens_details": null, + "total_tokens": total_tokens + } + } + }) +} + /// Convenience: SSE event for a single assistant message output item. -fn ev_assistant_message(id: &str, text: &str) -> Value { +pub(super) fn ev_assistant_message(id: &str, text: &str) -> Value { serde_json::json!({ "type": "response.output_item.done", "item": { @@ -65,13 +89,25 @@ fn ev_assistant_message(id: &str, text: &str) -> Value { }) } -fn sse_response(body: String) -> ResponseTemplate { +fn ev_function_call(call_id: &str, name: &str, arguments: &str) -> Value { + serde_json::json!({ + "type": "response.output_item.done", + "item": { + "type": "function_call", + "call_id": call_id, + "name": name, + "arguments": arguments + } + }) +} + +pub(super) fn sse_response(body: String) -> ResponseTemplate { ResponseTemplate::new(200) .insert_header("content-type", "text/event-stream") .set_body_raw(body, "text/event-stream") } -async fn mount_sse_once(server: &MockServer, matcher: M, body: String) +pub(super) async fn mount_sse_once(server: &MockServer, matcher: M, body: String) where M: wiremock::Match + Send + Sync + 'static, { @@ -79,15 +115,32 @@ where .and(path("/v1/responses")) .and(matcher) .respond_with(sse_response(body)) - .expect(1) .mount(server) .await; } -const FIRST_REPLY: &str = "FIRST_REPLY"; -const SUMMARY_TEXT: &str = "SUMMARY_ONLY_CONTEXT"; -const SUMMARIZE_TRIGGER: &str = "Start Summarization"; +async fn start_mock_server() -> MockServer { + MockServer::builder() + .body_print_limit(BodyPrintLimit::Limited(80_000)) + .start() + .await +} + +pub(super) const FIRST_REPLY: &str = "FIRST_REPLY"; +pub(super) const SUMMARY_TEXT: &str = "SUMMARY_ONLY_CONTEXT"; +pub(super) const SUMMARIZE_TRIGGER: &str = "Start Summarization"; const THIRD_USER_MSG: &str = "next turn"; +const AUTO_SUMMARY_TEXT: &str = "AUTO_SUMMARY"; +const FIRST_AUTO_MSG: &str = "token limit start"; +const SECOND_AUTO_MSG: &str = "token limit push"; +const STILL_TOO_BIG_REPLY: &str = "STILL_TOO_BIG"; +const MULTI_AUTO_MSG: &str = "multi auto"; +const SECOND_LARGE_REPLY: &str = "SECOND_LARGE_REPLY"; +const FIRST_AUTO_SUMMARY: &str = "FIRST_AUTO_SUMMARY"; +const SECOND_AUTO_SUMMARY: &str = "SECOND_AUTO_SUMMARY"; +const FINAL_REPLY: &str = "FINAL_REPLY"; +const DUMMY_FUNCTION_NAME: &str = "unsupported_tool"; +const DUMMY_CALL_ID: &str = "call-multi-auto"; #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn summarize_context_three_requests_and_instructions() { @@ -99,7 +152,7 @@ async fn summarize_context_three_requests_and_instructions() { } // Set up a mock server that we can inspect after the run. - let server = MockServer::start().await; + let server = start_mock_server().await; // SSE 1: assistant replies normally so it is recorded in history. let sse1 = sse(vec![ @@ -144,6 +197,7 @@ async fn summarize_context_three_requests_and_instructions() { let home = TempDir::new().unwrap(); let mut config = load_default_config_for_test(&home); config.model_provider = model_provider; + config.model_auto_compact_token_limit = Some(200_000); let conversation_manager = ConversationManager::with_auth(CodexAuth::from_api_key("dummy")); let NewConversation { conversation: codex, @@ -198,7 +252,7 @@ async fn summarize_context_three_requests_and_instructions() { "summarization should override base instructions" ); assert!( - instr2.contains("You are a summarization assistant"), + instr2.contains("You have exceeded the maximum number of tokens"), "summarization instructions not applied" ); @@ -209,14 +263,17 @@ async fn summarize_context_three_requests_and_instructions() { assert_eq!(last2.get("type").unwrap().as_str().unwrap(), "message"); assert_eq!(last2.get("role").unwrap().as_str().unwrap(), "user"); let text2 = last2["content"][0]["text"].as_str().unwrap(); - assert!(text2.contains(SUMMARIZE_TRIGGER)); + assert!( + text2.contains(SUMMARIZE_TRIGGER), + "expected summarize trigger, got `{text2}`" + ); - // Third request must contain only the summary from step 2 as prior history plus new user msg. + // Third request must contain the refreshed instructions, bridge summary message and new user msg. let input3 = body3.get("input").and_then(|v| v.as_array()).unwrap(); println!("third request body: {body3}"); assert!( - input3.len() >= 2, - "expected summary + new user message in third request" + input3.len() >= 3, + "expected refreshed context and new user message in third request" ); // Collect all (role, text) message tuples. @@ -232,24 +289,35 @@ async fn summarize_context_three_requests_and_instructions() { } } - // Exactly one assistant message should remain after compaction and the new user message is present. + // No previous assistant messages should remain and the new user message is present. let assistant_count = messages.iter().filter(|(r, _)| r == "assistant").count(); - assert_eq!( - assistant_count, 1, - "exactly one assistant message should remain after compaction" - ); + assert_eq!(assistant_count, 0, "assistant history should be cleared"); assert!( messages .iter() .any(|(r, t)| r == "user" && t == THIRD_USER_MSG), "third request should include the new user message" ); + let Some((_, bridge_text)) = messages.iter().find(|(role, text)| { + role == "user" + && (text.contains("Here were the user messages") + || text.contains("Here are all the user messages")) + && text.contains(SUMMARY_TEXT) + }) else { + panic!("expected a bridge message containing the summary"); + }; assert!( - !messages.iter().any(|(_, t)| t.contains("hello world")), - "third request should not include the original user input" + bridge_text.contains("hello world"), + "bridge should capture earlier user messages" ); assert!( - !messages.iter().any(|(_, t)| t.contains(SUMMARIZE_TRIGGER)), + !bridge_text.contains(SUMMARIZE_TRIGGER), + "bridge text should not echo the summarize trigger" + ); + assert!( + !messages + .iter() + .any(|(_, text)| text.contains(SUMMARIZE_TRIGGER)), "third request should not include the summarize trigger" ); @@ -258,6 +326,7 @@ async fn summarize_context_three_requests_and_instructions() { wait_for_event(&codex, |ev| matches!(ev, EventMsg::ShutdownComplete)).await; // Verify rollout contains APITurn entries for each API call and a Compacted entry. + println!("rollout path: {}", rollout_path.display()); let text = std::fs::read_to_string(&rollout_path).unwrap_or_else(|e| { panic!( "failed to read rollout file {}: {e}", @@ -296,3 +365,535 @@ async fn summarize_context_three_requests_and_instructions() { "expected a Compacted entry containing the summarizer output" ); } + +// Windows CI only: bump to 4 workers to prevent SSE/event starvation and test timeouts. +#[cfg_attr(windows, tokio::test(flavor = "multi_thread", worker_threads = 4))] +#[cfg_attr(not(windows), tokio::test(flavor = "multi_thread", worker_threads = 2))] +async fn auto_compact_runs_after_token_limit_hit() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + let server = start_mock_server().await; + + let sse1 = sse(vec![ + ev_assistant_message("m1", FIRST_REPLY), + ev_completed_with_tokens("r1", 70_000), + ]); + + let sse2 = sse(vec![ + ev_assistant_message("m2", "SECOND_REPLY"), + ev_completed_with_tokens("r2", 330_000), + ]); + + let sse3 = sse(vec![ + ev_assistant_message("m3", AUTO_SUMMARY_TEXT), + ev_completed_with_tokens("r3", 200), + ]); + + let first_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains(FIRST_AUTO_MSG) + && !body.contains(SECOND_AUTO_MSG) + && !body.contains("You have exceeded the maximum number of tokens") + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(first_matcher) + .respond_with(sse_response(sse1)) + .mount(&server) + .await; + + let second_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains(SECOND_AUTO_MSG) + && body.contains(FIRST_AUTO_MSG) + && !body.contains("You have exceeded the maximum number of tokens") + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(second_matcher) + .respond_with(sse_response(sse2)) + .mount(&server) + .await; + + let third_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains("You have exceeded the maximum number of tokens") + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(third_matcher) + .respond_with(sse_response(sse3)) + .mount(&server) + .await; + + let model_provider = ModelProviderInfo { + base_url: Some(format!("{}/v1", server.uri())), + ..built_in_model_providers()["openai"].clone() + }; + + let home = TempDir::new().unwrap(); + let mut config = load_default_config_for_test(&home); + config.model_provider = model_provider; + config.model_auto_compact_token_limit = Some(200_000); + let conversation_manager = ConversationManager::with_auth(CodexAuth::from_api_key("dummy")); + let codex = conversation_manager + .new_conversation(config) + .await + .unwrap() + .conversation; + + codex + .submit(Op::UserInput { + items: vec![InputItem::Text { + text: FIRST_AUTO_MSG.into(), + }], + }) + .await + .unwrap(); + + wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + codex + .submit(Op::UserInput { + items: vec![InputItem::Text { + text: SECOND_AUTO_MSG.into(), + }], + }) + .await + .unwrap(); + + wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + // wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + let requests = server.received_requests().await.unwrap(); + assert!( + requests.len() >= 3, + "auto compact should add at least a third request, got {}", + requests.len() + ); + let is_auto_compact = |req: &wiremock::Request| { + std::str::from_utf8(&req.body) + .unwrap_or("") + .contains("You have exceeded the maximum number of tokens") + }; + let auto_compact_count = requests.iter().filter(|req| is_auto_compact(req)).count(); + assert_eq!( + auto_compact_count, 1, + "expected exactly one auto compact request" + ); + let auto_compact_index = requests + .iter() + .enumerate() + .find_map(|(idx, req)| is_auto_compact(req).then_some(idx)) + .expect("auto compact request missing"); + assert_eq!( + auto_compact_index, 2, + "auto compact should add a third request" + ); + + let body3 = requests[auto_compact_index] + .body_json::() + .unwrap(); + let instructions = body3 + .get("instructions") + .and_then(|v| v.as_str()) + .unwrap_or_default(); + assert!( + instructions.contains("You have exceeded the maximum number of tokens"), + "auto compact should reuse summarization instructions" + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn auto_compact_persists_rollout_entries() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + let server = start_mock_server().await; + + let sse1 = sse(vec![ + ev_assistant_message("m1", FIRST_REPLY), + ev_completed_with_tokens("r1", 70_000), + ]); + + let sse2 = sse(vec![ + ev_assistant_message("m2", "SECOND_REPLY"), + ev_completed_with_tokens("r2", 330_000), + ]); + + let sse3 = sse(vec![ + ev_assistant_message("m3", AUTO_SUMMARY_TEXT), + ev_completed_with_tokens("r3", 200), + ]); + + let first_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains(FIRST_AUTO_MSG) + && !body.contains(SECOND_AUTO_MSG) + && !body.contains("You have exceeded the maximum number of tokens") + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(first_matcher) + .respond_with(sse_response(sse1)) + .mount(&server) + .await; + + let second_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains(SECOND_AUTO_MSG) + && body.contains(FIRST_AUTO_MSG) + && !body.contains("You have exceeded the maximum number of tokens") + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(second_matcher) + .respond_with(sse_response(sse2)) + .mount(&server) + .await; + + let third_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains("You have exceeded the maximum number of tokens") + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(third_matcher) + .respond_with(sse_response(sse3)) + .mount(&server) + .await; + + let model_provider = ModelProviderInfo { + base_url: Some(format!("{}/v1", server.uri())), + ..built_in_model_providers()["openai"].clone() + }; + + let home = TempDir::new().unwrap(); + let mut config = load_default_config_for_test(&home); + config.model_provider = model_provider; + let conversation_manager = ConversationManager::with_auth(CodexAuth::from_api_key("dummy")); + let NewConversation { + conversation: codex, + session_configured, + .. + } = conversation_manager.new_conversation(config).await.unwrap(); + + codex + .submit(Op::UserInput { + items: vec![InputItem::Text { + text: FIRST_AUTO_MSG.into(), + }], + }) + .await + .unwrap(); + wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + codex + .submit(Op::UserInput { + items: vec![InputItem::Text { + text: SECOND_AUTO_MSG.into(), + }], + }) + .await + .unwrap(); + wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + codex.submit(Op::Shutdown).await.unwrap(); + wait_for_event(&codex, |ev| matches!(ev, EventMsg::ShutdownComplete)).await; + + let rollout_path = session_configured.rollout_path; + let text = std::fs::read_to_string(&rollout_path).unwrap_or_else(|e| { + panic!( + "failed to read rollout file {}: {e}", + rollout_path.display() + ) + }); + + let mut turn_context_count = 0usize; + for line in text.lines() { + let trimmed = line.trim(); + if trimmed.is_empty() { + continue; + } + let Ok(entry): Result = serde_json::from_str(trimmed) else { + continue; + }; + match entry.item { + RolloutItem::TurnContext(_) => { + turn_context_count += 1; + } + RolloutItem::Compacted(_) => {} + _ => {} + } + } + + assert!( + turn_context_count >= 2, + "expected at least two turn context entries, got {turn_context_count}" + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn auto_compact_stops_after_failed_attempt() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + let server = start_mock_server().await; + + let sse1 = sse(vec![ + ev_assistant_message("m1", FIRST_REPLY), + ev_completed_with_tokens("r1", 500), + ]); + + let sse2 = sse(vec![ + ev_assistant_message("m2", SUMMARY_TEXT), + ev_completed_with_tokens("r2", 50), + ]); + + let sse3 = sse(vec![ + ev_assistant_message("m3", STILL_TOO_BIG_REPLY), + ev_completed_with_tokens("r3", 500), + ]); + + let first_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains(FIRST_AUTO_MSG) + && !body.contains("You have exceeded the maximum number of tokens") + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(first_matcher) + .respond_with(sse_response(sse1.clone())) + .mount(&server) + .await; + + let second_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains("You have exceeded the maximum number of tokens") + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(second_matcher) + .respond_with(sse_response(sse2.clone())) + .mount(&server) + .await; + + let third_matcher = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + !body.contains("You have exceeded the maximum number of tokens") + && body.contains(SUMMARY_TEXT) + }; + Mock::given(method("POST")) + .and(path("/v1/responses")) + .and(third_matcher) + .respond_with(sse_response(sse3.clone())) + .mount(&server) + .await; + + let model_provider = ModelProviderInfo { + base_url: Some(format!("{}/v1", server.uri())), + ..built_in_model_providers()["openai"].clone() + }; + + let home = TempDir::new().unwrap(); + let mut config = load_default_config_for_test(&home); + config.model_provider = model_provider; + config.model_auto_compact_token_limit = Some(200); + let conversation_manager = ConversationManager::with_auth(CodexAuth::from_api_key("dummy")); + let codex = conversation_manager + .new_conversation(config) + .await + .unwrap() + .conversation; + + codex + .submit(Op::UserInput { + items: vec![InputItem::Text { + text: FIRST_AUTO_MSG.into(), + }], + }) + .await + .unwrap(); + + let error_event = wait_for_event(&codex, |ev| matches!(ev, EventMsg::Error(_))).await; + let EventMsg::Error(ErrorEvent { message }) = error_event else { + panic!("expected error event"); + }; + assert!( + message.contains("limit"), + "error message should include limit information: {message}" + ); + wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + let requests = server.received_requests().await.unwrap(); + assert_eq!( + requests.len(), + 3, + "auto compact should attempt at most one summarization before erroring" + ); + + let last_body = requests[2].body_json::().unwrap(); + let instructions = last_body + .get("instructions") + .and_then(|v| v.as_str()) + .unwrap_or_default(); + assert!( + !instructions.contains("You have exceeded the maximum number of tokens"), + "third request should be the follow-up turn, not another summarization" + ); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn auto_compact_allows_multiple_attempts_when_interleaved_with_other_turn_events() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + let server = start_mock_server().await; + + let sse1 = sse(vec![ + ev_assistant_message("m1", FIRST_REPLY), + ev_completed_with_tokens("r1", 500), + ]); + let sse2 = sse(vec![ + ev_assistant_message("m2", FIRST_AUTO_SUMMARY), + ev_completed_with_tokens("r2", 50), + ]); + let sse3 = sse(vec![ + ev_function_call(DUMMY_CALL_ID, DUMMY_FUNCTION_NAME, "{}"), + ev_completed_with_tokens("r3", 150), + ]); + let sse4 = sse(vec![ + ev_assistant_message("m4", SECOND_LARGE_REPLY), + ev_completed_with_tokens("r4", 450), + ]); + let sse5 = sse(vec![ + ev_assistant_message("m5", SECOND_AUTO_SUMMARY), + ev_completed_with_tokens("r5", 60), + ]); + let sse6 = sse(vec![ + ev_assistant_message("m6", FINAL_REPLY), + ev_completed_with_tokens("r6", 120), + ]); + + #[derive(Clone)] + struct SeqResponder { + bodies: Arc>, + calls: Arc, + requests: Arc>>>, + } + + impl SeqResponder { + fn new(bodies: Vec) -> Self { + Self { + bodies: Arc::new(bodies), + calls: Arc::new(AtomicUsize::new(0)), + requests: Arc::new(Mutex::new(Vec::new())), + } + } + + fn recorded_requests(&self) -> Vec> { + self.requests.lock().unwrap().clone() + } + } + + impl Respond for SeqResponder { + fn respond(&self, req: &Request) -> ResponseTemplate { + let idx = self.calls.fetch_add(1, Ordering::SeqCst); + self.requests.lock().unwrap().push(req.body.clone()); + let body = self + .bodies + .get(idx) + .unwrap_or_else(|| panic!("unexpected request index {idx}")) + .clone(); + ResponseTemplate::new(200) + .insert_header("content-type", "text/event-stream") + .set_body_raw(body, "text/event-stream") + } + } + + let responder = SeqResponder::new(vec![sse1, sse2, sse3, sse4, sse5, sse6]); + Mock::given(method("POST")) + .and(path("/v1/responses")) + .respond_with(responder.clone()) + .expect(6) + .mount(&server) + .await; + + let model_provider = ModelProviderInfo { + base_url: Some(format!("{}/v1", server.uri())), + ..built_in_model_providers()["openai"].clone() + }; + + let home = TempDir::new().unwrap(); + let mut config = load_default_config_for_test(&home); + config.model_provider = model_provider; + config.model_auto_compact_token_limit = Some(200); + let conversation_manager = ConversationManager::with_auth(CodexAuth::from_api_key("dummy")); + let codex = conversation_manager + .new_conversation(config) + .await + .unwrap() + .conversation; + + codex + .submit(Op::UserInput { + items: vec![InputItem::Text { + text: MULTI_AUTO_MSG.into(), + }], + }) + .await + .unwrap(); + + loop { + let event = codex.next_event().await.unwrap(); + if let EventMsg::TaskComplete(_) = &event.msg + && !event.id.starts_with("auto-compact-") + { + break; + } + } + + let request_bodies: Vec = responder + .recorded_requests() + .into_iter() + .map(|body| String::from_utf8(body).unwrap_or_default()) + .collect(); + assert_eq!( + request_bodies.len(), + 6, + "expected six requests including two auto compactions" + ); + assert!( + request_bodies[0].contains(MULTI_AUTO_MSG), + "first request should contain the user input" + ); + assert!( + request_bodies[1].contains("You have exceeded the maximum number of tokens"), + "first auto compact request should use summarization instructions" + ); + assert!( + request_bodies[3].contains(&format!("unsupported call: {DUMMY_FUNCTION_NAME}")), + "function call output should be sent before the second auto compact" + ); + assert!( + request_bodies[4].contains("You have exceeded the maximum number of tokens"), + "second auto compact request should reuse summarization instructions" + ); +} diff --git a/codex-rs/core/tests/suite/compact_resume_fork.rs b/codex-rs/core/tests/suite/compact_resume_fork.rs new file mode 100644 index 0000000000..34b43ece91 --- /dev/null +++ b/codex-rs/core/tests/suite/compact_resume_fork.rs @@ -0,0 +1,838 @@ +#![allow(clippy::expect_used)] + +//! Integration tests that cover compacting, resuming, and forking conversations. +//! +//! Each test sets up a mocked SSE conversation and drives the conversation through +//! a specific sequence of operations. After every operation we capture the +//! request payload that Codex would send to the model and assert that the +//! model-visible history matches the expected sequence of messages. + +use super::compact::FIRST_REPLY; +use super::compact::SUMMARIZE_TRIGGER; +use super::compact::SUMMARY_TEXT; +use super::compact::ev_assistant_message; +use super::compact::ev_completed; +use super::compact::mount_sse_once; +use super::compact::sse; +use codex_core::CodexAuth; +use codex_core::CodexConversation; +use codex_core::ConversationManager; +use codex_core::ModelProviderInfo; +use codex_core::NewConversation; +use codex_core::built_in_model_providers; +use codex_core::config::Config; +use codex_core::protocol::ConversationPathResponseEvent; +use codex_core::protocol::EventMsg; +use codex_core::protocol::InputItem; +use codex_core::protocol::Op; +use codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR; +use core_test_support::load_default_config_for_test; +use core_test_support::wait_for_event; +use pretty_assertions::assert_eq; +use serde_json::Value; +use serde_json::json; +use std::sync::Arc; +use tempfile::TempDir; +use wiremock::MockServer; + +const AFTER_SECOND_RESUME: &str = "AFTER_SECOND_RESUME"; + +fn network_disabled() -> bool { + std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +/// Scenario: compact an initial conversation, resume it, fork one turn back, and +/// ensure the model-visible history matches expectations at each request. +async fn compact_resume_and_fork_preserve_model_history_view() { + if network_disabled() { + println!("Skipping test because network is disabled in this sandbox"); + return; + } + + // 1. Arrange mocked SSE responses for the initial compact/resume/fork flow. + let server = MockServer::start().await; + mount_initial_flow(&server).await; + + // 2. Start a new conversation and drive it through the compact/resume/fork steps. + let (_home, config, manager, base) = start_test_conversation(&server).await; + + user_turn(&base, "hello world").await; + compact_conversation(&base).await; + user_turn(&base, "AFTER_COMPACT").await; + let base_path = fetch_conversation_path(&base, "base conversation").await; + assert!( + base_path.exists(), + "compact+resume test expects base path {base_path:?} to exist", + ); + + let resumed = resume_conversation(&manager, &config, base_path).await; + user_turn(&resumed, "AFTER_RESUME").await; + let resumed_path = fetch_conversation_path(&resumed, "resumed conversation").await; + assert!( + resumed_path.exists(), + "compact+resume test expects resumed path {resumed_path:?} to exist", + ); + + let forked = fork_conversation(&manager, &config, resumed_path, 1).await; + user_turn(&forked, "AFTER_FORK").await; + + // 3. Capture the requests to the model and validate the history slices. + let requests = gather_request_bodies(&server).await; + + // input after compact is a prefix of input after resume/fork + let input_after_compact = json!(requests[requests.len() - 3]["input"]); + let input_after_resume = json!(requests[requests.len() - 2]["input"]); + let input_after_fork = json!(requests[requests.len() - 1]["input"]); + + let compact_arr = input_after_compact + .as_array() + .expect("input after compact should be an array"); + let resume_arr = input_after_resume + .as_array() + .expect("input after resume should be an array"); + let fork_arr = input_after_fork + .as_array() + .expect("input after fork should be an array"); + + assert!( + compact_arr.len() <= resume_arr.len(), + "after-resume input should have at least as many items as after-compact", + ); + assert_eq!(compact_arr.as_slice(), &resume_arr[..compact_arr.len()]); + eprint!( + "len of compact: {}, len of fork: {}", + compact_arr.len(), + fork_arr.len() + ); + eprintln!("input_after_fork:{}", json!(input_after_fork)); + assert!( + compact_arr.len() <= fork_arr.len(), + "after-fork input should have at least as many items as after-compact", + ); + assert_eq!(compact_arr.as_slice(), &fork_arr[..compact_arr.len()]); + + let prompt = requests[0]["instructions"] + .as_str() + .unwrap_or_default() + .to_string(); + let user_instructions = requests[0]["input"][0]["content"][0]["text"] + .as_str() + .unwrap_or_default() + .to_string(); + let environment_context = requests[0]["input"][1]["content"][0]["text"] + .as_str() + .unwrap_or_default() + .to_string(); + let tool_calls = json!(requests[0]["tools"].as_array()); + let prompt_cache_key = requests[0]["prompt_cache_key"] + .as_str() + .unwrap_or_default() + .to_string(); + let fork_prompt_cache_key = requests[requests.len() - 1]["prompt_cache_key"] + .as_str() + .unwrap_or_default() + .to_string(); + let user_turn_1 = json!( + { + "model": "gpt-5", + "instructions": prompt, + "input": [ + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": user_instructions + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": environment_context + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "hello world" + } + ] + } + ], + "tools": tool_calls, + "tool_choice": "auto", + "parallel_tool_calls": false, + "reasoning": { + "summary": "auto" + }, + "store": false, + "stream": true, + "include": [ + "reasoning.encrypted_content" + ], + "prompt_cache_key": prompt_cache_key + }); + let compact_1 = json!( + { + "model": "gpt-5", + "instructions": "You have exceeded the maximum number of tokens, please stop coding and instead write a short memento message for the next agent. Your note should: +- Summarize what you finished and what still needs work. If there was a recent update_plan call, repeat its steps verbatim. +- List outstanding TODOs with file paths / line numbers so they're easy to find. +- Flag code that needs more tests (edge cases, performance, integration, etc.). +- Record any open bugs, quirks, or setup steps that will make it easier for the next agent to pick up where you left off.", + "input": [ + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": user_instructions + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": environment_context + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "hello world" + } + ] + }, + { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "FIRST_REPLY" + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "Start Summarization" + } + ] + } + ], + "tools": [], + "tool_choice": "auto", + "parallel_tool_calls": false, + "reasoning": { + "summary": "auto" + }, + "store": false, + "stream": true, + "include": [ + "reasoning.encrypted_content" + ], + "prompt_cache_key": prompt_cache_key + }); + let user_turn_2_after_compact = json!( + { + "model": "gpt-5", + "instructions": prompt, + "input": [ + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": user_instructions + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": environment_context + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "You were originally given instructions from a user over one or more turns. Here were the user messages: + +hello world + +Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis: + +SUMMARY_ONLY_CONTEXT" + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "AFTER_COMPACT" + } + ] + } + ], + "tools": tool_calls, + "tool_choice": "auto", + "parallel_tool_calls": false, + "reasoning": { + "summary": "auto" + }, + "store": false, + "stream": true, + "include": [ + "reasoning.encrypted_content" + ], + "prompt_cache_key": prompt_cache_key + }); + let usert_turn_3_after_resume = json!( + { + "model": "gpt-5", + "instructions": prompt, + "input": [ + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": user_instructions + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": environment_context + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "You were originally given instructions from a user over one or more turns. Here were the user messages: + +hello world + +Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis: + +SUMMARY_ONLY_CONTEXT" + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "AFTER_COMPACT" + } + ] + }, + { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "AFTER_COMPACT_REPLY" + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "AFTER_RESUME" + } + ] + } + ], + "tools": tool_calls, + "tool_choice": "auto", + "parallel_tool_calls": false, + "reasoning": { + "summary": "auto" + }, + "store": false, + "stream": true, + "include": [ + "reasoning.encrypted_content" + ], + "prompt_cache_key": prompt_cache_key + }); + let user_turn_3_after_fork = json!( + { + "model": "gpt-5", + "instructions": prompt, + "input": [ + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": user_instructions + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": environment_context + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "You were originally given instructions from a user over one or more turns. Here were the user messages: + +hello world + +Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis: + +SUMMARY_ONLY_CONTEXT" + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "AFTER_COMPACT" + } + ] + }, + { + "type": "message", + "role": "assistant", + "content": [ + { + "type": "output_text", + "text": "AFTER_COMPACT_REPLY" + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "AFTER_FORK" + } + ] + } + ], + "tools": tool_calls, + "tool_choice": "auto", + "parallel_tool_calls": false, + "reasoning": { + "summary": "auto" + }, + "store": false, + "stream": true, + "include": [ + "reasoning.encrypted_content" + ], + "prompt_cache_key": fork_prompt_cache_key + }); + let expected = json!([ + user_turn_1, + compact_1, + user_turn_2_after_compact, + usert_turn_3_after_resume, + user_turn_3_after_fork + ]); + assert_eq!(requests.len(), 5); + assert_eq!(json!(requests), expected); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +/// Scenario: after the forked branch is compacted, resuming again should reuse +/// the compacted history and only append the new user message. +async fn compact_resume_after_second_compaction_preserves_history() { + if network_disabled() { + println!("Skipping test because network is disabled in this sandbox"); + return; + } + + // 1. Arrange mocked SSE responses for the initial flow plus the second compact. + let server = MockServer::start().await; + mount_initial_flow(&server).await; + mount_second_compact_flow(&server).await; + + // 2. Drive the conversation through compact -> resume -> fork -> compact -> resume. + let (_home, config, manager, base) = start_test_conversation(&server).await; + + user_turn(&base, "hello world").await; + compact_conversation(&base).await; + user_turn(&base, "AFTER_COMPACT").await; + let base_path = fetch_conversation_path(&base, "base conversation").await; + assert!( + base_path.exists(), + "second compact test expects base path {base_path:?} to exist", + ); + + let resumed = resume_conversation(&manager, &config, base_path).await; + user_turn(&resumed, "AFTER_RESUME").await; + let resumed_path = fetch_conversation_path(&resumed, "resumed conversation").await; + assert!( + resumed_path.exists(), + "second compact test expects resumed path {resumed_path:?} to exist", + ); + + let forked = fork_conversation(&manager, &config, resumed_path, 3).await; + user_turn(&forked, "AFTER_FORK").await; + + compact_conversation(&forked).await; + user_turn(&forked, "AFTER_COMPACT_2").await; + let forked_path = fetch_conversation_path(&forked, "forked conversation").await; + assert!( + forked_path.exists(), + "second compact test expects forked path {forked_path:?} to exist", + ); + + let resumed_again = resume_conversation(&manager, &config, forked_path).await; + user_turn(&resumed_again, AFTER_SECOND_RESUME).await; + + let requests = gather_request_bodies(&server).await; + let input_after_compact = json!(requests[requests.len() - 2]["input"]); + let input_after_resume = json!(requests[requests.len() - 1]["input"]); + + // test input after compact before resume is the same as input after resume + let compact_input_array = input_after_compact + .as_array() + .expect("input after compact should be an array"); + let resume_input_array = input_after_resume + .as_array() + .expect("input after resume should be an array"); + assert!( + compact_input_array.len() <= resume_input_array.len(), + "after-resume input should have at least as many items as after-compact" + ); + assert_eq!( + compact_input_array.as_slice(), + &resume_input_array[..compact_input_array.len()] + ); + // hard coded test + let prompt = requests[0]["instructions"] + .as_str() + .unwrap_or_default() + .to_string(); + let user_instructions = requests[0]["input"][0]["content"][0]["text"] + .as_str() + .unwrap_or_default() + .to_string(); + let environment_instructions = requests[0]["input"][1]["content"][0]["text"] + .as_str() + .unwrap_or_default() + .to_string(); + + let expected = json!([ + { + "instructions": prompt, + "input": [ + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": user_instructions + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": environment_instructions + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "You were originally given instructions from a user over one or more turns. Here were the user messages:\n\nAFTER_FORK\n\nAnother language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:\n\nSUMMARY_ONLY_CONTEXT" + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "AFTER_COMPACT_2" + } + ] + }, + { + "type": "message", + "role": "user", + "content": [ + { + "type": "input_text", + "text": "AFTER_SECOND_RESUME" + } + ] + } + ], + } + ]); + let last_request_after_2_compacts = json!([{ + "instructions": requests[requests.len() -1]["instructions"], + "input": requests[requests.len() -1]["input"], + }]); + assert_eq!(expected, last_request_after_2_compacts); +} + +fn normalize_line_endings(value: &mut Value) { + match value { + Value::String(text) => { + if text.contains('\r') { + *text = text.replace("\r\n", "\n").replace('\r', "\n"); + } + } + Value::Array(items) => { + for item in items { + normalize_line_endings(item); + } + } + Value::Object(map) => { + for item in map.values_mut() { + normalize_line_endings(item); + } + } + _ => {} + } +} + +async fn gather_request_bodies(server: &MockServer) -> Vec { + server + .received_requests() + .await + .expect("mock server should not fail") + .into_iter() + .map(|req| { + let mut value = req.body_json::().expect("valid JSON body"); + normalize_line_endings(&mut value); + value + }) + .collect() +} + +async fn mount_initial_flow(server: &MockServer) { + let sse1 = sse(vec![ + ev_assistant_message("m1", FIRST_REPLY), + ev_completed("r1"), + ]); + let sse2 = sse(vec![ + ev_assistant_message("m2", SUMMARY_TEXT), + ev_completed("r2"), + ]); + let sse3 = sse(vec![ + ev_assistant_message("m3", "AFTER_COMPACT_REPLY"), + ev_completed("r3"), + ]); + let sse4 = sse(vec![ev_completed("r4")]); + let sse5 = sse(vec![ev_completed("r5")]); + + let match_first = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains("\"text\":\"hello world\"") + && !body.contains(&format!("\"text\":\"{SUMMARIZE_TRIGGER}\"")) + && !body.contains("\"text\":\"AFTER_COMPACT\"") + && !body.contains("\"text\":\"AFTER_RESUME\"") + && !body.contains("\"text\":\"AFTER_FORK\"") + }; + mount_sse_once(server, match_first, sse1).await; + + let match_compact = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains(&format!("\"text\":\"{SUMMARIZE_TRIGGER}\"")) + }; + mount_sse_once(server, match_compact, sse2).await; + + let match_after_compact = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains("\"text\":\"AFTER_COMPACT\"") + && !body.contains("\"text\":\"AFTER_RESUME\"") + && !body.contains("\"text\":\"AFTER_FORK\"") + }; + mount_sse_once(server, match_after_compact, sse3).await; + + let match_after_resume = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains("\"text\":\"AFTER_RESUME\"") + }; + mount_sse_once(server, match_after_resume, sse4).await; + + let match_after_fork = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains("\"text\":\"AFTER_FORK\"") + }; + mount_sse_once(server, match_after_fork, sse5).await; +} + +async fn mount_second_compact_flow(server: &MockServer) { + let sse6 = sse(vec![ + ev_assistant_message("m4", SUMMARY_TEXT), + ev_completed("r6"), + ]); + let sse7 = sse(vec![ev_completed("r7")]); + + let match_second_compact = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains(&format!("\"text\":\"{SUMMARIZE_TRIGGER}\"")) && body.contains("AFTER_FORK") + }; + mount_sse_once(server, match_second_compact, sse6).await; + + let match_after_second_resume = |req: &wiremock::Request| { + let body = std::str::from_utf8(&req.body).unwrap_or(""); + body.contains(&format!("\"text\":\"{AFTER_SECOND_RESUME}\"")) + }; + mount_sse_once(server, match_after_second_resume, sse7).await; +} + +async fn start_test_conversation( + server: &MockServer, +) -> (TempDir, Config, ConversationManager, Arc) { + let model_provider = ModelProviderInfo { + base_url: Some(format!("{}/v1", server.uri())), + ..built_in_model_providers()["openai"].clone() + }; + let home = TempDir::new().expect("create temp dir"); + let mut config = load_default_config_for_test(&home); + config.model_provider = model_provider; + + let manager = ConversationManager::with_auth(CodexAuth::from_api_key("dummy")); + let NewConversation { conversation, .. } = manager + .new_conversation(config.clone()) + .await + .expect("create conversation"); + + (home, config, manager, conversation) +} + +async fn user_turn(conversation: &Arc, text: &str) { + conversation + .submit(Op::UserInput { + items: vec![InputItem::Text { text: text.into() }], + }) + .await + .expect("submit user turn"); + wait_for_event(conversation, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; +} + +async fn compact_conversation(conversation: &Arc) { + conversation + .submit(Op::Compact) + .await + .expect("compact conversation"); + wait_for_event(conversation, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; +} + +async fn fetch_conversation_path( + conversation: &Arc, + context: &str, +) -> std::path::PathBuf { + conversation + .submit(Op::GetPath) + .await + .expect("request conversation path"); + match wait_for_event(conversation, |ev| { + matches!(ev, EventMsg::ConversationPath(_)) + }) + .await + { + EventMsg::ConversationPath(ConversationPathResponseEvent { path, .. }) => path, + _ => panic!("expected ConversationPath event for {context}"), + } +} + +async fn resume_conversation( + manager: &ConversationManager, + config: &Config, + path: std::path::PathBuf, +) -> Arc { + let auth_manager = + codex_core::AuthManager::from_auth_for_testing(CodexAuth::from_api_key("dummy")); + let NewConversation { conversation, .. } = manager + .resume_conversation_from_rollout(config.clone(), path, auth_manager) + .await + .expect("resume conversation"); + conversation +} + +async fn fork_conversation( + manager: &ConversationManager, + config: &Config, + path: std::path::PathBuf, + back_steps: usize, +) -> Arc { + let NewConversation { conversation, .. } = manager + .fork_conversation(back_steps, config.clone(), path) + .await + .expect("fork conversation"); + conversation +} diff --git a/codex-rs/core/tests/suite/exec_stream_events.rs b/codex-rs/core/tests/suite/exec_stream_events.rs index 521823d2d4..0b3edf2e1c 100644 --- a/codex-rs/core/tests/suite/exec_stream_events.rs +++ b/codex-rs/core/tests/suite/exec_stream_events.rs @@ -2,8 +2,11 @@ use std::collections::HashMap; use std::path::PathBuf; +use std::time::Duration; use async_channel::Receiver; +use codex_core::error::CodexErr; +use codex_core::error::SandboxErr; use codex_core::exec::ExecParams; use codex_core::exec::SandboxType; use codex_core::exec::StdoutStream; @@ -170,3 +173,36 @@ async fn test_aggregated_output_interleaves_in_order() { assert_eq!(result.aggregated_output.text, "O1\nE1\nO2\nE2\n"); assert_eq!(result.aggregated_output.truncated_after_lines, None); } + +#[tokio::test] +async fn test_exec_timeout_returns_partial_output() { + let cmd = vec![ + "/bin/sh".to_string(), + "-c".to_string(), + "printf 'before\\n'; sleep 2; printf 'after\\n'".to_string(), + ]; + + let params = ExecParams { + command: cmd, + cwd: std::env::current_dir().unwrap_or_else(|_| PathBuf::from(".")), + timeout_ms: Some(200), + env: HashMap::new(), + with_escalated_permissions: None, + justification: None, + }; + + let policy = SandboxPolicy::new_read_only_policy(); + + let result = process_exec_tool_call(params, SandboxType::None, &policy, &None, None).await; + + let Err(CodexErr::Sandbox(SandboxErr::Timeout { output })) = result else { + panic!("expected timeout error"); + }; + + assert_eq!(output.exit_code, 124); + assert_eq!(output.stdout.text, "before\n"); + assert!(output.stderr.text.is_empty()); + assert_eq!(output.aggregated_output.text, "before\n"); + assert!(output.duration >= Duration::from_millis(200)); + assert!(output.timed_out); +} diff --git a/codex-rs/core/tests/suite/mod.rs b/codex-rs/core/tests/suite/mod.rs index aabf83bbe3..4c217b63f4 100644 --- a/codex-rs/core/tests/suite/mod.rs +++ b/codex-rs/core/tests/suite/mod.rs @@ -3,11 +3,15 @@ mod cli_stream; mod client; mod compact; +mod compact_resume_fork; mod exec; mod exec_stream_events; mod fork_conversation; mod live_cli; +mod model_overrides; mod prompt_caching; +mod review; +mod rollout_list_find; mod seatbelt; mod stream_error_allows_next_turn; mod stream_no_completed; diff --git a/codex-rs/core/tests/suite/model_overrides.rs b/codex-rs/core/tests/suite/model_overrides.rs new file mode 100644 index 0000000000..a186c13ef3 --- /dev/null +++ b/codex-rs/core/tests/suite/model_overrides.rs @@ -0,0 +1,92 @@ +use codex_core::CodexAuth; +use codex_core::ConversationManager; +use codex_core::protocol::EventMsg; +use codex_core::protocol::Op; +use codex_core::protocol_config_types::ReasoningEffort; +use core_test_support::load_default_config_for_test; +use core_test_support::wait_for_event; +use pretty_assertions::assert_eq; +use tempfile::TempDir; + +const CONFIG_TOML: &str = "config.toml"; + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn override_turn_context_does_not_persist_when_config_exists() { + let codex_home = TempDir::new().unwrap(); + let config_path = codex_home.path().join(CONFIG_TOML); + let initial_contents = "model = \"gpt-4o\"\n"; + tokio::fs::write(&config_path, initial_contents) + .await + .expect("seed config.toml"); + + let mut config = load_default_config_for_test(&codex_home); + config.model = "gpt-4o".to_string(); + + let conversation_manager = + ConversationManager::with_auth(CodexAuth::from_api_key("Test API Key")); + let codex = conversation_manager + .new_conversation(config) + .await + .expect("create conversation") + .conversation; + + codex + .submit(Op::OverrideTurnContext { + cwd: None, + approval_policy: None, + sandbox_policy: None, + model: Some("o3".to_string()), + effort: Some(Some(ReasoningEffort::High)), + summary: None, + }) + .await + .expect("submit override"); + + codex.submit(Op::Shutdown).await.expect("request shutdown"); + wait_for_event(&codex, |ev| matches!(ev, EventMsg::ShutdownComplete)).await; + + let contents = tokio::fs::read_to_string(&config_path) + .await + .expect("read config.toml after override"); + assert_eq!(contents, initial_contents); +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn override_turn_context_does_not_create_config_file() { + let codex_home = TempDir::new().unwrap(); + let config_path = codex_home.path().join(CONFIG_TOML); + assert!( + !config_path.exists(), + "test setup should start without config" + ); + + let config = load_default_config_for_test(&codex_home); + + let conversation_manager = + ConversationManager::with_auth(CodexAuth::from_api_key("Test API Key")); + let codex = conversation_manager + .new_conversation(config) + .await + .expect("create conversation") + .conversation; + + codex + .submit(Op::OverrideTurnContext { + cwd: None, + approval_policy: None, + sandbox_policy: None, + model: Some("o3".to_string()), + effort: Some(Some(ReasoningEffort::Medium)), + summary: None, + }) + .await + .expect("submit override"); + + codex.submit(Op::Shutdown).await.expect("request shutdown"); + wait_for_event(&codex, |ev| matches!(ev, EventMsg::ShutdownComplete)).await; + + assert!( + !config_path.exists(), + "override should not create config.toml" + ); +} diff --git a/codex-rs/core/tests/suite/prompt_caching.rs b/codex-rs/core/tests/suite/prompt_caching.rs index 5ac3da6003..c6731fee34 100644 --- a/codex-rs/core/tests/suite/prompt_caching.rs +++ b/codex-rs/core/tests/suite/prompt_caching.rs @@ -387,7 +387,7 @@ async fn overrides_turn_context_but_keeps_cached_prefix_and_key_constant() { exclude_slash_tmp: true, }), model: Some("o3".to_string()), - effort: Some(ReasoningEffort::High), + effort: Some(Some(ReasoningEffort::High)), summary: Some(ReasoningSummary::Detailed), }) .await @@ -519,7 +519,7 @@ async fn per_turn_overrides_keep_cached_prefix_and_key_constant() { exclude_slash_tmp: true, }, model: "o3".to_string(), - effort: ReasoningEffort::High, + effort: Some(ReasoningEffort::High), summary: ReasoningSummary::Detailed, }) .await diff --git a/codex-rs/core/tests/suite/review.rs b/codex-rs/core/tests/suite/review.rs new file mode 100644 index 0000000000..f65913a2ca --- /dev/null +++ b/codex-rs/core/tests/suite/review.rs @@ -0,0 +1,598 @@ +use codex_core::CodexAuth; +use codex_core::CodexConversation; +use codex_core::ConversationManager; +use codex_core::ModelProviderInfo; +use codex_core::built_in_model_providers; +use codex_core::config::Config; +use codex_core::protocol::EventMsg; +use codex_core::protocol::ExitedReviewModeEvent; +use codex_core::protocol::InputItem; +use codex_core::protocol::Op; +use codex_core::protocol::ReviewCodeLocation; +use codex_core::protocol::ReviewFinding; +use codex_core::protocol::ReviewLineRange; +use codex_core::protocol::ReviewOutputEvent; +use codex_core::protocol::ReviewRequest; +use codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR; +use core_test_support::load_default_config_for_test; +use core_test_support::load_sse_fixture_with_id_from_str; +use core_test_support::wait_for_event; +use pretty_assertions::assert_eq; +use std::path::PathBuf; +use std::sync::Arc; +use tempfile::TempDir; +use tokio::io::AsyncWriteExt as _; +use uuid::Uuid; +use wiremock::Mock; +use wiremock::MockServer; +use wiremock::ResponseTemplate; +use wiremock::matchers::method; +use wiremock::matchers::path; + +/// Verify that submitting `Op::Review` spawns a child task and emits +/// EnteredReviewMode -> ExitedReviewMode(None) -> TaskComplete +/// in that order when the model returns a structured review JSON payload. +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn review_op_emits_lifecycle_and_review_output() { + // Skip under Codex sandbox network restrictions. + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + // Start mock Responses API server. Return a single assistant message whose + // text is a JSON-encoded ReviewOutputEvent. + let review_json = serde_json::json!({ + "findings": [ + { + "title": "Prefer Stylize helpers", + "body": "Use .dim()/.bold() chaining instead of manual Style where possible.", + "confidence_score": 0.9, + "priority": 1, + "code_location": { + "absolute_file_path": "/tmp/file.rs", + "line_range": {"start": 10, "end": 20} + } + } + ], + "overall_correctness": "good", + "overall_explanation": "All good with some improvements suggested.", + "overall_confidence_score": 0.8 + }) + .to_string(); + let sse_template = r#"[ + {"type":"response.output_item.done", "item":{ + "type":"message", "role":"assistant", + "content":[{"type":"output_text","text":__REVIEW__}] + }}, + {"type":"response.completed", "response": {"id": "__ID__"}} + ]"#; + let review_json_escaped = serde_json::to_string(&review_json).unwrap(); + let sse_raw = sse_template.replace("__REVIEW__", &review_json_escaped); + let server = start_responses_server_with_sse(&sse_raw, 1).await; + let codex_home = TempDir::new().unwrap(); + let codex = new_conversation_for_server(&server, &codex_home, |_| {}).await; + + // Submit review request. + codex + .submit(Op::Review { + review_request: ReviewRequest { + prompt: "Please review my changes".to_string(), + user_facing_hint: "my changes".to_string(), + }, + }) + .await + .unwrap(); + + // Verify lifecycle: Entered -> Exited(Some(review)) -> TaskComplete. + let _entered = wait_for_event(&codex, |ev| matches!(ev, EventMsg::EnteredReviewMode(_))).await; + let closed = wait_for_event(&codex, |ev| matches!(ev, EventMsg::ExitedReviewMode(_))).await; + let review = match closed { + EventMsg::ExitedReviewMode(ev) => ev + .review_output + .expect("expected ExitedReviewMode with Some(review_output)"), + other => panic!("expected ExitedReviewMode(..), got {other:?}"), + }; + + // Deep compare full structure using PartialEq (floats are f32 on both sides). + let expected = ReviewOutputEvent { + findings: vec![ReviewFinding { + title: "Prefer Stylize helpers".to_string(), + body: "Use .dim()/.bold() chaining instead of manual Style where possible.".to_string(), + confidence_score: 0.9, + priority: 1, + code_location: ReviewCodeLocation { + absolute_file_path: PathBuf::from("/tmp/file.rs"), + line_range: ReviewLineRange { start: 10, end: 20 }, + }, + }], + overall_correctness: "good".to_string(), + overall_explanation: "All good with some improvements suggested.".to_string(), + overall_confidence_score: 0.8, + }; + assert_eq!(expected, review); + let _complete = wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + server.verify().await; +} + +/// When the model returns plain text that is not JSON, ensure the child +/// lifecycle still occurs and the plain text is surfaced via +/// ExitedReviewMode(Some(..)) as the overall_explanation. +// Windows CI only: bump to 4 workers to prevent SSE/event starvation and test timeouts. +#[cfg_attr(windows, tokio::test(flavor = "multi_thread", worker_threads = 4))] +#[cfg_attr(not(windows), tokio::test(flavor = "multi_thread", worker_threads = 2))] +async fn review_op_with_plain_text_emits_review_fallback() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + let sse_raw = r#"[ + {"type":"response.output_item.done", "item":{ + "type":"message", "role":"assistant", + "content":[{"type":"output_text","text":"just plain text"}] + }}, + {"type":"response.completed", "response": {"id": "__ID__"}} + ]"#; + let server = start_responses_server_with_sse(sse_raw, 1).await; + let codex_home = TempDir::new().unwrap(); + let codex = new_conversation_for_server(&server, &codex_home, |_| {}).await; + + codex + .submit(Op::Review { + review_request: ReviewRequest { + prompt: "Plain text review".to_string(), + user_facing_hint: "plain text review".to_string(), + }, + }) + .await + .unwrap(); + + let _entered = wait_for_event(&codex, |ev| matches!(ev, EventMsg::EnteredReviewMode(_))).await; + let closed = wait_for_event(&codex, |ev| matches!(ev, EventMsg::ExitedReviewMode(_))).await; + let review = match closed { + EventMsg::ExitedReviewMode(ev) => ev + .review_output + .expect("expected ExitedReviewMode with Some(review_output)"), + other => panic!("expected ExitedReviewMode(..), got {other:?}"), + }; + + // Expect a structured fallback carrying the plain text. + let expected = ReviewOutputEvent { + overall_explanation: "just plain text".to_string(), + ..Default::default() + }; + assert_eq!(expected, review); + let _complete = wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + server.verify().await; +} + +/// When the model returns structured JSON in a review, ensure no AgentMessage +/// is emitted; the UI consumes the structured result via ExitedReviewMode. +// Windows CI only: bump to 4 workers to prevent SSE/event starvation and test timeouts. +#[cfg_attr(windows, tokio::test(flavor = "multi_thread", worker_threads = 4))] +#[cfg_attr(not(windows), tokio::test(flavor = "multi_thread", worker_threads = 2))] +async fn review_does_not_emit_agent_message_on_structured_output() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + let review_json = serde_json::json!({ + "findings": [ + { + "title": "Example", + "body": "Structured review output.", + "confidence_score": 0.5, + "priority": 1, + "code_location": { + "absolute_file_path": "/tmp/file.rs", + "line_range": {"start": 1, "end": 2} + } + } + ], + "overall_correctness": "ok", + "overall_explanation": "ok", + "overall_confidence_score": 0.5 + }) + .to_string(); + let sse_template = r#"[ + {"type":"response.output_item.done", "item":{ + "type":"message", "role":"assistant", + "content":[{"type":"output_text","text":__REVIEW__}] + }}, + {"type":"response.completed", "response": {"id": "__ID__"}} + ]"#; + let review_json_escaped = serde_json::to_string(&review_json).unwrap(); + let sse_raw = sse_template.replace("__REVIEW__", &review_json_escaped); + let server = start_responses_server_with_sse(&sse_raw, 1).await; + let codex_home = TempDir::new().unwrap(); + let codex = new_conversation_for_server(&server, &codex_home, |_| {}).await; + + codex + .submit(Op::Review { + review_request: ReviewRequest { + prompt: "check structured".to_string(), + user_facing_hint: "check structured".to_string(), + }, + }) + .await + .unwrap(); + + // Drain events until TaskComplete; ensure none are AgentMessage. + use tokio::time::Duration; + use tokio::time::timeout; + let mut saw_entered = false; + let mut saw_exited = false; + loop { + let ev = timeout(Duration::from_secs(5), codex.next_event()) + .await + .expect("timeout waiting for event") + .expect("stream ended unexpectedly"); + match ev.msg { + EventMsg::TaskComplete(_) => break, + EventMsg::AgentMessage(_) => { + panic!("unexpected AgentMessage during review with structured output") + } + EventMsg::EnteredReviewMode(_) => saw_entered = true, + EventMsg::ExitedReviewMode(_) => saw_exited = true, + _ => {} + } + } + assert!(saw_entered && saw_exited, "missing review lifecycle events"); + + server.verify().await; +} + +/// Ensure that when a custom `review_model` is set in the config, the review +/// request uses that model (and not the main chat model). +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn review_uses_custom_review_model_from_config() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + // Minimal stream: just a completed event + let sse_raw = r#"[ + {"type":"response.completed", "response": {"id": "__ID__"}} + ]"#; + let server = start_responses_server_with_sse(sse_raw, 1).await; + let codex_home = TempDir::new().unwrap(); + // Choose a review model different from the main model; ensure it is used. + let codex = new_conversation_for_server(&server, &codex_home, |cfg| { + cfg.model = "gpt-4.1".to_string(); + cfg.review_model = "gpt-5".to_string(); + }) + .await; + + codex + .submit(Op::Review { + review_request: ReviewRequest { + prompt: "use custom model".to_string(), + user_facing_hint: "use custom model".to_string(), + }, + }) + .await + .unwrap(); + + // Wait for completion + let _entered = wait_for_event(&codex, |ev| matches!(ev, EventMsg::EnteredReviewMode(_))).await; + let _closed = wait_for_event(&codex, |ev| { + matches!( + ev, + EventMsg::ExitedReviewMode(ExitedReviewModeEvent { + review_output: None + }) + ) + }) + .await; + let _complete = wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + // Assert the request body model equals the configured review model + let request = &server.received_requests().await.unwrap()[0]; + let body = request.body_json::().unwrap(); + assert_eq!(body["model"].as_str().unwrap(), "gpt-5"); + + server.verify().await; +} + +/// When a review session begins, it must not prepend prior chat history from +/// the parent session. The request `input` should contain only the review +/// prompt from the user. +// Windows CI only: bump to 4 workers to prevent SSE/event starvation and test timeouts. +#[cfg_attr(windows, tokio::test(flavor = "multi_thread", worker_threads = 4))] +#[cfg_attr(not(windows), tokio::test(flavor = "multi_thread", worker_threads = 2))] +async fn review_input_isolated_from_parent_history() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + // Mock server for the single review request + let sse_raw = r#"[ + {"type":"response.completed", "response": {"id": "__ID__"}} + ]"#; + let server = start_responses_server_with_sse(sse_raw, 1).await; + + // Seed a parent session history via resume file with both user + assistant items. + let codex_home = TempDir::new().unwrap(); + let mut config = load_default_config_for_test(&codex_home); + config.model_provider = ModelProviderInfo { + base_url: Some(format!("{}/v1", server.uri())), + ..built_in_model_providers()["openai"].clone() + }; + + let session_file = codex_home.path().join("resume.jsonl"); + { + let mut f = tokio::fs::File::create(&session_file).await.unwrap(); + let convo_id = Uuid::new_v4(); + // Proper session_meta line (enveloped) with a conversation id + let meta_line = serde_json::json!({ + "timestamp": "2024-01-01T00:00:00.000Z", + "type": "session_meta", + "payload": { + "id": convo_id, + "timestamp": "2024-01-01T00:00:00Z", + "instructions": null, + "cwd": ".", + "originator": "test_originator", + "cli_version": "test_version" + } + }); + f.write_all(format!("{meta_line}\n").as_bytes()) + .await + .unwrap(); + + // Prior user message (enveloped response_item) + let user = codex_protocol::models::ResponseItem::Message { + id: None, + role: "user".to_string(), + content: vec![codex_protocol::models::ContentItem::InputText { + text: "parent: earlier user message".to_string(), + }], + }; + let user_json = serde_json::to_value(&user).unwrap(); + let user_line = serde_json::json!({ + "timestamp": "2024-01-01T00:00:01.000Z", + "type": "response_item", + "payload": user_json + }); + f.write_all(format!("{user_line}\n").as_bytes()) + .await + .unwrap(); + + // Prior assistant message (enveloped response_item) + let assistant = codex_protocol::models::ResponseItem::Message { + id: None, + role: "assistant".to_string(), + content: vec![codex_protocol::models::ContentItem::OutputText { + text: "parent: assistant reply".to_string(), + }], + }; + let assistant_json = serde_json::to_value(&assistant).unwrap(); + let assistant_line = serde_json::json!({ + "timestamp": "2024-01-01T00:00:02.000Z", + "type": "response_item", + "payload": assistant_json + }); + f.write_all(format!("{assistant_line}\n").as_bytes()) + .await + .unwrap(); + } + let codex = + resume_conversation_for_server(&server, &codex_home, session_file.clone(), |_| {}).await; + + // Submit review request; it must start fresh (no parent history in `input`). + let review_prompt = "Please review only this".to_string(); + codex + .submit(Op::Review { + review_request: ReviewRequest { + prompt: review_prompt.clone(), + user_facing_hint: review_prompt.clone(), + }, + }) + .await + .unwrap(); + + let _entered = wait_for_event(&codex, |ev| matches!(ev, EventMsg::EnteredReviewMode(_))).await; + let _closed = wait_for_event(&codex, |ev| { + matches!( + ev, + EventMsg::ExitedReviewMode(ExitedReviewModeEvent { + review_output: None + }) + ) + }) + .await; + let _complete = wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + // Assert the request `input` contains only the single review user message. + let request = &server.received_requests().await.unwrap()[0]; + let body = request.body_json::().unwrap(); + let expected_input = serde_json::json!([ + { + "type": "message", + "role": "user", + "content": [{"type": "input_text", "text": review_prompt}] + } + ]); + assert_eq!(body["input"], expected_input); + + server.verify().await; +} + +/// After a review thread finishes, its conversation should not leak into the +/// parent session. A subsequent parent turn must not include any review +/// messages in its request `input`. +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn review_history_does_not_leak_into_parent_session() { + if std::env::var(CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR).is_ok() { + println!( + "Skipping test because it cannot execute when network is disabled in a Codex sandbox." + ); + return; + } + + // Respond to both the review request and the subsequent parent request. + let sse_raw = r#"[ + {"type":"response.output_item.done", "item":{ + "type":"message", "role":"assistant", + "content":[{"type":"output_text","text":"review assistant output"}] + }}, + {"type":"response.completed", "response": {"id": "__ID__"}} + ]"#; + let server = start_responses_server_with_sse(sse_raw, 2).await; + let codex_home = TempDir::new().unwrap(); + let codex = new_conversation_for_server(&server, &codex_home, |_| {}).await; + + // 1) Run a review turn that produces an assistant message (isolated in child). + codex + .submit(Op::Review { + review_request: ReviewRequest { + prompt: "Start a review".to_string(), + user_facing_hint: "Start a review".to_string(), + }, + }) + .await + .unwrap(); + let _entered = wait_for_event(&codex, |ev| matches!(ev, EventMsg::EnteredReviewMode(_))).await; + let _closed = wait_for_event(&codex, |ev| { + matches!( + ev, + EventMsg::ExitedReviewMode(ExitedReviewModeEvent { + review_output: Some(_) + }) + ) + }) + .await; + let _complete = wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + // 2) Continue in the parent session; request input must not include any review items. + let followup = "back to parent".to_string(); + codex + .submit(Op::UserInput { + items: vec![InputItem::Text { + text: followup.clone(), + }], + }) + .await + .unwrap(); + let _complete = wait_for_event(&codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + + // Inspect the second request (parent turn) input contents. + // Parent turns include session initial messages (user_instructions, environment_context). + // Critically, no messages from the review thread should appear. + let requests = server.received_requests().await.unwrap(); + assert_eq!(requests.len(), 2); + let body = requests[1].body_json::().unwrap(); + let input = body["input"].as_array().expect("input array"); + + // Must include the followup as the last item for this turn + let last = input.last().expect("at least one item in input"); + assert_eq!(last["role"].as_str().unwrap(), "user"); + let last_text = last["content"][0]["text"].as_str().unwrap(); + assert_eq!(last_text, followup); + + // Ensure no review-thread content leaked into the parent request + let contains_review_prompt = input + .iter() + .any(|msg| msg["content"][0]["text"].as_str().unwrap_or_default() == "Start a review"); + let contains_review_assistant = input.iter().any(|msg| { + msg["content"][0]["text"].as_str().unwrap_or_default() == "review assistant output" + }); + assert!( + !contains_review_prompt, + "review prompt leaked into parent turn input" + ); + assert!( + !contains_review_assistant, + "review assistant output leaked into parent turn input" + ); + + server.verify().await; +} + +/// Start a mock Responses API server and mount the given SSE stream body. +async fn start_responses_server_with_sse(sse_raw: &str, expected_requests: usize) -> MockServer { + let server = MockServer::start().await; + let sse = load_sse_fixture_with_id_from_str(sse_raw, &Uuid::new_v4().to_string()); + Mock::given(method("POST")) + .and(path("/v1/responses")) + .respond_with( + ResponseTemplate::new(200) + .insert_header("content-type", "text/event-stream") + .set_body_raw(sse.clone(), "text/event-stream"), + ) + .expect(expected_requests as u64) + .mount(&server) + .await; + server +} + +/// Create a conversation configured to talk to the provided mock server. +#[expect(clippy::expect_used)] +async fn new_conversation_for_server( + server: &MockServer, + codex_home: &TempDir, + mutator: F, +) -> Arc +where + F: FnOnce(&mut Config), +{ + let model_provider = ModelProviderInfo { + base_url: Some(format!("{}/v1", server.uri())), + ..built_in_model_providers()["openai"].clone() + }; + let mut config = load_default_config_for_test(codex_home); + config.model_provider = model_provider; + mutator(&mut config); + let conversation_manager = + ConversationManager::with_auth(CodexAuth::from_api_key("Test API Key")); + conversation_manager + .new_conversation(config) + .await + .expect("create conversation") + .conversation +} + +/// Create a conversation resuming from a rollout file, configured to talk to the provided mock server. +#[expect(clippy::expect_used)] +async fn resume_conversation_for_server( + server: &MockServer, + codex_home: &TempDir, + resume_path: std::path::PathBuf, + mutator: F, +) -> Arc +where + F: FnOnce(&mut Config), +{ + let model_provider = ModelProviderInfo { + base_url: Some(format!("{}/v1", server.uri())), + ..built_in_model_providers()["openai"].clone() + }; + let mut config = load_default_config_for_test(codex_home); + config.model_provider = model_provider; + mutator(&mut config); + let conversation_manager = + ConversationManager::with_auth(CodexAuth::from_api_key("Test API Key")); + let auth_manager = + codex_core::AuthManager::from_auth_for_testing(CodexAuth::from_api_key("Test API Key")); + conversation_manager + .resume_conversation_from_rollout(config, resume_path, auth_manager) + .await + .expect("resume conversation") + .conversation +} diff --git a/codex-rs/core/tests/suite/rollout_list_find.rs b/codex-rs/core/tests/suite/rollout_list_find.rs new file mode 100644 index 0000000000..88409a4616 --- /dev/null +++ b/codex-rs/core/tests/suite/rollout_list_find.rs @@ -0,0 +1,50 @@ +#![allow(clippy::unwrap_used, clippy::expect_used)] +use std::io::Write; +use std::path::PathBuf; + +use codex_core::find_conversation_path_by_id_str; +use tempfile::TempDir; +use uuid::Uuid; + +/// Create sessions/YYYY/MM/DD and write a minimal rollout file containing the +/// provided conversation id in the SessionMeta line. Returns the absolute path. +fn write_minimal_rollout_with_id(codex_home: &TempDir, id: Uuid) -> PathBuf { + let sessions = codex_home.path().join("sessions/2024/01/01"); + std::fs::create_dir_all(&sessions).unwrap(); + + let file = sessions.join(format!("rollout-2024-01-01T00-00-00-{id}.jsonl")); + let mut f = std::fs::File::create(&file).unwrap(); + // Minimal first line: session_meta with the id so content search can find it + writeln!( + f, + "{}", + serde_json::json!({ + "timestamp": "2024-01-01T00:00:00.000Z", + "type": "session_meta", + "payload": { + "id": id, + "timestamp": "2024-01-01T00:00:00Z", + "instructions": null, + "cwd": ".", + "originator": "test", + "cli_version": "test" + } + }) + ) + .unwrap(); + + file +} + +#[tokio::test] +async fn find_locates_rollout_file_by_id() { + let home = TempDir::new().unwrap(); + let id = Uuid::new_v4(); + let expected = write_minimal_rollout_with_id(&home, id); + + let found = find_conversation_path_by_id_str(home.path(), &id.to_string()) + .await + .unwrap(); + + assert_eq!(found.unwrap(), expected); +} diff --git a/codex-rs/docs/codex_mcp_interface.md b/codex-rs/docs/codex_mcp_interface.md new file mode 100644 index 0000000000..1b048085c3 --- /dev/null +++ b/codex-rs/docs/codex_mcp_interface.md @@ -0,0 +1,123 @@ +# Codex MCP Interface [experimental] + +This document describes Codex’s experimental MCP interface: a JSON‑RPC API that runs over the Model Context Protocol (MCP) transport to control a local Codex engine. + +- Status: experimental and subject to change without notice +- Server binary: `codex mcp` (or `codex-mcp-server`) +- Transport: standard MCP over stdio (JSON‑RPC 2.0, line‑delimited) + +## Overview + +Codex exposes a small set of MCP‑compatible methods to create and manage conversations, send user input, receive live events, and handle approval prompts. The types are defined in `protocol/src/mcp_protocol.rs` and re‑used by the MCP server implementation in `mcp-server/`. + +At a glance: + +- Conversations + - `newConversation` → start a Codex session + - `sendUserMessage` / `sendUserTurn` → send user input into a conversation + - `interruptConversation` → stop the current turn + - `listConversations`, `resumeConversation`, `archiveConversation` +- Configuration and info + - `getUserSavedConfig`, `setDefaultModel`, `getUserAgent`, `userInfo` +- Auth + - `loginApiKey`, `loginChatGpt`, `cancelLoginChatGpt`, `logoutChatGpt`, `getAuthStatus` +- Utilities + - `gitDiffToRemote`, `execOneOffCommand` +- Approvals (server → client requests) + - `applyPatchApproval`, `execCommandApproval` +- Notifications (server → client) + - `loginChatGptComplete`, `authStatusChange` + - `codex/event` stream with agent events + +See code for full type definitions and exact shapes: `protocol/src/mcp_protocol.rs`. + +## Starting the server + +Run Codex as an MCP server and connect an MCP client: + +```bash +codex mcp | your_mcp_client +``` + +For a simple inspection UI, you can also try: + +```bash +npx @modelcontextprotocol/inspector codex mcp +``` + +## Conversations + +Start a new session with optional overrides: + +Request `newConversation` params (subset): + +- `model`: string model id (e.g. "o3", "gpt-5") +- `profile`: optional named profile +- `cwd`: optional working directory +- `approvalPolicy`: `untrusted` | `on-request` | `on-failure` | `never` +- `sandbox`: `read-only` | `workspace-write` | `danger-full-access` +- `config`: map of additional config overrides +- `baseInstructions`: optional instruction override +- `includePlanTool` / `includeApplyPatchTool`: booleans + +Response: `{ conversationId, model, reasoningEffort?, rolloutPath }` + +Send input to the active turn: + +- `sendUserMessage` → enqueue items to the conversation +- `sendUserTurn` → structured turn with explicit `cwd`, `approvalPolicy`, `sandboxPolicy`, `model`, optional `effort`, and `summary` + +Interrupt a running turn: `interruptConversation`. + +List/resume/archive: `listConversations`, `resumeConversation`, `archiveConversation`. + +## Event stream + +While a conversation runs, the server sends notifications: + +- `codex/event` with the serialized Codex event payload. The shape matches `core/src/protocol.rs`’s `Event` and `EventMsg` types. Some notifications include a `_meta.requestId` to correlate with the originating request. +- Auth notifications via method names `loginChatGptComplete` and `authStatusChange`. + +Clients should render events and, when present, surface approval requests (see next section). + +## Approvals (server → client) + +When Codex needs approval to apply changes or run commands, the server issues JSON‑RPC requests to the client: + +- `applyPatchApproval { conversationId, callId, fileChanges, reason?, grantRoot? }` +- `execCommandApproval { conversationId, callId, command, cwd, reason? }` + +The client must reply with `{ decision: "allow" | "deny" }` for each request. + +## Auth helpers + +For ChatGPT or API‑key based auth flows, the server exposes helpers: + +- `loginApiKey { apiKey }` +- `loginChatGpt` → returns `{ loginId, authUrl }`; browser completes flow; then `loginChatGptComplete` notification follows +- `cancelLoginChatGpt { loginId }`, `logoutChatGpt`, `getAuthStatus { includeToken?, refreshToken? }` + +## Example: start and send a message + +```json +{ "jsonrpc": "2.0", "id": 1, "method": "newConversation", "params": { "model": "gpt-5", "approvalPolicy": "on-request" } } +``` + +Server responds: + +```json +{ "jsonrpc": "2.0", "id": 1, "result": { "conversationId": "c7b0…", "model": "gpt-5", "rolloutPath": "/path/to/rollout.jsonl" } } +``` + +Then send input: + +```json +{ "jsonrpc": "2.0", "id": 2, "method": "sendUserMessage", "params": { "conversationId": "c7b0…", "items": [{ "type": "text", "text": "Hello Codex" }] } } +``` + +While processing, the server emits `codex/event` notifications containing agent output, approvals, and status updates. + +## Compatibility and stability + +This interface is experimental. Method names, fields, and event shapes may evolve. For the authoritative schema, consult `protocol/src/mcp_protocol.rs` and the corresponding server wiring in `mcp-server/`. + diff --git a/codex-rs/exec/Cargo.toml b/codex-rs/exec/Cargo.toml index 89dc3951e7..2dd121c368 100644 --- a/codex-rs/exec/Cargo.toml +++ b/codex-rs/exec/Cargo.toml @@ -38,7 +38,7 @@ tokio = { version = "1", features = [ "signal", ] } tracing = { version = "0.1.41", features = ["log"] } -tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.20", features = ["env-filter"] } [dev-dependencies] assert_cmd = "2" @@ -46,4 +46,6 @@ core_test_support = { path = "../core/tests/common" } libc = "0.2" predicates = "3" tempfile = "3.13.0" +uuid = "1" +walkdir = "2" wiremock = "0.6" diff --git a/codex-rs/exec/src/cli.rs b/codex-rs/exec/src/cli.rs index 31dd410991..19093ec925 100644 --- a/codex-rs/exec/src/cli.rs +++ b/codex-rs/exec/src/cli.rs @@ -6,6 +6,10 @@ use std::path::PathBuf; #[derive(Parser, Debug)] #[command(version)] pub struct Cli { + /// Action to perform. If omitted, runs a new non-interactive session. + #[command(subcommand)] + pub command: Option, + /// Optional image(s) to attach to the initial prompt. #[arg(long = "image", short = 'i', value_name = "FILE", value_delimiter = ',', num_args = 1..)] pub images: Vec, @@ -69,6 +73,28 @@ pub struct Cli { pub prompt: Option, } +#[derive(Debug, clap::Subcommand)] +pub enum Command { + /// Resume a previous session by id or pick the most recent with --last. + Resume(ResumeArgs), +} + +#[derive(Parser, Debug)] +pub struct ResumeArgs { + /// Conversation/session id (UUID). When provided, resumes this session. + /// If omitted, use --last to pick the most recent recorded session. + #[arg(value_name = "SESSION_ID")] + pub session_id: Option, + + /// Resume the most recent recorded session (newest) without specifying an id. + #[arg(long = "last", default_value_t = false, conflicts_with = "session_id")] + pub last: bool, + + /// Prompt to send after resuming the session. If `-` is used, read from stdin. + #[arg(value_name = "PROMPT")] + pub prompt: Option, +} + #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, ValueEnum)] #[value(rename_all = "kebab-case")] pub enum Color { diff --git a/codex-rs/exec/src/event_processor_with_human_output.rs b/codex-rs/exec/src/event_processor_with_human_output.rs index 3856e05bf5..c126208fad 100644 --- a/codex-rs/exec/src/event_processor_with_human_output.rs +++ b/codex-rs/exec/src/event_processor_with_human_output.rs @@ -562,6 +562,8 @@ impl EventProcessor for EventProcessorWithHumanOutput { EventMsg::ShutdownComplete => return CodexStatus::Shutdown, EventMsg::ConversationPath(_) => {} EventMsg::UserMessage(_) => {} + EventMsg::EnteredReviewMode(_) => {} + EventMsg::ExitedReviewMode(_) => {} } CodexStatus::Running } diff --git a/codex-rs/exec/src/lib.rs b/codex-rs/exec/src/lib.rs index 40b30f2bba..097231da60 100644 --- a/codex-rs/exec/src/lib.rs +++ b/codex-rs/exec/src/lib.rs @@ -30,11 +30,14 @@ use tracing::error; use tracing::info; use tracing_subscriber::EnvFilter; +use crate::cli::Command as ExecCommand; use crate::event_processor::CodexStatus; use crate::event_processor::EventProcessor; +use codex_core::find_conversation_path_by_id_str; pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> anyhow::Result<()> { let Cli { + command, images, model: model_cli_arg, oss, @@ -51,8 +54,15 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> any config_overrides, } = cli; - // Determine the prompt based on CLI arg and/or stdin. - let prompt = match prompt { + // Determine the prompt source (parent or subcommand) and read from stdin if needed. + let prompt_arg = match &command { + // Allow prompt before the subcommand by falling back to the parent-level prompt + // when the Resume subcommand did not provide its own prompt. + Some(ExecCommand::Resume(args)) => args.prompt.clone().or(prompt), + None => prompt, + }; + + let prompt = match prompt_arg { Some(p) if p != "-" => p, // Either `-` was passed or no positional arg. maybe_dash => { @@ -137,6 +147,7 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> any // Load configuration and determine approval policy let overrides = ConfigOverrides { model, + review_model: None, config_profile, // This CLI is intended to be headless and has no affordances for asking // the user for approval. @@ -189,11 +200,29 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> any let conversation_manager = ConversationManager::new(AuthManager::shared(config.codex_home.clone())); + + // Handle resume subcommand by resolving a rollout path and using explicit resume API. let NewConversation { conversation_id: _, conversation, session_configured, - } = conversation_manager.new_conversation(config).await?; + } = if let Some(ExecCommand::Resume(args)) = command { + let resume_path = resolve_resume_path(&config, &args).await?; + + if let Some(path) = resume_path { + conversation_manager + .resume_conversation_from_rollout( + config.clone(), + path, + AuthManager::shared(config.codex_home.clone()), + ) + .await? + } else { + conversation_manager.new_conversation(config).await? + } + } else { + conversation_manager.new_conversation(config).await? + }; info!("Codex initialized with event: {session_configured:?}"); let (tx, mut rx) = tokio::sync::mpsc::unbounded_channel::(); @@ -278,3 +307,23 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> any Ok(()) } + +async fn resolve_resume_path( + config: &Config, + args: &crate::cli::ResumeArgs, +) -> anyhow::Result> { + if args.last { + match codex_core::RolloutRecorder::list_conversations(&config.codex_home, 1, None).await { + Ok(page) => Ok(page.items.first().map(|it| it.path.clone())), + Err(e) => { + error!("Error listing conversations: {e}"); + Ok(None) + } + } + } else if let Some(id_str) = args.session_id.as_deref() { + let path = find_conversation_path_by_id_str(&config.codex_home, id_str).await?; + Ok(path) + } else { + Ok(None) + } +} diff --git a/codex-rs/exec/tests/fixtures/cli_responses_fixture.sse b/codex-rs/exec/tests/fixtures/cli_responses_fixture.sse new file mode 100644 index 0000000000..660c56b1d8 --- /dev/null +++ b/codex-rs/exec/tests/fixtures/cli_responses_fixture.sse @@ -0,0 +1,10 @@ +event: response.created +data: {"type":"response.created","response":{"id":"resp1"}} + +event: response.output_item.done +data: {"type":"response.output_item.done","item":{"type":"message","role":"assistant","content":[{"type":"output_text","text":"fixture hello"}]}} + +event: response.completed +data: {"type":"response.completed","response":{"id":"resp1","output":[]}} + + diff --git a/codex-rs/exec/tests/suite/mod.rs b/codex-rs/exec/tests/suite/mod.rs index 75b19ee1b2..5748fba1e8 100644 --- a/codex-rs/exec/tests/suite/mod.rs +++ b/codex-rs/exec/tests/suite/mod.rs @@ -1,4 +1,5 @@ // Aggregates all former standalone integration tests as modules. mod apply_patch; mod common; +mod resume; mod sandbox; diff --git a/codex-rs/exec/tests/suite/resume.rs b/codex-rs/exec/tests/suite/resume.rs new file mode 100644 index 0000000000..5868ed8eb2 --- /dev/null +++ b/codex-rs/exec/tests/suite/resume.rs @@ -0,0 +1,267 @@ +#![allow(clippy::unwrap_used, clippy::expect_used)] +use anyhow::Context; +use assert_cmd::prelude::*; +use serde_json::Value; +use std::process::Command; +use tempfile::TempDir; +use uuid::Uuid; +use walkdir::WalkDir; + +/// Utility: scan the sessions dir for a rollout file that contains `marker` +/// in any response_item.message.content entry. Returns the absolute path. +fn find_session_file_containing_marker( + sessions_dir: &std::path::Path, + marker: &str, +) -> Option { + for entry in WalkDir::new(sessions_dir) { + let entry = match entry { + Ok(e) => e, + Err(_) => continue, + }; + if !entry.file_type().is_file() { + continue; + } + if !entry.file_name().to_string_lossy().ends_with(".jsonl") { + continue; + } + let path = entry.path(); + let Ok(content) = std::fs::read_to_string(path) else { + continue; + }; + // Skip the first meta line and scan remaining JSONL entries. + let mut lines = content.lines(); + if lines.next().is_none() { + continue; + } + for line in lines { + if line.trim().is_empty() { + continue; + } + let Ok(item): Result = serde_json::from_str(line) else { + continue; + }; + if item.get("type").and_then(|t| t.as_str()) == Some("response_item") + && let Some(payload) = item.get("payload") + && payload.get("type").and_then(|t| t.as_str()) == Some("message") + && payload + .get("content") + .map(|c| c.to_string()) + .unwrap_or_default() + .contains(marker) + { + return Some(path.to_path_buf()); + } + } + } + None +} + +/// Extract the conversation UUID from the first SessionMeta line in the rollout file. +fn extract_conversation_id(path: &std::path::Path) -> String { + let content = std::fs::read_to_string(path).unwrap(); + let mut lines = content.lines(); + let meta_line = lines.next().expect("missing meta line"); + let meta: Value = serde_json::from_str(meta_line).expect("invalid meta json"); + meta.get("payload") + .and_then(|p| p.get("id")) + .and_then(|v| v.as_str()) + .unwrap_or_default() + .to_string() +} + +#[test] +fn exec_resume_last_appends_to_existing_file() -> anyhow::Result<()> { + let home = TempDir::new()?; + let fixture = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("tests/fixtures/cli_responses_fixture.sse"); + + // 1) First run: create a session with a unique marker in the content. + let marker = format!("resume-last-{}", Uuid::new_v4()); + let prompt = format!("echo {marker}"); + + Command::cargo_bin("codex-exec") + .context("should find binary for codex-exec")? + .env("CODEX_HOME", home.path()) + .env("OPENAI_API_KEY", "dummy") + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("-C") + .arg(env!("CARGO_MANIFEST_DIR")) + .arg(&prompt) + .assert() + .success(); + + // Find the created session file containing the marker. + let sessions_dir = home.path().join("sessions"); + let path = find_session_file_containing_marker(&sessions_dir, &marker) + .expect("no session file found after first run"); + + // 2) Second run: resume the most recent file with a new marker. + let marker2 = format!("resume-last-2-{}", Uuid::new_v4()); + let prompt2 = format!("echo {marker2}"); + + let mut binding = assert_cmd::Command::cargo_bin("codex-exec") + .context("should find binary for codex-exec")?; + let cmd = binding + .env("CODEX_HOME", home.path()) + .env("OPENAI_API_KEY", "dummy") + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("-C") + .arg(env!("CARGO_MANIFEST_DIR")) + .arg(&prompt2) + .arg("resume") + .arg("--last"); + cmd.assert().success(); + + // Ensure the same file was updated and contains both markers. + let resumed_path = find_session_file_containing_marker(&sessions_dir, &marker2) + .expect("no resumed session file containing marker2"); + assert_eq!( + resumed_path, path, + "resume --last should append to existing file" + ); + let content = std::fs::read_to_string(&resumed_path)?; + assert!(content.contains(&marker)); + assert!(content.contains(&marker2)); + Ok(()) +} + +#[test] +fn exec_resume_by_id_appends_to_existing_file() -> anyhow::Result<()> { + let home = TempDir::new()?; + let fixture = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("tests/fixtures/cli_responses_fixture.sse"); + + // 1) First run: create a session + let marker = format!("resume-by-id-{}", Uuid::new_v4()); + let prompt = format!("echo {marker}"); + + Command::cargo_bin("codex-exec") + .context("should find binary for codex-exec")? + .env("CODEX_HOME", home.path()) + .env("OPENAI_API_KEY", "dummy") + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("-C") + .arg(env!("CARGO_MANIFEST_DIR")) + .arg(&prompt) + .assert() + .success(); + + let sessions_dir = home.path().join("sessions"); + let path = find_session_file_containing_marker(&sessions_dir, &marker) + .expect("no session file found after first run"); + let session_id = extract_conversation_id(&path); + assert!( + !session_id.is_empty(), + "missing conversation id in meta line" + ); + + // 2) Resume by id + let marker2 = format!("resume-by-id-2-{}", Uuid::new_v4()); + let prompt2 = format!("echo {marker2}"); + + let mut binding = assert_cmd::Command::cargo_bin("codex-exec") + .context("should find binary for codex-exec")?; + let cmd = binding + .env("CODEX_HOME", home.path()) + .env("OPENAI_API_KEY", "dummy") + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("-C") + .arg(env!("CARGO_MANIFEST_DIR")) + .arg(&prompt2) + .arg("resume") + .arg(&session_id); + cmd.assert().success(); + + let resumed_path = find_session_file_containing_marker(&sessions_dir, &marker2) + .expect("no resumed session file containing marker2"); + assert_eq!( + resumed_path, path, + "resume by id should append to existing file" + ); + let content = std::fs::read_to_string(&resumed_path)?; + assert!(content.contains(&marker)); + assert!(content.contains(&marker2)); + Ok(()) +} + +#[test] +fn exec_resume_preserves_cli_configuration_overrides() -> anyhow::Result<()> { + let home = TempDir::new()?; + let fixture = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("tests/fixtures/cli_responses_fixture.sse"); + + let marker = format!("resume-config-{}", Uuid::new_v4()); + let prompt = format!("echo {marker}"); + + Command::cargo_bin("codex-exec") + .context("should find binary for codex-exec")? + .env("CODEX_HOME", home.path()) + .env("OPENAI_API_KEY", "dummy") + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("--sandbox") + .arg("workspace-write") + .arg("--model") + .arg("gpt-5") + .arg("-C") + .arg(env!("CARGO_MANIFEST_DIR")) + .arg(&prompt) + .assert() + .success(); + + let sessions_dir = home.path().join("sessions"); + let path = find_session_file_containing_marker(&sessions_dir, &marker) + .expect("no session file found after first run"); + + let marker2 = format!("resume-config-2-{}", Uuid::new_v4()); + let prompt2 = format!("echo {marker2}"); + + let output = Command::cargo_bin("codex-exec") + .context("should find binary for codex-exec")? + .env("CODEX_HOME", home.path()) + .env("OPENAI_API_KEY", "dummy") + .env("CODEX_RS_SSE_FIXTURE", &fixture) + .env("OPENAI_BASE_URL", "http://unused.local") + .arg("--skip-git-repo-check") + .arg("--sandbox") + .arg("workspace-write") + .arg("--model") + .arg("gpt-5-high") + .arg("-C") + .arg(env!("CARGO_MANIFEST_DIR")) + .arg(&prompt2) + .arg("resume") + .arg("--last") + .output() + .context("resume run should succeed")?; + + assert!(output.status.success(), "resume run failed: {output:?}"); + + let stdout = String::from_utf8(output.stdout)?; + assert!( + stdout.contains("model: gpt-5-high"), + "stdout missing model override: {stdout}" + ); + assert!( + stdout.contains("sandbox: workspace-write"), + "stdout missing sandbox override: {stdout}" + ); + + let resumed_path = find_session_file_containing_marker(&sessions_dir, &marker2) + .expect("no resumed session file containing marker2"); + assert_eq!(resumed_path, path, "resume should append to same file"); + + let content = std::fs::read_to_string(&resumed_path)?; + assert!(content.contains(&marker)); + assert!(content.contains(&marker2)); + Ok(()) +} diff --git a/codex-rs/execpolicy/Cargo.toml b/codex-rs/execpolicy/Cargo.toml index e0e3d75e42..9f0a25c422 100644 --- a/codex-rs/execpolicy/Cargo.toml +++ b/codex-rs/execpolicy/Cargo.toml @@ -1,7 +1,7 @@ [package] +edition = "2024" name = "codex-execpolicy" version = { workspace = true } -edition = "2024" [[bin]] name = "codex-execpolicy" @@ -15,9 +15,8 @@ path = "src/lib.rs" workspace = true [dependencies] -anyhow = "1" -starlark = "0.13.0" allocative = "0.3.3" +anyhow = "1" clap = { version = "4", features = ["derive"] } derive_more = { version = "2", features = ["display"] } env_logger = "0.11.5" @@ -25,9 +24,10 @@ log = "0.4" multimap = "0.10.0" path-absolutize = "3.1.1" regex-lite = "0.1" -serde = { version = "1.0.194", features = ["derive"] } -serde_json = "1.0.143" +serde = { version = "1", features = ["derive"] } +serde_json = "1" serde_with = { version = "3", features = ["macros"] } +starlark = "0.13.0" [dev-dependencies] tempfile = "3.13.0" diff --git a/codex-rs/file-search/Cargo.toml b/codex-rs/file-search/Cargo.toml index f02d8402aa..023e6936c8 100644 --- a/codex-rs/file-search/Cargo.toml +++ b/codex-rs/file-search/Cargo.toml @@ -17,5 +17,5 @@ clap = { version = "4", features = ["derive"] } ignore = "0.4.23" nucleo-matcher = "0.3.1" serde = { version = "1", features = ["derive"] } -serde_json = "1.0.143" +serde_json = "1" tokio = { version = "1", features = ["full"] } diff --git a/codex-rs/justfile b/codex-rs/justfile index e47ad1a2bd..850737efd6 100644 --- a/codex-rs/justfile +++ b/codex-rs/justfile @@ -31,6 +31,13 @@ install: rustup show active-toolchain cargo fetch +# Run `cargo nextest` since it's faster than `cargo test`, though including +# --no-fail-fast is important to ensure all tests are run. +# +# Run `cargo install cargo-nextest` if you don't have it installed. +test: + cargo nextest run --no-fail-fast + # Run the MCP server mcp-server-run *args: cargo run -p codex-mcp-server -- "$@" diff --git a/codex-rs/linux-sandbox/tests/suite/landlock.rs b/codex-rs/linux-sandbox/tests/suite/landlock.rs index 8faa02d158..fddb43c38e 100644 --- a/codex-rs/linux-sandbox/tests/suite/landlock.rs +++ b/codex-rs/linux-sandbox/tests/suite/landlock.rs @@ -121,7 +121,7 @@ async fn test_writable_root() { } #[tokio::test] -#[should_panic(expected = "Sandbox(Timeout)")] +#[should_panic(expected = "Sandbox(Timeout")] async fn test_timeout() { run_cmd(&["sleep", "2"], &[], 50).await; } @@ -156,26 +156,27 @@ async fn assert_network_blocked(cmd: &[&str]) { ) .await; - let (exit_code, stdout, stderr) = match result { - Ok(output) => (output.exit_code, output.stdout.text, output.stderr.text), - Err(CodexErr::Sandbox(SandboxErr::Denied(exit_code, stdout, stderr))) => { - (exit_code, stdout, stderr) - } + let output = match result { + Ok(output) => output, + Err(CodexErr::Sandbox(SandboxErr::Denied { output })) => *output, _ => { panic!("expected sandbox denied error, got: {result:?}"); } }; - dbg!(&stderr); - dbg!(&stdout); - dbg!(&exit_code); + dbg!(&output.stderr.text); + dbg!(&output.stdout.text); + dbg!(&output.exit_code); // A completely missing binary exits with 127. Anything else should also // be non‑zero (EPERM from seccomp will usually bubble up as 1, 2, 13…) // If—*and only if*—the command exits 0 we consider the sandbox breached. - if exit_code == 0 { - panic!("Network sandbox FAILED - {cmd:?} exited 0\nstdout:\n{stdout}\nstderr:\n{stderr}",); + if output.exit_code == 0 { + panic!( + "Network sandbox FAILED - {cmd:?} exited 0\nstdout:\n{}\nstderr:\n{}", + output.stdout.text, output.stderr.text + ); } } diff --git a/codex-rs/login/src/server.rs b/codex-rs/login/src/server.rs index 2cf1189f4c..26f341b9d9 100644 --- a/codex-rs/login/src/server.rs +++ b/codex-rs/login/src/server.rs @@ -238,8 +238,8 @@ async fn process_request( &opts.codex_home, api_key.clone(), tokens.id_token.clone(), - Some(tokens.access_token.clone()), - Some(tokens.refresh_token.clone()), + tokens.access_token.clone(), + tokens.refresh_token.clone(), ) .await { @@ -446,8 +446,8 @@ async fn persist_tokens_async( codex_home: &Path, api_key: Option, id_token: String, - access_token: Option, - refresh_token: Option, + access_token: String, + refresh_token: String, ) -> io::Result<()> { // Reuse existing synchronous logic but run it off the async runtime. let codex_home = codex_home.to_path_buf(); @@ -459,43 +459,29 @@ async fn persist_tokens_async( std::fs::create_dir_all(parent).map_err(io::Error::other)?; } - let mut auth = read_or_default(&auth_file); - if let Some(key) = api_key { - auth.openai_api_key = Some(key); - } - let tokens = auth.tokens.get_or_insert_with(TokenData::default); - tokens.id_token = parse_id_token(&id_token).map_err(io::Error::other)?; - // Persist chatgpt_account_id if present in claims + let mut tokens = TokenData { + id_token: parse_id_token(&id_token).map_err(io::Error::other)?, + access_token, + refresh_token, + account_id: None, + }; if let Some(acc) = jwt_auth_claims(&id_token) .get("chatgpt_account_id") .and_then(|v| v.as_str()) { tokens.account_id = Some(acc.to_string()); } - if let Some(at) = access_token { - tokens.access_token = at; - } - if let Some(rt) = refresh_token { - tokens.refresh_token = rt; - } - auth.last_refresh = Some(Utc::now()); + let auth = AuthDotJson { + openai_api_key: api_key, + tokens: Some(tokens), + last_refresh: Some(Utc::now()), + }; codex_core::auth::write_auth_json(&auth_file, &auth) }) .await .map_err(|e| io::Error::other(format!("persist task failed: {e}")))? } -fn read_or_default(path: &Path) -> AuthDotJson { - match codex_core::auth::try_read_auth_json(path) { - Ok(auth) => auth, - Err(_) => AuthDotJson { - openai_api_key: None, - tokens: None, - last_refresh: None, - }, - } -} - fn compose_success_url(port: u16, issuer: &str, id_token: &str, access_token: &str) -> String { let token_claims = jwt_auth_claims(id_token); let access_claims = jwt_auth_claims(access_token); diff --git a/codex-rs/login/tests/suite/login_server_e2e.rs b/codex-rs/login/tests/suite/login_server_e2e.rs index 9309ef4123..dd2cb9048d 100644 --- a/codex-rs/login/tests/suite/login_server_e2e.rs +++ b/codex-rs/login/tests/suite/login_server_e2e.rs @@ -90,6 +90,22 @@ async fn end_to_end_login_flow_persists_auth_json() { let tmp = tempdir().unwrap(); let codex_home = tmp.path().to_path_buf(); + // Seed auth.json with stale API key + tokens that should be overwritten. + let stale_auth = serde_json::json!({ + "OPENAI_API_KEY": "sk-stale", + "tokens": { + "id_token": "stale.header.payload", + "access_token": "stale-access", + "refresh_token": "stale-refresh", + "account_id": "stale-acc" + } + }); + std::fs::write( + codex_home.join("auth.json"), + serde_json::to_string_pretty(&stale_auth).unwrap(), + ) + .unwrap(); + let state = "test_state_123".to_string(); // Run server in background @@ -122,10 +138,10 @@ async fn end_to_end_login_flow_persists_auth_json() { let auth_path = codex_home.join("auth.json"); let data = std::fs::read_to_string(&auth_path).unwrap(); let json: serde_json::Value = serde_json::from_str(&data).unwrap(); - assert!( - !json["OPENAI_API_KEY"].is_null(), - "OPENAI_API_KEY should be set" - ); + // The following assert is here because of the old oauth flow that exchanges tokens for an + // API key. See obtain_api_key in server.rs for details. Once we remove this old mechanism + // from the code, this test should be updated to expect that the API key is no longer present. + assert_eq!(json["OPENAI_API_KEY"], "access-123"); assert_eq!(json["tokens"]["access_token"], "access-123"); assert_eq!(json["tokens"]["refresh_token"], "refresh-123"); assert_eq!(json["tokens"]["account_id"], "acc-123"); diff --git a/codex-rs/mcp-server/src/codex_message_processor.rs b/codex-rs/mcp-server/src/codex_message_processor.rs index 6cd6fdeca8..ceb47889be 100644 --- a/codex-rs/mcp-server/src/codex_message_processor.rs +++ b/codex-rs/mcp-server/src/codex_message_processor.rs @@ -20,7 +20,7 @@ use codex_core::config::ConfigToml; use codex_core::config::load_config_as_toml; use codex_core::config_edit::CONFIG_KEY_EFFORT; use codex_core::config_edit::CONFIG_KEY_MODEL; -use codex_core::config_edit::persist_non_null_overrides; +use codex_core::config_edit::persist_overrides_and_clear_if_none; use codex_core::default_client::get_codex_user_agent; use codex_core::exec::ExecParams; use codex_core::exec_env::create_env; @@ -423,32 +423,41 @@ impl CodexMessageProcessor { // Determine whether auth is required based on the active model provider. // If a custom provider is configured with `requires_openai_auth == false`, // then no auth step is required; otherwise, default to requiring auth. - let requires_openai_auth = Some(self.config.model_provider.requires_openai_auth); + let requires_openai_auth = self.config.model_provider.requires_openai_auth; - let response = match self.auth_manager.auth() { - Some(auth) => { - let (reported_auth_method, token_opt) = match auth.get_token().await { - Ok(token) if !token.is_empty() => { - let tok = if include_token { Some(token) } else { None }; - (Some(auth.mode), tok) - } - Ok(_) => (None, None), - Err(err) => { - tracing::warn!("failed to get token for auth status: {err}"); - (None, None) - } - }; - codex_protocol::mcp_protocol::GetAuthStatusResponse { - auth_method: reported_auth_method, - auth_token: token_opt, - requires_openai_auth, - } - } - None => codex_protocol::mcp_protocol::GetAuthStatusResponse { + let response = if !requires_openai_auth { + codex_protocol::mcp_protocol::GetAuthStatusResponse { auth_method: None, auth_token: None, - requires_openai_auth, - }, + requires_openai_auth: Some(false), + } + } else { + match self.auth_manager.auth() { + Some(auth) => { + let auth_mode = auth.mode; + let (reported_auth_method, token_opt) = match auth.get_token().await { + Ok(token) if !token.is_empty() => { + let tok = if include_token { Some(token) } else { None }; + (Some(auth_mode), tok) + } + Ok(_) => (None, None), + Err(err) => { + tracing::warn!("failed to get token for auth status: {err}"); + (None, None) + } + }; + codex_protocol::mcp_protocol::GetAuthStatusResponse { + auth_method: reported_auth_method, + auth_token: token_opt, + requires_openai_auth: Some(true), + } + } + None => codex_protocol::mcp_protocol::GetAuthStatusResponse { + auth_method: None, + auth_token: None, + requires_openai_auth: Some(true), + }, + } }; self.outgoing.send_response(request_id, response).await; @@ -519,7 +528,7 @@ impl CodexMessageProcessor { (&[CONFIG_KEY_EFFORT], effort_str.as_deref()), ]; - match persist_non_null_overrides( + match persist_overrides_and_clear_if_none( &self.config.codex_home, self.config.active_profile.as_deref(), &overrides, @@ -1248,6 +1257,7 @@ fn derive_config_from_params( } = params; let overrides = ConfigOverrides { model, + review_model: None, config_profile: profile, cwd: cwd.map(PathBuf::from), approval_policy, diff --git a/codex-rs/mcp-server/src/codex_tool_config.rs b/codex-rs/mcp-server/src/codex_tool_config.rs index 7b635d2dc3..d90924aa94 100644 --- a/codex-rs/mcp-server/src/codex_tool_config.rs +++ b/codex-rs/mcp-server/src/codex_tool_config.rs @@ -152,6 +152,7 @@ impl CodexToolCallParam { // Build the `ConfigOverrides` recognized by codex-core. let overrides = codex_core::config::ConfigOverrides { model, + review_model: None, config_profile: profile, cwd: cwd.map(PathBuf::from), approval_policy: approval_policy.map(Into::into), diff --git a/codex-rs/mcp-server/src/codex_tool_runner.rs b/codex-rs/mcp-server/src/codex_tool_runner.rs index 226408f805..db48da28e2 100644 --- a/codex-rs/mcp-server/src/codex_tool_runner.rs +++ b/codex-rs/mcp-server/src/codex_tool_runner.rs @@ -279,7 +279,9 @@ async fn run_codex_tool_session_inner( | EventMsg::TurnAborted(_) | EventMsg::ConversationPath(_) | EventMsg::UserMessage(_) - | EventMsg::ShutdownComplete => { + | EventMsg::ShutdownComplete + | EventMsg::EnteredReviewMode(_) + | EventMsg::ExitedReviewMode(_) => { // For now, we do not do anything extra for these // events. Note that // send(codex_event_to_notification(&event)) above has diff --git a/codex-rs/mcp-server/src/outgoing_message.rs b/codex-rs/mcp-server/src/outgoing_message.rs index 04e99516ce..90e7f9d26a 100644 --- a/codex-rs/mcp-server/src/outgoing_message.rs +++ b/codex-rs/mcp-server/src/outgoing_message.rs @@ -280,7 +280,7 @@ mod tests { msg: EventMsg::SessionConfigured(SessionConfiguredEvent { session_id: conversation_id, model: "gpt-4o".to_string(), - reasoning_effort: ReasoningEffort::default(), + reasoning_effort: Some(ReasoningEffort::default()), history_log_id: 1, history_entry_count: 1000, initial_messages: None, @@ -314,7 +314,7 @@ mod tests { let session_configured_event = SessionConfiguredEvent { session_id: conversation_id, model: "gpt-4o".to_string(), - reasoning_effort: ReasoningEffort::default(), + reasoning_effort: Some(ReasoningEffort::default()), history_log_id: 1, history_entry_count: 1000, initial_messages: None, diff --git a/codex-rs/mcp-server/tests/suite/auth.rs b/codex-rs/mcp-server/tests/suite/auth.rs index a3ccd33946..6681fd7546 100644 --- a/codex-rs/mcp-server/tests/suite/auth.rs +++ b/codex-rs/mcp-server/tests/suite/auth.rs @@ -15,11 +15,17 @@ use tokio::time::timeout; const DEFAULT_READ_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(10); -// Helper to create a config.toml; mirrors create_conversation.rs -fn create_config_toml(codex_home: &Path) -> std::io::Result<()> { +fn create_config_toml_custom_provider( + codex_home: &Path, + requires_openai_auth: bool, +) -> std::io::Result<()> { let config_toml = codex_home.join("config.toml"); - std::fs::write( - config_toml, + let requires_line = if requires_openai_auth { + "requires_openai_auth = true\n" + } else { + "" + }; + let contents = format!( r#" model = "mock-model" approval_policy = "never" @@ -33,6 +39,20 @@ base_url = "http://127.0.0.1:0/v1" wire_api = "chat" request_max_retries = 0 stream_max_retries = 0 +{requires_line} +"# + ); + std::fs::write(config_toml, contents) +} + +fn create_config_toml(codex_home: &Path) -> std::io::Result<()> { + let config_toml = codex_home.join("config.toml"); + std::fs::write( + config_toml, + r#" +model = "mock-model" +approval_policy = "never" +sandbox_mode = "danger-full-access" "#, ) } @@ -124,6 +144,47 @@ async fn get_auth_status_with_api_key() { assert_eq!(status.auth_token, Some("sk-test-key".to_string())); } +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn get_auth_status_with_api_key_when_auth_not_required() { + let codex_home = TempDir::new().unwrap_or_else(|e| panic!("create tempdir: {e}")); + create_config_toml_custom_provider(codex_home.path(), false) + .unwrap_or_else(|err| panic!("write config.toml: {err}")); + + let mut mcp = McpProcess::new(codex_home.path()) + .await + .expect("spawn mcp process"); + timeout(DEFAULT_READ_TIMEOUT, mcp.initialize()) + .await + .expect("init timeout") + .expect("init failed"); + + login_with_api_key_via_request(&mut mcp, "sk-test-key").await; + + let request_id = mcp + .send_get_auth_status_request(GetAuthStatusParams { + include_token: Some(true), + refresh_token: Some(false), + }) + .await + .expect("send getAuthStatus"); + + let resp: JSONRPCResponse = timeout( + DEFAULT_READ_TIMEOUT, + mcp.read_stream_until_response_message(RequestId::Integer(request_id)), + ) + .await + .expect("getAuthStatus timeout") + .expect("getAuthStatus response"); + let status: GetAuthStatusResponse = to_response(resp).expect("deserialize status"); + assert_eq!(status.auth_method, None, "expected no auth method"); + assert_eq!(status.auth_token, None, "expected no token"); + assert_eq!( + status.requires_openai_auth, + Some(false), + "requires_openai_auth should be false", + ); +} + #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn get_auth_status_with_api_key_no_include_token() { let codex_home = TempDir::new().unwrap_or_else(|e| panic!("create tempdir: {e}")); diff --git a/codex-rs/mcp-server/tests/suite/codex_message_processor_flow.rs b/codex-rs/mcp-server/tests/suite/codex_message_processor_flow.rs index 49d9ab1807..50a480b4a0 100644 --- a/codex-rs/mcp-server/tests/suite/codex_message_processor_flow.rs +++ b/codex-rs/mcp-server/tests/suite/codex_message_processor_flow.rs @@ -320,7 +320,7 @@ async fn test_send_user_turn_changes_approval_policy_behavior() { approval_policy: AskForApproval::Never, sandbox_policy: SandboxPolicy::new_read_only_policy(), model: "mock-model".to_string(), - effort: ReasoningEffort::Medium, + effort: Some(ReasoningEffort::Medium), summary: ReasoningSummary::Auto, }) .await diff --git a/codex-rs/mcp-server/tests/suite/set_default_model.rs b/codex-rs/mcp-server/tests/suite/set_default_model.rs index e11b69ed2d..7ffee3438d 100644 --- a/codex-rs/mcp-server/tests/suite/set_default_model.rs +++ b/codex-rs/mcp-server/tests/suite/set_default_model.rs @@ -1,5 +1,6 @@ +use std::path::Path; + use codex_core::config::ConfigToml; -use codex_protocol::config_types::ReasoningEffort; use codex_protocol::mcp_protocol::SetDefaultModelParams; use codex_protocol::mcp_protocol::SetDefaultModelResponse; use mcp_test_support::McpProcess; @@ -14,7 +15,8 @@ const DEFAULT_READ_TIMEOUT: std::time::Duration = std::time::Duration::from_secs #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn set_default_model_persists_overrides() { - let codex_home = TempDir::new().unwrap_or_else(|e| panic!("create tempdir: {e}")); + let codex_home = TempDir::new().expect("create tempdir"); + create_config_toml(codex_home.path()).expect("write config.toml"); let mut mcp = McpProcess::new(codex_home.path()) .await @@ -25,8 +27,8 @@ async fn set_default_model_persists_overrides() { .expect("init failed"); let params = SetDefaultModelParams { - model: Some("o4-mini".to_string()), - reasoning_effort: Some(ReasoningEffort::High), + model: Some("gpt-4.1".to_string()), + reasoning_effort: None, }; let request_id = mcp @@ -53,10 +55,22 @@ async fn set_default_model_persists_overrides() { assert_eq!( ConfigToml { - model: Some("o4-mini".to_string()), - model_reasoning_effort: Some(ReasoningEffort::High), + model: Some("gpt-4.1".to_string()), + model_reasoning_effort: None, ..Default::default() }, config_toml, ); } + +// Helper to create a config.toml; mirrors create_conversation.rs +fn create_config_toml(codex_home: &Path) -> std::io::Result<()> { + let config_toml = codex_home.join("config.toml"); + std::fs::write( + config_toml, + r#" +model = "gpt-5" +model_reasoning_effort = "medium" +"#, + ) +} diff --git a/codex-rs/protocol/src/mcp_protocol.rs b/codex-rs/protocol/src/mcp_protocol.rs index 42f38d46bd..fe77d20b66 100644 --- a/codex-rs/protocol/src/mcp_protocol.rs +++ b/codex-rs/protocol/src/mcp_protocol.rs @@ -223,7 +223,8 @@ pub struct NewConversationResponse { pub conversation_id: ConversationId, pub model: String, /// Note this could be ignored by the model. - pub reasoning_effort: ReasoningEffort, + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_effort: Option, pub rollout_path: PathBuf, } @@ -424,8 +425,11 @@ pub struct GetUserSavedConfigResponse { #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, TS)] #[serde(rename_all = "camelCase")] pub struct SetDefaultModelParams { + /// If set to None, this means `model` should be cleared in config.toml. #[serde(skip_serializing_if = "Option::is_none")] pub model: Option, + /// If set to None, this means `model_reasoning_effort` should be cleared + /// in config.toml. #[serde(skip_serializing_if = "Option::is_none")] pub reasoning_effort: Option, } @@ -523,7 +527,8 @@ pub struct SendUserTurnParams { pub approval_policy: AskForApproval, pub sandbox_policy: SandboxPolicy, pub model: String, - pub effort: ReasoningEffort, + #[serde(skip_serializing_if = "Option::is_none")] + pub effort: Option, pub summary: ReasoningSummary, } diff --git a/codex-rs/protocol/src/protocol.rs b/codex-rs/protocol/src/protocol.rs index 134059e978..c3aebcdd42 100644 --- a/codex-rs/protocol/src/protocol.rs +++ b/codex-rs/protocol/src/protocol.rs @@ -15,6 +15,7 @@ use crate::config_types::ReasoningSummary as ReasoningSummaryConfig; use crate::custom_prompts::CustomPrompt; use crate::mcp_protocol::ConversationId; use crate::message_history::HistoryEntry; +use crate::models::ContentItem; use crate::models::ResponseItem; use crate::num_format::format_with_separators; use crate::parse_command::ParsedCommand; @@ -81,7 +82,8 @@ pub enum Op { model: String, /// Will only be honored if the model is configured to use reasoning. - effort: ReasoningEffortConfig, + #[serde(skip_serializing_if = "Option::is_none")] + effort: Option, /// Will only be honored if the model is configured to use reasoning. summary: ReasoningSummaryConfig, @@ -111,8 +113,11 @@ pub enum Op { model: Option, /// Updated reasoning effort (honored only for reasoning-capable models). + /// + /// Use `Some(Some(_))` to set a specific effort, `Some(None)` to clear + /// the effort, or `None` to leave the existing value unchanged. #[serde(skip_serializing_if = "Option::is_none")] - effort: Option, + effort: Option>, /// Updated reasoning summary preference (honored only for reasoning-capable models). #[serde(skip_serializing_if = "Option::is_none")] @@ -162,6 +167,10 @@ pub enum Op { /// The agent will use its existing context (either conversation history or previous response id) /// to generate a summary which will be returned as an AgentMessage event. Compact, + + /// Request a code review from the agent. + Review { review_request: ReviewRequest }, + /// Request to shut down codex instance. Shutdown, } @@ -405,6 +414,7 @@ pub struct Event { } /// Response event from the agent +/// NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen. #[derive(Debug, Clone, Deserialize, Serialize, Display, TS)] #[serde(tag = "type", rename_all = "snake_case")] #[strum(serialize_all = "snake_case")] @@ -500,6 +510,17 @@ pub enum EventMsg { ShutdownComplete, ConversationPath(ConversationPathResponseEvent), + + /// Entered review mode. + EnteredReviewMode(ReviewRequest), + + /// Exited review mode with an optional final result to apply. + ExitedReviewMode(ExitedReviewModeEvent), +} + +#[derive(Debug, Clone, Deserialize, Serialize, TS)] +pub struct ExitedReviewModeEvent { + pub review_output: Option, } // Individual event payload types matching each `EventMsg` variant. @@ -708,12 +729,12 @@ where let (_role, message) = value; let message = message.as_ref(); let trimmed = message.trim(); - if trimmed.starts_with(ENVIRONMENT_CONTEXT_OPEN_TAG) - && trimmed.ends_with(ENVIRONMENT_CONTEXT_CLOSE_TAG) + if starts_with_ignore_ascii_case(trimmed, ENVIRONMENT_CONTEXT_OPEN_TAG) + && ends_with_ignore_ascii_case(trimmed, ENVIRONMENT_CONTEXT_CLOSE_TAG) { InputMessageKind::EnvironmentContext - } else if trimmed.starts_with(USER_INSTRUCTIONS_OPEN_TAG) - && trimmed.ends_with(USER_INSTRUCTIONS_CLOSE_TAG) + } else if starts_with_ignore_ascii_case(trimmed, USER_INSTRUCTIONS_OPEN_TAG) + && ends_with_ignore_ascii_case(trimmed, USER_INSTRUCTIONS_CLOSE_TAG) { InputMessageKind::UserInstructions } else { @@ -722,6 +743,26 @@ where } } +fn starts_with_ignore_ascii_case(text: &str, prefix: &str) -> bool { + let text_bytes = text.as_bytes(); + let prefix_bytes = prefix.as_bytes(); + text_bytes.len() >= prefix_bytes.len() + && text_bytes + .iter() + .zip(prefix_bytes.iter()) + .all(|(a, b)| a.eq_ignore_ascii_case(b)) +} + +fn ends_with_ignore_ascii_case(text: &str, suffix: &str) -> bool { + let text_bytes = text.as_bytes(); + let suffix_bytes = suffix.as_bytes(); + text_bytes.len() >= suffix_bytes.len() + && text_bytes[text_bytes.len() - suffix_bytes.len()..] + .iter() + .zip(suffix_bytes.iter()) + .all(|(a, b)| a.eq_ignore_ascii_case(b)) +} + #[derive(Debug, Clone, Deserialize, Serialize, TS)] pub struct AgentMessageDeltaEvent { pub delta: String, @@ -828,26 +869,7 @@ impl InitialHistory { InitialHistory::Forked(items) => items.clone(), } } - pub fn get_response_items(&self) -> Vec { - match self { - InitialHistory::New => Vec::new(), - InitialHistory::Resumed(resumed) => resumed - .history - .iter() - .filter_map(|ri| match ri { - RolloutItem::ResponseItem(item) => Some(item.clone()), - _ => None, - }) - .collect(), - InitialHistory::Forked(items) => items - .iter() - .filter_map(|ri| match ri { - RolloutItem::ResponseItem(item) => Some(item.clone()), - _ => None, - }) - .collect(), - } - } + pub fn get_event_msgs(&self) -> Option> { match self { InitialHistory::New => None, @@ -907,13 +929,26 @@ pub struct CompactedItem { pub message: String, } +impl From for ResponseItem { + fn from(value: CompactedItem) -> Self { + ResponseItem::Message { + id: None, + role: "assistant".to_string(), + content: vec![ContentItem::OutputText { + text: value.message, + }], + } + } +} + #[derive(Serialize, Deserialize, Clone, Debug, TS)] pub struct TurnContextItem { pub cwd: PathBuf, pub approval_policy: AskForApproval, pub sandbox_policy: SandboxPolicy, pub model: String, - pub effort: ReasoningEffortConfig, + #[serde(skip_serializing_if = "Option::is_none")] + pub effort: Option, pub summary: ReasoningSummaryConfig, } @@ -937,6 +972,57 @@ pub struct GitInfo { pub repository_url: Option, } +/// Review request sent to the review session. +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, TS)] +pub struct ReviewRequest { + pub prompt: String, + pub user_facing_hint: String, +} + +/// Structured review result produced by a child review session. +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, TS)] +pub struct ReviewOutputEvent { + pub findings: Vec, + pub overall_correctness: String, + pub overall_explanation: String, + pub overall_confidence_score: f32, +} + +impl Default for ReviewOutputEvent { + fn default() -> Self { + Self { + findings: Vec::new(), + overall_correctness: String::default(), + overall_explanation: String::default(), + overall_confidence_score: 0.0, + } + } +} + +/// A single review finding describing an observed issue or recommendation. +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, TS)] +pub struct ReviewFinding { + pub title: String, + pub body: String, + pub confidence_score: f32, + pub priority: i32, + pub code_location: ReviewCodeLocation, +} + +/// Location of the code related to a review finding. +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, TS)] +pub struct ReviewCodeLocation { + pub absolute_file_path: PathBuf, + pub line_range: ReviewLineRange, +} + +/// Inclusive line range in a file associated with the finding. +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, TS)] +pub struct ReviewLineRange { + pub start: u32, + pub end: u32, +} + #[derive(Debug, Clone, Deserialize, Serialize, TS)] pub struct ExecCommandBeginEvent { /// Identifier so this can be paired with the ExecCommandEnd event. @@ -1082,7 +1168,8 @@ pub struct SessionConfiguredEvent { pub model: String, /// The effort the model is putting into reasoning about the user's request. - pub reasoning_effort: ReasoningEffortConfig, + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning_effort: Option, /// Identifier of the history log file (inode on Unix, 0 otherwise). pub history_log_id: u64, @@ -1172,7 +1259,7 @@ mod tests { msg: EventMsg::SessionConfigured(SessionConfiguredEvent { session_id: conversation_id, model: "codex-mini-latest".to_string(), - reasoning_effort: ReasoningEffortConfig::default(), + reasoning_effort: Some(ReasoningEffortConfig::default()), history_log_id: 0, history_entry_count: 0, initial_messages: None, diff --git a/codex-rs/tui/Cargo.toml b/codex-rs/tui/Cargo.toml index 88e68875d4..06e892b720 100644 --- a/codex-rs/tui/Cargo.toml +++ b/codex-rs/tui/Cargo.toml @@ -43,6 +43,7 @@ crossterm = { version = "0.28.1", features = [ "bracketed-paste", "event-stream", ] } +dirs = "6" diffy = "0.4.2" image = { version = "^0.25.8", default-features = false, features = [ "jpeg", @@ -78,7 +79,7 @@ tokio = { version = "1", features = [ tokio-stream = "0.1.17" tracing = { version = "0.1.41", features = ["log"] } tracing-appender = "0.2.3" -tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } +tracing-subscriber = { version = "0.3.20", features = ["env-filter"] } pulldown-cmark = "0.10" unicode-segmentation = "1.12.0" unicode-width = "0.1" diff --git a/codex-rs/tui/frames/blocks/frame_1.txt b/codex-rs/tui/frames/blocks/frame_1.txt new file mode 100644 index 0000000000..8c3263f518 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_1.txt @@ -0,0 +1,17 @@ + + ▒▓▒▓▒██▒▒██▒ + ▒▒█▓█▒█▓█▒▒░░▒▒ ▒ █▒ + █░█░███ ▒░ ░ █░ ░▒░░░█ + ▓█▒▒████▒ ▓█░▓░█ + ▒▒▓▓█▒░▒░▒▒ ▓░▒▒█ + ░█ █░ ░█▓▓░░█ █▓▒░░█ + █▒ ▓█ █▒░█▓ ░▒ ░▓░ + ░░▒░░ █▓▓░▓░█ ░░ + ░▒░█░ ▓░░▒▒░ ▓░██████▒██ ▒ ░ + ▒░▓█ ▒▓█░ ▓█ ░ ░▒▒▒▓▓███░▓█▓█░ + ▒▒▒ ▒ ▒▒█▓▓░ ░▒████ ▒█ ▓█▓▒▓ + █▒█ █ ░ ██▓█▒░ + ▒▒█░▒█▒ ▒▒▒█░▒█ + ▒██▒▒ ██▓▓▒▓▓▓▒██▒█░█ + ░█ █░░░▒▒▒█▒▓██ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_10.txt b/codex-rs/tui/frames/blocks/frame_10.txt new file mode 100644 index 0000000000..a6fbbf1a4b --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_10.txt @@ -0,0 +1,17 @@ + + ▒████▒██▒ + ██░███▒░▓▒██ + ▒▒█░░▓░░▓░█▒██ + ░▒▒▓▒░▓▒▓▒███▒▒█ + ▓ ▓░░ ░▒ ██▓▒▓░▓ + ░░ █░█░▓▓▒ ░▒ ░ + ▒ ░█ █░░░░█ ░▓█ + ░░▒█▓█░░▓▒░▓▒░░ + ░▒ ▒▒░▓░░█▒█▓░░ + ░ █░▒█░▒▓▒█▒▒▒░█░ + █ ░░░░░ ▒█ ▒░░ + ▒░██▒██ ▒░ █▓▓ + ░█ ░░░░██▓█▓░▓░ + ▓░██▓░█▓▒ ▓▓█ + ██ ▒█▒▒█▓█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_11.txt b/codex-rs/tui/frames/blocks/frame_11.txt new file mode 100644 index 0000000000..88e3dfa7c5 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_11.txt @@ -0,0 +1,17 @@ + + ███████▒ + ▓ ▓░░░▒▒█ + ▓ ▒▒░░▓▒█▓▒█ + ░▒▒░░▒▓█▒▒▓▓ + ▒ ▓▓▒░█▒█▓▒░░█ + ░█░░░█▒▓▓░▒▓░░ + ██ █░░░░░░▒░▒▒ + ░ ░░▓░░▒▓ ░ ░ + ▓ █░▓░░█▓█░▒░ + ██ ▒░▓▒█ ▓░▒░▒ + █░▓ ░░░░▒▓░▒▒░ + ▒▒▓▓░▒█▓██▓░░ + ▒ █░▒▒▒▒░▓ + ▒█ █░░█▒▓█░ + ▒▒ ███▒█░ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_12.txt b/codex-rs/tui/frames/blocks/frame_12.txt new file mode 100644 index 0000000000..c6c0ef3e87 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_12.txt @@ -0,0 +1,17 @@ + + █████▓ + █▒░▒▓░█▒ + ░▓▒██ + ▓█░░░▒▒ ░ + ░ █░░░░▓▓░ + ░█▓▓█▒ ▒░ + ░ ░▓▒░░▒ + ░ ▓█▒░░ + ██ ░▓░░█░░ + ░ ▓░█▓█▒ + ░▓ ░ ▒██▓ + █ █░ ▒█░ + ▓ ██░██▒░ + █▒▓ █░▒░░ + ▒ █░▒▓▓ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_13.txt b/codex-rs/tui/frames/blocks/frame_13.txt new file mode 100644 index 0000000000..7a090e51e3 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_13.txt @@ -0,0 +1,17 @@ + + ▓████ + ░▒▒░░ + ░░▒░ + ░██░▒ + █ ░░ + ▓▓░░ + █ ░░ + █ ░ + ▓█ ▒░▓ + ░ █▒░ + █░▓▓ ░░ + ░▒▒▒░ + ░██░▒ + █▒▒░▒ + █ ▓ ▒ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_14.txt b/codex-rs/tui/frames/blocks/frame_14.txt new file mode 100644 index 0000000000..f5e74d12b7 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_14.txt @@ -0,0 +1,17 @@ + + ████▓ + █▓▒▒▓▒ + ░▒░░▓ ░ + ░░▓░ ▒░█ + ░░░▒ ░ + ░█░░ █░ + ░░░░ ▓ █ + ░░▒░░ ▒ + ░░░░ + ▒▓▓ ▓▓ + ▒░ █▓█░ + ░█░░▒▒▒░ + ▓ ░▒▒▒░ + ░▒▓█▒▒▓ + ▒█ █▒▓ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_15.txt b/codex-rs/tui/frames/blocks/frame_15.txt new file mode 100644 index 0000000000..f04599ea27 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_15.txt @@ -0,0 +1,17 @@ + + █████░▒ + ░█▒░░▒▓██ + ▓▓░█▒▒░ █░ + ░▓░ ▓▓█▓▒▒░ + ░░▒ ▒▒░░▓ ▒░ + ▒░░▓░░▓▓░ + ░░ ░░░░░░█░ + ░░▓░░█░░░ █▓░ + ░░████░░░▒▓▓░ + ░▒░▓▓░▒░█▓ ▓░ + ░▓░░░░▒░ ░ ▓ + ░██▓▒░░▒▓ ▒ + █░▒█ ▓▓▓░ ▓░ + ░▒░░▒▒▓█▒▓ + ▒▒█▒▒▒▒▓ + ░░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_16.txt b/codex-rs/tui/frames/blocks/frame_16.txt new file mode 100644 index 0000000000..1eb080286e --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_16.txt @@ -0,0 +1,17 @@ + + ▒▒█ ███░▒ + ▓▒░░█░░▒░▒▒ + ░▓▓ ▒▓▒▒░░ █▒ + ▓▓▓ ▓█▒▒░▒░░██░ + ░░▓▒▓██▒░░█▓░░▒ + ░░░█░█ ░▒▒ ░ ░▓░ + ▒▒░ ▓░█░░░░▓█ █ ░ + ░▓▓ ░░░░▓░░░ ▓ ░░ + ▒▒░░░█░▓▒░░ ██ ▓ + █ ▒▒█▒▒▒█░▓▒░ █▒░ + ░░░█ ▓█▒░▓ ▓▓░░░ + ░░█ ░░ ░▓▓█ ▓ + ▒░█ ░ ▓█▓▒█░ + ▒░░ ▒█░▓▓█▒░ + █▓▓▒▒▓▒▒▓█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_17.txt b/codex-rs/tui/frames/blocks/frame_17.txt new file mode 100644 index 0000000000..dd5f5c8da5 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_17.txt @@ -0,0 +1,17 @@ + + █▒███▓▓░█▒ + ▒▓██░░░█▒█░█ ▒█ + ██▒▓▒▒▒░██ ░░░▒ ▒ + ▓░▓▒▓░ ▒░ █░▓▒░░░▒▒ + ░▓▒ ░ ░ ▓▒▒▒▓▓ █ + ░▒██▓░ █▓▓░ ▓█▒▓░▓▓ + █ ▓▓░ █▓▓░▒ █ ░░▓▒░ + ▓ ▒░ ▓▓░░▓░█░░▒▓█ + █▓█▓▒▒▒█░▒▒░▒▒▓▒░░░ ░ + ░ ▒▓▒▒░▓█▒▓░░▒ ▒███▒ + ▒▒▒▓ ████▒▒░█▓▓▒ ▒█ + ▒░░▒█ ░▓░░░ ▓ + ▒▒▒ █▒▒ ███▓▒▒▓ + █ ░██▒▒█░▒▓█▓░█ + ░█▓▓▒██░█▒██ + ░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_18.txt b/codex-rs/tui/frames/blocks/frame_18.txt new file mode 100644 index 0000000000..a6c93e6c01 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_18.txt @@ -0,0 +1,17 @@ + + ▒▒▒█▒▒█▓░█▒ + ▒█ ▒▓███░▒▒█ █▓▓▒ + ▒▓▓░█ █▒ █ ▓▒ █▓▓▒ █ + █░░█▓█▒ █ █▒░▒▓▒░▒▓▒▒▒█ + ▒▒▓▓ ▓░ ▒ █▒▒▓░▓░▒▒▓▒▒▒ + ▓▒░ ██░▓▒▒▒▓███░█▓▓▒▓░▓░ + ░░▒▓▓ █▓█▓░ ▒▓ █░▒░▒█ + ▒▓░░ ▒▒ ░░▓▒ ░▓░ + ▒ █▒▒▒▓▒▓█░░█░█▓▒█ ░█░░ + ▒▒▒░█▒█ ░░▓▒▒▒▒░░░▒▓░░▒ █ + ░▓░▒░ █████░ ▒▒▒▓░▓█▓░▓░ + ▒▒ █▒█ ░░█ ▓█▒█ + ▒▒██▒▒▓ ▒█▒▒▓▒█░ + █░▓████▒▒▒▒██▒▓▒██ + ░░▒▓▒▒█▓█ ▓█ + ░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_19.txt b/codex-rs/tui/frames/blocks/frame_19.txt new file mode 100644 index 0000000000..73341b5d58 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_19.txt @@ -0,0 +1,17 @@ + + ▒▒▒▒█░█▒▒░▓▒ + ▒█░░░▒▓▒▒▒▒█▒█░███ + ██▓▓▓ ░██░ ░█▓█░█▓▒ + ▓▓░██▒░ ▒▒▒██▒░██ + ░░▓░▓░ █░▒ ▓ ░▒ ░▒█ + ░▒▓██ ▒░█░▓ ▓▓ █▓█░ + ▒▒░░█ ▓█▒▓░██░ ▓▓▓█░ + ░░░░ ░▓ ▒░ █ ░ ░░░ + ░█░▒█▒▓▓▒▒▒░░░░██▓█░▓ ▒ ░░ + ▒▓▓█░▒█▓▒██▒█░█ ▒▒ ▓▒▒▒█▓▓░▒ + █▒ ▓█░ ██ ▒▒▒▓░▓▓ ▓▓█ + ▒▒▒█▒▒ ░▓▓▒▓▓█ + █ ▒▒░░██ █▓▒▓▓░▓░ + █ ▓░█▓░█▒▒▒▓▓█ ▓█░█ + ░▓▒▓▓█▒█▓▒█▓▒ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_2.txt b/codex-rs/tui/frames/blocks/frame_2.txt new file mode 100644 index 0000000000..1c7578c970 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_2.txt @@ -0,0 +1,17 @@ + + ▒▓▒▓▒█▒▒▒██▒ + ▒██▓█▓█░░░▒░░▒▒█░██▒ + █░█░▒██░█░░ ░ █▒█▓░░▓░█ + ▒░▓▒▓████▒ ▓█▒░▓░█ + █▒ ▓█▒░▒▒▒▒▒ ▒█░▒░█ + █▓█ ░ ░█▒█▓▒█ ▒▒░█░ + █░██░ ▒▓░▓░▒░█ ▓ ░ ░ + ░ ▒░ █░█░░▓█ ░█▓▓░ + █ ▒░ ▓░▒▒▒░ ▓░█████████░▒░░█ + ▒▒█░ ▓░░█ ▓█ ░▒▒▒▒▒▒▓▓▒▒░█▓ ░ + ▒▒▒ █ █▒▓▓░█ ░ ███████ ░██░░ + █▒▒▓▓█ ░ ██▓▓██ + ▓▒▒▒░██ █▒▒█ ▒░ + ░░▒▓▒▒ ██▓▓▒▓▓▓▒█░▒░░█ + ░████░░▒▒▒▒░▓▓█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_20.txt b/codex-rs/tui/frames/blocks/frame_20.txt new file mode 100644 index 0000000000..3e0c5f0d9c --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_20.txt @@ -0,0 +1,17 @@ + + ▒▒█▒░░▒█▒█▒▒ + █▓▒ ▓█▒█▒▒▒░░▒▒█▒██ + ██ ▒██ ░█ ░ ▒ ▒██░█▒ + ▒░ ▒█░█ ▒██░▒▓█▒▒ + ▒░ █░█ ▒▓ ▒░░▒█▒░░▒ + ▓░█░█ ███▓░ ▓ █▒░░▒ + ▓░▓█░ ██ ▓██▒ █▒░▓ + ░▒▒▓░ ▓▓░ █ ░░ ░ + ░▓░░▓█▒▓▒▒▒▒▒▒▒██▓▒▒▒▒█ ▓ ░▒ + █░▒░▒ ▓░░▒▒▒▒░▒ █▒▒ ░▒▒ █▓ ░░ + ▒█▒▒█ █ ▒█▒░░█░ ▓▒ + █ ▒█▓█ ▒▓█▓░▓ + ▒▒▒██░▒ █▓█░▓██ + ▒█▓▓ ░█▒▓▓█▓ ░ ░█▓██ + ░██░▒ ▒▒▒▒▒░█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_21.txt b/codex-rs/tui/frames/blocks/frame_21.txt new file mode 100644 index 0000000000..971877651f --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_21.txt @@ -0,0 +1,17 @@ + + ▒▒█▒█▒▒█▒██▒▒ + ███░░▒▒█░▒░█▓▒░▓██▒ + ▓█▒▒██▒ ░ ░▒░██▒░██ + ██░▓ █ ▒█▓██▓██ + ▓█▓█░ █░▓▒▒ ▒▒▒▒█ + ▓ ▓░ ███▒▓▓ ▒▒▒█ + ░█░░ ▒ ▓░█▓█ ▒▓▒ + ░▒ ▒▓ ░█ ░ ░ + ░ ░ ██▓▓▓▓▓███ ▒░█ ░█ ▓▓ ░ + ░ ░▒ ░▒ ▒█░ ▒ ░█░█ ▓ ▓▓ + ▓ ▓ ░░ █░ ██▒█▓ ▓░ █ + ██ ▓▓▒ ▒█ ▓ + █▒ ▒▓▒ ▒▓▓██ █░ + █▒▒ █ ██▓░░▓▓▒█ ▓░ + ███▓█▒▒▒▒█▒▓██░ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_22.txt b/codex-rs/tui/frames/blocks/frame_22.txt new file mode 100644 index 0000000000..2713fd669e --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_22.txt @@ -0,0 +1,17 @@ + + ▒██▒█▒▒█▒██▒ + ▒█▓█░▓▒▓░▓▒░░▓░█▓██▒ + █▓█▓░▒██░ ░ █▒███▒▒██ + ▓█░██ ██░░░▒█▒ + ▒░░▓█ █▒▓░▒░▓▓▓█░ + ▒░█▓░ █░▓░▓▒▓░ ▒░▒▒░ + ░██▒▓ ░█░▒█▓█ ░░▓░ + ░░▒░░ ░▒░░▒▒ ░▒░ ░ + ░░█ █ █░▒▒▓▓▓▒██▒▒█░▒ ▒█ ▒░▓ + ▒░▒ █▒▒▒█ ▓█ ░▓▓░ ▒█▓▒ ░██ ▓▒▒ + ▒▒▒▒░ ██ ░ ░▓██▒▓▓▓ █░ + ▒█▒▒▒█ ▒██ ░██ + █ █▓ ██▒ ▒▓██ █▒▓ + █▓███ █░▓▒█▓▓▓▒█ ███ + ░ ░▒▓▒▒▒▓▒▒▓▒█░ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_23.txt b/codex-rs/tui/frames/blocks/frame_23.txt new file mode 100644 index 0000000000..39a6c55644 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_23.txt @@ -0,0 +1,17 @@ + + ▒██▒▒████▒█▒▒ + ▒▒░█░▒▒█▒▒▒█░▒░█░█▒ + █ █░██▓█░ ░▓█░▒▓░░█ + ▓▓░█▓▓░ ▒▓▓▒░░▓▒ + ▓▓░░▓█ █▓████▓█▒░▒ + █▒░ ▓░ ▒█████▓██░░▒░█ + ░░░ ░ ▓▓▓▓ ▒░░ ░██ + ░▓░ ░ ░ ░█▒▒█ ░ █▓░ + ▒ ▒ ░█░▓▒▒▒▒▒▓▒░▒█░▒ ▒▒ ░ ░░░ + ░▒▒▒░ ▒ ▓░▒ ▒░▒▒█░ ▒▒░ + ▓█░ ░ ░ █░▓▓▒░▒▓▒▓░ + █░░▒░▓ █▓░▒▒▓░ + ▒ ░██▓▒▒ ▒▓ ▓█▓█▓ + ▒▒▒█▓██▒░▒▒▒██ ▓▒██░ + ░ █▒▒░▒▒█▒▒██░ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_24.txt b/codex-rs/tui/frames/blocks/frame_24.txt new file mode 100644 index 0000000000..90ccc262f0 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_24.txt @@ -0,0 +1,17 @@ + + ▒░▒▓███▒▒█▒ + █ ▒▓ ░▒▒░▒▒██▒██ + █ █▓▒▓█ ░ ▓░▓█░███ ▒ + ██▓▓█▓░▒█▒░░▓░ ▒█▒░▒▒█ + █ ▓▓▒▓█ ░ ▓▒▒░░░▒░██ + ░█▒█▒░ ███▓ ▓░▓ ▓ ▒ + ░ ░░ █▓▒█▓ ▓▒▒░▒▒░▒ + ░ ▒░░ ░█▒▓▒▒░░▒▓▓░░░ + ░▓ ░▓▓▓▓██░░░██▒██▒░ ░ ░░ + ▒ ▓ █░▓██▓▓██░▓▒▒██░ ░█░ + ▒ █▒░▒█ ░ ▒█▓█▒░▒▓█░ + ▒ ▒██▒ ░ ▓▓▓ + ▒▓█▒░░▓ ▒▒ ▒▓▓▒█ + ▓▓██▒▒ ░░▓▒▒▓░▒▒▓░ + █▓▒██▓▒▒▒▒▒██ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_25.txt b/codex-rs/tui/frames/blocks/frame_25.txt new file mode 100644 index 0000000000..d8fd5b45a8 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_25.txt @@ -0,0 +1,17 @@ + + ▒█▒█▓████▒ + █ ███░▒▓▒░█░░█ + ▓░▓▓██ ▓░█▒▒▒░░░▒ + ░██░ ▓ ▒░ ▒░██▒▓ + █▒▒▒█▓█▒▓▓▒░ ░▓▓▒▓█ + ▒█░░░▒██▓▒░▓ ▓░█░▓▓░█ + ░▓░█░ ░▒▒▓▒▒▓░▒▓▒ ░▒░ + ░░░▓░▓ ░▒▒▒▓░▒▒░▒░░▒ + ▒█▒░ ░▒▒▒▒▒▒█░░▒▒░██░▒ + ▓▓ ░▓░█░▒░░▓█▒░▒█▒▓▒░ + ▒░█▓▒░░ ██▓░▒░▓░░ + ░▒ ░▓█▓▒▓██▓▒▓█▓▓░▓ + ▒░▒░▒▒▒█▓▓█▒▓▒░░▓ + ▒▓▓▒▒▒█▒░██ █░█ + ░█ █▒██▒█░█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_26.txt b/codex-rs/tui/frames/blocks/frame_26.txt new file mode 100644 index 0000000000..a4734b4486 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_26.txt @@ -0,0 +1,17 @@ + + ▒▓███ ██ + ▓█░▓▓▒░█▓░█ + ▓█ ░▓▒░▒ ▒█ + ▓█ █░░░▒░░▒█▓▒ + ░▒█▒░▓░ █▒▓▓░▒▓ + ▒ ░▓▓▓ █▒▒ ▒▒▓ + ░ ██▒░░▓░░▓▓ █ + ▓▓ ▒░░░▒▒▒░░▓░░ + ░ ▓▒█▓█░█▒▒▓▒░░ + ▓▒░▓█░▒▒██▒▒█░ + ░░ ▓░█ ▒█▓░█▒░░ + ▒▒░░▓▒ ▓▓ ░░░ + █ █░▒ ▒░▓░▓█ + ░ █▒▒ █▒██▓ + ▒▓▓▒█░▒▒█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_27.txt b/codex-rs/tui/frames/blocks/frame_27.txt new file mode 100644 index 0000000000..b99e90e6d4 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_27.txt @@ -0,0 +1,17 @@ + + ▓█████ + ░▓▓▓░▓▒ + ▓█░ █░▓█░ + ░░░▒░░▓░░ + ░ ░░▒▓█▒ + ░▒▓▒ ░░░░░ + ▒ ░░▒█░░ + ░ ░░░░▒ ░░ + ░▓ ▓ ░█░░░░ + █▒ ▓ ▒░▒█░░ + ░▓ ▒▒███▓█ + ░░██░░▒▓░ + ░▒▒█▒█▓░▒ + ▒▒▒░▒▒▓▓ + █▒ ▒▒▓ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_28.txt b/codex-rs/tui/frames/blocks/frame_28.txt new file mode 100644 index 0000000000..de6db173b4 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_28.txt @@ -0,0 +1,17 @@ + + ▓██▓ + ░█▒░░ + ▒ ▓░░ + ░▓░█░ + ░ ░░ + ░ ▓ ░ + ▒░░ ▒░ + ░▓ ░ + ▓▒ ▒░ + ░░▓▓░░ + ░ ▒░ + ░▒█▒░ + ░▒█░░ + █▒▒▓░ + ░ ▓█░ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_29.txt b/codex-rs/tui/frames/blocks/frame_29.txt new file mode 100644 index 0000000000..d7b871c9c3 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_29.txt @@ -0,0 +1,17 @@ + + ██████ + █░█▓ █▒ + ▒█░░ █ ░ + ░░░░▒▒█▓ + ▒ ░ ░ ░ + ░█░░░ ▒▒ + ░▒▒░░░ ▒ + ░░▒░░ + ░░░█░ ░ + ▒░▒░░ ░ + █░░▓░▒ ▒ + ░▓░░░ ▒░ + ░░░░░░▒░ + ░▒░█▓ ░█ + ░░█ ▓█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_3.txt b/codex-rs/tui/frames/blocks/frame_3.txt new file mode 100644 index 0000000000..833b2b3db2 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_3.txt @@ -0,0 +1,17 @@ + + ▒▓▒▓██▒▒▒▒█▒ + ▒██▓▒░░█░ ▒▒░▓▒▒░██▒ + █▓▓█▓░█ ░ ░ ░ ███▓▒░█ + ▓█▓▒░▓██▒ ░▒█ ░░▒ + █▓█░▓▒▓░░█▒▒ ▒▒▒░░▒ + ▓░▒▒▓ ▓█░▒▓▒▒ ░ ▒▒░ + ▒█ ░ ██▒░▒ ░█ ▓█▓░█ + █▓░█░ █▓░ ▓▒░ ░▒░▒░ + ▓ █░ ▓░██░░█▓░▒██▒▒▒██▒░▒ ▓░ + █▒▓▒█ ▓▓█▓▓▓░ ░█░▒▒█ ▒▓█▓▒░░▒░░ + █▒░ ░ ░░██ ███ ███▓▓▓█▓ + ██░ ▒█ ░ ▓▒█▒▓▓ + ▒▒▓▓█▒█ ██▓▓ █░█ + ▒▒██▒██▒▒▓▒▓█▓▒█▓░▒█ + ░███▒▓░▒▒▒▒░▓▓▒ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_30.txt b/codex-rs/tui/frames/blocks/frame_30.txt new file mode 100644 index 0000000000..9c27cf67d0 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_30.txt @@ -0,0 +1,17 @@ + + ▒▓ ████ + ▒▓▓░░▒██▒▒ + █▒░█▒▒░██▒ + ░░▒░▓░▒▒░▒ ▒█ + ▒█░░░▒░█░█ ░ + ░█░▒█ █░░░░▓░ + ▒▓░░░▒▒ ▒▓▒░ ▒░ + ░ ██▒░█░ ░▓ ░ + ░▒ ▒░▒░▒▓░█ ░ + ░░▒░▒▒░░ ██ ░ + ▒░░▓▒▒█░░░█░░ + ░█▓▓█▓█▒░░ ░ + ▒░▒░░▓█░░█░▓ + █▒██▒▒▓░█▓█ + ▒▓▓░▒▒▒▓█ + ░░░░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_31.txt b/codex-rs/tui/frames/blocks/frame_31.txt new file mode 100644 index 0000000000..c787451d71 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_31.txt @@ -0,0 +1,17 @@ + + ▒▓▓████▒█ + ▒██▓██▒ █▒███ + █░▒▓▓█▒▒░▓ ░▒█▒ + █░▓█▒▒█▓▒█▒▒░▒░░▒ + ▒░░░░█▓█▒▒█ ▒░▓▒▒ + ▓░▒░░▒░█ ▒▓██▓▓░█ ░ + ▓░░ ░▒█░▒▓▒▓▓█░█░▓░ + ▒▒█ ░░ ░▒ ░▒ ░░▒▓░ + ░▒█▒░█▒░░░▓█░░░▒ ░ + ░░░▓▓░░▒▒▒▒▒░▒░░ █ + ▒█▒▓█░█ ▓███░▓░█░▒ + ░░░▒▒▒█ ▒▒█ ░ + ▓░█▒▒ █ ▓ ░█░▓░ + ▓░▒░▓▒░░█░ █░░ + █ ▒░▒██▓▓▓█ + ░░░░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_32.txt b/codex-rs/tui/frames/blocks/frame_32.txt new file mode 100644 index 0000000000..e5e7adf64d --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_32.txt @@ -0,0 +1,17 @@ + + █████▓▓░█▒ + ▓█░██░▒░░██░░█ + ▓▒█▒▒██▒▓▓░█░█▒███ + █▓▓░▒█░▓▓ ▓ █▒▒░██ █ + ▓▓░█░█▒██░▓ █░█░▒▓▒█▒█ + ▒▓▒▒█▒█░░▓░░█▒ ░█▓ █ + █░ ▓█░█▒░░██░█▒░▓▒▓▓░█▒ + ░░░█▒ ▒░░ ▓█░▓▓▒ ▒░ ░ + ▒░░▓▒ █▒░ ▒▒░███░░░▒░ ▒░ + █ ▒░░█▒█▒▒▒▒▒▒░░█░▓░▓▒ + █▒█░░▓ ░█ ███▒▓▓▓▓▓▓ + ▒█░▒▒▒ █▒░▓█░ + ███░░░█▒ ▒▓▒░▓ █ + ▒▓▒ ░█░▓▒█░▒█ ▒▓ + ░▓▒▒▒██▓█▒ + ░░░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_33.txt b/codex-rs/tui/frames/blocks/frame_33.txt new file mode 100644 index 0000000000..31a607b29c --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_33.txt @@ -0,0 +1,17 @@ + + ▒██▒█▒█▒░▓▒ + ▒██░░▒█▒░▓░▓░█░█▓ + ▒▓▒░████▒ ░ █▓░░█ █ + █▒▓░▓▒░█▒ █░░▒▒█ + ▒▓░▓░░░▓▒▒▒ ░█▒▒▒ + ▓▓█ ▒▒▒▒░▒█ ▓▒▓▒▒ + ░░█ ▒██░▒░▒ ░█░░ + █░██ ███▒▓▒█ ▒ ░█ + ░░░ ░ █░ ▓████▓▒▒█░░█▓▒░▒░ + ▒▓░█ ▓▓█▓░░░▒▒▒▒▒░░█▒▒▒░░▓ + ▒▒▒█ ░▓░▓ ▓ ███ ░░█▓▒░ + ▒█▒██ █ ▓▓▓▓▒▓ + █▒ ███▓█ ▒█░█▓█▒█ + ▒░ █▒█░█▓█▒ ▓█▒█░█ + ▒▒██▒▒▒▒██▓▓ + ░░░░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_34.txt b/codex-rs/tui/frames/blocks/frame_34.txt new file mode 100644 index 0000000000..db99cb73d6 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_34.txt @@ -0,0 +1,17 @@ + + ▒█▒████▒░█▒ + ▒███▓▒▓░ ░██▒██▓█▒▒ + ▒▓▓█░█ ▓░█░ ░▒▒▒█ ███ + █▓▒░█▒▓█▒ █░██▒▒ + ▓▓░▒▓▓░ ░ █ ▒▒█▒▒ + █▓▒░░▓ ▒▒ ░▒█▒ ▒█▒░▒ + ░█▒░▒ █▒▒█░▒▒ ░▓░▒ + ▒░▒ ▓ ░█▒░▓ ░ ▓ ▒▒ + ██▓▓ ▓▒▓▓ ▒▒▒██████░▒▒ ░▒░ + ░░▒█▓██▒ ▓▓█░░░▒░▓▒▒▒█▓▒░░░░▒ + ▓▒▒█ ░▒░█▒ ██░░░░▒ █▓█▒░█ + ▓█▒▓▒▒▒ ▓▓▓░▓█ + ▒█░░█▒▓█ ▒█▒ ▒▓█░ + ▓▒▓░ ░██▓██▒█▒█░██▓█ + ░▒▓▒▒▒▒▒▒▓▒█▒▒ + ░░░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_35.txt b/codex-rs/tui/frames/blocks/frame_35.txt new file mode 100644 index 0000000000..814188563d --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_35.txt @@ -0,0 +1,17 @@ + + ▒██▓▒███▒██▒ + ██▒█▓░███ ░█░▓ ░█▒▒ + ▒▓▓░▓██░▒█ ░ ░ █▒█▓ ░██ + █▓▓█▓█▓█▒ ██▒▒░▒ + ▓▓░░▓▓▒ ▒██ ░▒█░█ + ▓▓▓▓█░ █░▒ ▓▓█▒ ░▒▒░ + ▒ ▓▓ ▒▒ ██▒▓ ░▒▒▒ + ░░░▓ ▓▒▒▓▓█ ▓ ▓ + ▓ █▒ █░░▓▓ ▓░▒▒▒▓▒▒█░░ ░░▒█ + ░█▒▓█ ▓▓▓ ██▓░▓ ▒█▒▒▒▒▓ ░▓█ ░█ + ▓░▒██▓▒▒░▓▒░ ░ ▒▒▒▒█▒▒█▓▓▒█░ + ▓▒▒▓░ ▒▓█ █▒ + ▒▓░▒▓█▓█ █▓▓▒███ + ▒▒ ░█░▓▓░░█░▓▓█ ▒▓▓ + ▒░▓▒▒▒▓▒▒███ ▒ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_36.txt b/codex-rs/tui/frames/blocks/frame_36.txt new file mode 100644 index 0000000000..cde83b56f4 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_36.txt @@ -0,0 +1,17 @@ + + ▒▒█▒████▒██▒ + ▒▒ ▒█▓▓▓█▒█▓██ ███▒ + █▒█▒███▓█ ░░ ░ █░██░██░█ + ▒░ ██▒▒▒▒ ██░▒ ░ + █▓▒▓▒█░▒░▒█▓ ▒▒▓█ + ▓ █▓░ █▒ ░▓█ ▒▒█ + ░ ▓ ░ ▒ ▒▒ ░▒░█ + ░░▒░ ▒▒ ▒▓▓ ▒░ ░ + ░█ ░ ▓▓ ██ ████▒█████▒ ░▒░░ + ▒█░▒ █░▒▒▓░▓ ░░▒▒▒▒▒▒▒░░ ▒▓█░ + █ █░▒ █▒█▓▒ ██▒▒▒▒▒ ░█ ▓ + ██ ▒▓▓ █▓░ ▓ + ▒▓░░█░█ ███ ▓█░ + ██▒ ██▒▒▓░▒█░▓ ▓ █▓██ + ░██▓░▒██▒██████ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_4.txt b/codex-rs/tui/frames/blocks/frame_4.txt new file mode 100644 index 0000000000..7ad27d16e7 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_4.txt @@ -0,0 +1,17 @@ + + ▒▓▒▓█▒▒█▒██▒ + ▒▓ ██░▓ ░▒▒▓█▓░ ▓██▒ + ██▒░░░██ ░ ░▒░▒▒█░▓▒▒▒ + ▓▓░█░ ▓██ ░██▒█▒ + ▓░▓▒░▒░▒▓▒░█ ▒ ▒░█▒ + ▓░░▒░ █▒░░▓█▒ █ ▒▒░█ + ▒░▓░ ███▒█ ░█ █ ▓░ + ░▓▒ █░▓█▒░░ ░░░ + ▒░ ░▒ ▓░▓ ▒▓▓█░███▒▒▒▒██ ░░█ + ░▒▓ ░ █▓▓▓█▒░░▒▒░█▓▒█▓▓▒▓░▓▓ ░ + ░░▓█▒█▒▒█▒▓ ████████▒▓░░░░ + █░▒ ░▒░ █▒▓▓███ + ▒▒█▓▒ █▒ ▒▓▒██▓░▓ + ░░░▒▒██▒▓▓▒▓██▒██▒░█░ + █▒▒░▓░▒▒▒▒▒▓▓█░ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_5.txt b/codex-rs/tui/frames/blocks/frame_5.txt new file mode 100644 index 0000000000..24f9843954 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_5.txt @@ -0,0 +1,17 @@ + + ▒▓▒▓▓█▒▒▒██▒ + ▒█ █▓█▓░░█░▒█▓▒░ ██ + █▒▓▒█░█ ░ ▒▒░█▒ ███ + █░▓░▓░▓▒█ ▓▒░░░░▒ + █▒▓█▓▒▒█░▒▒█ ░ ▒░▒░▒ + ░░░░▓ ▒▒░▒▓▓░▒ █▓░░ + ░▓░ █ ░▒▒░▒ ░█ ██░█░█ + ░▓░▒ █▒▒░▓▒░ █░▒░ + ░█░▒█ ▓▒░ █░█▒▒░█░▒▒▒██▒ ░▓░ + ▒▒░▒██▓██ ░ ▓▓▒▒▒█▒▓█▓░▓█░░ + ▒█░░█░█▒▒▓█░ ██ █░▓░▒▓ + ▒▒█▓▒▒ ░ ▓▒▓██▒ + ▒▓█▒░▒█▒ ▒▒████▓█ + ▒░█░███▒▓░▒▒██▒█▒░▓█ + ▒▓█▒█ ▒▒▒▓▒███░ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_6.txt b/codex-rs/tui/frames/blocks/frame_6.txt new file mode 100644 index 0000000000..fe185a7573 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_6.txt @@ -0,0 +1,17 @@ + + ▒▓▒▓▓█▒▒██▒▒ + █▒▓▓█░▒██░██▓▒███▒ + ███░░░█ ░ ░▓▒███▓▒▒ + ▓█░█░█▒▒█ ▒█░░░░█ + █▒░░░█▒▒██▒ ▓▒▒░▒█ + ▓▓▓░▓░▒█▓░▒▒░█ ▓▒▒▓░ + ▒ █░░ ▒▒░▓▒▒ ▒█░▒░ + ░ ░░░ ▒░▒░▓░░ ░█▒░░ + ▒▓░▓░ ▓█░░█▓▓█▒░█░▒▒██▒▓▒▓░ + ░░▒█▓▒▒▒▓█ ░▓▒██░░█▓▒▒▒░█░▒ + ▓ ░ ▓░░░▓▓ █ ██ ░▒▒▓░ + █ ▓ ▓█░ █▓▒▓▓░░ + ▓░▒▒███ ▒█▒▒▓███ + ░ ░██ █ ▓░▒▒████ ▓▓█ + ▒▓▓███▒▒▒░▒███ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_7.txt b/codex-rs/tui/frames/blocks/frame_7.txt new file mode 100644 index 0000000000..7441f97e96 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_7.txt @@ -0,0 +1,17 @@ + + ▒▓░▓██▒▒██▒ + ██░█▒░███▒▒▒▓ ░██ + █ █░░░█░ ░▒░░ █▓▒██ + ▒▒░░░░▓█ ▒░▒█░▓█ + ░█░█░░▒░▓▒█ ▓ █░░▒ + ░ ▓░░ ░█▒▓░▒ █▓░░░ + ░▒ ░ ▒▒░▒░▒░ ██▒░░ + ▒ ▓░░ ▒█▓░█░░ █ ░░░ + ▓ ░█ █ ▒▓░▒▓░░▓▓▒░░▒▓█▒░░ + ░██░░▒▓░░▓█░▓▒░░▒▒█▒█▓▒░▒░ + ▒ ▒▒▓█░█▒▓ ██████ ▒▓░░ + █▒ ▓▒▓▒░ █ ▓▓▓▓█ + █▓██▒▒▒▒ █▒░██▓██ + ▒▒█▒░█▒▓░▒▒▒██░██▓ + ░█ ░▓░▒▒█▒▓██ + \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_8.txt b/codex-rs/tui/frames/blocks/frame_8.txt new file mode 100644 index 0000000000..ea88b09538 --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_8.txt @@ -0,0 +1,17 @@ + + ▒▒█▒▓██▒██▒ + █ █▓░░░█▒▒ ░ █ + ▒░▒█░▓▓█ █ ░▓░█▒█▒█ + ▒█▒█▓░██░ █ ▒▒░░▒ + █ ▓░▓█▒░▓▒ ▓█▒░░█ + ░██░▒▒▒▒▒░▒█ ▒█░░░ + ░█░░░ █▒▓▒░░░ ░▒░▓░█ + ▒█░░▓ ░█▒▓░██▓ ▓░▓░░ + ▒ ▒░░▒▒ ▓█▒░░▓█████▒░░░ + ▒█▓▒▒░ █░█░░▓░▒▒▒░░▒█ + ▓▓▒▒░▒░░░▓█▒█▒█ ▒█ ▓▒░ + ██ ░▒░░░ ▓█▓▓▓█ + █▒▒█▒▒▒▒ ▒▓▒▒░█▓█ + ▓▓█░██ ▓▓██▓▓▒█░░ + ░░▒██▒░▒██▓▒░ + ░░ \ No newline at end of file diff --git a/codex-rs/tui/frames/blocks/frame_9.txt b/codex-rs/tui/frames/blocks/frame_9.txt new file mode 100644 index 0000000000..9066ba1bed --- /dev/null +++ b/codex-rs/tui/frames/blocks/frame_9.txt @@ -0,0 +1,17 @@ + + ▓▒▒█▓██▒█ + ▓█▒▓░░█ ▒ ▒▓▒▒ + ▓ █░░▓█▒▒▒▓ ▒▒░█ + ░░▓▓▒▒ ▒▒█░▒▒░██ + ▓█ ▓▒█ ░██ █▓██▓█░░ + ░ ░░░ ▒░▒▓▒▒ ░█░█░░░ + ░ ░█▒░██░▒▒█ ▓█▓ ░░░ + ░ ░▓▒█▒░░░▒▓▒▒▒░ ░░ + █░ ▓░ ░░░░█░░█░░░ + ░▒░░░▒█░▒░▒░░░░▒▒░░░ + ░▒▓▒▒░▓ ████░░ ▓▒░ + ▒░░░▒█░ █▓ ▒▓░░ + ▒█▒░▒▒ ▓▓▒▓░▓█ + ▒▓ ▒▒░█▓█▒▓▓█░░ + █▓▒ █▒▒░▓█▓ + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_1.txt b/codex-rs/tui/frames/codex/frame_1.txt new file mode 100644 index 0000000000..63249f4242 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_1.txt @@ -0,0 +1,17 @@ + + eoeddccddcoe + edoocecocedxxde ecce + oxcxccccee eccecxdxxxc + dceeccooe ocxdxo + eedocexeeee coxeeo + xc ce xcodxxo coexxo + cecoc cexcocxe xox + xxexe oooxdxc cex + xdxce dxxeexcoxcccccceco dc x + exdc edce oc xcxeeeodoooxoooox + eeece eeoooe eecccc eccoodeo + ceo co e ococex + eeoeece edecxecc + ecoee ccdddddodcceoxc + ecccxxxeeeoedccc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_10.txt b/codex-rs/tui/frames/codex/frame_10.txt new file mode 100644 index 0000000000..fe5e51b984 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_10.txt @@ -0,0 +1,17 @@ + + eccccecce + ccecccexoeco + eeoxxoxxoxceoo + xeeoexdeoeocceeo + o dxxcxe cooeoxo + xe cxcxooe eecx + e xcccxxxxc xoo + c xxecocxxoeeoexx + c xe eexdxxcecdxx + x oxeoxeoeceeexce + o cxxxxxcc eocexe + eecoeocc exccooo + xc xxxxcodooxoe + deccoxcde ooc + co eceeodc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_11.txt b/codex-rs/tui/frames/codex/frame_11.txt new file mode 100644 index 0000000000..48e507a84a --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_11.txt @@ -0,0 +1,17 @@ + + occcccce + oc dxxxeeo + oceexxdecoeo + xeexxddoedoo + ecodexcecdexxo + xcexxceddxeoxx + cc oxxxxxxexde + x xxoxxeo xcx + o cxoxxcocxex + cc exodocoxexe + ceo xxxxdoxeex + eeooxecoccdxe + e cxeeeexdc + ec cxxoeoce + ee cccece + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_12.txt b/codex-rs/tui/frames/codex/frame_12.txt new file mode 100644 index 0000000000..29de69516a --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_12.txt @@ -0,0 +1,17 @@ + + ccccco + odeeoxoe + c xoeco + ocxxxddcx + x cxxxxoox + xcoocecexc + x xoexxe + x ocexxc + co xoxxcxx + x oxcdce + xo xcdcco + o cx eox + o ccxocex + ceocoxexe + e cxeoo + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_13.txt b/codex-rs/tui/frames/codex/frame_13.txt new file mode 100644 index 0000000000..67fe336a13 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_13.txt @@ -0,0 +1,17 @@ + + occco + xeexx + xeexc + xccxe + c xx + cdoxx + o xx + c cx + oc exo + xc cdx + ceoo xe + xeeex + xcoxe + ceexd + o ocd + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_14.txt b/codex-rs/tui/frames/codex/frame_14.txt new file mode 100644 index 0000000000..f8d32cd6d1 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_14.txt @@ -0,0 +1,17 @@ + + ccccd + ooeeoe + xexxo x + xxoxcexo + xxxe x + xcxx cx + xxxx o c + xxexe e + xxxx c + ceoo do + exccooox + xcxxeeex + o cxddde + xeoceeo + ec cdo + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_15.txt b/codex-rs/tui/frames/codex/frame_15.txt new file mode 100644 index 0000000000..2e14341237 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_15.txt @@ -0,0 +1,17 @@ + + cccccxe + eodxxedco + ooxcdexccx + xoe ooooeex + xxdcdexxocex + exxoxxoox c + xx xxxxxxox + xxoxxcxxx cox + xxcoocxxxeodx + xexdoxexco ox + xoxxxxex e d + xccoexxeo d + cxeo oooe de + xexxeeoceo + eeceeeeo + ee \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_16.txt b/codex-rs/tui/frames/codex/frame_16.txt new file mode 100644 index 0000000000..c90ce92cb6 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_16.txt @@ -0,0 +1,17 @@ + + edcccccxe + oexxcxxexde + xooceodexx ce + ooo dceexexxccx + xxdeoccdxxcoxee + xxxcxc xed x xox + eex oeoxxxxocco x + xod xexxoxxxcd ex + eexxxcxoexxccc o + cceeoddecxoex oex + xxxcccocexdcdoxxe + xxc xe eooo o + exc x oooeox + exxcecxoocex + cdoeddeedc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_17.txt b/codex-rs/tui/frames/codex/frame_17.txt new file mode 100644 index 0000000000..e1f2bb6d96 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_17.txt @@ -0,0 +1,17 @@ + + odcccddxoe + edccxxxcdcxoceo + oceoeddecocxxxece + oxoeoxcee cxdexxxde + xoe x xcoedeoo o + edcooe odox oodoxoo + c dox oooxe ccxxodx + ocdx ooxxoxoxxddc + oocoeddcxeexeedexxx x + xcedeexoceoxxe eccce + eeeoccccccceexcooe ec + exxec eoxxe d + eee cee ocooeeo + o xccdeceedcdxc + ecdoeocxcecc + e \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_18.txt b/codex-rs/tui/frames/codex/frame_18.txt new file mode 100644 index 0000000000..be64251770 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_18.txt @@ -0,0 +1,17 @@ + + eddcddcdxoe + eccedoccxeeoccdde + eodxcccdcocoeccooe c + oxxcooecc ceeeodxedeeeo + eeoo ox ecceeoxoxeedeee + oex ooxoeeeoocoxcooeoeox + xxedo cocoxceoccxdxdo + ceoxx eecxxde xdxc + ecc oedddddcxxoxcoeo xcxe + eeexcec xxoeeeexxxedxee o + xoxeeccccccce eeeoxocoeoe + ee oeo eeccocec + eecceeo eceeoeoe + cxoccccdddecceoeoc + cxxeoeeooccdcc + e \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_19.txt b/codex-rs/tui/frames/codex/frame_19.txt new file mode 100644 index 0000000000..8904157121 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_19.txt @@ -0,0 +1,17 @@ + + eeddcxcddxoe + ecxxxeodddeceoxcoo + ocddocxcce ecdoecde + odxcoee eddcoexco + xxoeoe oxecocxe xeo + xeocc excxo oo cocx + edxxc oceoxcoe odocx + xxxx xdcexco x xxx + xcxeoddddddxxxxccdcxd e cxx + edooxdcoecceoeo ee deeeoooxe + cecocxcccccccc eeeoxoo ooc + eeecee eooeooc + c eexxco oddooxde + ccoxcoxceeddocc dcxc + cxoedoceooecoe + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_2.txt b/codex-rs/tui/frames/codex/frame_2.txt new file mode 100644 index 0000000000..a3c0663db4 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_2.txt @@ -0,0 +1,17 @@ + + eoeddcdddcoe + ecoocdcxxxdxxdecxcce + oxcxeccxcee eccdcoxxdxo + exoeoccooe ooexoxo + oecocexeeeee eoxexo + cocce xcecoec eexcx + oxccx eoxdxexo ocxcx + xc ee oxcxxdc xcoox + cccdx dxeeexcoxccccccccoxexxc + edcx oxxc oc xdeeeeeooeexco x + eee c ceooxc ecccccccccxocxx + ceeooo e ocdooc + oeeexco odec exc + exedeecccdddddodceexxc + eccccxxeeeexdocc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_20.txt b/codex-rs/tui/frames/codex/frame_20.txt new file mode 100644 index 0000000000..cea5393f75 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_20.txt @@ -0,0 +1,17 @@ + + eecdxxdcdoee + oddcdoeodddxxeececo + oocecccxcc ecececcxce + excecxc eocxeocee + ex oxc eo exxecexxe + oeoxc cccdxco cexxe + dxdcx oc occe oexo + xeeoe ccddxco xxcx + xoxxdoddddddddeocdeeeec o xe + cxexec oeeeeeexe ceecxde oo xx + eoeecccccccccc eodxxox oe + c ecoo eocoxo + eeecoxe odcedcc + eooocxceddodcxceoocc + eccxe deeeexccc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_21.txt b/codex-rs/tui/frames/codex/frame_21.txt new file mode 100644 index 0000000000..efa6d610d9 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_21.txt @@ -0,0 +1,17 @@ + + eeodcddcdcoee + occeeeecxdxcdeeocce + dceeccece eexcceeco + ocxdcc eodcodco + oooce oxoee eeeeo + ocox occeoo eeeo + xcxe e oeooc edec + ee ed cxo x x + x x ocdddddccc exocxo do x + x xe xe eox ececxo ocoo + d co eeccc ce cceod oe o + cc dde ecc o + ce eoe eodcc oe + cde ccccdxxdddccc oe + cccdceeeeoedcce + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_22.txt b/codex-rs/tui/frames/codex/frame_22.txt new file mode 100644 index 0000000000..91c9c2ecaa --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_22.txt @@ -0,0 +1,17 @@ + + eocdcddcdcoe + ecocxoeoxoexxdxcocce + odcdxecce ecceccceeco + dcxccc ooxxxece + exxoc oeoxdxoodcx + excoe oxoxdeoe exedx + xcceo xcxecoc xxox + xxdxe xexxee xexcx + xxoco cxddddddcceecxe eo exdc + exd ceeeo oocxoox ecdecxoo oed + eeeex cccccccce edcceooocoe + eceeeo ecocxoc + cccd cce eococceo + cdccoccxddcddodccccoc + cxcxedeeeodeodce + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_23.txt b/codex-rs/tui/frames/codex/frame_23.txt new file mode 100644 index 0000000000..5b5f1be139 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_23.txt @@ -0,0 +1,17 @@ + + eocedccccdcee + edxcxeeoeddoxexcxce + occxcodce cxdcxedxxo + odxcdoe eddexxde + ooxeoc ooooccocexe + oexcoe ecccccoccxxexo + exxcx odoo exe c xcc + xox x xcxoeeo x cox + ece xcxddddddddxecxecee x xxx + xeeexcdc oee exeeox eex + ocx x eccccccc ceoddxeoeoe + oxxexo ooxeeoe + e xocoee eocdcoco + edecdccexddecccoecce + cx cdexeeceecce + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_24.txt b/codex-rs/tui/frames/codex/frame_24.txt new file mode 100644 index 0000000000..c0269d8eda --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_24.txt @@ -0,0 +1,17 @@ + + exedcccddoe + oceocxeexddcoecc + occdeoccx oedcxcco e + ocooooxdoeexoe ecexeec + o ooeoo eccoeexeeexoc + xoecee cooo oxd oce + x xx ooeoocoeexeexe + x exx xodoeexxeooexx + xo xddddccxxxccecoex x xx + e o cxoooddooxoeeccx xcx + e cexeccccccce eoocexdooe + e eoce x codo + eoceexo edceodec + oocoeecxxddddxeeoe + cdeccdeeeddcc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_25.txt b/codex-rs/tui/frames/codex/frame_25.txt new file mode 100644 index 0000000000..5b040665d0 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_25.txt @@ -0,0 +1,17 @@ + + ecdcdcccce + o coceedexcxxo + oxoooocoxcedexxxe + xccx o dx cexoceo + oeeeoocedoexc xooeoc + eoxxxeccoexd oxoxooxo + xoxcx xeeoeeoxeoecxdx + xxxoxoc xedeoxeexdxxe + ecexcxeeddddcxxeexccxe + oocxoxoxexxdcexecdoex + excoexecccccccoxexoxe + xecxdcdeoocdeooooxo + eeexeeecdooeoexxo + eodeeecdxcc cxc + xoccecoecxc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_26.txt b/codex-rs/tui/frames/codex/frame_26.txt new file mode 100644 index 0000000000..1592c09e8c --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_26.txt @@ -0,0 +1,17 @@ + + edccccco + ocxdoexcdxo + occcxdexecceo + dccoxxxexxecoe + xeoexoxcceodxed + e cxodocceeceeo + x ccdxxoxxddcc + oo exxxeedxxoxx + x oecdcxcddoexx + oexooxeeoceecx + xecoxcceooecexx + eexxoe oocxxe + c cxe eeoxoo + xcceecceccd + eodecxeec + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_27.txt b/codex-rs/tui/frames/codex/frame_27.txt new file mode 100644 index 0000000000..5279157c04 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_27.txt @@ -0,0 +1,17 @@ + + dcccco + xddoxoe + dce cxocx + xxxexxdxx + x exeocd + xeoecexxxe + d cxxecxx + x exxxdcxx + xo o xcxxxx + cd ocexecxx + xo eecccoc + xxccxxeox + xddcdooxe + eeexedoo + cec eeo + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_28.txt b/codex-rs/tui/frames/codex/frame_28.txt new file mode 100644 index 0000000000..ea695865f4 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_28.txt @@ -0,0 +1,17 @@ + + occd + xcexe + d dxe + xoecx + x xx + x ocx + exx ex + xoccx + oe ex + xxodxx + x ex + xdcdx + xdcxx + ceeox + x ocx + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_29.txt b/codex-rs/tui/frames/codex/frame_29.txt new file mode 100644 index 0000000000..328d426a41 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_29.txt @@ -0,0 +1,17 @@ + + ccccco + oxco ce + eoxx ccx + xxxxeeoo + e xcx x + xoxxx ee + xeexxx e + xxdxx + xxxcx e + exdxx e + cxxoxe d + xoxxx ex + xxxxexex + xdxcocxc + xxc oo + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_3.txt b/codex-rs/tui/frames/codex/frame_3.txt new file mode 100644 index 0000000000..3e9206577a --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_3.txt @@ -0,0 +1,17 @@ + + eoddccddddoe + ecooexxcxcddxdeexcce + odocdxccce ecx cccoexo + ocoexdoce edc xxe + cocxoeoxxcee eeexxe + oxeeo ooxedee x eex + dc x ccexecxo ocoxo + ooxox ooxcoex xexdx + occx dxccxxcoxdcceeeccexecdx + oedeo oocoddx xcxeeo doodeexexe + cex x cxxcoc cccccccccoooooo + ccx ec e oeceoo + deooceo ocdocoxc + decoecceddddoddcdeecc + ecccedxeeeexdoec + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_30.txt b/codex-rs/tui/frames/codex/frame_30.txt new file mode 100644 index 0000000000..b9da98c5c3 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_30.txt @@ -0,0 +1,17 @@ + + edcccco + eodxxeccde + ccexoeexcoe + xxexoxeexe eo + dcxxeexoxo x + xcxec cxxxxox + eoxxxee eoex de + cx ccdxoxcxo e + cxecexdxeoxo e + cxxexeexx co e + exxdeecxxxcxx + xcoooocexxc x + exexxocxxoxo + oeocdeoxooc + eooxeeedc + eeee \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_31.txt b/codex-rs/tui/frames/codex/frame_31.txt new file mode 100644 index 0000000000..baef07474c --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_31.txt @@ -0,0 +1,17 @@ + + eodccccdo + eccdcoeccecco + oxeooodeeocxece + oxoceecdeoeexexxe + exxxxcoceeocexoee + dxeexexccedcoooxocx + oxx xecxeododcxcxox + eeo xxcxe xeccxxeox + xeoexcexxxocxxxe x + cxxxooxxeeeeexexx c + eceocxo occceoxcxe + xxxeeeo edc x + dxcde o o xceoe + dxexoexeoxcoxe + ccdxeccoodc + eeee \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_32.txt b/codex-rs/tui/frames/codex/frame_32.txt new file mode 100644 index 0000000000..c0997d9a14 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_32.txt @@ -0,0 +1,17 @@ + + occccddxoe + dcxccxexxccxxo + oecdeocedoecxcecco + cooxeoedo o oeexco o + ooxoxceccxd ceoxeoeceo + eoeeoecxedxxce xco c + cxcdoecexxooxodeoeooxce + xxxoe cexxcocxdoecexcce + exxoe cexceexcccxxxdxcde + ccceexceceeeeeexxcxdxoe + oecxxo xccccccedooooo + eoxeee oexocx + cccxxxce eoexo o + eoecxcxddceecceo + xddeeococecc + eee \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_33.txt b/codex-rs/tui/frames/codex/frame_33.txt new file mode 100644 index 0000000000..cd8691c150 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_33.txt @@ -0,0 +1,17 @@ + + eocdcdcdxoe + eccxxecdxdxoxcxco + eoexcccodce ccoxxcco + oeoxoexoe cxxeec + eoxoexxoeee xceee + ooo eeeeeeo oeoee + xxc eocxexe xcxx + cxoo occeodo ecxc + xxx x oe ocooodddcxxcoexex + eoxccodooexxeeeeexxceeexxo + edeo xoxo o ccccccc xxooee + ececoco oododo + ceccocdo ecxoocec + exccecxodcecdoecxc + cddcoeeeeccdoc + eeee \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_34.txt b/codex-rs/tui/frames/codex/frame_34.txt new file mode 100644 index 0000000000..ef8eabf7dc --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_34.txt @@ -0,0 +1,17 @@ + + eodccccdxoe + ecccoedxcxccdccdode + eoooxccdxce eeeeoccco + ooexceooe cxocee + ooxeoox xc o eecee + ooexeo eecxece eoexe + xcexe ceecxee xdxe + exdcd xcexocx o ee + ocooc oeooceddccccccxeec xee + xxeooooecoocxxxexoeeeooexxexe + oeeo xexce ccceeeee oooexc + ooeddee odoxoc + ecexcedo ecdceooe + oeoxcxcodocdcdceccdc + cxeddeeeeeddcde + eee \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_35.txt b/codex-rs/tui/frames/codex/frame_35.txt new file mode 100644 index 0000000000..1c53d2373f --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_35.txt @@ -0,0 +1,17 @@ + + eocddcccdcoe + ocdcoxccccxcxdcxcde + eooxdccxecce eccdcocxco + ooocoodoe cceexe + ooxxooe ceco xecxo + dodoce cxecooce xeex + e oo ee cceo xeee + xxxd oeedoc o co + o oe oxxodcoxddededcxx xxdc + xoedc oodcccoxd eoeeeeocxoc xc + oeeocoeexoee eceeeeceecooeox + coeeox eoc oe + edeedodo odoeccc + ceecxcxodxxcxdocceodc + cexddeeoeecccce + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_36.txt b/codex-rs/tui/frames/codex/frame_36.txt new file mode 100644 index 0000000000..4928a2a9d0 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_36.txt @@ -0,0 +1,17 @@ + + eecdccccdcoe + edccecodocecdcccccce + oeceoccoccee eccxccxocxo + exccceeee ccxecx + ooedecxeeeoo eeoc + o ooe ce cxoo ceec + x d e e cee xexo + xxex ee eoo ex x + xccx oo occcocceccccce xexx + ecxe oxeeoxo exeeeeeeexx eoce + c cxe cecoe ccceeeeec xoco + cocedo ooxco + eoxxcxo occcooe + coecccdedxecxdcocodcc + eccoxeooeooccccc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_4.txt b/codex-rs/tui/frames/codex/frame_4.txt new file mode 100644 index 0000000000..a5ae50eeae --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_4.txt @@ -0,0 +1,17 @@ + + eoddcddcdcoe + eocccxo xedocdxcocoe + ocdxxxccce eexeecxoeee + ooxoxcoco cxccece + oxoexdxedexo ecexce + oxxex cexxoce c edxo + cexde ccceccxo o cdx + xoe oxocexx xxx + ex xe dxoceoocxccceeeeoo xxc + xeo x oooooexedexooeodoedxoocx + exdceoeeoeo ccccccccceoxxxe + oxecxee oedoccc + eeode oe eoeocdxo + xxxdecceddddocdccexce + ceexdxeeeeedoce + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_5.txt b/codex-rs/tui/frames/codex/frame_5.txt new file mode 100644 index 0000000000..47abf7a0af --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_5.txt @@ -0,0 +1,17 @@ + + eodddcdddcoe + ecccocoxxcxdcdexcco + ceoecxcce cedxce oco + oxoxoxodo oexxxxe + oeocoeecxeeo e exexe + xxxxo eexedoxe coxx + xox c eeexecxo ccxcxo + xoxec oedxoex cxex + xoxec oexcoxcdexcxeeecoecxox + eexeoooccc xc ooedeodoooxocxe + eoxxoxoeeoce ccccccccoxdxeo + eecoee e oeocoe + eocexdce edcoccdc + excxoccedxdeocdcexdc + eocecceeeoeocce + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_6.txt b/codex-rs/tui/frames/codex/frame_6.txt new file mode 100644 index 0000000000..ba04c52772 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_6.txt @@ -0,0 +1,17 @@ + + eodddcddccee + oedocxdccxccdeocce + oooxxxcc ecxodcccoee + ooxcxcedo ecxxxxo + cdxxxceecce oeexeo + dooxoeecdxeexo odeox + e cxx eexoee ecxex + x xxx exdxoxx xcexx + eoxox ocxxcdocexcxeecceoeox + xxeooeeedc xodcoxxodddexoxe + o x oxxxdoc cccccccceeeox + o d ooe odeooxe + oeeecco eceeococ + ecxcocc dxeeoccc ddc + eodccoeeeeeocc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_7.txt b/codex-rs/tui/frames/codex/frame_7.txt new file mode 100644 index 0000000000..f7dd0de9b6 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_7.txt @@ -0,0 +1,17 @@ + + eoxdccddcoe + ocecexcccdded eco + c oxxxce eexe coeco + eexxxxdc execxoo + ecxcxxexoeo o cxxe + x dxxc ecedxe ooxxx + eecx eexexex ccexx + ecoxx dcoxcxe c xxx + ocxc oceoxeoxxddexxddcexx + xocxxddxxocxoexxeeododexex + e deocxceo cccccccceoxx + ce oeoee ocoodoc + cdoceeee oexococc + eecexcedxeeeccxcco + cxccxdxeeoedcc + \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_8.txt b/codex-rs/tui/frames/codex/frame_8.txt new file mode 100644 index 0000000000..e3f93702f7 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_8.txt @@ -0,0 +1,17 @@ + + eecedccdcoe + occoxxxcdd x cc + exdoxooc ocxoxceceo + ececoxocx c dexxe + c oxooexoe ocexxo + xcoxeeeeexec ecxxx + xcxxx cedexex xexoxo + eoxxo xceoxoco oeoxx + e exxee ocdxxococooexxx + ecodexcoxoxxdxdeexxdc + ooeexexxxocececceccoex + cocxexee oooooc + ceeceeee eoeexcoc + odcxoc ddccdodoxe + xxeccexeocode + ee \ No newline at end of file diff --git a/codex-rs/tui/frames/codex/frame_9.txt b/codex-rs/tui/frames/codex/frame_9.txt new file mode 100644 index 0000000000..210e417d43 --- /dev/null +++ b/codex-rs/tui/frames/codex/frame_9.txt @@ -0,0 +1,17 @@ + + odecoccdo + oceoxxccd eoee + o oxxoceedo eexo + c xxodde eeoxeexco + occdeccxco coccdcxx + x xxxcexedee xcxcxxx + e xcexccxeeocooo exx + x xoeoexxxeodeex xx + coxc oxcxxxxcxxoxxe + xexxxeoxexexxxxeexxx + c eeoeexocccccxxcoex + exxxeoe oo eoxe + ecexee odedxoc + eoceexcocdddcxe + coe ceexdcoc + \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_1.txt b/codex-rs/tui/frames/default/frame_1.txt new file mode 100644 index 0000000000..64a140d2b9 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_1.txt @@ -0,0 +1,17 @@ +                                       +             _._:=++==+,_              +         _=,/*\+/+\=||=_ _"+_          +       ,|*|+**"^`   `"*`"~=~||+        +      ;*_\*',,_            /*|;|,      +     \^;/'^|\`\\            ".|\\,     +    ~* +`  |*/;||,           '.\||,    +   +^"-*    '\|*/"|_          ! |/|    +   ||_|`     ,//|;|*            "`|    +   |=~'`    ;||^\|".~++++++_+, =" |    +    _~;*  _;+` /* |"|___.:,,,|/,/,|    +    \^_"^ ^\,./`   `^*''* ^*"/,;_/     +     *^, ", `              ,'/*_|      +       ^\,`\+_          _=_+|_+"       +         ^*,\_!*+:;=;;.=*+_,|*         +           `*"*|~~___,_;+*"            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_10.txt b/codex-rs/tui/frames/default/frame_10.txt new file mode 100644 index 0000000000..9d45417346 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_10.txt @@ -0,0 +1,17 @@ +                                       +              _+***\++_                +             *'`+*+\~/_*,              +            ^_,||/~~-~+\,,             +           |__/\|;_.\,''\\,            +           / ;||"|^  /_/|/            +          |` '|*~//\   `_"|            +          \  ~*"*||~|*   |/,           +          "  ||\+/+||-_ .\||           +          "  ~\ \\|;~~+\+;||           +          |  ,|\,|_/_*___|*`           +           , "|||||""!\,"\|`           +           \`',\,*"  "",//            +            |' |||~*,:,/|/`            +             ;`**/|+;_!//'             +              *, _*\_,;*               +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_11.txt b/codex-rs/tui/frames/default/frame_11.txt new file mode 100644 index 0000000000..769e5ae76d --- /dev/null +++ b/codex-rs/tui/frames/default/frame_11.txt @@ -0,0 +1,17 @@ +                                       +               ,****++_                +              /" ;|||\\,               +             /"__||;\*/\,              +             |__||=;,_=//              +            _".;\|+\';_||,             +            |+`||+_;;|_/||             +            ** ,||||||_|=\             +            |  ||/||\/ |"|             +            /  '|/||*/+|_|             +            ** _|/=,"/|_|^             +            '`- ||||=/|\\|             +             \_-/|_*/**;|`             +             !_ *|\\^_|;"              +              \+!*||,_/*`              +               \_ '*+_+`               +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_12.txt b/codex-rs/tui/frames/default/frame_12.txt new file mode 100644 index 0000000000..50cfd73302 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_12.txt @@ -0,0 +1,17 @@ +                                       +                +***+.                 +               ,=`_/|,\                +               "  |/\+,                +               /+~||=="|               +              | '~|||./|               +              |'..*^"_|"               +              |   ~/\||\               +              |   /+\||"               +              *, ~/||+|~               +              |   /|*;*_               +              |.  |"=**/               +               ,  *|!_,|               +               / **|,*\|               +               '^/",|\|`               +                \ '~\./                +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_13.txt b/codex-rs/tui/frames/default/frame_13.txt new file mode 100644 index 0000000000..04ed71335c --- /dev/null +++ b/codex-rs/tui/frames/default/frame_13.txt @@ -0,0 +1,17 @@ +                                       +                 /***,                 +                 |__||                 +                 |`_|"                 +                 |**|_                 +                 *  ||                 +                 ":-||                 +                 ,  ||                 +                 +  "|                 +                /+  _~.                +                |"  +=|                +                '`.. ~`                +                 |___|                 +                 |+,|_                 +                 *__|=                 +                 , ."=                 +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_14.txt b/codex-rs/tui/frames/default/frame_14.txt new file mode 100644 index 0000000000..66e91f7187 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_14.txt @@ -0,0 +1,17 @@ +                                       +                 +***;                 +                 ,/__.\                +                |_||. |                +                ||/|"^~,               +                |||\   |               +                ~*||  '|               +                |||| . *               +                ||\|`  \               +                |||~   "               +                "^//  ;/               +                \|"",.,|               +                |*~|___|               +                /!"|===`               +                |\/*__/                +                 _* '=/                +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_15.txt b/codex-rs/tui/frames/default/frame_15.txt new file mode 100644 index 0000000000..9d8132e3c4 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_15.txt @@ -0,0 +1,17 @@ +                                       +                 ++***~_               +                `,=||^:*,              +               //|*=\|"*|              +               |/` //,.__|             +              ||="=\||/"^|             +              \||-||//|  "             +              ||   ||||~~,|            +              ||/~|+||| '-|            +              ||+,,*|||_.:|            +              |_|;/|\~*. .|            +              |/||||_| ` ;             +              |**.^~|\-  =             +              '|\, ///` ;`             +               |^||\\.+\/              +                \^*^___/               +                   ``                  \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_16.txt b/codex-rs/tui/frames/default/frame_16.txt new file mode 100644 index 0000000000..7217fe58b8 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_16.txt @@ -0,0 +1,17 @@ +                                       +                _=+"**+~_              +               /^||*||\|=\             +              |//"\/=\|| '\            +             /// ;' \|\||**|           +             ||;_ =||*/|`\           +            |||*|  /|= !| ~.|          +            \\|  ,||||/*", |          +            |/; |`||/|||"; `|          +            \\|~|+~/^||"*+  /          +            *"__,==\*|._| ,_|          +            |||+""/*\|;";.~|`          +             ||* |   `//,  /           +             \|*  |  /,/_,|            +              \|~"_*~//+_|             +               ':._=:__;*              +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_17.txt b/codex-rs/tui/frames/default/frame_17.txt new file mode 100644 index 0000000000..0d873df751 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_17.txt @@ -0,0 +1,17 @@ +                                       +                ,=+++;;~,_             +             _;**|~~*=*|,"^,           +            ,*\/_==`+,"|||_"\          +           /|/_/|"   |;\~||=\         +           |/_ ~     "/\=\//  ,        +          `=*,/`   ,:/| /,=/|./        +          *!;/|   ,//|_ *"||/=|        +          -"=|!   !//||/ ,||=;*        +          ,/*/\==+~\_|\^:\||| |        +           |"_;__|/*\/||\!\+'+\        +          \\\/"""****\_|*//\ \'        +           \||_*       `/||` ;         +            _\\!*\_   ,',/^_/          +             , ~*+=\+`_;*:|'           +              `+;/_,+~*_+*             +                   `                   \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_18.txt b/codex-rs/tui/frames/default/frame_18.txt new file mode 100644 index 0000000000..a474a4f3d0 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_18.txt @@ -0,0 +1,17 @@ +                                       +               _==+==+;~,_             +            _+"_;,++~__,"+;;_          +          _/:|*"*=" "._"+//\ *         +         ,||*.,^" _/=~\;\\\,       +        _\// /|   _\/~/|_\;\\_       +        /\| ,, _/,*,|'-/^/`/~!      +        ||\:/     +/*/|"_/"*|=|=,      +        "\-~|     ^\"||;^   |;|"       +       \"" ,\==;=;+~|,|*/\, |*|`       +        _\\|*\* ~|/__\_~||_;~`\ ,      +        |/|\`""*****` \__/|/*/`-`      +         \\!,\,         ``*"/*_'       +          \^*+^^.      _*^_/\,`        +           '|.**++===^'*_/_,*          +             "~|_/__,.+";+"            +                    `                  \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_19.txt b/codex-rs/tui/frames/default/frame_19.txt new file mode 100644 index 0000000000..e83b78bd3b --- /dev/null +++ b/codex-rs/tui/frames/default/frame_19.txt @@ -0,0 +1,17 @@ +                                       +              __==+~+==~._             +           _+|||\/===_*_,|*,,          +         ,*;;/"|+*`    `*:,`*;\        +        /;|*,^`         _==+,^|*,      +       ||/`/`         ,|^"/"|\ |\,     +      |\/*'         _|*~/!./ '.*|      +      ^=|~'        /*^/|+,`   /:/+|    +      ||||         |;"\|",    | |||    +      |*|\,=;;===~~~|+*;*|;   \ "||    +      ^;/,|=*/^*+\,`, ^_ :\_\,/.|_     +      '\"/+|"""""**"   ^\_/|// //'     +       \\^*_\             `//_//'      +        '!_\~~*,        ,;=./|;`       +          '".|*/~+__=;/*" ;*~'         +             "~._:-'_,.^*-^            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_2.txt b/codex-rs/tui/frames/default/frame_2.txt new file mode 100644 index 0000000000..ac205dd4a5 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_2.txt @@ -0,0 +1,17 @@ +                                       +             _._:=+===+,_              +         _+,/*;+||~=~|=_'|*+_          +       ,|*|\**~*``  `"*=*/||;|,        +     _|/_/*',,_           -,\|/|,      +     ,^"/*^|\_\\_           ^,|\|,     +    '/+"`  |*\+/\+           \\|*|     +   ,|'*|    ^/|;|_|,          /"|"|    +   |" \`     ,|*||;*          |'/.|    +   *""=|    ;|^^_|".~++++++++,|_|~*    +    _='|  /||' /* |=\____..__|+/!|!    +    \\\ * *\..|'   `"*******"|,*||     +     '\_./, `              ,+;/,*      +       .\__|+,          ,=_+!_|"       +        `~^;__"*+:;=;;.=*`_||*         +           `*+*+~~____~;/*"            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_20.txt b/codex-rs/tui/frames/default/frame_20.txt new file mode 100644 index 0000000000..bff8cc065f --- /dev/null +++ b/codex-rs/tui/frames/default/frame_20.txt @@ -0,0 +1,17 @@ +                                       +              __+=~~=+=,__             +          ,;=";,_,===||_^*\+,          +        ,,"_+*"~*"    `"^"\+*|+_       +      _|"_*|*           _,+|\/*\\      +     _| ,|*           _/!_||^*\||\     +     /`,|'           +*';|"/  '\~|\    +    ;|;+|          ,* .+*^     ,\|/    +    |_^/`          "";:|",     |~"|    +    |/||;,=;======_,';^^\\*    / |\    +    '|^|_" /``____|\  *\\"|=\ ,/ ||    +     \,^\'"""""""*"     \,=||,| /\     +      * ^*/,               _/*.|/      +        \_^*,~_          ,;*`;*'       +          ^,-."~+^;;,:"~"`,/*'         +            `*+~_!=____|*""            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_21.txt b/codex-rs/tui/frames/default/frame_21.txt new file mode 100644 index 0000000000..b23aadbc7c --- /dev/null +++ b/codex-rs/tui/frames/default/frame_21.txt @@ -0,0 +1,17 @@ +                                       +             __,=+==+=+,__             +          ,+*``__+~=~+;_`-*+_          +        ;*^_+*^"`     `^~*+_`*,        +      ,*|;"'             _,;*,;*,      +     /,/*`             ,|/_\ \\_^,     +    /"/|             ,**_//    \\^,    +    |'|`           _!/`,/'     \;\"    +     `\            \; "|,       | |    +    | |  ,+;;;;;+++  ^|,"|,    ;/ |    +    | ~\ |_      _,|   ^"`*|,  /"./    +     ; ". ``"""  '`     '*_,; /` ,     +     '+ :;_                 _*" /      +       *_  ^-_          _.;*' ,`       +         *=_ *"*+:~~;:=*""  -`         +            *++;+____,_;+*`            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_22.txt b/codex-rs/tui/frames/default/frame_22.txt new file mode 100644 index 0000000000..ccc8480d8b --- /dev/null +++ b/codex-rs/tui/frames/default/frame_22.txt @@ -0,0 +1,17 @@ +                                       +             _,+=+==+=+,_              +         _+/*|._/|/\||;|+/*+_          +       ,;*;~\**`    `"*\**+__+,        +      ;*~**"            ,,|||_*\       +     \|~/'            ,_/|=|./;'|      +    \|*/`           ,~/|;^/` \|\=|     +   |+*\/           ~+|\*/'    ~|/|     +   ||=|`           |\|~^\     |^|"|    +   ||,", +~==;;;=++_\*|_!\,   _|;"!    +   ^|= *_\\,!/,"~//|  \*;_"|,,!/\=     +    \\\_| """""**"`    `:*+_///",`     +     \*\_\,               _*,"|,'      +      '"+; ++_         _.*,"*_/        +        ':*+,"*~;=+;;/=*""',*          +           "~"~_;___-=_.=*`            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_23.txt b/codex-rs/tui/frames/default/frame_23.txt new file mode 100644 index 0000000000..406ced01b0 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_23.txt @@ -0,0 +1,17 @@ +                                       +            _,+_=+*++=+__              +         _=|+|\_,_==,|_|*|+_           +       ,"+|',;*`    "~:+|\;||,         +      /;|*;/`          _;;\||;\        +     //|`/'          ,/,,'*/*\|\       +    ,\|"/`         _***''/*'|~\|,      +    `||"|         /:/. _|`  "!|'*      +    ~/| |         |"|,_\,   | */|      +    ^"\ |+~;=====;=|_*|_"\_ | |~|      +    |\\_|"="       /`\ \|_\,~ \_|      +     /'| | `"""""""   '`/;=|_/^/`      +      ,||_|.             ,/|\^/`       +       \ |,'/__       _.";*/+/         +         \=\+;*+\~==_++"-_+*`          +           "~!*=\~__+__**`             +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_24.txt b/codex-rs/tui/frames/default/frame_24.txt new file mode 100644 index 0000000000..73f5639390 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_24.txt @@ -0,0 +1,17 @@ +                                       +             _~_;++*==,_               +          ,"_/"|__~==+,_'+             +        ,"';\/+"~ .`:*~**, \           +       ,'//,/|=,\`~/`!_*\|\_'          +      , //\/,    `""/\_|``\|,'         +      ~,\+\`       *,,/!.|;!/"\        +     |  |~!      ,/_,/"/^\|\^|^        +     | \||       |,=/\_|~_/.`||        +     |. |;;;:++~~~++_*,_| |  ||        +      _ / !*|/,,;;,,|.^\+*| |*|        +      \ '\|\*""""""` \,.*\|=/,`        +       \ \,*\           |!"/;/         +        \.*\`|.      _="_/:_*          +          .-*,\^"~~:==;|^_/`           +            *:_*+;\__==+*              +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_25.txt b/codex-rs/tui/frames/default/frame_25.txt new file mode 100644 index 0000000000..6fb0cbc16c --- /dev/null +++ b/codex-rs/tui/frames/default/frame_25.txt @@ -0,0 +1,17 @@ +                                       +             _+=*;++++_                +           ,!*,*`_;\|*||,              +          /|//,,".|+\=\|||_            +         |+*| /! =| "\|,*\/            +        ,__\,/'^;/_|" |//\/*           +        \,~|~_*+.^|: /|,|//|,          +        |/|*| |__/\_/|\/_"|=|          +        |||/|."!~_=\/|\_~=||\          +       ^+\|"|__====+~|\\|+*|\          +        /-"|/|,|_||;*_|\*=/\|          +        \~*/\|`"""""'+/|\|/|`          +         |_"|;+;\-,*:_/,//|/           +          ^`^|_\_*;/,^/_||/            +           \.;\\_*=|**!*|*             +             ~,"*\+,_+|*               +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_26.txt b/codex-rs/tui/frames/default/frame_26.txt new file mode 100644 index 0000000000..8bd6052839 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_26.txt @@ -0,0 +1,17 @@ +                                       +              _;***"+,                 +             /*|;/\|+;|,               +            /*""|;\|\""\,              +           ;*",||~_||_+/^              +           |_,\|.~"*\/;|\;             +           \ "|/:/"*_\"\\/             +          |!  *'=||/||;;"+             +          /-  \|||^^=||/||             +          |  .\*;+~+==/\||             +          ! ._|/,|__,*\\*|             +           |`"/|*"\,/`+\||             +           \_~|/\   //"||`             +            *  *|\ ^`/|/,              +             |"*\\"*_**;               +              \/:^*~_\*                +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_27.txt b/codex-rs/tui/frames/default/frame_27.txt new file mode 100644 index 0000000000..e8630695b8 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_27.txt @@ -0,0 +1,17 @@ +                                       +                ;***+,                 +               |;:/|/\                 +              ;'` *|/'|                +              |~~^||;|~                +              |  `|_-'=                +              ~_._"`|||`               +              = "||_*||!               +             |  `||~="||               +             |. .!|+||||               +             '= ."_|_*||               +              |- _^**+/'               +              ||++||_/|                +              |==+=,/|^                +               \__|\=//                +               '\" ^\/                 +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_28.txt b/codex-rs/tui/frames/default/frame_28.txt new file mode 100644 index 0000000000..3313d8b9bf --- /dev/null +++ b/codex-rs/tui/frames/default/frame_28.txt @@ -0,0 +1,17 @@ +                                       +                 /**;                  +                 |+_|`                 +                 = ;|`                 +                 |-`*|                 +                 |  ~|                 +                 | -"|                 +                ^|~ _|                 +                 |-""|                 +                /\  _|                 +                ||.:~|                 +                 |  _|                 +                 |=+=|                 +                 |=*||                 +                 *__/|                 +                 ~ .+|                 +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_29.txt b/codex-rs/tui/frames/default/frame_29.txt new file mode 100644 index 0000000000..2ae088f1b9 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_29.txt @@ -0,0 +1,17 @@ +                                       +                 +****,                +                ,|*/!*\                +                ^,|| '"|               +                ||||^\,/               +                \ ~"|  |               +                |,~|| __               +                |\\||| ^               +                ||=~|                  +                ||~*|   `              +                _|=||   `              +                *||/|^ =               +                |/~~| _|               +                ~|||`~_|               +                |=|*/"|'               +                 ~|* .,                +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_3.txt b/codex-rs/tui/frames/default/frame_3.txt new file mode 100644 index 0000000000..727e25a8e8 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_3.txt @@ -0,0 +1,17 @@ +                                       +             _.=;++====,_              +         _+,/\||+|"==|;_^|*+_          +       ,;/*;|*""`   `"~!**+/^|,        +      /+/\|;,+_          `=*!||\       +     '/*|/^/||*\_           \^\||_     +    /|\\/  .,|\;\\           | \\|     +    =* |    '*\|_"|,          .*/|,    +   ,-|,|     ,-|"/\|          ~_|=|    +    -"'|    ;|*+~|*-~=++___++_~^";|    +    ,\:\, ./*/;;| |*|__,!=.,;\`|\|`    +    '^| | "||+,"   "***"""**,///,/     +     '*~ \+ `              /^+^//      +       =^//*\,          ,+;/",|'       +         =^+,_**^=;=;,:=*;`_+"         +           `*+*_:~____~;/^"            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_30.txt b/codex-rs/tui/frames/default/frame_30.txt new file mode 100644 index 0000000000..99eeebce33 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_30.txt @@ -0,0 +1,17 @@ +                                       +                 _;"**+,               +               _/;||\*'=\              +               "'^|,\\|+,\             +              ||\|/|_\|\ \,            +              =*||`\|,|,  |            +             |*|^+  *||||.|            +             \/|||\_ \/\| =`           +             "| '+=~,|"|-  `           +             "|_"\~=~\/|,  `           +             "||\|__~|!+,  `           +             !\||;\_*~||+~|            +              |*//,/*\||" |            +              \|\||/*~|,~/             +               ,^,+=^/|,/'             +                \-.|^__;'              +                  ````                 \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_31.txt b/codex-rs/tui/frames/default/frame_31.txt new file mode 100644 index 0000000000..8d9adf28b2 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_31.txt @@ -0,0 +1,17 @@ +                                       +                _.:*+*+=,              +              _+*;+,_"+\'*,            +             ,|\//,=_`."|_*\           +            ,~/+__*;_,\\|\~|\          +            ^||||+-*\_,"\|/__          +           ;|^`~_|'"\;*,./|,"|         +           /|| |^*|\.=/;*|*|/|         +           \\, |~"|\ |^""|~\.|         +           |\,_|'^~|~/+~~|_  |         +           "||~//||___\_|\|| *         +           ^*_/+|, /***`/|'~_!         +            |||\\\,     _=* |          +             ;|*=_!,  . |*`/`          +              :|\|/_|`,|",|`           +               '"=~_+*/.;*             +                   ````                \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_32.txt b/codex-rs/tui/frames/default/frame_32.txt new file mode 100644 index 0000000000..4175a7a66e --- /dev/null +++ b/codex-rs/tui/frames/default/frame_32.txt @@ -0,0 +1,17 @@ +                                       +                ,++++;;~,_             +              ;*~**~\||**|~,           +            /^*=^,+^:-`*|*\'*,         +           '//|_,`;- - ,_\|+,!,        +          //|,|*\'*|; '`,~\/\*\,       +          \/\\,\*|`:||+_   |+/ *       +         *|";,`'\||,,|,=`/_//|'_       +         |||,_  "_||"/'|;-_"\|""`      +         \||-_ '_|"__|+++~~~=|"=`      +         '""_`|*\'\_____||*|;~-_       +           ,\*||/ |*""***^;///./       +           \,|^\\        ,\|/'~        +           '**||~+_    _/_|/ ,         +             \-\"~+|;=*`_+"_/          +               ~;=__,+/*_""            +                   ```                 \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_33.txt b/codex-rs/tui/frames/default/frame_33.txt new file mode 100644 index 0000000000..dbd9568018 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_33.txt @@ -0,0 +1,17 @@ +                                       +               _,+=+=+=~._             +            _+*||\*=~:|-|*|*.          +          _/\|+*+,="`  "*/||+",        +         ,\/|/_|,_        *||\_*       +        _.|/`||/\^\         |+\\^      +        //,   \_\\`\,        /\/_\     +        ||+ !  \,*|_|\       |*||      +        *|,,   ,''\/=,       \"|*      +        ||| | ,` /*,,,;==+~~+/_|\~     +        ^/|'"/:,/`~|_____||*^^^~|.     +        \=\, |/|/ / """"*** ||,/^`     +         \+\*,",           //;/=/      +          *\"*,*;,      _+|,/*\'       +            \~"*\+|,;+_";,\*~*         +              "==+,___^+*;-"           +                   ````                \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_34.txt b/codex-rs/tui/frames/default/frame_34.txt new file mode 100644 index 0000000000..7fc67a92db --- /dev/null +++ b/codex-rs/tui/frames/default/frame_34.txt @@ -0,0 +1,17 @@ +                                       +               _,=++++=~,_             +           _+*+/\;|"~+*=**;,=_         +         _//,|*":~*`   `^\\,"**,       +        ,/_|*_/,_          *|,*\\      +       //|\-/|!|"!,          \\*\^     +      ,/\|`/ \\"|\*\          \,\|\    +      |*^~_   '\_*|_^          |;~_    +      \|=":    |*_|/"|         / _\    +      ,'/."   /\//"_==++++++~__" ~^`   +      ||\,/,,^"//'~||_~.___,/_||`|\    +       /_\, |\|*^!  "**````^ ,/,\|'    +        /,\;=\_             /;.|/'     +         \+`|+\;,        _+="_/,`      +           -\/~"|+,;,+=*=*`+*:'        +             "~\;=_____;=*=^           +                   ```                 \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_35.txt b/codex-rs/tui/frames/default/frame_35.txt new file mode 100644 index 0000000000..570f34f0de --- /dev/null +++ b/codex-rs/tui/frames/default/frame_35.txt @@ -0,0 +1,17 @@ +                                       +              _,+;=+++=+,_             +           ,*=*.~**+"|*~:"~*=_         +        _//|;+*|^*"`  `"*=*."|*,       +       ,//+/,;,_            *+_\|_     +      //~|//\ "\*,            |\*|,    +     ;/;/+` '|_"..*_           |\\|    +     \ !./    \\ '*_.           |^\\   +     ~|~:      /\\;/'           / "/   +     / ,_    ,||/;"/|==_;_=+~~  |~=*   +     |,^;'  //;"*+/|; \,____/"~/' |'   +      /`\,'/\_|/^`  `"^^^^*^^*//_,|    +       ".^\/~               _/* ,^     +        \;`^;,:,          ,;/_**'      +          "^_"~*~-:~~+~;/*"_/;"        +             "^~;=__/__++*"^           +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_36.txt b/codex-rs/tui/frames/default/frame_36.txt new file mode 100644 index 0000000000..74d83c8e70 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_36.txt @@ -0,0 +1,17 @@ +                                       +              __+=++++=+,_             +          _=""\+/;/+\+;++"**+_         +        ,\'\,+*-*"`` `"*~*+|,*|,       +      _|"*+____            '*~\"|      +     ,/_;\'|\`\,.             ^\.*     +     / ,/`  *_ "|/,            "\^*    +    | ;!`     !\ "\\            |^|,   +    ||\~      _\ _//!           \| |   +    |'"|     // ,*"',++_+++++_  |\~|   +     _*|\  ,|__/~/ !`~_______|| \/'`   +     ' *|\ +_+/^     "**^^^^^" |,"/    +      ',"\;.                 ,/|"/     +        \/||+~,           ,++"/,`      +          *,_"**=^;~_+~;"-",;+'        +            `*+/~_,,_,,++**"           +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_4.txt b/codex-rs/tui/frames/default/frame_4.txt new file mode 100644 index 0000000000..06dbce99c0 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_4.txt @@ -0,0 +1,17 @@ +                                       +             _.=;+==+=+,_              +         _-"+*|/!|\=/*;|"/*,_          +       ,*=|||+*"`   `^~\^*|/\\_        +      //|,|".+,          "|**\*\       +     /|/_|=|\;^|,          \"\|*\      +    /||^|  '_||/*\          ' \=|,     +    "\|;`   '**\+"|,         , ";|     +     |.\     ,|/*^||           |||     +    _|!|_   ;|/"^//+~+++____,, ||*     +    |\/!| ,///,_|`=\|,._,:/^;|//"|     +     `|;'\,\\,\/   "*******'^-|||`     +      ,|\"|_`             ,^;/**'      +       \\,:^!,_        _.^,*;|/        +         ~||=_**\;;=;,+=*+\|*`         +            *\\~:~_____;-*`            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_5.txt b/codex-rs/tui/frames/default/frame_5.txt new file mode 100644 index 0000000000..6b1ce12447 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_5.txt @@ -0,0 +1,17 @@ +                                       +             _.=;;+===+,_              +         _+"+/*/||+~=+;_|"+,           +        *_/\+|*"`   "^=|*\!,*,         +      ,|/|/|.=,          -^||||_       +     ,\/*/^_+|_\,         ` \|\|_      +     ~|||/ \_|\;/|_          +/||      +    |/|!+   `\_|\"|,        ''~+|,     +    |/|_"    ,_=|/_|          +|_|     +    |,|^*   /_|",|*=_~+~___+,_"|.|     +     _\|\,,/+*" |"!//\=^,=.,/|/*|`     +     \,||,~,\\/+`  "**""""",~;|\/      +      \\+/\\ `            /_/*,^       +       ^/*\|=+_        _=+,*';*        +         ^|*|,*+\;~=_,+=*^~;*          +            ^-*_*"___-_,+*`            +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_6.txt b/codex-rs/tui/frames/default/frame_6.txt new file mode 100644 index 0000000000..7724f483dc --- /dev/null +++ b/codex-rs/tui/frames/default/frame_6.txt @@ -0,0 +1,17 @@ +                                       +             _.=;;+==++__              +          ,^;/*|=*+|++;_,*+_           +        ,,,|||*"   `"~.=*+*/\_         +       /,|*|*_=,        \+||||,        +      '=|||*\\+*\         .\\|\,       +     ;-/|/`^+;|\_|,        .=\/|       +     _ +~|   !^\|/^\        ^+|_|      +     ~ |~|   _|=~/||        ~+\||      +     _.|-|  /'||*;/+_~+~__++_.\/|      +     ||\,/_^_;+ |/=*,||,;==\|,|\!      +      / | /~||;/"  "*"""'*"`\\/|       +       , ; /,`           ,:_//|`       +        .`\_**,       _+^_/*,+         +         `"~*,"+!;~__,+**!:;'          +            ^-;*+,___`_,+*             +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_7.txt b/codex-rs/tui/frames/default/frame_7.txt new file mode 100644 index 0000000000..0d0f43072c --- /dev/null +++ b/codex-rs/tui/frames/default/frame_7.txt @@ -0,0 +1,17 @@ +                                       +             _.~;*+==+,_               +          ,*`+\|+*+==\;!`*,            +         * ,|||*`  `^~`!*/_*,          +        \\|||~;+       ^~\*|/,         +       `'|*||^|/\,       . *||\        +      | ;||" `'\;|\       ,-|||        +       `\"|  ^_|\|\|       **^||       +      _"/~|   =+/|*|`      ' |||       +       /"~* ,"_/|\/~~;;_~~=;*\||       +      |,'||=:~|/'|.\||\\,=,;\|\|       +       \ =^/*|*_/  ******""_/||        +       '_ /_/_`         ,"-/;/'        +        ';,+\\\_      ,^~,*/*'         +          \_'\|*\;~___+*|*+/           +            "~*"~:~__,_;**             +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_8.txt b/codex-rs/tui/frames/default/frame_8.txt new file mode 100644 index 0000000000..2e8019c061 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_8.txt @@ -0,0 +1,17 @@ +                                       +             __+_;++=+,_               +           ,"*/|||*==!~ "+             +         _|=,|//*!,"~/~*\+^,           +        _*\*/|,+|     ' =^||\          +        ' /|/,\|/\      .'\||,         +       |',|\^^_\|_*      \+|||         +       |*||| '_;\|`|      ^|/|,        +       \,||/  |+\/|,*.    .`/||        +       \ \||_^ !/*=|~/+,+,,\~||        +       !  \*/=_|",|,||;|=__||='        +        //\\|\|||/'^*^*"\*"/\|         +        ',"|\|``        .,///'         +         '\_*\\\_    _/\_|+/*          +           .:'|,*!;;+*;/=,|`           +             ~~_**\|_,+/=`             +                  ``                   \ No newline at end of file diff --git a/codex-rs/tui/frames/default/frame_9.txt b/codex-rs/tui/frames/default/frame_9.txt new file mode 100644 index 0000000000..128e915007 --- /dev/null +++ b/codex-rs/tui/frames/default/frame_9.txt @@ -0,0 +1,17 @@ +                                       +              .=^*/++=,                +            /*_/||*"=!_-\_             +           / ,||/*^^=/!\_~,            +          " ||/;=_ _^,|\^|+,           +         /*";\*"|*,  +:+||           +         | |||"^|\;*   '|*|||          +         ` ~*\ **|\\," / `||          +        |  ~/_ ~||_/= | !||          +        !  ",|" /|"|~~|+|~,||`         +         |_|||_,|^|_||||__|||          +         " `^/\\|/"****||"/\|          +          \~||\,`     ,/ ^/|`          +           \+\|\\    /;_;|/*           +            ^-"\_|*/+=;;*|`            +             '-_ *\\|;+/"              +                                       \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_1.txt b/codex-rs/tui/frames/dots/frame_1.txt new file mode 100644 index 0000000000..36964a4864 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_1.txt @@ -0,0 +1,17 @@ + + ○◉○◉○●●○○●●○ + ○○●◉●○●◉●○○··○○ ○ ●○ + ●·●·●●● ○· · ●· ·○···● + ◉●○○●●●●○ ◉●·◉·● + ○○◉◉●○·○·○○ ◉·○○● + ·● ●· ·●◉◉··● ●◉○··● + ●○ ◉● ●○·●◉ ·○ ·◉· + ··○·· ●◉◉·◉·● ·· + ·○·●· ◉··○○· ◉·●●●●●●○●● ○ · + ○·◉● ○◉●· ◉● · ·○○○◉◉●●●·◉●◉●· + ○○○ ○ ○○●◉◉· ·○●●●● ○● ◉●◉○◉ + ●○● ● · ●●◉●○· + ○○●·○●○ ○○○●·○● + ○●●○○ ●●◉◉○◉◉◉○●●○●·● + ·● ●···○○○●○◉●● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_10.txt b/codex-rs/tui/frames/dots/frame_10.txt new file mode 100644 index 0000000000..3c687d7f64 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_10.txt @@ -0,0 +1,17 @@ + + ○●●●●○●●○ + ●●·●●●○·◉○●● + ○○●··◉··◉·●○●● + ·○○◉○·◉○◉○●●●○○● + ◉ ◉·· ·○ ●●◉○◉·◉ + ·· ●·●·◉◉○ ·○ · + ○ ·● ●····● ·◉● + ··○●◉●··◉○·◉○·· + ·○ ○○·◉··●○●◉·· + · ●·○●·○◉○●○○○·●· + ● ····· ○● ○·· + ○·●●○●● ○· ●◉◉ + ·● ····●●◉●◉·◉· + ◉·●●◉·●◉○ ◉◉● + ●● ○●○○●◉● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_11.txt b/codex-rs/tui/frames/dots/frame_11.txt new file mode 100644 index 0000000000..c2548db4b3 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_11.txt @@ -0,0 +1,17 @@ + + ●●●●●●●○ + ◉ ◉···○○● + ◉ ○○··◉○●◉○● + ·○○··○◉●○○◉◉ + ○ ◉◉○·●○●◉○··● + ·●···●○◉◉·○◉·· + ●● ●······○·○○ + · ··◉··○◉ · · + ◉ ●·◉··●◉●·○· + ●● ○·◉○● ◉·○·○ + ●·◉ ····○◉·○○· + ○○◉◉·○●◉●●◉·· + ○ ●·○○○○·◉ + ○● ●··●○◉●· + ○○ ●●●○●· + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_12.txt b/codex-rs/tui/frames/dots/frame_12.txt new file mode 100644 index 0000000000..30b03392bf --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_12.txt @@ -0,0 +1,17 @@ + + ●●●●●◉ + ●○·○◉·●○ + ·◉○●● + ◉●···○○ · + · ●····◉◉· + ·●◉◉●○ ○· + · ·◉○··○ + · ◉●○·· + ●● ·◉··●·· + · ◉·●◉●○ + ·◉ · ○●●◉ + ● ●· ○●· + ◉ ●●·●●○· + ●○◉ ●·○·· + ○ ●·○◉◉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_13.txt b/codex-rs/tui/frames/dots/frame_13.txt new file mode 100644 index 0000000000..cb95f3763d --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_13.txt @@ -0,0 +1,17 @@ + + ◉●●●● + ·○○·· + ··○· + ·●●·○ + ● ·· + ◉◉·· + ● ·· + ● · + ◉● ○·◉ + · ●○· + ●·◉◉ ·· + ·○○○· + ·●●·○ + ●○○·○ + ● ◉ ○ + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_14.txt b/codex-rs/tui/frames/dots/frame_14.txt new file mode 100644 index 0000000000..3a8ed60b8f --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_14.txt @@ -0,0 +1,17 @@ + + ●●●●◉ + ●◉○○◉○ + ·○··◉ · + ··◉· ○·● + ···○ · + ·●·· ●· + ···· ◉ ● + ··○·· ○ + ···· + ○◉◉ ◉◉ + ○· ●◉●· + ·●··○○○· + ◉ ·○○○· + ·○◉●○○◉ + ○● ●○◉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_15.txt b/codex-rs/tui/frames/dots/frame_15.txt new file mode 100644 index 0000000000..c57b4af0ee --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_15.txt @@ -0,0 +1,17 @@ + + ●●●●●·○ + ·●○··○◉●● + ◉◉·●○○· ●· + ·◉· ◉◉●◉○○· + ··○ ○○··◉ ○· + ○··◉··◉◉· + ·· ······●· + ··◉··●··· ●◉· + ··●●●●···○◉◉· + ·○·◉◉·○·●◉ ◉· + ·◉····○· · ◉ + ·●●◉○··○◉ ○ + ●·○● ◉◉◉· ◉· + ·○··○○◉●○◉ + ○○●○○○○◉ + ·· \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_16.txt b/codex-rs/tui/frames/dots/frame_16.txt new file mode 100644 index 0000000000..18ae0e09ee --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_16.txt @@ -0,0 +1,17 @@ + + ○○● ●●●·○ + ◉○··●··○·○○ + ·◉◉ ○◉○○·· ●○ + ◉◉◉ ◉●○○·○··●●· + ··◉○◉●●○··●◉··○ + ···●·● ·○○ · ·◉· + ○○· ◉·●····◉● ● · + ·◉◉ ····◉··· ◉ ·· + ○○···●·◉○·· ●● ◉ + ● ○○●○○○●·◉○· ●○· + ···● ◉●○·◉ ◉◉··· + ··● ·· ·◉◉● ◉ + ○·● · ◉●◉○●· + ○·· ○●·◉◉●○· + ●◉◉○○◉○○◉● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_17.txt b/codex-rs/tui/frames/dots/frame_17.txt new file mode 100644 index 0000000000..a470b4ba8d --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_17.txt @@ -0,0 +1,17 @@ + + ●○●●●◉◉·●○ + ○◉●●···●○●·● ○● + ●●○◉○○○·●● ···○ ○ + ◉·◉○◉· ○· ●·◉○···○○ + ·◉○ · · ◉○○○◉◉ ● + ·○●●◉· ●◉◉· ◉●○◉·◉◉ + ● ◉◉· ●◉◉·○ ● ··◉○· + ◉ ○· ◉◉··◉·●··○◉● + ●◉●◉○○○●·○○·○○◉○··· · + · ○◉○○·◉●○◉··○ ○●●●○ + ○○○◉ ●●●●○○·●◉◉○ ○● + ○··○● ·◉··· ◉ + ○○○ ●○○ ●●●◉○○◉ + ● ·●●○○●·○◉●◉·● + ·●◉◉○●●·●○●● + · \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_18.txt b/codex-rs/tui/frames/dots/frame_18.txt new file mode 100644 index 0000000000..c0354b3933 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_18.txt @@ -0,0 +1,17 @@ + + ○○○●○○●◉·●○ + ○● ○◉●●●·○○● ●◉◉○ + ○◉◉·● ●○ ● ◉○ ●◉◉○ ● + ●··●◉●○ ● ●○·○◉○·○◉○○○● + ○○◉◉ ◉· ○ ●○○◉·◉·○○◉○○○ + ◉○· ●●·◉○○○◉●●●·●◉◉○◉·◉· + ··○◉◉ ●◉●◉· ○◉ ●·○·○● + ○◉·· ○○ ··◉○ ·◉· + ○ ●○○○◉○◉●··●·●◉○● ·●·· + ○○○·●○● ··◉○○○○···○◉··○ ● + ·◉·○· ●●●●●· ○○○◉·◉●◉·◉· + ○○ ●○● ··● ◉●○● + ○○●●○○◉ ○●○○◉○●· + ●·◉●●●●○○○○●●○◉○●● + ··○◉○○●◉● ◉● + · \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_19.txt b/codex-rs/tui/frames/dots/frame_19.txt new file mode 100644 index 0000000000..c9ded56838 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_19.txt @@ -0,0 +1,17 @@ + + ○○○○●·●○○·◉○ + ○●···○◉○○○○●○●·●●● + ●●◉◉◉ ·●●· ·●◉●·●◉○ + ◉◉·●●○· ○○○●●○·●● + ··◉·◉· ●·○ ◉ ·○ ·○● + ·○◉●● ○·●·◉ ◉◉ ●◉●· + ○○··● ◉●○◉·●●· ◉◉◉●· + ···· ·◉ ○· ● · ··· + ·●·○●○◉◉○○○····●●◉●·◉ ○ ·· + ○◉◉●·○●◉○●●○●·● ○○ ◉○○○●◉◉·○ + ●○ ◉●· ●● ○○○◉·◉◉ ◉◉● + ○○○●○○ ·◉◉○◉◉● + ● ○○··●● ●◉○◉◉·◉· + ● ◉·●◉·●○○○◉◉● ◉●·● + ·◉○◉◉●○●◉○●◉○ + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_2.txt b/codex-rs/tui/frames/dots/frame_2.txt new file mode 100644 index 0000000000..6e7a27fb29 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_2.txt @@ -0,0 +1,17 @@ + + ○◉○◉○●○○○●●○ + ○●●◉●◉●···○··○○●·●●○ + ●·●·○●●·●·· · ●○●◉··◉·● + ○·◉○◉●●●●○ ◉●○·◉·● + ●○ ◉●○·○○○○○ ○●·○·● + ●◉● · ·●○●◉○● ○○·●· + ●·●●· ○◉·◉·○·● ◉ · · + · ○· ●·●··◉● ·●◉◉· + ● ○· ◉·○○○· ◉·●●●●●●●●●·○··● + ○○●· ◉··● ◉● ·○○○○○○◉◉○○·●◉ · + ○○○ ● ●○◉◉·● · ●●●●●●● ·●●·· + ●○○◉◉● · ●●◉◉●● + ◉○○○·●● ●○○● ○· + ··○◉○○ ●●◉◉○◉◉◉○●·○··● + ·●●●●··○○○○·◉◉● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_20.txt b/codex-rs/tui/frames/dots/frame_20.txt new file mode 100644 index 0000000000..d9809e733c --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_20.txt @@ -0,0 +1,17 @@ + + ○○●○··○●○●○○ + ●◉○ ◉●○●○○○··○○●○●● + ●● ○●● ·● · ○ ○●●·●○ + ○· ○●·● ○●●·○◉●○○ + ○· ●·● ○◉ ○··○●○··○ + ◉·●·● ●●●◉· ◉ ●○··○ + ◉·◉●· ●● ◉●●○ ●○·◉ + ·○○◉· ◉◉· ● ·· · + ·◉··◉●○◉○○○○○○○●●◉○○○○● ◉ ·○ + ●·○·○ ◉··○○○○·○ ●○○ ·○○ ●◉ ·· + ○●○○● ● ○●○··●· ◉○ + ● ○●◉● ○◉●◉·◉ + ○○○●●·○ ●◉●·◉●● + ○●◉◉ ·●○◉◉●◉ · ·●◉●● + ·●●·○ ○○○○○·● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_21.txt b/codex-rs/tui/frames/dots/frame_21.txt new file mode 100644 index 0000000000..0821f12d75 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_21.txt @@ -0,0 +1,17 @@ + + ○○●○●○○●○●●○○ + ●●●··○○●·○·●◉○·◉●●○ + ◉●○○●●○ · ·○·●●○·●● + ●●·◉ ● ○●◉●●◉●● + ◉●◉●· ●·◉○○ ○○○○● + ◉ ◉· ●●●○◉◉ ○○○● + ·●·· ○ ◉·●◉● ○◉○ + ·○ ○◉ ·● · · + · · ●●◉◉◉◉◉●●● ○·● ·● ◉◉ · + · ·○ ·○ ○●· ○ ·●·● ◉ ◉◉ + ◉ ◉ ·· ●· ●●○●◉ ◉· ● + ●● ◉◉○ ○● ◉ + ●○ ○◉○ ○◉◉●● ●· + ●○○ ● ●●◉··◉◉○● ◉· + ●●●◉●○○○○●○◉●●· + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_22.txt b/codex-rs/tui/frames/dots/frame_22.txt new file mode 100644 index 0000000000..d673349801 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_22.txt @@ -0,0 +1,17 @@ + + ○●●○●○○●○●●○ + ○●◉●·◉○◉·◉○··◉·●◉●●○ + ●◉●◉·○●●· · ●○●●●○○●● + ◉●·●● ●●···○●○ + ○··◉● ●○◉·○·◉◉◉●· + ○·●◉· ●·◉·◉○◉· ○·○○· + ·●●○◉ ·●·○●◉● ··◉· + ··○·· ·○··○○ ·○· · + ··● ● ●·○○◉◉◉○●●○○●·○ ○● ○·◉ + ○·○ ●○○○● ◉● ·◉◉· ○●◉○ ·●● ◉○○ + ○○○○· ●● · ·◉●●○◉◉◉ ●· + ○●○○○● ○●● ·●● + ● ●◉ ●●○ ○◉●● ●○◉ + ●◉●●● ●·◉○●◉◉◉○● ●●● + · ·○◉○○○◉○○◉○●· + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_23.txt b/codex-rs/tui/frames/dots/frame_23.txt new file mode 100644 index 0000000000..180ab16784 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_23.txt @@ -0,0 +1,17 @@ + + ○●●○○●●●●○●○○ + ○○·●·○○●○○○●·○·●·●○ + ● ●·●●◉●· ·◉●·○◉··● + ◉◉·●◉◉· ○◉◉○··◉○ + ◉◉··◉● ●◉●●●●◉●○·○ + ●○· ◉· ○●●●●●◉●●··○·● + ··· · ◉◉◉◉ ○·· ·●● + ·◉· · · ·●○○● · ●◉· + ○ ○ ·●·◉○○○○○◉○·○●·○ ○○ · ··· + ·○○○· ○ ◉·○ ○·○○●· ○○· + ◉●· · · ●·◉◉○·○◉○◉· + ●··○·◉ ●◉·○○◉· + ○ ·●●◉○○ ○◉ ◉●◉●◉ + ○○○●◉●●○·○○○●● ◉○●●· + · ●○○·○○●○○●●· + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_24.txt b/codex-rs/tui/frames/dots/frame_24.txt new file mode 100644 index 0000000000..3244b1c6f9 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_24.txt @@ -0,0 +1,17 @@ + + ○·○◉●●●○○●○ + ● ○◉ ·○○·○○●●○●● + ● ●◉○◉● · ◉·◉●·●●● ○ + ●●◉◉●◉·○●○··◉· ○●○·○○● + ● ◉◉○◉● · ◉○○···○·●● + ·●○●○· ●●●◉ ◉·◉ ◉ ○ + · ·· ●◉○●◉ ◉○○·○○·○ + · ○·· ·●○◉○○··○◉◉··· + ·◉ ·◉◉◉◉●●···●●○●●○· · ·· + ○ ◉ ●·◉●●◉◉●●·◉○○●●· ·●· + ○ ●○·○● · ○●◉●○·○◉●· + ○ ○●●○ · ◉◉◉ + ○◉●○··◉ ○○ ○◉◉○● + ◉◉●●○○ ··◉○○◉·○○◉· + ●◉○●●◉○○○○○●● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_25.txt b/codex-rs/tui/frames/dots/frame_25.txt new file mode 100644 index 0000000000..c04ef18b74 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_25.txt @@ -0,0 +1,17 @@ + + ○●○●◉●●●●○ + ● ●●●·○◉○·●··● + ◉·◉◉●● ◉·●○○○···○ + ·●●· ◉ ○· ○·●●○◉ + ●○○○●◉●○◉◉○· ·◉◉○◉● + ○●···○●●◉○·◉ ◉·●·◉◉·● + ·◉·●· ·○○◉○○◉·○◉○ ·○· + ···◉·◉ ·○○○◉·○○·○··○ + ○●○· ·○○○○○○●··○○·●●·○ + ◉◉ ·◉·●·○··◉●○·○●○◉○· + ○·●◉○·· ●●◉·○·◉·· + ·○ ·◉●◉○◉●●◉○◉●◉◉·◉ + ○·○·○○○●◉◉●○◉○··◉ + ○◉◉○○○●○·●● ●·● + ·● ●○●●○●·● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_26.txt b/codex-rs/tui/frames/dots/frame_26.txt new file mode 100644 index 0000000000..1ecc43beef --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_26.txt @@ -0,0 +1,17 @@ + + ○◉●●● ●● + ◉●·◉◉○·●◉·● + ◉● ·◉○·○ ○● + ◉● ●···○··○●◉○ + ·○●○·◉· ●○◉◉·○◉ + ○ ·◉◉◉ ●○○ ○○◉ + · ●●○··◉··◉◉ ● + ◉◉ ○···○○○··◉·· + · ◉○●◉●·●○○◉○·· + ◉○·◉●·○○●●○○●· + ·· ◉·● ○●◉·●○·· + ○○··◉○ ◉◉ ··· + ● ●·○ ○·◉·◉● + · ●○○ ●○●●◉ + ○◉◉○●·○○● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_27.txt b/codex-rs/tui/frames/dots/frame_27.txt new file mode 100644 index 0000000000..83e62da52e --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_27.txt @@ -0,0 +1,17 @@ + + ◉●●●●● + ·◉◉◉·◉○ + ◉●· ●·◉●· + ···○··◉·· + · ··○◉●○ + ·○◉○ ····· + ○ ··○●·· + · ····○ ·· + ·◉ ◉ ·●···· + ●○ ◉ ○·○●·· + ·◉ ○○●●●◉● + ··●●··○◉· + ·○○●○●◉·○ + ○○○·○○◉◉ + ●○ ○○◉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_28.txt b/codex-rs/tui/frames/dots/frame_28.txt new file mode 100644 index 0000000000..6d460c936d --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_28.txt @@ -0,0 +1,17 @@ + + ◉●●◉ + ·●○·· + ○ ◉·· + ·◉·●· + · ·· + · ◉ · + ○·· ○· + ·◉ · + ◉○ ○· + ··◉◉·· + · ○· + ·○●○· + ·○●·· + ●○○◉· + · ◉●· + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_29.txt b/codex-rs/tui/frames/dots/frame_29.txt new file mode 100644 index 0000000000..d0d6b3c286 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_29.txt @@ -0,0 +1,17 @@ + + ●●●●●● + ●·●◉ ●○ + ○●·· ● · + ····○○●◉ + ○ · · · + ·●··· ○○ + ·○○··· ○ + ··○·· + ···●· · + ○·○·· · + ●··◉·○ ○ + ·◉··· ○· + ······○· + ·○·●◉ ·● + ··● ◉● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_3.txt b/codex-rs/tui/frames/dots/frame_3.txt new file mode 100644 index 0000000000..062da3ed89 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_3.txt @@ -0,0 +1,17 @@ + + ○◉○◉●●○○○○●○ + ○●●◉○··●· ○○·◉○○·●●○ + ●◉◉●◉·● · · · ●●●◉○·● + ◉●◉○·◉●●○ ·○● ··○ + ●◉●·◉○◉··●○○ ○○○··○ + ◉·○○◉ ◉●·○◉○○ · ○○· + ○● · ●●○·○ ·● ◉●◉·● + ●◉·●· ●◉· ◉○· ·○·○· + ◉ ●· ◉·●●··●◉·○●●○○○●●○·○ ◉· + ●○◉○● ◉◉●◉◉◉· ·●·○○● ○◉●◉○··○·· + ●○· · ··●● ●●● ●●●◉◉◉●◉ + ●●· ○● · ◉○●○◉◉ + ○○◉◉●○● ●●◉◉ ●·● + ○○●●○●●○○◉○◉●◉○●◉·○● + ·●●●○◉·○○○○·◉◉○ + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_30.txt b/codex-rs/tui/frames/dots/frame_30.txt new file mode 100644 index 0000000000..4bf02ade3d --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_30.txt @@ -0,0 +1,17 @@ + + ○◉ ●●●● + ○◉◉··○●●○○ + ●○·●○○·●●○ + ··○·◉·○○·○ ○● + ○●···○·●·● · + ·●·○● ●····◉· + ○◉···○○ ○◉○· ○· + · ●●○·●· ·◉ · + ·○ ○·○·○◉·● · + ··○·○○·· ●● · + ○··◉○○●···●·· + ·●◉◉●◉●○·· · + ○·○··◉●··●·◉ + ●○●●○○◉·●◉● + ○◉◉·○○○◉● + ···· \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_31.txt b/codex-rs/tui/frames/dots/frame_31.txt new file mode 100644 index 0000000000..99385ee51f --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_31.txt @@ -0,0 +1,17 @@ + + ○◉◉●●●●○● + ○●●◉●●○ ●○●●● + ●·○◉◉●○○·◉ ·○●○ + ●·◉●○○●◉○●○○·○··○ + ○····●◉●○○● ○·◉○○ + ◉·○··○·● ○◉●●◉◉·● · + ◉·· ·○●·○◉○◉◉●·●·◉· + ○○● ·· ·○ ·○ ··○◉· + ·○●○·●○···◉●···○ · + ···◉◉··○○○○○·○·· ● + ○●○◉●·● ◉●●●·◉·●·○ + ···○○○● ○○● · + ◉·●○○ ● ◉ ·●·◉· + ◉·○·◉○··●· ●·· + ● ○·○●●◉◉◉● + ···· \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_32.txt b/codex-rs/tui/frames/dots/frame_32.txt new file mode 100644 index 0000000000..771e9c9106 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_32.txt @@ -0,0 +1,17 @@ + + ●●●●●◉◉·●○ + ◉●·●●·○··●●··● + ◉○●○○●●○◉◉·●·●○●●● + ●◉◉·○●·◉◉ ◉ ●○○·●● ● + ◉◉·●·●○●●·◉ ●·●·○◉○●○● + ○◉○○●○●··◉··●○ ·●◉ ● + ●· ◉●·●○··●●·●○·◉○◉◉·●○ + ···●○ ○·· ◉●·◉◉○ ○· · + ○··◉○ ●○· ○○·●●●···○· ○· + ● ○··●○●○○○○○○··●·◉·◉○ + ●○●··◉ ·● ●●●○◉◉◉◉◉◉ + ○●·○○○ ●○·◉●· + ●●●···●○ ○◉○·◉ ● + ○◉○ ·●·◉○●·○● ○◉ + ·◉○○○●●◉●○ + ··· \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_33.txt b/codex-rs/tui/frames/dots/frame_33.txt new file mode 100644 index 0000000000..4d36c1eb6f --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_33.txt @@ -0,0 +1,17 @@ + + ○●●○●○●○·◉○ + ○●●··○●○·◉·◉·●·●◉ + ○◉○·●●●●○ · ●◉··● ● + ●○◉·◉○·●○ ●··○○● + ○◉·◉···◉○○○ ·●○○○ + ◉◉● ○○○○·○● ◉○◉○○ + ··● ○●●·○·○ ·●·· + ●·●● ●●●○◉○● ○ ·● + ··· · ●· ◉●●●●◉○○●··●◉○·○· + ○◉·● ◉◉●◉···○○○○○··●○○○··◉ + ○○○● ·◉·◉ ◉ ●●● ··●◉○· + ○●○●● ● ◉◉◉◉○◉ + ●○ ●●●◉● ○●·●◉●○● + ○· ●○●·●◉●○ ◉●○●·● + ○○●●○○○○●●◉◉ + ···· \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_34.txt b/codex-rs/tui/frames/dots/frame_34.txt new file mode 100644 index 0000000000..4cbd99c143 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_34.txt @@ -0,0 +1,17 @@ + + ○●○●●●●○·●○ + ○●●●◉○◉· ·●●○●●◉●○○ + ○◉◉●·● ◉·●· ·○○○● ●●● + ●◉○·●○◉●○ ●·●●○○ + ◉◉·○◉◉· · ● ○○●○○ + ●◉○··◉ ○○ ·○●○ ○●○·○ + ·●○·○ ●○○●·○○ ·◉·○ + ○·○ ◉ ·●○·◉ · ◉ ○○ + ●●◉◉ ◉○◉◉ ○○○●●●●●●·○○ ·○· + ··○●◉●●○ ◉◉●···○·◉○○○●◉○····○ + ◉○○● ·○·●○ ●●····○ ●◉●○·● + ◉●○◉○○○ ◉◉◉·◉● + ○●··●○◉● ○●○ ○◉●· + ◉○◉· ·●●◉●●○●○●·●●◉● + ·○◉○○○○○○◉○●○○ + ··· \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_35.txt b/codex-rs/tui/frames/dots/frame_35.txt new file mode 100644 index 0000000000..5ccdf711b5 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_35.txt @@ -0,0 +1,17 @@ + + ○●●◉○●●●○●●○ + ●●○●◉·●●● ·●·◉ ·●○○ + ○◉◉·◉●●·○● · · ●○●◉ ·●● + ●◉◉●◉●◉●○ ●●○○·○ + ◉◉··◉◉○ ○●● ·○●·● + ◉◉◉◉●· ●·○ ◉◉●○ ·○○· + ○ ◉◉ ○○ ●●○◉ ·○○○ + ···◉ ◉○○◉◉● ◉ ◉ + ◉ ●○ ●··◉◉ ◉·○○○◉○○●·· ··○● + ·●○◉● ◉◉◉ ●●◉·◉ ○●○○○○◉ ·◉● ·● + ◉·○●●◉○○·◉○· · ○○○○●○○●◉◉○●· + ◉○○◉· ○◉● ●○ + ○◉·○◉●◉● ●◉◉○●●● + ○○ ·●·◉◉··●·◉◉● ○◉◉ + ○·◉○○○◉○○●●● ○ + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_36.txt b/codex-rs/tui/frames/dots/frame_36.txt new file mode 100644 index 0000000000..6a26abaea6 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_36.txt @@ -0,0 +1,17 @@ + + ○○●○●●●●○●●○ + ○○ ○●◉◉◉●○●◉●● ●●●○ + ●○●○●●●◉● ·· · ●·●●·●●·● + ○· ●●○○○○ ●●·○ · + ●◉○◉○●·○·○●◉ ○○◉● + ◉ ●◉· ●○ ·◉● ○○● + · ◉ · ○ ○○ ·○·● + ··○· ○○ ○◉◉ ○· · + ·● · ◉◉ ●● ●●●●○●●●●●○ ·○·· + ○●·○ ●·○○◉·◉ ··○○○○○○○·· ○◉●· + ● ●·○ ●○●◉○ ●●○○○○○ ·● ◉ + ●● ○◉◉ ●◉· ◉ + ○◉··●·● ●●● ◉●· + ●●○ ●●○○◉·○●·◉ ◉ ●◉●● + ·●●◉·○●●○●●●●●● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_4.txt b/codex-rs/tui/frames/dots/frame_4.txt new file mode 100644 index 0000000000..b4496013b5 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_4.txt @@ -0,0 +1,17 @@ + + ○◉○◉●○○●○●●○ + ○◉ ●●·◉ ·○○◉●◉· ◉●●○ + ●●○···●● · ·○·○○●·◉○○○ + ◉◉·●· ◉●● ·●●○●○ + ◉·◉○·○·○◉○·● ○ ○·●○ + ◉··○· ●○··◉●○ ● ○○·● + ○·◉· ●●●○● ·● ● ◉· + ·◉○ ●·◉●○·· ··· + ○· ·○ ◉·◉ ○◉◉●·●●●○○○○●● ··● + ·○◉ · ●◉◉◉●○··○○·●◉○●◉◉○◉·◉◉ · + ··◉●○●○○●○◉ ●●●●●●●●○◉···· + ●·○ ·○· ●○◉◉●●● + ○○●◉○ ●○ ○◉○●●◉·◉ + ···○○●●○◉◉○◉●●○●●○·●· + ●○○·◉·○○○○○◉◉●· + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_5.txt b/codex-rs/tui/frames/dots/frame_5.txt new file mode 100644 index 0000000000..0905c495b2 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_5.txt @@ -0,0 +1,17 @@ + + ○◉○◉◉●○○○●●○ + ○● ●◉●◉··●·○●◉○· ●● + ●○◉○●·● · ○○·●○ ●●● + ●·◉·◉·◉○● ◉○····○ + ●○◉●◉○○●·○○● · ○·○·○ + ····◉ ○○·○◉◉·○ ●◉·· + ·◉· ● ·○○·○ ·● ●●·●·● + ·◉·○ ●○○·◉○· ●·○· + ·●·○● ◉○· ●·●○○·●·○○○●●○ ·◉· + ○○·○●●◉●● · ◉◉○○○●○◉●◉·◉●·· + ○●··●·●○○◉●· ●● ●·◉·○◉ + ○○●◉○○ · ◉○◉●●○ + ○◉●○·○●○ ○○●●●●◉● + ○·●·●●●○◉·○○●●○●○·◉● + ○◉●○● ○○○◉○●●●· + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_6.txt b/codex-rs/tui/frames/dots/frame_6.txt new file mode 100644 index 0000000000..3f96b66761 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_6.txt @@ -0,0 +1,17 @@ + + ○◉○◉◉●○○●●○○ + ●○◉◉●·○●●·●●◉○●●●○ + ●●●···● · ·◉○●●●◉○○ + ◉●·●·●○○● ○●····● + ●○···●○○●●○ ◉○○·○● + ◉◉◉·◉·○●◉·○○·● ◉○○◉· + ○ ●·· ○○·◉○○ ○●·○· + · ··· ○·○·◉·· ·●○·· + ○◉·◉· ◉●··●◉◉●○·●·○○●●○◉○◉· + ··○●◉○○○◉● ·◉○●●··●◉○○○·●·○ + ◉ · ◉···◉◉ ● ●● ·○○◉· + ● ◉ ◉●· ●◉○◉◉·· + ◉·○○●●● ○●○○◉●●● + · ·●● ● ◉·○○●●●● ◉◉● + ○◉◉●●●○○○·○●●● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_7.txt b/codex-rs/tui/frames/dots/frame_7.txt new file mode 100644 index 0000000000..aa52e1b869 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_7.txt @@ -0,0 +1,17 @@ + + ○◉·◉●●○○●●○ + ●●·●○·●●●○○○◉ ·●● + ● ●···●· ·○·· ●◉○●● + ○○····◉● ○·○●·◉● + ·●·●··○·◉○● ◉ ●··○ + · ◉·· ·●○◉·○ ●◉··· + ·○ · ○○·○·○· ●●○·· + ○ ◉·· ○●◉·●·· ● ··· + ◉ ·● ● ○◉·○◉··◉◉○··○◉●○·· + ·●●··○◉··◉●·◉○··○○●○●◉○·○· + ○ ○○◉●·●○◉ ●●●●●● ○◉·· + ●○ ◉○◉○· ● ◉◉◉◉● + ●◉●●○○○○ ●○·●●◉●● + ○○●○·●○◉·○○○●●·●●◉ + ·● ·◉·○○●○◉●● + \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_8.txt b/codex-rs/tui/frames/dots/frame_8.txt new file mode 100644 index 0000000000..5791ce70e4 --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_8.txt @@ -0,0 +1,17 @@ + + ○○●○◉●●○●●○ + ● ●◉···●○○ · ● + ○·○●·◉◉● ● ·◉·●○●○● + ○●○●◉·●●· ● ○○··○ + ● ◉·◉●○·◉○ ◉●○··● + ·●●·○○○○○·○● ○●··· + ·●··· ●○◉○··· ·○·◉·● + ○●··◉ ·●○◉·●●◉ ◉·◉·· + ○ ○··○○ ◉●○··◉●●●●●○··· + ○●◉○○· ●·●··◉·○○○··○● + ◉◉○○·○···◉●○●○● ○● ◉○· + ●● ·○··· ◉●◉◉◉● + ●○○●○○○○ ○◉○○·●◉● + ◉◉●·●● ◉◉●●◉◉○●·· + ··○●●○·○●●◉○· + ·· \ No newline at end of file diff --git a/codex-rs/tui/frames/dots/frame_9.txt b/codex-rs/tui/frames/dots/frame_9.txt new file mode 100644 index 0000000000..35588ee1ee --- /dev/null +++ b/codex-rs/tui/frames/dots/frame_9.txt @@ -0,0 +1,17 @@ + + ◉○○●◉●●○● + ◉●○◉··● ○ ○◉○○ + ◉ ●··◉●○○○◉ ○○·● + ··◉◉○○ ○○●·○○·●● + ◉● ◉○● ·●● ●◉●●◉●·· + · ··· ○·○◉○○ ·●·●··· + · ·●○·●●·○○● ◉●◉ ··· + · ·◉○●○···○◉○○○· ·· + ●· ◉· ····●··●··· + ·○···○●·○·○····○○··· + ·○◉○○·◉ ●●●●·· ◉○· + ○···○●· ●◉ ○◉·· + ○●○·○○ ◉◉○◉·◉● + ○◉ ○○·●◉●○◉◉●·· + ●◉○ ●○○·◉●◉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_1.txt b/codex-rs/tui/frames/hash/frame_1.txt new file mode 100644 index 0000000000..45adbbac24 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_1.txt @@ -0,0 +1,17 @@ + + -.-A*##**##- + -*#A**#A#**..*- -█#- + #.*.#**█-- -█*-█.*...# + **-**█##- A*.*.# + *-*A█-.*-** █..**# + .* #- .*A*..# █.*..# + #-█-* █*.*A█.- .A. + ..-.- #AA.*.* █-. + .*.█- *..-*.█..######-## *█ . + -.** -*#- A* .█.---.A###.A#A#. + *--█- -*#.A- --*██* -*█A#*-A + *-# █# - #█A*-. + -*#-*#- -*-#.-#█ + -*#*- *#A****.**#-#.* + -*█*...---#-*#*█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_10.txt b/codex-rs/tui/frames/hash/frame_10.txt new file mode 100644 index 0000000000..0e9a76d4d8 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_10.txt @@ -0,0 +1,17 @@ + + -#****##- + *█-#*#*.A-*# + --#..A..-.#*## + .--A*.*-.*#██**# + A *..█.- █#A-A.A + .- █.*.AA* --█. + * .*█*....* .A# + █ ..*#A#..---.*.. + █ .* **.*..#*#*.. + . #.*#.-A-*---.*- + # █.....██ *#█*.- + *-█#*#*█ -.██#AA + .█ ....*#A#A.A- + *-**A.#*- AA█ + *# -**-#** + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_11.txt b/codex-rs/tui/frames/hash/frame_11.txt new file mode 100644 index 0000000000..b7e743b218 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_11.txt @@ -0,0 +1,17 @@ + + #****##- + A█ *...**# + A█--..***A*# + .--..**#-*AA + -█.**.#*█*-..# + .#-..#-**.-A.. + ** #......-.** + . ..A..*A .█. + A █.A..*A#.-. + ** -.A*#█A.-.- + █-- ....*A.**. + *--A.-*A***.- + - *.**--.*█ + *# *..#-A*- + *- █*#-#- + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_12.txt b/codex-rs/tui/frames/hash/frame_12.txt new file mode 100644 index 0000000000..0c6c85043f --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_12.txt @@ -0,0 +1,17 @@ + + #***#. + #*--A.#* + █ .A*## + A#...**█. + . █.....A. + .█..*-█-.█ + . .A*..* + . A#*..█ + *# .A..#.. + . A.***- + .. .█***A + # *. -#. + A **.#**. + █-A█#.*.- + * █.*.A + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_13.txt b/codex-rs/tui/frames/hash/frame_13.txt new file mode 100644 index 0000000000..097cd508d7 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_13.txt @@ -0,0 +1,17 @@ + + A***# + .--.. + .--.█ + .**.- + * .. + █A-.. + # .. + # █. + A# -.. + .█ #*. + █-.. .- + .---. + .##.- + *--.* + # .█* + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_14.txt b/codex-rs/tui/frames/hash/frame_14.txt new file mode 100644 index 0000000000..8eca909504 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_14.txt @@ -0,0 +1,17 @@ + + #**** + #A--.* + .-... . + ..A.█-.# + ...* . + .*.. █. + .... . * + ..*.- * + .... █ + █-AA *A + *.██#.#. + .*..---. + A █.***- + .*A*--A + -* █*A + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_15.txt b/codex-rs/tui/frames/hash/frame_15.txt new file mode 100644 index 0000000000..cbf646ab35 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_15.txt @@ -0,0 +1,17 @@ + + ##***.- + -#*..-A*# + AA.***.█*. + .A- AA#.--. + ..*█**..A█-. + *..-..AA. █ + .. ......#. + ..A..#... █-. + ..###*...-.A. + .-.*A.*.*. .. + .A....-. - * + .**.-..*- * + █.*# AAA- *- + .-..**.#*A + *-*----A + -- \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_16.txt b/codex-rs/tui/frames/hash/frame_16.txt new file mode 100644 index 0000000000..82698755af --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_16.txt @@ -0,0 +1,17 @@ + + -*#█**#.- + A-..*..*.** + .AA█*A**.. █* + AAA **-*.*..**. + ..*-A*█*..*A.-* + ...*.█ .** . ... + **. A-#....A*█# . + .A* .-..A...█* -. + **...#.A-..█*# A + *█--#****..-. #-. + ...#██A**.*█*...- + ..* .- -AA# A + *.* . A#A-#. + *..█-*.AA#-. + █A.-*A--** + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_17.txt b/codex-rs/tui/frames/hash/frame_17.txt new file mode 100644 index 0000000000..57d02179e7 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_17.txt @@ -0,0 +1,17 @@ + + #*###**.#- + -***...***.#█-# + #**A-**-##█...-█* + A.A-A.█-- █.**...** + .A- . .█A***AA # + -**#A- #AA. A#*A..A + * *A. #AA.- *█..A*. + -█*. AA..A.#..*** + #A*A***#.*-.*-A*... . + .█-*--.A**A..* *#█#* + ***A███*****-.*AA* *█ + *..-* -A..- * + -** **- #█#A--A + # .*#**#--**A.█ + -#*A-##.*-#* + - \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_18.txt b/codex-rs/tui/frames/hash/frame_18.txt new file mode 100644 index 0000000000..ef524a0ed9 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_18.txt @@ -0,0 +1,17 @@ + + -**#**#*.#- + -#█-*###.--#█#**- + -AA.*█**█#█.-█#AA* * + #..*.#-█* █*--A*.*****# + -*AA A. -█#-*A.A.-****- + A*. ##..---A#*#.█-A-A-A. + ..*AA #A*A.█-A█*.*.*# + █*-.. -*█..*- .*.█ + *██ #******#..#.*A*# .*.- + -**.*** ..A--*-...-*.-* # + .A.*-██*****- *--A.A*A--- + ** #*# --*█A*-█ + *-*#--. -*--A*#- + █..**##***-█*-A-#* + █..-A--#.#█*#█ + - \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_19.txt b/codex-rs/tui/frames/hash/frame_19.txt new file mode 100644 index 0000000000..80a9abf012 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_19.txt @@ -0,0 +1,17 @@ + + --**#.#**..- + -#...*A***-*-#.*## + #***A█.#*- -*A#-*** + A*.*#-- -**##-.*# + ..A-A- #.-█A█.* .*# + .*A*█ -.*.A .A █.*. + -*..█ A*-A.##- AAA#. + .... .*█*.█# . ... + .*.*#******....#***.* * █.. + -*A#.**A-*#*#-# -- A*-*#A..- + █*█A#.█████**█ -*-A.AA AA█ + **-*-* -AA-AA█ + █ -*..*# #**.A.*- + ██..*A.#--**A*█ **.█ + █..-A-█-#.-*-- + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_2.txt b/codex-rs/tui/frames/hash/frame_2.txt new file mode 100644 index 0000000000..843df90f28 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_2.txt @@ -0,0 +1,17 @@ + + -.-A*#***##- + -##A**#...*..*-█.*#- + #.*.***.*-- -█***A..*.# + -.A-A*█##- -#*.A.# + #-█A*-.*-**- -#.*.# + █A#█- .**#A*# **.*. + #.█*. -A.*.-.# A█.█. + .█ *- #.*..** .█A.. + *██*. *.---.█..#########.-..* + -*█. A..█ A* .**----..--.#A . + *** * **...█ -█*******█.#*.. + █*-.A# - ##*A#* + .*--.## #*-# -.█ + -.-*--█*#A****.**--..* + -*#*#..----.*A*█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_20.txt b/codex-rs/tui/frames/hash/frame_20.txt new file mode 100644 index 0000000000..b588df3894 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_20.txt @@ -0,0 +1,17 @@ + + --#*..*#*#-- + #**█*#-#***..--**## + ##█-#*█.*█ -█-█*#*.#- + -.█-*.* -##.*A*** + -. #.* -A -..-**..* + A-#.█ #*█*.█A █*..* + *.*#. #* .#*- #*.A + .--A- ██*A.█# ..█. + .A..*#********-#█*--*** A .* + █.-.-█ A------.* ***█.** #A .. + *#-*████████*█ *#*..#. A* + * -*A# -A*..A + *--*#.- #**-**█ + -#-.█.#-**#A█.█-#A*█ + -*#.- *----.*██ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_21.txt b/codex-rs/tui/frames/hash/frame_21.txt new file mode 100644 index 0000000000..0d1fc7ec26 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_21.txt @@ -0,0 +1,17 @@ + + --#*#**#*##-- + ##*----#.*.#*---*#- + **--#*-█- --.*#--*# + #*.*██ -#**#**# + A#A*- #.A-* **--# + A█A. #**-AA **-# + .█.- - A-#A█ ***█ + -* ** █.# . . + . . ##*****### -.#█.# *A . + . .* .- -#. -█-*.# A█.A + * █. --███ █- █*-#* A- # + █# A*- -*█ A + *- --- -.**█ #- + **- *█*#A..*A**██ -- + *##*#----#-*#*- + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_22.txt b/codex-rs/tui/frames/hash/frame_22.txt new file mode 100644 index 0000000000..8fbfdb5713 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_22.txt @@ -0,0 +1,17 @@ + + -##*#**#*##- + -#A*..-A.A*..*.#A*#- + #***.***- -█****#--## + **.**█ ##...-** + *..A█ #-A.*..A*█. + *.*A- #.A.*-A- *.**. + .#**A .#.**A█ ..A. + ..*.- .*..-* .-.█. + ..#█# #.******##-**.- *# -.*█ + -.* *-**# A#█.AA. ***-█.## A** + ***-. █████**█- -A*#-AAA█#- + ***-*# -*#█.#█ + ██#* ##- -.*#█*-A + █A*##█*.**#**A**███#* + █.█.-*----*-.**- + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_23.txt b/codex-rs/tui/frames/hash/frame_23.txt new file mode 100644 index 0000000000..ef2f8adb70 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_23.txt @@ -0,0 +1,17 @@ + + -##-*#*##*#-- + -*.#.*-#-**#.-.*.#- + #█#.█#**- █.A#.**..# + A*.**A- -***..** + AA.-A█ #A##█*A**.* + #*.█A- -***██A*█..*.# + -..█. AAA. -.- █ .█* + .A. . .█.#-*# . *A. + -█* .#.********.-*.-█*- . ... + .**-.█*█ A-* *.-*#. *-. + A█. . -███████ █-A**.-A-A- + #..-.. #A.*-A- + * .#█A-- -.█**A#A + ***#**#*.**-##█--#*- + █. ***.--#--**- + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_24.txt b/codex-rs/tui/frames/hash/frame_24.txt new file mode 100644 index 0000000000..09a7fd520c --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_24.txt @@ -0,0 +1,17 @@ + + -.-*##***#- + #█-A█.--.**##-█# + #██**A#█. .-A*.**# * + #█AA#A.*#*-.A- -**.*-█ + # AA*A# -██A*-.--*.#█ + .#*#*- *##A ..* A█* + . .. #A-#A█A-*.*-.- + . *.. .#*A*-..-A.-.. + .. .***A##...##-*#-. . .. + - A *.A##**##..-*#*. .*. + * █*.**██████- *#.**.*A#- + * *#** . █A*A + *.**-.. -*█-AA-* + .-*#*-█..A***.--A- + *A-*#**--**#* + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_25.txt b/codex-rs/tui/frames/hash/frame_25.txt new file mode 100644 index 0000000000..af8bb947f6 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_25.txt @@ -0,0 +1,17 @@ + + -#***####- + # *#*--**.*..# + A.AA##█..#***...- + .#*. A *. █*.#**A + #--*#A█-*A-.█ .AA*A* + *#...-*#.-.A A.#.AA.# + .A.*. .--A*-A.*A-█.*. + ...A..█ .-**A.*-.*..* + -#*.█.--****#..**.#*.* + A-█.A.#.-..**-.***A*. + *.*A*.-██████#A.*.A.- + .-█.*#**-#*A-A#AA.A + ---.-*-**A#-A-..A + *.***-**.** *.* + .#█**##-#.* + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_26.txt b/codex-rs/tui/frames/hash/frame_26.txt new file mode 100644 index 0000000000..7ff85c300a --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_26.txt @@ -0,0 +1,17 @@ + + -****█## + A*.*A*.#*.# + A*██.**.*██*# + **█#...-..-#A- + .-#*...█**A*.** + * █.AAA█*-*█**A + . *█*..A..**█# + A- *...--*..A.. + . .***#.#**A*.. + .-.A#.--#****. + .-█A.*█*#A-#*.. + *-..A* AA█..- + * *.* --A.A# + .█***█*-*** + *AA-*.-** + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_27.txt b/codex-rs/tui/frames/hash/frame_27.txt new file mode 100644 index 0000000000..06e988b076 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_27.txt @@ -0,0 +1,17 @@ + + ****## + .*AA.A* + *█- *.A█. + ...-..*.. + . -.--█* + .-.-█-...- + * █..-*.. + . -...*█.. + .. . .#.... + █* .█-.-*.. + .- --**#A█ + ..##..-A. + .**#*#A.- + *--.**AA + █*█ -*A + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_28.txt b/codex-rs/tui/frames/hash/frame_28.txt new file mode 100644 index 0000000000..0e25818145 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_28.txt @@ -0,0 +1,17 @@ + + A*** + .#-.- + * *.- + .--*. + . .. + . -█. + -.. -. + .-██. + A* -. + ...A.. + . -. + .*#*. + .**.. + *--A. + . .#. + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_29.txt b/codex-rs/tui/frames/hash/frame_29.txt new file mode 100644 index 0000000000..7f2ddab00a --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_29.txt @@ -0,0 +1,17 @@ + + #****# + #.*A ** + -#.. ██. + ....-*#A + * .█. . + .#... -- + .**... - + ..*.. + ...*. - + -.*.. - + *..A.- * + .A... -. + ....-.-. + .*.*A█.█ + ..* .# + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_3.txt b/codex-rs/tui/frames/hash/frame_3.txt new file mode 100644 index 0000000000..8cce426bb4 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_3.txt @@ -0,0 +1,17 @@ + + -.**##****#- + -##A*..#.█**.*--.*#- + #*A**.*██- -█. **#A-.# + A#A*.*##- -** ..* + █A*.A-A..**- *-*..- + A.**A .#.**** . **. + ** . █**.-█.# .*A.# + #-.#. #-.█A*. .-.*. + -██. *.*#..*-.*##---##-.-█*. + #*A*# .A*A**. .*.--# *.#**-.*.- + █-. . █..##█ █***███**#AAA#A + █*. *# - A-#-AA + *-AA**# ##*A█#.█ + *-##-**-****#A***--#█ + -*#*-A.----.*A-█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_30.txt b/codex-rs/tui/frames/hash/frame_30.txt new file mode 100644 index 0000000000..24a2165e45 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_30.txt @@ -0,0 +1,17 @@ + + -*█**## + -A*..**█** + ██-.#**.##* + ..*.A.-*.* *# + **..-*.#.# . + .*.-# *...... + *A...*- *A*. *- + █. █#*.#.█.- - + █.-█*.*.*A.# - + █..*.--.. ## - + *..**-*...#.. + .*AA#A**..█ . + *.*..A*..#.A + #-##*-A.#A█ + *-..---*█ + ---- \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_31.txt b/codex-rs/tui/frames/hash/frame_31.txt new file mode 100644 index 0000000000..65f139ab96 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_31.txt @@ -0,0 +1,17 @@ + + -.A*#*#*# + -#**##-█#*█*# + #.*AA#*--.█.-** + #.A#--**-#**.*..* + -....#-**-#█*.A-- + *.--.-.██***#.A.#█. + A.. .-*.*.*A**.*.A. + **# ..█.* .-██..*.. + .*#-.█-...A#...- . + █...AA..---*-.*.. * + -*-A#.# A***-A.█.- + ...***# -** . + *.**- # . .*-A- + A.*.A-.-#.█#.- + ██*.-#*A.** + ---- \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_32.txt b/codex-rs/tui/frames/hash/frame_32.txt new file mode 100644 index 0000000000..6cbec21aec --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_32.txt @@ -0,0 +1,17 @@ + + #####**.#- + **.**.*..**..# + A-**-##-A--*.**█*# + █AA.-#-*- - #-*.## # + AA.#.**█*.* █-#.*A***# + *A**#**.-A..#- .#A * + *.█*#-█*..##.#*-A-AA.█- + ...#- █-..█A█.*--█*.██- + *..-- █-.█--.###...*.█*- + ███--.**█*-----..*.*.-- + #**..A .*██***-*AAA.A + *#.-** #*.A█. + █**...#- -A-.A # + *-*█.#.***--#█-A + .**--##A*-██ + --- \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_33.txt b/codex-rs/tui/frames/hash/frame_33.txt new file mode 100644 index 0000000000..a661feb2af --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_33.txt @@ -0,0 +1,17 @@ + + -##*#*#*..- + -#*..***.A.-.*.*. + -A*.#*##*█- █*A..#█# + #*A.A-.#- *..*-* + -..A-..A*-* .#**- + AA# *-**-*# A*A-* + ..# *#*.-.* .*.. + *.## #██*A*# *█.* + ... . #- A*###***#..#A-.*. + -A.██AA#A-..-----..*---... + ***# .A.A A ████*** ..#A-- + *#**#█# AA*A*A + **█*#**# -#.#A**█ + *.█**#.#*#-█*#**.* + █**##----#**-█ + ---- \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_34.txt b/codex-rs/tui/frames/hash/frame_34.txt new file mode 100644 index 0000000000..3427025326 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_34.txt @@ -0,0 +1,17 @@ + + -#*####*.#- + -#*#A**.█.#*****#*- + -AA#.*█A.*- --**#█**# + #A-.*-A#- *.#*** + AA.*-A. .█ # ****- + #A*.-A **█.*** *#*.* + .*-.- █*-*.-- .*.- + *.*█A .*-.A█. A -* + #█A.█ A*AA█-**######.--█ .-- + ..*#A##-█AA█...-..---#A-..-.* + A-*# .*.*- █**----- #A#*.█ + A#****- A*..A█ + *#-.#**# -#*█-A#- + -*A.█.##*##****-#*A█ + █.***-----****- + --- \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_35.txt b/codex-rs/tui/frames/hash/frame_35.txt new file mode 100644 index 0000000000..e0919ec5d0 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_35.txt @@ -0,0 +1,17 @@ + + -##**###*##- + #***..**#█.*.A█.**- + -AA.*#*.-*█- -█***.█.*# + #AA#A#*#- *#-*.- + AA..AA* █**# .**.# + *A*A#- █.-█..*- .**. + * .A ** █*-. .-** + ...A A***A█ A █A + A #- #..A*█A.**-*-*#.. ..** + .#-*█ AA*█*#A.* *#----A█.A█ .█ + A-*#█A*-.A-- -█----*--*AA-#. + █.-*A. -A* #- + **--*#A# #*A-**█ + █--█.*.-A..#.*A*█-A*█ + █-.**--A--##*█- + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_36.txt b/codex-rs/tui/frames/hash/frame_36.txt new file mode 100644 index 0000000000..0355f68b47 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_36.txt @@ -0,0 +1,17 @@ + + --#*####*##- + -*██*#A*A#*#*##█**#- + #*█*##*-*█-- -█*.*#.#*.# + -.█*#---- █*.*█. + #A-**█.*-*#. -*.* + A #A- *- █.A# █*-* + . * - * █** .-.# + ..*. -* -AA *. . + .██. AA #*██###-#####- .*.. + -*.* #.--A.A -.-------.. *A█- + █ *.* #-#A- █**-----█ .#█A + █#█**. #A.█A + *A..#.# ###█A#- + *#-█***-*.-#.*█-█#*#█ + -*#A.-##-####**█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_4.txt b/codex-rs/tui/frames/hash/frame_4.txt new file mode 100644 index 0000000000..2b4b7c670b --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_4.txt @@ -0,0 +1,17 @@ + + -.**#**#*##- + --█#*.A .**A**.█A*#- + #**...#*█- --.*-*.A**- + AA.#.█.## █.***** + A.A-.*.**-.# *█*.** + A..-. █-..A** █ **.# + █*.*- █***#█.# # █*. + ..* #.A*-.. ... + -. .- *.A█-AA#.###----## ..* + .*A . #AAA#-.-**.#.-#AA-*.AA█. + -.*█*#**#*A █*******█--...- + #.*█.-- #-*A**█ + **#A- #- -.-#**.A + ...*-*******##**#*.*- + ***.A.-----*-*- + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_5.txt b/codex-rs/tui/frames/hash/frame_5.txt new file mode 100644 index 0000000000..c71575690b --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_5.txt @@ -0,0 +1,17 @@ + + -.***#***##- + -#█#A*A..#.*#*-.█## + *-A*#.*█- █-*.** #*# + #.A.A..*# --....- + #*A*A--#.-*# - *.*.- + ....A *-.**A.- #A.. + .A. # -*-.*█.# ██.#.# + .A.-█ #-*.A-. #.-. + .#.-* A-.█#.**-.#.---##-█... + -*.*##A#*█ .█ AA**-#*.#A.A*.- + *#..#.#**A#- █**█████#.*.*A + **#A** - A-A*#- + -A**.*#- -*##*█** + -.*.#*#**.*-##**-.** + --*-*█-----##*- + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_6.txt b/codex-rs/tui/frames/hash/frame_6.txt new file mode 100644 index 0000000000..799e3a1cf5 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_6.txt @@ -0,0 +1,17 @@ + + -.***#**##-- + #-*A*.**#.##*-#*#- + ###...*█ -█..**#*A*- + A#.*.*-*# *#....# + █*...***#** .**.*# + *-A.A--#*.*-.# .**A. + - #.. -*.A-* -#.-. + . ... -.*.A.. .#*.. + -..-. A█..**A#-.#.--##-.*A. + ..*#A---*# .A**#..#****.#.* + A . A...*A█ █*████*█-**A. + # * A#- #A-AA.- + .-*-**# -#--A*## + -█.*#█# *.--##** A*█ + --**##-----##* + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_7.txt b/codex-rs/tui/frames/hash/frame_7.txt new file mode 100644 index 0000000000..4a3f9f202f --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_7.txt @@ -0,0 +1,17 @@ + + -..**#**##- + #*-#*.#*#**** -*# + * #...*- --.- *A-*# + **....*# -.**.A# + -█.*..-.A*# . *..* + . *..█ -█**.* #-... + -*█. --.*.*. **-.. + -█A.. *#A.*.- █ ... + A█.* #█-A.*A..**-..****.. + .#█..*A..A█..*..**#*#**.*. + * *-A*.*-A ******██-A.. + █- A-A-- #█-A*A█ + █*##***- #-.#*A*█ + *-█*.***.---#*.*#A + █.*█.A.--#-*** + \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_8.txt b/codex-rs/tui/frames/hash/frame_8.txt new file mode 100644 index 0000000000..4bc5a6f118 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_8.txt @@ -0,0 +1,17 @@ + + --#-*##*##- + #█*A...*** . █# + -.*#.AA* #█.A.**#-# + -***A.##. █ *-..* + █ A.A#*.A* .█*..# + .█#.*---*.-* *#... + .*... █-**.-. .-.A.# + *#..A .#*A.#*. .-A.. + * *..-- A**..A#####*... + **A*-.█#.#..*.*--..*█ + AA**.*...A█-*-*█**█A*. + █#█.*.-- .#AAA█ + █*-****- -A*-.#A* + .A█.#* **#**A*#.- + ..-***.-##A*- + -- \ No newline at end of file diff --git a/codex-rs/tui/frames/hash/frame_9.txt b/codex-rs/tui/frames/hash/frame_9.txt new file mode 100644 index 0000000000..db3507db59 --- /dev/null +++ b/codex-rs/tui/frames/hash/frame_9.txt @@ -0,0 +1,17 @@ + + .*-*A##*# + A*-A..*█* --*- + A #..A*--*A *-.# + █ ..A**- --#.*-.## + A*█***█.*# *.█#A#.. + . ...█-.**-- .█.*... + - .**.**.**#█.#A -.. + . .A-#*...-A**-. .. + █#.█ A.█....#..#..- + .-...-#.-.-....--... + █ --A**.A█****..█A*. + *...*#- #A -A.- + *#*.** A*-*.A* + --█*-.*A#****.- + █-- ***.*#A█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_1.txt b/codex-rs/tui/frames/hbars/frame_1.txt new file mode 100644 index 0000000000..ab8be3eb1e --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_1.txt @@ -0,0 +1,17 @@ + + ▂▅▂▅▄▇▇▄▄▇▆▂ + ▂▄▆▅▇▃▇▅▇▃▄▁▁▄▂ ▂█▇▂ + ▆▁▇▁▇▇▇█▃▂ ▂█▇▂█▁▄▁▁▁▇ + ▄▇▂▃▇█▆▆▂ ▅▇▁▄▁▆ + ▃▃▄▅█▃▁▃▂▃▃ █▅▁▃▃▆ + ▁▇ ▇▂ ▁▇▅▄▁▁▆ █▅▃▁▁▆ + ▇▃█▆▇ █▃▁▇▅█▁▂ ▁▅▁ + ▁▁▂▁▂ ▆▅▅▁▄▁▇ █▂▁ + ▁▄▁█▂ ▄▁▁▃▃▁█▅▁▇▇▇▇▇▇▂▇▆ ▄█ ▁ + ▂▁▄▇ ▂▄▇▂ ▅▇ ▁█▁▂▂▂▅▅▆▆▆▁▅▆▅▆▁ + ▃▃▂█▃ ▃▃▆▅▅▂ ▂▃▇██▇ ▃▇█▅▆▄▂▅ + ▇▃▆ █▆ ▂ ▆█▅▇▂▁ + ▃▃▆▂▃▇▂ ▂▄▂▇▁▂▇█ + ▃▇▆▃▂ ▇▇▅▄▄▄▄▅▄▇▇▂▆▁▇ + ▂▇█▇▁▁▁▂▂▂▆▂▄▇▇█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_10.txt b/codex-rs/tui/frames/hbars/frame_10.txt new file mode 100644 index 0000000000..5e565ce40b --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_10.txt @@ -0,0 +1,17 @@ + + ▂▇▇▇▇▃▇▇▂ + ▇█▂▇▇▇▃▁▅▂▇▆ + ▃▂▆▁▁▅▁▁▆▁▇▃▆▆ + ▁▂▂▅▃▁▄▂▅▃▆██▃▃▆ + ▅ ▄▁▁█▁▃ █▆▅▂▅▁▅ + ▁▂ █▁▇▁▅▅▃ ▂▂█▁ + ▃ ▁▇█▇▁▁▁▁▇ ▁▅▆ + █ ▁▁▃▇▅▇▁▁▆▂▂▅▃▁▁ + █ ▁▃ ▃▃▁▄▁▁▇▃▇▄▁▁ + ▁ ▆▁▃▆▁▂▅▂▇▂▂▂▁▇▂ + ▆ █▁▁▁▁▁██ ▃▆█▃▁▂ + ▃▂█▆▃▆▇█ ▂▁██▆▅▅ + ▁█ ▁▁▁▁▇▆▅▆▅▁▅▂ + ▄▂▇▇▅▁▇▄▂ ▅▅█ + ▇▆ ▂▇▃▂▆▄▇ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_11.txt b/codex-rs/tui/frames/hbars/frame_11.txt new file mode 100644 index 0000000000..5305252a8d --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_11.txt @@ -0,0 +1,17 @@ + + ▆▇▇▇▇▇▇▂ + ▅█ ▄▁▁▁▃▃▆ + ▅█▂▂▁▁▄▃▇▅▃▆ + ▁▂▂▁▁▄▄▆▂▄▅▅ + ▂█▅▄▃▁▇▃█▄▂▁▁▆ + ▁▇▂▁▁▇▂▄▄▁▂▅▁▁ + ▇▇ ▆▁▁▁▁▁▁▂▁▄▃ + ▁ ▁▁▅▁▁▃▅ ▁█▁ + ▅ █▁▅▁▁▇▅▇▁▂▁ + ▇▇ ▂▁▅▄▆█▅▁▂▁▃ + █▂▆ ▁▁▁▁▄▅▁▃▃▁ + ▃▂▆▅▁▂▇▅▇▇▄▁▂ + ▂ ▇▁▃▃▃▂▁▄█ + ▃▇ ▇▁▁▆▂▅▇▂ + ▃▂ █▇▇▂▇▂ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_12.txt b/codex-rs/tui/frames/hbars/frame_12.txt new file mode 100644 index 0000000000..cebfe226e1 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_12.txt @@ -0,0 +1,17 @@ + + ▇▇▇▇▇▅ + ▆▄▂▂▅▁▆▃ + █ ▁▅▃▇▆ + ▅▇▁▁▁▄▄█▁ + ▁ █▁▁▁▁▅▅▁ + ▁█▅▅▇▃█▂▁█ + ▁ ▁▅▃▁▁▃ + ▁ ▅▇▃▁▁█ + ▇▆ ▁▅▁▁▇▁▁ + ▁ ▅▁▇▄▇▂ + ▁▅ ▁█▄▇▇▅ + ▆ ▇▁ ▂▆▁ + ▅ ▇▇▁▆▇▃▁ + █▃▅█▆▁▃▁▂ + ▃ █▁▃▅▅ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_13.txt b/codex-rs/tui/frames/hbars/frame_13.txt new file mode 100644 index 0000000000..566cc4ffa3 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_13.txt @@ -0,0 +1,17 @@ + + ▅▇▇▇▆ + ▁▂▂▁▁ + ▁▂▂▁█ + ▁▇▇▁▂ + ▇ ▁▁ + █▅▆▁▁ + ▆ ▁▁ + ▇ █▁ + ▅▇ ▂▁▅ + ▁█ ▇▄▁ + █▂▅▅ ▁▂ + ▁▂▂▂▁ + ▁▇▆▁▂ + ▇▂▂▁▄ + ▆ ▅█▄ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_14.txt b/codex-rs/tui/frames/hbars/frame_14.txt new file mode 100644 index 0000000000..380790e11c --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_14.txt @@ -0,0 +1,17 @@ + + ▇▇▇▇▄ + ▆▅▂▂▅▃ + ▁▂▁▁▅ ▁ + ▁▁▅▁█▃▁▆ + ▁▁▁▃ ▁ + ▁▇▁▁ █▁ + ▁▁▁▁ ▅ ▇ + ▁▁▃▁▂ ▃ + ▁▁▁▁ █ + █▃▅▅ ▄▅ + ▃▁██▆▅▆▁ + ▁▇▁▁▂▂▂▁ + ▅ █▁▄▄▄▂ + ▁▃▅▇▂▂▅ + ▂▇ █▄▅ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_15.txt b/codex-rs/tui/frames/hbars/frame_15.txt new file mode 100644 index 0000000000..47d169e98b --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_15.txt @@ -0,0 +1,17 @@ + + ▇▇▇▇▇▁▂ + ▂▆▄▁▁▃▅▇▆ + ▅▅▁▇▄▃▁█▇▁ + ▁▅▂ ▅▅▆▅▂▂▁ + ▁▁▄█▄▃▁▁▅█▃▁ + ▃▁▁▆▁▁▅▅▁ █ + ▁▁ ▁▁▁▁▁▁▆▁ + ▁▁▅▁▁▇▁▁▁ █▆▁ + ▁▁▇▆▆▇▁▁▁▂▅▅▁ + ▁▂▁▄▅▁▃▁▇▅ ▅▁ + ▁▅▁▁▁▁▂▁ ▂ ▄ + ▁▇▇▅▃▁▁▃▆ ▄ + █▁▃▆ ▅▅▅▂ ▄▂ + ▁▃▁▁▃▃▅▇▃▅ + ▃▃▇▃▂▂▂▅ + ▂▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_16.txt b/codex-rs/tui/frames/hbars/frame_16.txt new file mode 100644 index 0000000000..3b1fb1fc5d --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_16.txt @@ -0,0 +1,17 @@ + + ▂▄▇█▇▇▇▁▂ + ▅▃▁▁▇▁▁▃▁▄▃ + ▁▅▅█▃▅▄▃▁▁ █▃ + ▅▅▅ ▄▇▂▃▁▃▁▁▇▇▁ + ▁▁▄▂▅▇█▄▁▁▇▅▁▂▃ + ▁▁▁▇▁█ ▁▃▄ ▁ ▁▅▁ + ▃▃▁ ▅▂▆▁▁▁▁▅▇█▆ ▁ + ▁▅▄ ▁▂▁▁▅▁▁▁█▄ ▂▁ + ▃▃▁▁▁▇▁▅▃▁▁█▇▇ ▅ + ▇█▂▂▆▄▄▃▇▁▅▂▁ ▆▂▁ + ▁▁▁▇██▅▇▃▁▄█▄▅▁▁▂ + ▁▁▇ ▁▂ ▂▅▅▆ ▅ + ▃▁▇ ▁ ▅▆▅▂▆▁ + ▃▁▁█▂▇▁▅▅▇▂▁ + █▅▅▂▄▅▂▂▄▇ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_17.txt b/codex-rs/tui/frames/hbars/frame_17.txt new file mode 100644 index 0000000000..93817e2ead --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_17.txt @@ -0,0 +1,17 @@ + + ▆▄▇▇▇▄▄▁▆▂ + ▂▄▇▇▁▁▁▇▄▇▁▆█▃▆ + ▆▇▃▅▂▄▄▂▇▆█▁▁▁▂█▃ + ▅▁▅▂▅▁█▂▂ █▁▄▃▁▁▁▄▃ + ▁▅▂ ▁ ▁█▅▃▄▃▅▅ ▆ + ▂▄▇▆▅▂ ▆▅▅▁ ▅▆▄▅▁▅▅ + ▇ ▄▅▁ ▆▅▅▁▂ ▇█▁▁▅▄▁ + ▆█▄▁ ▅▅▁▁▅▁▆▁▁▄▄▇ + ▆▅▇▅▃▄▄▇▁▃▂▁▃▃▅▃▁▁▁ ▁ + ▁█▂▄▂▂▁▅▇▃▅▁▁▃ ▃▇█▇▃ + ▃▃▃▅███▇▇▇▇▃▂▁▇▅▅▃ ▃█ + ▃▁▁▂▇ ▂▅▁▁▂ ▄ + ▂▃▃ ▇▃▂ ▆█▆▅▃▂▅ + ▆ ▁▇▇▄▃▇▂▂▄▇▅▁█ + ▂▇▄▅▂▆▇▁▇▂▇▇ + ▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_18.txt b/codex-rs/tui/frames/hbars/frame_18.txt new file mode 100644 index 0000000000..03d2c5e94b --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_18.txt @@ -0,0 +1,17 @@ + + ▂▄▄▇▄▄▇▄▁▆▂ + ▂▇█▂▄▆▇▇▁▂▂▆█▇▄▄▂ + ▂▅▅▁▇█▇▄█▆█▅▂█▇▅▅▃ ▇ + ▆▁▁▇▅▆▃█▇ █▃▂▂▅▄▁▃▄▃▃▃▆ + ▂▃▅▅ ▅▁ ▂█▇▂▃▅▁▅▁▂▃▄▃▃▂ + ▅▃▁ ▆▆▁▅▂▂▂▅▆▇▆▁█▆▅▃▅▂▅▁ + ▁▁▃▅▅ ▇▅▇▅▁█▂▅█▇▁▄▁▄▆ + █▃▆▁▁ ▃▃█▁▁▄▃ ▁▄▁█ + ▃██ ▆▃▄▄▄▄▄▇▁▁▆▁▇▅▃▆ ▁▇▁▂ + ▂▃▃▁▇▃▇ ▁▁▅▂▂▃▂▁▁▁▂▄▁▂▃ ▆ + ▁▅▁▃▂██▇▇▇▇▇▂ ▃▂▂▅▁▅▇▅▂▆▂ + ▃▃ ▆▃▆ ▂▂▇█▅▇▂█ + ▃▃▇▇▃▃▅ ▂▇▃▂▅▃▆▂ + █▁▅▇▇▇▇▄▄▄▃█▇▂▅▂▆▇ + █▁▁▂▅▂▂▆▅▇█▄▇█ + ▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_19.txt b/codex-rs/tui/frames/hbars/frame_19.txt new file mode 100644 index 0000000000..f826776170 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_19.txt @@ -0,0 +1,17 @@ + + ▂▂▄▄▇▁▇▄▄▁▅▂ + ▂▇▁▁▁▃▅▄▄▄▂▇▂▆▁▇▆▆ + ▆▇▄▄▅█▁▇▇▂ ▂▇▅▆▂▇▄▃ + ▅▄▁▇▆▃▂ ▂▄▄▇▆▃▁▇▆ + ▁▁▅▂▅▂ ▆▁▃█▅█▁▃ ▁▃▆ + ▁▃▅▇█ ▂▁▇▁▅ ▅▅ █▅▇▁ + ▃▄▁▁█ ▅▇▃▅▁▇▆▂ ▅▅▅▇▁ + ▁▁▁▁ ▁▄█▃▁█▆ ▁ ▁▁▁ + ▁▇▁▃▆▄▄▄▄▄▄▁▁▁▁▇▇▄▇▁▄ ▃ █▁▁ + ▃▄▅▆▁▄▇▅▃▇▇▃▆▂▆ ▃▂ ▅▃▂▃▆▅▅▁▂ + █▃█▅▇▁█████▇▇█ ▃▃▂▅▁▅▅ ▅▅█ + ▃▃▃▇▂▃ ▂▅▅▂▅▅█ + █ ▂▃▁▁▇▆ ▆▄▄▅▅▁▄▂ + ██▅▁▇▅▁▇▂▂▄▄▅▇█ ▄▇▁█ + █▁▅▂▅▆█▂▆▅▃▇▆▃ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_2.txt b/codex-rs/tui/frames/hbars/frame_2.txt new file mode 100644 index 0000000000..d4efa4def0 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_2.txt @@ -0,0 +1,17 @@ + + ▂▅▂▅▄▇▄▄▄▇▆▂ + ▂▇▆▅▇▄▇▁▁▁▄▁▁▄▂█▁▇▇▂ + ▆▁▇▁▃▇▇▁▇▂▂ ▂█▇▄▇▅▁▁▄▁▆ + ▂▁▅▂▅▇█▆▆▂ ▆▆▃▁▅▁▆ + ▆▃█▅▇▃▁▃▂▃▃▂ ▃▆▁▃▁▆ + █▅▇█▂ ▁▇▃▇▅▃▇ ▃▃▁▇▁ + ▆▁█▇▁ ▃▅▁▄▁▂▁▆ ▅█▁█▁ + ▁█ ▃▂ ▆▁▇▁▁▄▇ ▁█▅▅▁ + ▇██▄▁ ▄▁▃▃▂▁█▅▁▇▇▇▇▇▇▇▇▆▁▂▁▁▇ + ▂▄█▁ ▅▁▁█ ▅▇ ▁▄▃▂▂▂▂▅▅▂▂▁▇▅ ▁ + ▃▃▃ ▇ ▇▃▅▅▁█ ▂█▇▇▇▇▇▇▇█▁▆▇▁▁ + █▃▂▅▅▆ ▂ ▆▇▄▅▆▇ + ▅▃▂▂▁▇▆ ▆▄▂▇ ▂▁█ + ▂▁▃▄▂▂█▇▇▅▄▄▄▄▅▄▇▂▂▁▁▇ + ▂▇▇▇▇▁▁▂▂▂▂▁▄▅▇█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_20.txt b/codex-rs/tui/frames/hbars/frame_20.txt new file mode 100644 index 0000000000..30c29f51c9 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_20.txt @@ -0,0 +1,17 @@ + + ▂▂▇▄▁▁▄▇▄▆▂▂ + ▆▄▄█▄▆▂▆▄▄▄▁▁▂▃▇▃▇▆ + ▆▆█▂▇▇█▁▇█ ▂█▃█▃▇▇▁▇▂ + ▂▁█▂▇▁▇ ▂▆▇▁▃▅▇▃▃ + ▂▁ ▆▁▇ ▂▅ ▂▁▁▃▇▃▁▁▃ + ▅▂▆▁█ ▇▇█▄▁█▅ █▃▁▁▃ + ▄▁▄▇▁ ▆▇ ▅▇▇▃ ▆▃▁▅ + ▁▂▃▅▂ ██▄▅▁█▆ ▁▁█▁ + ▁▅▁▁▄▆▄▄▄▄▄▄▄▄▂▆█▄▃▃▃▃▇ ▅ ▁▃ + █▁▃▁▂█ ▅▂▂▂▂▂▂▁▃ ▇▃▃█▁▄▃ ▆▅ ▁▁ + ▃▆▃▃████████▇█ ▃▆▄▁▁▆▁ ▅▃ + ▇ ▃▇▅▆ ▂▅▇▅▁▅ + ▃▂▃▇▆▁▂ ▆▄▇▂▄▇█ + ▃▆▆▅█▁▇▃▄▄▆▅█▁█▂▆▅▇█ + ▂▇▇▁▂ ▄▂▂▂▂▁▇██ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_21.txt b/codex-rs/tui/frames/hbars/frame_21.txt new file mode 100644 index 0000000000..b6a6c2c109 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_21.txt @@ -0,0 +1,17 @@ + + ▂▂▆▄▇▄▄▇▄▇▆▂▂ + ▆▇▇▂▂▂▂▇▁▄▁▇▄▂▂▆▇▇▂ + ▄▇▃▂▇▇▃█▂ ▂▃▁▇▇▂▂▇▆ + ▆▇▁▄██ ▂▆▄▇▆▄▇▆ + ▅▆▅▇▂ ▆▁▅▂▃ ▃▃▂▃▆ + ▅█▅▁ ▆▇▇▂▅▅ ▃▃▃▆ + ▁█▁▂ ▂ ▅▂▆▅█ ▃▄▃█ + ▂▃ ▃▄ █▁▆ ▁ ▁ + ▁ ▁ ▆▇▄▄▄▄▄▇▇▇ ▃▁▆█▁▆ ▄▅ ▁ + ▁ ▁▃ ▁▂ ▂▆▁ ▃█▂▇▁▆ ▅█▅▅ + ▄ █▅ ▂▂███ █▂ █▇▂▆▄ ▅▂ ▆ + █▇ ▅▄▂ ▂▇█ ▅ + ▇▂ ▃▆▂ ▂▅▄▇█ ▆▂ + ▇▄▂ ▇█▇▇▅▁▁▄▅▄▇██ ▆▂ + ▇▇▇▄▇▂▂▂▂▆▂▄▇▇▂ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_22.txt b/codex-rs/tui/frames/hbars/frame_22.txt new file mode 100644 index 0000000000..38195cd38b --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_22.txt @@ -0,0 +1,17 @@ + + ▂▆▇▄▇▄▄▇▄▇▆▂ + ▂▇▅▇▁▅▂▅▁▅▃▁▁▄▁▇▅▇▇▂ + ▆▄▇▄▁▃▇▇▂ ▂█▇▃▇▇▇▂▂▇▆ + ▄▇▁▇▇█ ▆▆▁▁▁▂▇▃ + ▃▁▁▅█ ▆▂▅▁▄▁▅▅▄█▁ + ▃▁▇▅▂ ▆▁▅▁▄▃▅▂ ▃▁▃▄▁ + ▁▇▇▃▅ ▁▇▁▃▇▅█ ▁▁▅▁ + ▁▁▄▁▂ ▁▃▁▁▃▃ ▁▃▁█▁ + ▁▁▆█▆ ▇▁▄▄▄▄▄▄▇▇▂▃▇▁▂ ▃▆ ▂▁▄█ + ▃▁▄ ▇▂▃▃▆ ▅▆█▁▅▅▁ ▃▇▄▂█▁▆▆ ▅▃▄ + ▃▃▃▂▁ █████▇▇█▂ ▂▅▇▇▂▅▅▅█▆▂ + ▃▇▃▂▃▆ ▂▇▆█▁▆█ + ██▇▄ ▇▇▂ ▂▅▇▆█▇▂▅ + █▅▇▇▆█▇▁▄▄▇▄▄▅▄▇███▆▇ + █▁█▁▂▄▂▂▂▆▄▂▅▄▇▂ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_23.txt b/codex-rs/tui/frames/hbars/frame_23.txt new file mode 100644 index 0000000000..a81cac3ef2 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_23.txt @@ -0,0 +1,17 @@ + + ▂▆▇▂▄▇▇▇▇▄▇▂▂ + ▂▄▁▇▁▃▂▆▂▄▄▆▁▂▁▇▁▇▂ + ▆█▇▁█▆▄▇▂ █▁▅▇▁▃▄▁▁▆ + ▅▄▁▇▄▅▂ ▂▄▄▃▁▁▄▃ + ▅▅▁▂▅█ ▆▅▆▆█▇▅▇▃▁▃ + ▆▃▁█▅▂ ▂▇▇▇██▅▇█▁▁▃▁▆ + ▂▁▁█▁ ▅▅▅▅ ▂▁▂ █ ▁█▇ + ▁▅▁ ▁ ▁█▁▆▂▃▆ ▁ ▇▅▁ + ▃█▃ ▁▇▁▄▄▄▄▄▄▄▄▁▂▇▁▂█▃▂ ▁ ▁▁▁ + ▁▃▃▂▁█▄█ ▅▂▃ ▃▁▂▃▆▁ ▃▂▁ + ▅█▁ ▁ ▂███████ █▂▅▄▄▁▂▅▃▅▂ + ▆▁▁▂▁▅ ▆▅▁▃▃▅▂ + ▃ ▁▆█▅▂▂ ▂▅█▄▇▅▇▅ + ▃▄▃▇▄▇▇▃▁▄▄▂▇▇█▆▂▇▇▂ + █▁ ▇▄▃▁▂▂▇▂▂▇▇▂ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_24.txt b/codex-rs/tui/frames/hbars/frame_24.txt new file mode 100644 index 0000000000..791f93b591 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_24.txt @@ -0,0 +1,17 @@ + + ▂▁▂▄▇▇▇▄▄▆▂ + ▆█▂▅█▁▂▂▁▄▄▇▆▂█▇ + ▆██▄▃▅▇█▁ ▅▂▅▇▁▇▇▆ ▃ + ▆█▅▅▆▅▁▄▆▃▂▁▅▂ ▂▇▃▁▃▂█ + ▆ ▅▅▃▅▆ ▂██▅▃▂▁▂▂▃▁▆█ + ▁▆▃▇▃▂ ▇▆▆▅ ▅▁▄ ▅█▃ + ▁ ▁▁ ▆▅▂▆▅█▅▃▃▁▃▃▁▃ + ▁ ▃▁▁ ▁▆▄▅▃▂▁▁▂▅▅▂▁▁ + ▁▅ ▁▄▄▄▅▇▇▁▁▁▇▇▂▇▆▂▁ ▁ ▁▁ + ▂ ▅ ▇▁▅▆▆▄▄▆▆▁▅▃▃▇▇▁ ▁▇▁ + ▃ █▃▁▃▇██████▂ ▃▆▅▇▃▁▄▅▆▂ + ▃ ▃▆▇▃ ▁ █▅▄▅ + ▃▅▇▃▂▁▅ ▂▄█▂▅▅▂▇ + ▅▆▇▆▃▃█▁▁▅▄▄▄▁▃▂▅▂ + ▇▅▂▇▇▄▃▂▂▄▄▇▇ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_25.txt b/codex-rs/tui/frames/hbars/frame_25.txt new file mode 100644 index 0000000000..565fdb82ea --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_25.txt @@ -0,0 +1,17 @@ + + ▂▇▄▇▄▇▇▇▇▂ + ▆ ▇▆▇▂▂▄▃▁▇▁▁▆ + ▅▁▅▅▆▆█▅▁▇▃▄▃▁▁▁▂ + ▁▇▇▁ ▅ ▄▁ █▃▁▆▇▃▅ + ▆▂▂▃▆▅█▃▄▅▂▁█ ▁▅▅▃▅▇ + ▃▆▁▁▁▂▇▇▅▃▁▅ ▅▁▆▁▅▅▁▆ + ▁▅▁▇▁ ▁▂▂▅▃▂▅▁▃▅▂█▁▄▁ + ▁▁▁▅▁▅█ ▁▂▄▃▅▁▃▂▁▄▁▁▃ + ▃▇▃▁█▁▂▂▄▄▄▄▇▁▁▃▃▁▇▇▁▃ + ▅▆█▁▅▁▆▁▂▁▁▄▇▂▁▃▇▄▅▃▁ + ▃▁▇▅▃▁▂██████▇▅▁▃▁▅▁▂ + ▁▂█▁▄▇▄▃▆▆▇▅▂▅▆▅▅▁▅ + ▃▂▃▁▂▃▂▇▄▅▆▃▅▂▁▁▅ + ▃▅▄▃▃▂▇▄▁▇▇ ▇▁▇ + ▁▆█▇▃▇▆▂▇▁▇ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_26.txt b/codex-rs/tui/frames/hbars/frame_26.txt new file mode 100644 index 0000000000..e37d671dc4 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_26.txt @@ -0,0 +1,17 @@ + + ▂▄▇▇▇█▇▆ + ▅▇▁▄▅▃▁▇▄▁▆ + ▅▇██▁▄▃▁▃██▃▆ + ▄▇█▆▁▁▁▂▁▁▂▇▅▃ + ▁▂▆▃▁▅▁█▇▃▅▄▁▃▄ + ▃ █▁▅▅▅█▇▂▃█▃▃▅ + ▁ ▇█▄▁▁▅▁▁▄▄█▇ + ▅▆ ▃▁▁▁▃▃▄▁▁▅▁▁ + ▁ ▅▃▇▄▇▁▇▄▄▅▃▁▁ + ▅▂▁▅▆▁▂▂▆▇▃▃▇▁ + ▁▂█▅▁▇█▃▆▅▂▇▃▁▁ + ▃▂▁▁▅▃ ▅▅█▁▁▂ + ▇ ▇▁▃ ▃▂▅▁▅▆ + ▁█▇▃▃█▇▂▇▇▄ + ▃▅▅▃▇▁▂▃▇ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_27.txt b/codex-rs/tui/frames/hbars/frame_27.txt new file mode 100644 index 0000000000..d3dbefa975 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_27.txt @@ -0,0 +1,17 @@ + + ▄▇▇▇▇▆ + ▁▄▅▅▁▅▃ + ▄█▂ ▇▁▅█▁ + ▁▁▁▃▁▁▄▁▁ + ▁ ▂▁▂▆█▄ + ▁▂▅▂█▂▁▁▁▂ + ▄ █▁▁▂▇▁▁ + ▁ ▂▁▁▁▄█▁▁ + ▁▅ ▅ ▁▇▁▁▁▁ + █▄ ▅█▂▁▂▇▁▁ + ▁▆ ▂▃▇▇▇▅█ + ▁▁▇▇▁▁▂▅▁ + ▁▄▄▇▄▆▅▁▃ + ▃▂▂▁▃▄▅▅ + █▃█ ▃▃▅ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_28.txt b/codex-rs/tui/frames/hbars/frame_28.txt new file mode 100644 index 0000000000..0ae0f54e0b --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_28.txt @@ -0,0 +1,17 @@ + + ▅▇▇▄ + ▁▇▂▁▂ + ▄ ▄▁▂ + ▁▆▂▇▁ + ▁ ▁▁ + ▁ ▆█▁ + ▃▁▁ ▂▁ + ▁▆██▁ + ▅▃ ▂▁ + ▁▁▅▅▁▁ + ▁ ▂▁ + ▁▄▇▄▁ + ▁▄▇▁▁ + ▇▂▂▅▁ + ▁ ▅▇▁ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_29.txt b/codex-rs/tui/frames/hbars/frame_29.txt new file mode 100644 index 0000000000..d333f278dc --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_29.txt @@ -0,0 +1,17 @@ + + ▇▇▇▇▇▆ + ▆▁▇▅ ▇▃ + ▃▆▁▁ ██▁ + ▁▁▁▁▃▃▆▅ + ▃ ▁█▁ ▁ + ▁▆▁▁▁ ▂▂ + ▁▃▃▁▁▁ ▃ + ▁▁▄▁▁ + ▁▁▁▇▁ ▂ + ▂▁▄▁▁ ▂ + ▇▁▁▅▁▃ ▄ + ▁▅▁▁▁ ▂▁ + ▁▁▁▁▂▁▂▁ + ▁▄▁▇▅█▁█ + ▁▁▇ ▅▆ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_3.txt b/codex-rs/tui/frames/hbars/frame_3.txt new file mode 100644 index 0000000000..5d0b07202a --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_3.txt @@ -0,0 +1,17 @@ + + ▂▅▄▄▇▇▄▄▄▄▆▂ + ▂▇▆▅▃▁▁▇▁█▄▄▁▄▂▃▁▇▇▂ + ▆▄▅▇▄▁▇██▂ ▂█▁ ▇▇▇▅▃▁▆ + ▅▇▅▃▁▄▆▇▂ ▂▄▇ ▁▁▃ + █▅▇▁▅▃▅▁▁▇▃▂ ▃▃▃▁▁▂ + ▅▁▃▃▅ ▅▆▁▃▄▃▃ ▁ ▃▃▁ + ▄▇ ▁ █▇▃▁▂█▁▆ ▅▇▅▁▆ + ▆▆▁▆▁ ▆▆▁█▅▃▁ ▁▂▁▄▁ + ▆██▁ ▄▁▇▇▁▁▇▆▁▄▇▇▂▂▂▇▇▂▁▃█▄▁ + ▆▃▅▃▆ ▅▅▇▅▄▄▁ ▁▇▁▂▂▆ ▄▅▆▄▃▂▁▃▁▂ + █▃▁ ▁ █▁▁▇▆█ █▇▇▇███▇▇▆▅▅▅▆▅ + █▇▁ ▃▇ ▂ ▅▃▇▃▅▅ + ▄▃▅▅▇▃▆ ▆▇▄▅█▆▁█ + ▄▃▇▆▂▇▇▃▄▄▄▄▆▅▄▇▄▂▂▇█ + ▂▇▇▇▂▅▁▂▂▂▂▁▄▅▃█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_30.txt b/codex-rs/tui/frames/hbars/frame_30.txt new file mode 100644 index 0000000000..7ceb36d37a --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_30.txt @@ -0,0 +1,17 @@ + + ▂▄█▇▇▇▆ + ▂▅▄▁▁▃▇█▄▃ + ██▃▁▆▃▃▁▇▆▃ + ▁▁▃▁▅▁▂▃▁▃ ▃▆ + ▄▇▁▁▂▃▁▆▁▆ ▁ + ▁▇▁▃▇ ▇▁▁▁▁▅▁ + ▃▅▁▁▁▃▂ ▃▅▃▁ ▄▂ + █▁ █▇▄▁▆▁█▁▆ ▂ + █▁▂█▃▁▄▁▃▅▁▆ ▂ + █▁▁▃▁▂▂▁▁ ▇▆ ▂ + ▃▁▁▄▃▂▇▁▁▁▇▁▁ + ▁▇▅▅▆▅▇▃▁▁█ ▁ + ▃▁▃▁▁▅▇▁▁▆▁▅ + ▆▃▆▇▄▃▅▁▆▅█ + ▃▆▅▁▃▂▂▄█ + ▂▂▂▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_31.txt b/codex-rs/tui/frames/hbars/frame_31.txt new file mode 100644 index 0000000000..419be30ed9 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_31.txt @@ -0,0 +1,17 @@ + + ▂▅▅▇▇▇▇▄▆ + ▂▇▇▄▇▆▂█▇▃█▇▆ + ▆▁▃▅▅▆▄▂▂▅█▁▂▇▃ + ▆▁▅▇▂▂▇▄▂▆▃▃▁▃▁▁▃ + ▃▁▁▁▁▇▆▇▃▂▆█▃▁▅▂▂ + ▄▁▃▂▁▂▁██▃▄▇▆▅▅▁▆█▁ + ▅▁▁ ▁▃▇▁▃▅▄▅▄▇▁▇▁▅▁ + ▃▃▆ ▁▁█▁▃ ▁▃██▁▁▃▅▁ + ▁▃▆▂▁█▃▁▁▁▅▇▁▁▁▂ ▁ + █▁▁▁▅▅▁▁▂▂▂▃▂▁▃▁▁ ▇ + ▃▇▂▅▇▁▆ ▅▇▇▇▂▅▁█▁▂ + ▁▁▁▃▃▃▆ ▂▄▇ ▁ + ▄▁▇▄▂ ▆ ▅ ▁▇▂▅▂ + ▅▁▃▁▅▂▁▂▆▁█▆▁▂ + ██▄▁▂▇▇▅▅▄▇ + ▂▂▂▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_32.txt b/codex-rs/tui/frames/hbars/frame_32.txt new file mode 100644 index 0000000000..1234a419b0 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_32.txt @@ -0,0 +1,17 @@ + + ▆▇▇▇▇▄▄▁▆▂ + ▄▇▁▇▇▁▃▁▁▇▇▁▁▆ + ▅▃▇▄▃▆▇▃▅▆▂▇▁▇▃█▇▆ + █▅▅▁▂▆▂▄▆ ▆ ▆▂▃▁▇▆ ▆ + ▅▅▁▆▁▇▃█▇▁▄ █▂▆▁▃▅▃▇▃▆ + ▃▅▃▃▆▃▇▁▂▅▁▁▇▂ ▁▇▅ ▇ + ▇▁█▄▆▂█▃▁▁▆▆▁▆▄▂▅▂▅▅▁█▂ + ▁▁▁▆▂ █▂▁▁█▅█▁▄▆▂█▃▁██▂ + ▃▁▁▆▂ █▂▁█▂▂▁▇▇▇▁▁▁▄▁█▄▂ + ███▂▂▁▇▃█▃▂▂▂▂▂▁▁▇▁▄▁▆▂ + ▆▃▇▁▁▅ ▁▇██▇▇▇▃▄▅▅▅▅▅ + ▃▆▁▃▃▃ ▆▃▁▅█▁ + █▇▇▁▁▁▇▂ ▂▅▂▁▅ ▆ + ▃▆▃█▁▇▁▄▄▇▂▂▇█▂▅ + ▁▄▄▂▂▆▇▅▇▂██ + ▂▂▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_33.txt b/codex-rs/tui/frames/hbars/frame_33.txt new file mode 100644 index 0000000000..780eb104ef --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_33.txt @@ -0,0 +1,17 @@ + + ▂▆▇▄▇▄▇▄▁▅▂ + ▂▇▇▁▁▃▇▄▁▅▁▆▁▇▁▇▅ + ▂▅▃▁▇▇▇▆▄█▂ █▇▅▁▁▇█▆ + ▆▃▅▁▅▂▁▆▂ ▇▁▁▃▂▇ + ▂▅▁▅▂▁▁▅▃▃▃ ▁▇▃▃▃ + ▅▅▆ ▃▂▃▃▂▃▆ ▅▃▅▂▃ + ▁▁▇ ▃▆▇▁▂▁▃ ▁▇▁▁ + ▇▁▆▆ ▆██▃▅▄▆ ▃█▁▇ + ▁▁▁ ▁ ▆▂ ▅▇▆▆▆▄▄▄▇▁▁▇▅▂▁▃▁ + ▃▅▁██▅▅▆▅▂▁▁▂▂▂▂▂▁▁▇▃▃▃▁▁▅ + ▃▄▃▆ ▁▅▁▅ ▅ ████▇▇▇ ▁▁▆▅▃▂ + ▃▇▃▇▆█▆ ▅▅▄▅▄▅ + ▇▃█▇▆▇▄▆ ▂▇▁▆▅▇▃█ + ▃▁█▇▃▇▁▆▄▇▂█▄▆▃▇▁▇ + █▄▄▇▆▂▂▂▃▇▇▄▆█ + ▂▂▂▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_34.txt b/codex-rs/tui/frames/hbars/frame_34.txt new file mode 100644 index 0000000000..4bf69e69eb --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_34.txt @@ -0,0 +1,17 @@ + + ▂▆▄▇▇▇▇▄▁▆▂ + ▂▇▇▇▅▃▄▁█▁▇▇▄▇▇▄▆▄▂ + ▂▅▅▆▁▇█▅▁▇▂ ▂▃▃▃▆█▇▇▆ + ▆▅▂▁▇▂▅▆▂ ▇▁▆▇▃▃ + ▅▅▁▃▆▅▁ ▁█ ▆ ▃▃▇▃▃ + ▆▅▃▁▂▅ ▃▃█▁▃▇▃ ▃▆▃▁▃ + ▁▇▃▁▂ █▃▂▇▁▂▃ ▁▄▁▂ + ▃▁▄█▅ ▁▇▂▁▅█▁ ▅ ▂▃ + ▆█▅▅█ ▅▃▅▅█▂▄▄▇▇▇▇▇▇▁▂▂█ ▁▃▂ + ▁▁▃▆▅▆▆▃█▅▅█▁▁▁▂▁▅▂▂▂▆▅▂▁▁▂▁▃ + ▅▂▃▆ ▁▃▁▇▃ █▇▇▂▂▂▂▃ ▆▅▆▃▁█ + ▅▆▃▄▄▃▂ ▅▄▅▁▅█ + ▃▇▂▁▇▃▄▆ ▂▇▄█▂▅▆▂ + ▆▃▅▁█▁▇▆▄▆▇▄▇▄▇▂▇▇▅█ + █▁▃▄▄▂▂▂▂▂▄▄▇▄▃ + ▂▂▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_35.txt b/codex-rs/tui/frames/hbars/frame_35.txt new file mode 100644 index 0000000000..86dde2ad34 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_35.txt @@ -0,0 +1,17 @@ + + ▂▆▇▄▄▇▇▇▄▇▆▂ + ▆▇▄▇▅▁▇▇▇█▁▇▁▅█▁▇▄▂ + ▂▅▅▁▄▇▇▁▃▇█▂ ▂█▇▄▇▅█▁▇▆ + ▆▅▅▇▅▆▄▆▂ ▇▇▂▃▁▂ + ▅▅▁▁▅▅▃ █▃▇▆ ▁▃▇▁▆ + ▄▅▄▅▇▂ █▁▂█▅▅▇▂ ▁▃▃▁ + ▃ ▅▅ ▃▃ █▇▂▅ ▁▃▃▃ + ▁▁▁▅ ▅▃▃▄▅█ ▅ █▅ + ▅ ▆▂ ▆▁▁▅▄█▅▁▄▄▂▄▂▄▇▁▁ ▁▁▄▇ + ▁▆▃▄█ ▅▅▄█▇▇▅▁▄ ▃▆▂▂▂▂▅█▁▅█ ▁█ + ▅▂▃▆█▅▃▂▁▅▃▂ ▂█▃▃▃▃▇▃▃▇▅▅▂▆▁ + █▅▃▃▅▁ ▂▅▇ ▆▃ + ▃▄▂▃▄▆▅▆ ▆▄▅▂▇▇█ + █▃▂█▁▇▁▆▅▁▁▇▁▄▅▇█▂▅▄█ + █▃▁▄▄▂▂▅▂▂▇▇▇█▃ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_36.txt b/codex-rs/tui/frames/hbars/frame_36.txt new file mode 100644 index 0000000000..bccadcf7b7 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_36.txt @@ -0,0 +1,17 @@ + + ▂▂▇▄▇▇▇▇▄▇▆▂ + ▂▄██▃▇▅▄▅▇▃▇▄▇▇█▇▇▇▂ + ▆▃█▃▆▇▇▆▇█▂▂ ▂█▇▁▇▇▁▆▇▁▆ + ▂▁█▇▇▂▂▂▂ █▇▁▃█▁ + ▆▅▂▄▃█▁▃▂▃▆▅ ▃▃▅▇ + ▅ ▆▅▂ ▇▂ █▁▅▆ █▃▃▇ + ▁ ▄ ▂ ▃ █▃▃ ▁▃▁▆ + ▁▁▃▁ ▂▃ ▂▅▅ ▃▁ ▁ + ▁██▁ ▅▅ ▆▇██▆▇▇▂▇▇▇▇▇▂ ▁▃▁▁ + ▂▇▁▃ ▆▁▂▂▅▁▅ ▂▁▂▂▂▂▂▂▂▁▁ ▃▅█▂ + █ ▇▁▃ ▇▂▇▅▃ █▇▇▃▃▃▃▃█ ▁▆█▅ + █▆█▃▄▅ ▆▅▁█▅ + ▃▅▁▁▇▁▆ ▆▇▇█▅▆▂ + ▇▆▂█▇▇▄▃▄▁▂▇▁▄█▆█▆▄▇█ + ▂▇▇▅▁▂▆▆▂▆▆▇▇▇▇█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_4.txt b/codex-rs/tui/frames/hbars/frame_4.txt new file mode 100644 index 0000000000..5867215a96 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_4.txt @@ -0,0 +1,17 @@ + + ▂▅▄▄▇▄▄▇▄▇▆▂ + ▂▆█▇▇▁▅ ▁▃▄▅▇▄▁█▅▇▆▂ + ▆▇▄▁▁▁▇▇█▂ ▂▃▁▃▃▇▁▅▃▃▂ + ▅▅▁▆▁█▅▇▆ █▁▇▇▃▇▃ + ▅▁▅▂▁▄▁▃▄▃▁▆ ▃█▃▁▇▃ + ▅▁▁▃▁ █▂▁▁▅▇▃ █ ▃▄▁▆ + █▃▁▄▂ █▇▇▃▇█▁▆ ▆ █▄▁ + ▁▅▃ ▆▁▅▇▃▁▁ ▁▁▁ + ▂▁ ▁▂ ▄▁▅█▃▅▅▇▁▇▇▇▂▂▂▂▆▆ ▁▁▇ + ▁▃▅ ▁ ▆▅▅▅▆▂▁▂▄▃▁▆▅▂▆▅▅▃▄▁▅▅█▁ + ▂▁▄█▃▆▃▃▆▃▅ █▇▇▇▇▇▇▇█▃▆▁▁▁▂ + ▆▁▃█▁▂▂ ▆▃▄▅▇▇█ + ▃▃▆▅▃ ▆▂ ▂▅▃▆▇▄▁▅ + ▁▁▁▄▂▇▇▃▄▄▄▄▆▇▄▇▇▃▁▇▂ + ▇▃▃▁▅▁▂▂▂▂▂▄▆▇▂ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_5.txt b/codex-rs/tui/frames/hbars/frame_5.txt new file mode 100644 index 0000000000..d0cd750b8a --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_5.txt @@ -0,0 +1,17 @@ + + ▂▅▄▄▄▇▄▄▄▇▆▂ + ▂▇█▇▅▇▅▁▁▇▁▄▇▄▂▁█▇▆ + ▇▂▅▃▇▁▇█▂ █▃▄▁▇▃ ▆▇▆ + ▆▁▅▁▅▁▅▄▆ ▆▃▁▁▁▁▂ + ▆▃▅▇▅▃▂▇▁▂▃▆ ▂ ▃▁▃▁▂ + ▁▁▁▁▅ ▃▂▁▃▄▅▁▂ ▇▅▁▁ + ▁▅▁ ▇ ▂▃▂▁▃█▁▆ ██▁▇▁▆ + ▁▅▁▂█ ▆▂▄▁▅▂▁ ▇▁▂▁ + ▁▆▁▃▇ ▅▂▁█▆▁▇▄▂▁▇▁▂▂▂▇▆▂█▁▅▁ + ▂▃▁▃▆▆▅▇▇█ ▁█ ▅▅▃▄▃▆▄▅▆▅▁▅▇▁▂ + ▃▆▁▁▆▁▆▃▃▅▇▂ █▇▇█████▆▁▄▁▃▅ + ▃▃▇▅▃▃ ▂ ▅▂▅▇▆▃ + ▃▅▇▃▁▄▇▂ ▂▄▇▆▇█▄▇ + ▃▁▇▁▆▇▇▃▄▁▄▂▆▇▄▇▃▁▄▇ + ▃▆▇▂▇█▂▂▂▆▂▆▇▇▂ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_6.txt b/codex-rs/tui/frames/hbars/frame_6.txt new file mode 100644 index 0000000000..2fde73afab --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_6.txt @@ -0,0 +1,17 @@ + + ▂▅▄▄▄▇▄▄▇▇▂▂ + ▆▃▄▅▇▁▄▇▇▁▇▇▄▂▆▇▇▂ + ▆▆▆▁▁▁▇█ ▂█▁▅▄▇▇▇▅▃▂ + ▅▆▁▇▁▇▂▄▆ ▃▇▁▁▁▁▆ + █▄▁▁▁▇▃▃▇▇▃ ▅▃▃▁▃▆ + ▄▆▅▁▅▂▃▇▄▁▃▂▁▆ ▅▄▃▅▁ + ▂ ▇▁▁ ▃▃▁▅▃▃ ▃▇▁▂▁ + ▁ ▁▁▁ ▂▁▄▁▅▁▁ ▁▇▃▁▁ + ▂▅▁▆▁ ▅█▁▁▇▄▅▇▂▁▇▁▂▂▇▇▂▅▃▅▁ + ▁▁▃▆▅▂▃▂▄▇ ▁▅▄▇▆▁▁▆▄▄▄▃▁▆▁▃ + ▅ ▁ ▅▁▁▁▄▅█ █▇████▇█▂▃▃▅▁ + ▆ ▄ ▅▆▂ ▆▅▂▅▅▁▂ + ▅▂▃▂▇▇▆ ▂▇▃▂▅▇▆▇ + ▂█▁▇▆█▇ ▄▁▂▂▆▇▇▇ ▅▄█ + ▃▆▄▇▇▆▂▂▂▂▂▆▇▇ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_7.txt b/codex-rs/tui/frames/hbars/frame_7.txt new file mode 100644 index 0000000000..f9b4ed9219 --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_7.txt @@ -0,0 +1,17 @@ + + ▂▅▁▄▇▇▄▄▇▆▂ + ▆▇▂▇▃▁▇▇▇▄▄▃▄ ▂▇▆ + ▇ ▆▁▁▁▇▂ ▂▃▁▂ ▇▅▂▇▆ + ▃▃▁▁▁▁▄▇ ▃▁▃▇▁▅▆ + ▂█▁▇▁▁▃▁▅▃▆ ▅ ▇▁▁▃ + ▁ ▄▁▁█ ▂█▃▄▁▃ ▆▆▁▁▁ + ▂▃█▁ ▃▂▁▃▁▃▁ ▇▇▃▁▁ + ▂█▅▁▁ ▄▇▅▁▇▁▂ █ ▁▁▁ + ▅█▁▇ ▆█▂▅▁▃▅▁▁▄▄▂▁▁▄▄▇▃▁▁ + ▁▆█▁▁▄▅▁▁▅█▁▅▃▁▁▃▃▆▄▆▄▃▁▃▁ + ▃ ▄▃▅▇▁▇▂▅ ▇▇▇▇▇▇██▂▅▁▁ + █▂ ▅▂▅▂▂ ▆█▆▅▄▅█ + █▄▆▇▃▃▃▂ ▆▃▁▆▇▅▇█ + ▃▂█▃▁▇▃▄▁▂▂▂▇▇▁▇▇▅ + █▁▇█▁▅▁▂▂▆▂▄▇▇ + \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_8.txt b/codex-rs/tui/frames/hbars/frame_8.txt new file mode 100644 index 0000000000..44c448de8a --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_8.txt @@ -0,0 +1,17 @@ + + ▂▂▇▂▄▇▇▄▇▆▂ + ▆█▇▅▁▁▁▇▄▄ ▁ █▇ + ▂▁▄▆▁▅▅▇ ▆█▁▅▁▇▃▇▃▆ + ▂▇▃▇▅▁▆▇▁ █ ▄▃▁▁▃ + █ ▅▁▅▆▃▁▅▃ ▅█▃▁▁▆ + ▁█▆▁▃▃▃▂▃▁▂▇ ▃▇▁▁▁ + ▁▇▁▁▁ █▂▄▃▁▂▁ ▁▃▁▅▁▆ + ▃▆▁▁▅ ▁▇▃▅▁▆▇▅ ▅▂▅▁▁ + ▃ ▃▁▁▂▃ ▅▇▄▁▁▅▇▆▇▆▆▃▁▁▁ + ▃▇▅▄▂▁█▆▁▆▁▁▄▁▄▂▂▁▁▄█ + ▅▅▃▃▁▃▁▁▁▅█▃▇▃▇█▃▇█▅▃▁ + █▆█▁▃▁▂▂ ▅▆▅▅▅█ + █▃▂▇▃▃▃▂ ▂▅▃▂▁▇▅▇ + ▅▅█▁▆▇ ▄▄▇▇▄▅▄▆▁▂ + ▁▁▂▇▇▃▁▂▆▇▅▄▂ + ▂▂ \ No newline at end of file diff --git a/codex-rs/tui/frames/hbars/frame_9.txt b/codex-rs/tui/frames/hbars/frame_9.txt new file mode 100644 index 0000000000..a18a8a231c --- /dev/null +++ b/codex-rs/tui/frames/hbars/frame_9.txt @@ -0,0 +1,17 @@ + + ▅▄▃▇▅▇▇▄▆ + ▅▇▂▅▁▁▇█▄ ▂▆▃▂ + ▅ ▆▁▁▅▇▃▃▄▅ ▃▂▁▆ + █ ▁▁▅▄▄▂ ▂▃▆▁▃▃▁▇▆ + ▅▇█▄▃▇█▁▇▆ ▇▅█▇▅▇▁▁ + ▁ ▁▁▁█▃▁▃▄▂▂ ▁█▁▇▁▁▁ + ▂ ▁▇▃▁▇▇▁▃▃▆█▅▆▅ ▂▁▁ + ▁ ▁▅▂▆▃▁▁▁▂▅▄▃▂▁ ▁▁ + █▆▁█ ▅▁█▁▁▁▁▇▁▁▆▁▁▂ + ▁▂▁▁▁▂▆▁▃▁▂▁▁▁▁▂▂▁▁▁ + █ ▂▃▅▃▃▁▅█▇▇▇▇▁▁█▅▃▁ + ▃▁▁▁▃▆▂ ▆▅ ▃▅▁▂ + ▃▇▃▁▃▃ ▅▄▂▄▁▅▇ + ▃▆█▃▂▁▇▅▇▄▄▄▇▁▂ + █▆▂ ▇▃▃▁▄▇▅█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_1.txt b/codex-rs/tui/frames/openai/frame_1.txt new file mode 100644 index 0000000000..1019a11c95 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_1.txt @@ -0,0 +1,17 @@ + + aeaenppnnppa + anpeonpepnniina aopa + pioipoooaa aooaoiniiip + noanooppa eoinip + naneoainann oeinnp + io pa ioeniip oeniip + paopo onioeoia iei + iiaia peeinio oai + inioa niianioeippppppapp no i + aino anpa eo ioiaaaeepppiepepi + naaoa anpeea aaoooo aooepnae + oap op a poeoai + anpanpa anapiapo + aopna opennnnenopapio + aoooiiiaaapanpoo + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_10.txt b/codex-rs/tui/frames/openai/frame_10.txt new file mode 100644 index 0000000000..942f59e944 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_10.txt @@ -0,0 +1,17 @@ + + apooonppa + ooapopnieaop + aapiieiipipnpp + iaaeninaenpoonnp + e niioia opeaeie + ia oioieen aaoi + n ioooiiiio iep + o iinpepiipaaenii + o in nniniipnpnii + i pinpiaeaoaaaioa + p oiiiiioo nponia + naopnpoo aioopee + io iiiiopepeiea + naooeipna eeo + op aonapno + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_11.txt b/codex-rs/tui/frames/openai/frame_11.txt new file mode 100644 index 0000000000..ef0aff76e0 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_11.txt @@ -0,0 +1,17 @@ + + pooooppa + eo niiinnp + eoaaiinnoenp + iaaiinnpanee + aoennipnonaiip + ipaiipanniaeii + oo piiiiiiainn + i iieiine ioi + e oieiioepiai + oo aienpoeiaia + oap iiiineinni + napeiaoeoonia + a oinnaaino + np oiipaeoa + na oopapa + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_12.txt b/codex-rs/tui/frames/openai/frame_12.txt new file mode 100644 index 0000000000..8940e05bd6 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_12.txt @@ -0,0 +1,17 @@ + + pooope + pnaaeipn + o ienpp + epiiinnoi + i oiiiieei + ioeeoaoaio + i ieniin + i epniio + op ieiipii + i eionoa + ie ionooe + p oi api + e ooiponi + oaeopinia + n oinee + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_13.txt b/codex-rs/tui/frames/openai/frame_13.txt new file mode 100644 index 0000000000..c73afab740 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_13.txt @@ -0,0 +1,17 @@ + + eooop + iaaii + iaaio + iooia + o ii + oepii + p ii + p oi + ep aie + io pni + oaee ia + iaaai + ippia + oaain + p eon + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_14.txt b/codex-rs/tui/frames/openai/frame_14.txt new file mode 100644 index 0000000000..8a273a1666 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_14.txt @@ -0,0 +1,17 @@ + + pooon + peaaen + iaiie i + iieioaip + iiin i + ioii oi + iiii e o + iinia n + iiii o + oaee ne + nioopepi + ioiiaaai + e oinnna + ineoaae + ao one + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_15.txt b/codex-rs/tui/frames/openai/frame_15.txt new file mode 100644 index 0000000000..5a0e8f1b54 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_15.txt @@ -0,0 +1,17 @@ + + ppoooia + apniiaeop + eeionniooi + iea eepeaai + iinonniieoai + niipiieei o + ii iiiiiipi + iieiipiii opi + iipppoiiiaeei + iaineinioe ei + ieiiiiai a n + iooeaiinp n + oinp eeea na + iaiinnepne + naoaaaae + aa \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_16.txt b/codex-rs/tui/frames/openai/frame_16.txt new file mode 100644 index 0000000000..06c519f602 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_16.txt @@ -0,0 +1,17 @@ + + anpooopia + eaiioiininn + ieeonennii on + eee noaniniiooi + iinaeooniioeian + iiioio inn i iei + nni eapiiiieoop i + ien iaiieiiion ai + nniiipieaiioop e + ooaapnnnoieai pai + iiipooeoninoneiia + iio ia aeep e + nio i epeapi + niioaoieepai + oeeaneaano + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_17.txt b/codex-rs/tui/frames/openai/frame_17.txt new file mode 100644 index 0000000000..0bd4ef6dfc --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_17.txt @@ -0,0 +1,17 @@ + + pnpppnnipa + anooiiionoipoap + poneannappoiiiaon + eieaeioaa oinniiinn + iea i ioennnee p + anopea peei epneiee + o nei peeia ooiieni + poni eeiieipiinno + peoennnpinainaeniii i + ioanaaieoneiin npopn + nnneooooooonaioeen no + niiao aeiia n + ann ona popeaae + p iopnnpaanoeio + apneappioapo + a \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_18.txt b/codex-rs/tui/frames/openai/frame_18.txt new file mode 100644 index 0000000000..de59f344ef --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_18.txt @@ -0,0 +1,17 @@ + + annpnnpnipa + apoanpppiaapopnna + aeeiooonopoeaopeen o + piioepaoo onaaeninnnnnp + anee ei aopaneieiannnna + eni ppieaaaepopiopeaeaei + iinee peoeioaeooininp + onpii anoiina inio + noo pnnnnnnpiipioenp ioia + anniono iieaanaiiianian p + ieinaoooooooa naaeieoeapa + nn pnp aaooeoao + naopaae aoaaenpa + oieooppnnnaooaeapo + oiiaeaapeponpo + a \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_19.txt b/codex-rs/tui/frames/openai/frame_19.txt new file mode 100644 index 0000000000..ade5662359 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_19.txt @@ -0,0 +1,17 @@ + + aannpipnniea + apiiinennnaoapiopp + ponneoipoa aoepaonn + eniopaa annppaiop + iieaea piaoeoin inp + ineoo aioie ee oeoi + aniio eoaeippa eeepi + iiii inoniop i iii + ioinpnnnnnniiiiponoin n oii + anepinoeaopnpap aa enanpeeia + onoepioooooooo anaeiee eeo + nnaoan aeeaeeo + o aniiop pnneeina + ooeioeipaanneoo noio + oieaepoapeaopa + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_2.txt b/codex-rs/tui/frames/openai/frame_2.txt new file mode 100644 index 0000000000..be49360bbf --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_2.txt @@ -0,0 +1,17 @@ + + aeaenpnnnppa + appeonpiiiniinaoiopa + pioinooioaa aoonoeiinip + aieaeooppa ppnieip + paoeoainanna apinip + oepoa ionpenp nnioi + piooi aeiniaip eoioi + io na pioiino ioeei + oooni niaaaioeipppppppppiaiio + anoi eiio eo innaaaaeeaaipe i + nnn o oneeio aoooooooooipoii + onaeep a ppnepo + enaaipp pnap aio + aianaaoopennnnenoaaiio + aopopiiaaaaineoo + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_20.txt b/codex-rs/tui/frames/openai/frame_20.txt new file mode 100644 index 0000000000..6eaf358e88 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_20.txt @@ -0,0 +1,17 @@ + + aapniinpnpaa + pnnonpapnnniiaaonpp + ppoapooioo aoaonpoipa + aioaoio appineonn + ai pio ae aiiaoniin + eapio poonioe oniin + ninpi po epoa pnie + iaaea ooneiop iioi + ieiinpnnnnnnnnaponaanno e in + oiaiao eaaaaaain onnoinn pe ii + npanoooooooooo npniipi en + o aoep aeoeie + naaopia pnoanoo + appeoipannpeoioapeoo + aopia naaaaiooo + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_21.txt b/codex-rs/tui/frames/openai/frame_21.txt new file mode 100644 index 0000000000..5f317f375c --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_21.txt @@ -0,0 +1,17 @@ + + aapnpnnpnppaa + ppoaaaapinipnaapopa + noaapoaoa aaiopaaop + poinoo apnopnop + epeoa piean nnaap + eoei pooaee nnap + ioia a eapeo nnno + an nn oip i i + i i ppnnnnnppp aipoip ne i + i in ia api aoaoip eoee + n oe aaooo oa ooapn ea p + op ena aoo e + oa apa aenoo pa + ona ooopeiinenooo pa + oppnpaaaapanpoa + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_22.txt b/codex-rs/tui/frames/openai/frame_22.txt new file mode 100644 index 0000000000..74b75b9113 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_22.txt @@ -0,0 +1,17 @@ + + appnpnnpnppa + apeoieaeieniinipeopa + pnoninooa aoonoopaapp + noiooo ppiiiaon + niieo paeinieenoi + nioea pieinaea ninni + ipone ipinoeo iiei + iinia iniian iaioi + iipop pinnnnnnppanoia np aino + ain oannp epoieei nonaoipp enn + nnnai ooooooooa aeopaeeeopa + nonanp aopoipo + oopn ppa aeopooae + oeoppooinnpnnenoooopo + oioianaaapnaenoa + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_23.txt b/codex-rs/tui/frames/openai/frame_23.txt new file mode 100644 index 0000000000..35e7fe2210 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_23.txt @@ -0,0 +1,17 @@ + + appanpoppnpaa + anipinapannpiaioipa + popiopnoa oiepinniip + enionea annniinn + eeiaeo peppooeonin + pnioea aoooooeooiinip + aiioi eeee aia o ioo + iei i ioipanp i oei + aon ipinnnnnnnniaoiaona i iii + innaiono ean nianpi nai + eoi i aooooooo oaenniaeaea + piiaie peinaea + n ipoeaa aeonoepe + nnnpnopninnappopapoa + oi onniaapaaooa + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_24.txt b/codex-rs/tui/frames/openai/frame_24.txt new file mode 100644 index 0000000000..a74ea1f0bb --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_24.txt @@ -0,0 +1,17 @@ + + aianpponnpa + poaeoiaainnppaop + poonnepoi eaeoioop n + poeepeinpnaiea aoninao + p eenep aooenaiaanipo + ipnpna oppe ein eon + i ii peapeoeaninaia + i nii ipnenaiiaeeaii + ie innneppiiippaopai i ii + a e oieppnnppieanpoi ioi + n oninoooooooa npeoninepa + n npon i oene + neonaie anoaeeao + epopnaoiiennniaaea + oeaopnnaannpo + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_25.txt b/codex-rs/tui/frames/openai/frame_25.txt new file mode 100644 index 0000000000..c2c5b30b29 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_25.txt @@ -0,0 +1,17 @@ + + apnonppppa + p opoaannioiip + eieeppoeipnnniiia + ipoi e ni onipone + paanpeoaneaio ieeneo + npiiiaopeaie eipieeip + ieioi iaaenaeineaoini + iiieieo ianneinainiin + apnioiaannnnpiinnipoin + epoieipiaiinoainoneni + nioeniaoooooopeinieia + iaoinpnnppoeaepeeie + aaaianaonepaeaiie + nennnaonioo oio + ipoonppapio + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_26.txt b/codex-rs/tui/frames/openai/frame_26.txt new file mode 100644 index 0000000000..09a947d35d --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_26.txt @@ -0,0 +1,17 @@ + + anoooopp + eoinenipnip + eoooinninoonp + noopiiiaiiapea + iapnieiooneninn + n oieeeooanonne + i ooniieiinnop + ep niiiaaniieii + i enonpipnnenii + eaiepiaaponnoi + iaoeioonpeapnii + naiien eeoiia + o oin aaeiep + ioonnooaoon + neeaoiano + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_27.txt b/codex-rs/tui/frames/openai/frame_27.txt new file mode 100644 index 0000000000..b3fef11ac8 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_27.txt @@ -0,0 +1,17 @@ + + nooopp + ineeien + noa oieoi + iiiaiinii + i aiapon + iaeaoaiiia + n oiiaoii + i aiiinoii + ie e ipiiii + on eoaiaoii + ip aaoopeo + iippiiaei + innpnpeia + naainnee + ono ane + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_28.txt b/codex-rs/tui/frames/openai/frame_28.txt new file mode 100644 index 0000000000..11fdcec520 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_28.txt @@ -0,0 +1,17 @@ + + eoon + ipaia + n nia + ipaoi + i ii + i poi + aii ai + ipooi + en ai + iieeii + i ai + inpni + inoii + oaaei + i epi + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_29.txt b/codex-rs/tui/frames/openai/frame_29.txt new file mode 100644 index 0000000000..2dc6c66753 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_29.txt @@ -0,0 +1,17 @@ + + poooop + pioe on + apii ooi + iiiianpe + n ioi i + ipiii aa + inniii a + iinii + iiioi a + ainii a + oiieia n + ieiii ai + iiiiaiai + inioeoio + iio ep + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_3.txt b/codex-rs/tui/frames/openai/frame_3.txt new file mode 100644 index 0000000000..9026d59a43 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_3.txt @@ -0,0 +1,17 @@ + + aennppnnnnpa + appeniipionninaaiopa + pneonioooa aoi oopeaip + epeninppa ano iin + oeoieaeiiona naniia + einne epinnnn i nni + no i ooniaoip eoeip + ppipi ppioeni iaini + pooi niopiiopinppaaappaiaoni + pnenp eeoenni ioiaap nepnnainia + oai i oiippo ooooooooopeeepe + ooi np a eapaee + naeeonp ppneopio + nappaooannnnpenonaapo + aopoaeiaaaaineao + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_30.txt b/codex-rs/tui/frames/openai/frame_30.txt new file mode 100644 index 0000000000..73b4906d0e --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_30.txt @@ -0,0 +1,17 @@ + + anooopp + aeniinoonn + ooaipnnippn + iinieianin np + noiianipip i + ioiap oiiiiei + neiiina neni na + oi opnipioip a + oiaoninineip a + oiiniaaii pp a + niinnaoiiipii + ioeepeoniio i + niniieoiipie + pappnaeipeo + npeiaaano + aaaa \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_31.txt b/codex-rs/tui/frames/openai/frame_31.txt new file mode 100644 index 0000000000..cc71fce920 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_31.txt @@ -0,0 +1,17 @@ + + aeeopopnp + aponppaopnoop + pineepnaaeoiaon + piepaaonapnniniin + aiiiipponaponieaa + niaaiaioonnopeeipoi + eii iaoinenenoioiei + nnp iioin iaooiinei + inpaioaiiiepiiia i + oiiieeiiaaanainii o + aoaepip eoooaeioia + iiinnnp ano i + niona p e ioaea + einieaiapiopia + ooniapoeeno + aaaa \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_32.txt b/codex-rs/tui/frames/openai/frame_32.txt new file mode 100644 index 0000000000..c0d6573da7 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_32.txt @@ -0,0 +1,17 @@ + + pppppnnipa + noiooiniiooiip + eaonappaepaoionoop + oeeiapanp p panipp p + eeipionooin oapinenonp + nennpnoiaeiipa ipe o + oionpaoniippipnaeaeeioa + iiipa oaiioeoinpaoniooa + niipa oaioaaipppiiiniona + oooaaiononaaaaaiioinipa + pnoiie iooooooaneeeee + npiann pnieoi + oooiiipa aeaie p + npnoipinnoaapoae + innaappeoaoo + aaa \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_33.txt b/codex-rs/tui/frames/openai/frame_33.txt new file mode 100644 index 0000000000..56ef96d36a --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_33.txt @@ -0,0 +1,17 @@ + + appnpnpniea + apoiinonieipioioe + aenipoppnoa ooeiipop + pneieaipa oiinao + aeieaiienan ipnna + eep nannanp enean + iip npoiain ioii + oipp poonenp noio + iii i pa eopppnnnpiipeaini + aeiooeepeaiiaaaaaiioaaaiie + nnnp ieie e ooooooo iipeaa + npnopop eenene + onooponp apipeono + nioonpipnpaonpnoio + onnppaaaaponpo + aaaa \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_34.txt b/codex-rs/tui/frames/openai/frame_34.txt new file mode 100644 index 0000000000..b6e87c62f1 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_34.txt @@ -0,0 +1,17 @@ + + apnppppnipa + apopennioiponoonpna + aeepiooeioa aannpooop + peaioaepa oiponn + eeinpei io p nnona + peniae nnoinon npnin + ioaia onaoiaa inia + ninoe ioaieoi e an + poeeo eneeoannppppppiaao iaa + iinpeppaoeeoiiiaieaaapeaiiain + eanp inioa oooaaaaa pepnio + epnnnna eneieo + npaipnnp apnoaepa + pneioippnppnonoapoeo + oinnnaaaaannona + aaa \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_35.txt b/codex-rs/tui/frames/openai/frame_35.txt new file mode 100644 index 0000000000..899d6766b7 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_35.txt @@ -0,0 +1,17 @@ + + appnnpppnppa + ponoeioopoioieoiona + aeeinpoiaooa aoonoeoiop + peepepnpa opania + eeiieen onop inoip + nenepa oiaoeeoa inni + n ee nn ooae iann + iiie ennneo e oe + e pa piienoeinnananpii iino + ipano eenoopein npaaaaeoieo io + eanpoenaieaa aoaaaaoaaoeeapi + oeanei aeo pa + nnaanpep pneaooo + oaaoioipeiipineooaeno + oainnaaeaappooa + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_36.txt b/codex-rs/tui/frames/openai/frame_36.txt new file mode 100644 index 0000000000..9a23d2ddd6 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_36.txt @@ -0,0 +1,17 @@ + + aapnppppnppa + anoonpenepnpnppooopa + pnonppopooaa aooiopipoip + aioopaaaa ooinoi + peannoinanpe aneo + e pea oa oiep onao + i n a n onn iaip + iini an aee ni i + iooi ee pooopppapppppa inii + aoin piaaeie aiaaaaaaaii neoa + o oin papea oooaaaaao ipoe + oponne peioe + neiipip pppoepa + opaooonaniapinopopnpo + aopeiappappppooo + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_4.txt b/codex-rs/tui/frames/openai/frame_4.txt new file mode 100644 index 0000000000..0c76cc5ce8 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_4.txt @@ -0,0 +1,17 @@ + + aennpnnpnppa + apopoie inneonioeopa + poniiipooa aainaoienna + eeipioepp oioonon + eieaininnaip nonion + eiiai oaiieon o nnip + onina ooonpoip p oni + ien pieoaii iii + ai ia nieoaeepipppaaaapp iio + ine i peeepaiannipeapeeanieeoi + ainonpnnpne oooooooooapiiia + pinoiaa paneooo + nnpea pa aeaponie + iiinaoonnnnnppnopnioa + onnieiaaaaanpoa + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_5.txt b/codex-rs/tui/frames/openai/frame_5.txt new file mode 100644 index 0000000000..2b06cade09 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_5.txt @@ -0,0 +1,17 @@ + + aennnpnnnppa + apopeoeiipinpnaiopp + oaenpiooa oanion pop + pieieienp paiiiia + pneoeaapianp a ninia + iiiie nainneia peii + iei p anainoip ooipip + ieiao panieai piai + ipiao eaiopionaipiaaappaoiei + aninppepoo io eennapnepeieoia + npiipipnnepa oooooooopinine + nnpenn a eaeopa + aeoninpa anppoono + aioipopnninappnoaino + apoaooaaapappoa + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_6.txt b/codex-rs/tui/frames/openai/frame_6.txt new file mode 100644 index 0000000000..2ca8bb0bc7 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_6.txt @@ -0,0 +1,17 @@ + + aennnpnnppaa + paneoinopippnapopa + pppiiioo aoienopoena + epioioanp npiiiip + oniiionnpon enninp + npeieaapninaip ennei + a pii aniean apiai + i iii ainieii ipnii + aeipi eoiionepaipiaappaenei + iinpeaaanp ienopiipnnnnipin + e i eiiineo ooooooooannei + p n epa peaeeia + eanaoop apaaeopp + aoiopop niaappoo eno + apnoppaaaaappo + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_7.txt b/codex-rs/tui/frames/openai/frame_7.txt new file mode 100644 index 0000000000..f66ddaf5a6 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_7.txt @@ -0,0 +1,17 @@ + + aeinopnnppa + poapnipopnnnn aop + o piiioa aaia oeaop + nniiiinp ainoiep + aoioiiaienp e oiin + i niio aonnin ppiii + anoi aainini ooaii + aoeii npeioia o iii + eoio poaeineiinnaiinnonii + ipoiineiieoieniinnpnpnnini + n naeoioae ooooooooaeii + oa eaeaa popeneo + onppnnna paipoeoo + naonionniaaapoiope + oiooieiaapanoo + \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_8.txt b/codex-rs/tui/frames/openai/frame_8.txt new file mode 100644 index 0000000000..e54163d2c8 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_8.txt @@ -0,0 +1,17 @@ + + aapanppnppa + pooeiiionn i op + ainpieeo poieionpap + aonoeippi o naiin + o eiepnien eoniip + iopinaaaniao npiii + ioiii oanniai iaieip + npiie ipneipoe eaeii + n niiaa eoniiepppppniii + noenaiopipiininaaiino + eenniniiieoaoaoonooeni + opoiniaa epeeeo + onaonnna aenaipeo + eeoipo nnponenpia + iiaooniappena + aa \ No newline at end of file diff --git a/codex-rs/tui/frames/openai/frame_9.txt b/codex-rs/tui/frames/openai/frame_9.txt new file mode 100644 index 0000000000..a339de1118 --- /dev/null +++ b/codex-rs/tui/frames/openai/frame_9.txt @@ -0,0 +1,17 @@ + + enaoeppnp + eoaeiioon apna + e piieoaane naip + o iienna aapinaipp + eoonnooiop oeopepii + i iiioainnaa ioioiii + a ioniooinnpoepe aii + i ieapniiiaennai ii + opio eioiiiipiipiia + iaiiiapiaiaiiiiaaiii + o aaennieoooooiioeni + niiinpa pe aeia + npninn enanieo + aponaioepnnnoia + opa onninpeo + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_1.txt b/codex-rs/tui/frames/shapes/frame_1.txt new file mode 100644 index 0000000000..244e2470b4 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_1.txt @@ -0,0 +1,17 @@ + + ◆△◆△●□□●●□▲◆ + ◆●▲△□○□△□○●◇◇●◆ ◆■□◆ + ▲◇□◇□□□■○◆ ◆■□◆■◇●◇◇◇□ + ●□◆○□■▲▲◆ △□◇●◇▲ + ○○●△■○◇○◆○○ ■△◇○○▲ + ◇□ □◆ ◇□△●◇◇▲ ■△○◇◇▲ + □○■▲□ ■○◇□△■◇◆ ◇△◇ + ◇◇◆◇◆ ▲△△◇●◇□ ■◆◇ + ◇●◇■◆ ●◇◇○○◇■△◇□□□□□□◆□▲ ●■ ◇ + ◆◇●□ ◆●□◆ △□ ◇■◇◆◆◆△△▲▲▲◇△▲△▲◇ + ○○◆■○ ○○▲△△◆ ◆○□■■□ ○□■△▲●◆△ + □○▲ ■▲ ◆ ▲■△□◆◇ + ○○▲◆○□◆ ◆●◆□◇◆□■ + ○□▲○◆ □□△●●●●△●□□◆▲◇□ + ◆□■□◇◇◇◆◆◆▲◆●□□■ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_10.txt b/codex-rs/tui/frames/shapes/frame_10.txt new file mode 100644 index 0000000000..f306dffc08 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_10.txt @@ -0,0 +1,17 @@ + + ◆□□□□○□□◆ + □■◆□□□○◇△◆□▲ + ○◆▲◇◇△◇◇▲◇□○▲▲ + ◇◆◆△○◇●◆△○▲■■○○▲ + △ ●◇◇■◇○ ■▲△◆△◇△ + ◇◆ ■◇□◇△△○ ◆◆■◇ + ○ ◇□■□◇◇◇◇□ ◇△▲ + ■ ◇◇○□△□◇◇▲◆◆△○◇◇ + ■ ◇○ ○○◇●◇◇□○□●◇◇ + ◇ ▲◇○▲◇◆△◆□◆◆◆◇□◆ + ▲ ■◇◇◇◇◇■■ ○▲■○◇◆ + ○◆■▲○▲□■ ◆◇■■▲△△ + ◇■ ◇◇◇◇□▲△▲△◇△◆ + ●◆□□△◇□●◆ △△■ + □▲ ◆□○◆▲●□ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_11.txt b/codex-rs/tui/frames/shapes/frame_11.txt new file mode 100644 index 0000000000..dcf944902b --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_11.txt @@ -0,0 +1,17 @@ + + ▲□□□□□□◆ + △■ ●◇◇◇○○▲ + △■◆◆◇◇●○□△○▲ + ◇◆◆◇◇●●▲◆●△△ + ◆■△●○◇□○■●◆◇◇▲ + ◇□◆◇◇□◆●●◇◆△◇◇ + □□ ▲◇◇◇◇◇◇◆◇●○ + ◇ ◇◇△◇◇○△ ◇■◇ + △ ■◇△◇◇□△□◇◆◇ + □□ ◆◇△●▲■△◇◆◇○ + ■◆▲ ◇◇◇◇●△◇○○◇ + ○◆▲△◇◆□△□□●◇◆ + ◆ □◇○○○◆◇●■ + ○□ □◇◇▲◆△□◆ + ○◆ ■□□◆□◆ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_12.txt b/codex-rs/tui/frames/shapes/frame_12.txt new file mode 100644 index 0000000000..d8d1fbf334 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_12.txt @@ -0,0 +1,17 @@ + + □□□□□△ + ▲●◆◆△◇▲○ + ■ ◇△○□▲ + △□◇◇◇●●■◇ + ◇ ■◇◇◇◇△△◇ + ◇■△△□○■◆◇■ + ◇ ◇△○◇◇○ + ◇ △□○◇◇■ + □▲ ◇△◇◇□◇◇ + ◇ △◇□●□◆ + ◇△ ◇■●□□△ + ▲ □◇ ◆▲◇ + △ □□◇▲□○◇ + ■○△■▲◇○◇◆ + ○ ■◇○△△ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_13.txt b/codex-rs/tui/frames/shapes/frame_13.txt new file mode 100644 index 0000000000..1387fc9b91 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_13.txt @@ -0,0 +1,17 @@ + + △□□□▲ + ◇◆◆◇◇ + ◇◆◆◇■ + ◇□□◇◆ + □ ◇◇ + ■△▲◇◇ + ▲ ◇◇ + □ ■◇ + △□ ◆◇△ + ◇■ □●◇ + ■◆△△ ◇◆ + ◇◆◆◆◇ + ◇□▲◇◆ + □◆◆◇● + ▲ △■● + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_14.txt b/codex-rs/tui/frames/shapes/frame_14.txt new file mode 100644 index 0000000000..70a5070ba9 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_14.txt @@ -0,0 +1,17 @@ + + □□□□● + ▲△◆◆△○ + ◇◆◇◇△ ◇ + ◇◇△◇■○◇▲ + ◇◇◇○ ◇ + ◇□◇◇ ■◇ + ◇◇◇◇ △ □ + ◇◇○◇◆ ○ + ◇◇◇◇ ■ + ■○△△ ●△ + ○◇■■▲△▲◇ + ◇□◇◇◆◆◆◇ + △ ■◇●●●◆ + ◇○△□◆◆△ + ◆□ ■●△ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_15.txt b/codex-rs/tui/frames/shapes/frame_15.txt new file mode 100644 index 0000000000..584e0e043a --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_15.txt @@ -0,0 +1,17 @@ + + □□□□□◇◆ + ◆▲●◇◇○△□▲ + △△◇□●○◇■□◇ + ◇△◆ △△▲△◆◆◇ + ◇◇●■●○◇◇△■○◇ + ○◇◇▲◇◇△△◇ ■ + ◇◇ ◇◇◇◇◇◇▲◇ + ◇◇△◇◇□◇◇◇ ■▲◇ + ◇◇□▲▲□◇◇◇◆△△◇ + ◇◆◇●△◇○◇□△ △◇ + ◇△◇◇◇◇◆◇ ◆ ● + ◇□□△○◇◇○▲ ● + ■◇○▲ △△△◆ ●◆ + ◇○◇◇○○△□○△ + ○○□○◆◆◆△ + ◆◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_16.txt b/codex-rs/tui/frames/shapes/frame_16.txt new file mode 100644 index 0000000000..af6c836855 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_16.txt @@ -0,0 +1,17 @@ + + ◆●□■□□□◇◆ + △○◇◇□◇◇○◇●○ + ◇△△■○△●○◇◇ ■○ + △△△ ●□◆○◇○◇◇□□◇ + ◇◇●◆△□■●◇◇□△◇◆○ + ◇◇◇□◇■ ◇○● ◇ ◇△◇ + ○○◇ △◆▲◇◇◇◇△□■▲ ◇ + ◇△● ◇◆◇◇△◇◇◇■● ◆◇ + ○○◇◇◇□◇△○◇◇■□□ △ + □■◆◆▲●●○□◇△◆◇ ▲◆◇ + ◇◇◇□■■△□○◇●■●△◇◇◆ + ◇◇□ ◇◆ ◆△△▲ △ + ○◇□ ◇ △▲△◆▲◇ + ○◇◇■◆□◇△△□◆◇ + ■△△◆●△◆◆●□ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_17.txt b/codex-rs/tui/frames/shapes/frame_17.txt new file mode 100644 index 0000000000..4a158cf609 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_17.txt @@ -0,0 +1,17 @@ + + ▲●□□□●●◇▲◆ + ◆●□□◇◇◇□●□◇▲■○▲ + ▲□○△◆●●◆□▲■◇◇◇◆■○ + △◇△◆△◇■◆◆ ■◇●○◇◇◇●○ + ◇△◆ ◇ ◇■△○●○△△ ▲ + ◆●□▲△◆ ▲△△◇ △▲●△◇△△ + □ ●△◇ ▲△△◇◆ □■◇◇△●◇ + ▲■●◇ △△◇◇△◇▲◇◇●●□ + ▲△□△○●●□◇○◆◇○○△○◇◇◇ ◇ + ◇■◆●◆◆◇△□○△◇◇○ ○□■□○ + ○○○△■■■□□□□○◆◇□△△○ ○■ + ○◇◇◆□ ◆△◇◇◆ ● + ◆○○ □○◆ ▲■▲△○◆△ + ▲ ◇□□●○□◆◆●□△◇■ + ◆□●△◆▲□◇□◆□□ + ◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_18.txt b/codex-rs/tui/frames/shapes/frame_18.txt new file mode 100644 index 0000000000..16bf8c1b58 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_18.txt @@ -0,0 +1,17 @@ + + ◆●●□●●□●◇▲◆ + ◆□■◆●▲□□◇◆◆▲■□●●◆ + ◆△△◇□■□●■▲■△◆■□△△○ □ + ▲◇◇□△▲○■□ ■○◆◆△●◇○●○○○▲ + ◆○△△ △◇ ◆■□◆○△◇△◇◆○●○○◆ + △○◇ ▲▲◇△◆◆◆△▲□▲◇■▲△○△◆△◇ + ◇◇○△△ □△□△◇■◆△■□◇●◇●▲ + ■○▲◇◇ ○○■◇◇●○ ◇●◇■ + ○■■ ▲○●●●●●□◇◇▲◇□△○▲ ◇□◇◆ + ◆○○◇□○□ ◇◇△◆◆○◆◇◇◇◆●◇◆○ ▲ + ◇△◇○◆■■□□□□□◆ ○◆◆△◇△□△◆▲◆ + ○○ ▲○▲ ◆◆□■△□◆■ + ○○□□○○△ ◆□○◆△○▲◆ + ■◇△□□□□●●●○■□◆△◆▲□ + ■◇◇◆△◆◆▲△□■●□■ + ◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_19.txt b/codex-rs/tui/frames/shapes/frame_19.txt new file mode 100644 index 0000000000..e1bc51ae1b --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_19.txt @@ -0,0 +1,17 @@ + + ◆◆●●□◇□●●◇△◆ + ◆□◇◇◇○△●●●◆□◆▲◇□▲▲ + ▲□●●△■◇□□◆ ◆□△▲◆□●○ + △●◇□▲○◆ ◆●●□▲○◇□▲ + ◇◇△◆△◆ ▲◇○■△■◇○ ◇○▲ + ◇○△□■ ◆◇□◇△ △△ ■△□◇ + ○●◇◇■ △□○△◇□▲◆ △△△□◇ + ◇◇◇◇ ◇●■○◇■▲ ◇ ◇◇◇ + ◇□◇○▲●●●●●●◇◇◇◇□□●□◇● ○ ■◇◇ + ○●△▲◇●□△○□□○▲◆▲ ○◆ △○◆○▲△△◇◆ + ■○■△□◇■■■■■□□■ ○○◆△◇△△ △△■ + ○○○□◆○ ◆△△◆△△■ + ■ ◆○◇◇□▲ ▲●●△△◇●◆ + ■■△◇□△◇□◆◆●●△□■ ●□◇■ + ■◇△◆△▲■◆▲△○□▲○ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_2.txt b/codex-rs/tui/frames/shapes/frame_2.txt new file mode 100644 index 0000000000..af71459f5e --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_2.txt @@ -0,0 +1,17 @@ + + ◆△◆△●□●●●□▲◆ + ◆□▲△□●□◇◇◇●◇◇●◆■◇□□◆ + ▲◇□◇○□□◇□◆◆ ◆■□●□△◇◇●◇▲ + ◆◇△◆△□■▲▲◆ ▲▲○◇△◇▲ + ▲○■△□○◇○◆○○◆ ○▲◇○◇▲ + ■△□■◆ ◇□○□△○□ ○○◇□◇ + ▲◇■□◇ ○△◇●◇◆◇▲ △■◇■◇ + ◇■ ○◆ ▲◇□◇◇●□ ◇■△△◇ + □■■●◇ ●◇○○◆◇■△◇□□□□□□□□▲◇◆◇◇□ + ◆●■◇ △◇◇■ △□ ◇●○◆◆◆◆△△◆◆◇□△ ◇ + ○○○ □ □○△△◇■ ◆■□□□□□□□■◇▲□◇◇ + ■○◆△△▲ ◆ ▲□●△▲□ + △○◆◆◇□▲ ▲●◆□ ◆◇■ + ◆◇○●◆◆■□□△●●●●△●□◆◆◇◇□ + ◆□□□□◇◇◆◆◆◆◇●△□■ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_20.txt b/codex-rs/tui/frames/shapes/frame_20.txt new file mode 100644 index 0000000000..c5eb01382d --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_20.txt @@ -0,0 +1,17 @@ + + ◆◆□●◇◇●□●▲◆◆ + ▲●●■●▲◆▲●●●◇◇◆○□○□▲ + ▲▲■◆□□■◇□■ ◆■○■○□□◇□◆ + ◆◇■◆□◇□ ◆▲□◇○△□○○ + ◆◇ ▲◇□ ◆△ ◆◇◇○□○◇◇○ + △◆▲◇■ □□■●◇■△ ■○◇◇○ + ●◇●□◇ ▲□ △□□○ ▲○◇△ + ◇◆○△◆ ■■●△◇■▲ ◇◇■◇ + ◇△◇◇●▲●●●●●●●●◆▲■●○○○○□ △ ◇○ + ■◇○◇◆■ △◆◆◆◆◆◆◇○ □○○■◇●○ ▲△ ◇◇ + ○▲○○■■■■■■■■□■ ○▲●◇◇▲◇ △○ + □ ○□△▲ ◆△□△◇△ + ○◆○□▲◇◆ ▲●□◆●□■ + ○▲▲△■◇□○●●▲△■◇■◆▲△□■ + ◆□□◇◆ ●◆◆◆◆◇□■■ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_21.txt b/codex-rs/tui/frames/shapes/frame_21.txt new file mode 100644 index 0000000000..944b99f058 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_21.txt @@ -0,0 +1,17 @@ + + ◆◆▲●□●●□●□▲◆◆ + ▲□□◆◆◆◆□◇●◇□●◆◆▲□□◆ + ●□○◆□□○■◆ ◆○◇□□◆◆□▲ + ▲□◇●■■ ◆▲●□▲●□▲ + △▲△□◆ ▲◇△◆○ ○○◆○▲ + △■△◇ ▲□□◆△△ ○○○▲ + ◇■◇◆ ◆ △◆▲△■ ○●○■ + ◆○ ○● ■◇▲ ◇ ◇ + ◇ ◇ ▲□●●●●●□□□ ○◇▲■◇▲ ●△ ◇ + ◇ ◇○ ◇◆ ◆▲◇ ○■◆□◇▲ △■△△ + ● ■△ ◆◆■■■ ■◆ ■□◆▲● △◆ ▲ + ■□ △●◆ ◆□■ △ + □◆ ○▲◆ ◆△●□■ ▲◆ + □●◆ □■□□△◇◇●△●□■■ ▲◆ + □□□●□◆◆◆◆▲◆●□□◆ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_22.txt b/codex-rs/tui/frames/shapes/frame_22.txt new file mode 100644 index 0000000000..60ea930d46 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_22.txt @@ -0,0 +1,17 @@ + + ◆▲□●□●●□●□▲◆ + ◆□△□◇△◆△◇△○◇◇●◇□△□□◆ + ▲●□●◇○□□◆ ◆■□○□□□◆◆□▲ + ●□◇□□■ ▲▲◇◇◇◆□○ + ○◇◇△■ ▲◆△◇●◇△△●■◇ + ○◇□△◆ ▲◇△◇●○△◆ ○◇○●◇ + ◇□□○△ ◇□◇○□△■ ◇◇△◇ + ◇◇●◇◆ ◇○◇◇○○ ◇○◇■◇ + ◇◇▲■▲ □◇●●●●●●□□◆○□◇◆ ○▲ ◆◇●■ + ○◇● □◆○○▲ △▲■◇△△◇ ○□●◆■◇▲▲ △○● + ○○○◆◇ ■■■■■□□■◆ ◆△□□◆△△△■▲◆ + ○□○◆○▲ ◆□▲■◇▲■ + ■■□● □□◆ ◆△□▲■□◆△ + ■△□□▲■□◇●●□●●△●□■■■▲□ + ■◇■◇◆●◆◆◆▲●◆△●□◆ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_23.txt b/codex-rs/tui/frames/shapes/frame_23.txt new file mode 100644 index 0000000000..5d340640bf --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_23.txt @@ -0,0 +1,17 @@ + + ◆▲□◆●□□□□●□◆◆ + ◆●◇□◇○◆▲◆●●▲◇◆◇□◇□◆ + ▲■□◇■▲●□◆ ■◇△□◇○●◇◇▲ + △●◇□●△◆ ◆●●○◇◇●○ + △△◇◆△■ ▲△▲▲■□△□○◇○ + ▲○◇■△◆ ◆□□□■■△□■◇◇○◇▲ + ◆◇◇■◇ △△△△ ◆◇◆ ■ ◇■□ + ◇△◇ ◇ ◇■◇▲◆○▲ ◇ □△◇ + ○■○ ◇□◇●●●●●●●●◇◆□◇◆■○◆ ◇ ◇◇◇ + ◇○○◆◇■●■ △◆○ ○◇◆○▲◇ ○◆◇ + △■◇ ◇ ◆■■■■■■■ ■◆△●●◇◆△○△◆ + ▲◇◇◆◇△ ▲△◇○○△◆ + ○ ◇▲■△◆◆ ◆△■●□△□△ + ○●○□●□□○◇●●◆□□■▲◆□□◆ + ■◇ □●○◇◆◆□◆◆□□◆ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_24.txt b/codex-rs/tui/frames/shapes/frame_24.txt new file mode 100644 index 0000000000..558224147d --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_24.txt @@ -0,0 +1,17 @@ + + ◆◇◆●□□□●●▲◆ + ▲■◆△■◇◆◆◇●●□▲◆■□ + ▲■■●○△□■◇ △◆△□◇□□▲ ○ + ▲■△△▲△◇●▲○◆◇△◆ ◆□○◇○◆■ + ▲ △△○△▲ ◆■■△○◆◇◆◆○◇▲■ + ◇▲○□○◆ □▲▲△ △◇● △■○ + ◇ ◇◇ ▲△◆▲△■△○○◇○○◇○ + ◇ ○◇◇ ◇▲●△○◆◇◇◆△△◆◇◇ + ◇△ ◇●●●△□□◇◇◇□□◆□▲◆◇ ◇ ◇◇ + ◆ △ □◇△▲▲●●▲▲◇△○○□□◇ ◇□◇ + ○ ■○◇○□■■■■■■◆ ○▲△□○◇●△▲◆ + ○ ○▲□○ ◇ ■△●△ + ○△□○◆◇△ ◆●■◆△△◆□ + △▲□▲○○■◇◇△●●●◇○◆△◆ + □△◆□□●○◆◆●●□□ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_25.txt b/codex-rs/tui/frames/shapes/frame_25.txt new file mode 100644 index 0000000000..38d3250764 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_25.txt @@ -0,0 +1,17 @@ + + ◆□●□●□□□□◆ + ▲ □▲□◆◆●○◇□◇◇▲ + △◇△△▲▲■△◇□○●○◇◇◇◆ + ◇□□◇ △ ●◇ ■○◇▲□○△ + ▲◆◆○▲△■○●△◆◇■ ◇△△○△□ + ○▲◇◇◇◆□□△○◇△ △◇▲◇△△◇▲ + ◇△◇□◇ ◇◆◆△○◆△◇○△◆■◇●◇ + ◇◇◇△◇△■ ◇◆●○△◇○◆◇●◇◇○ + ○□○◇■◇◆◆●●●●□◇◇○○◇□□◇○ + △▲■◇△◇▲◇◆◇◇●□◆◇○□●△○◇ + ○◇□△○◇◆■■■■■■□△◇○◇△◇◆ + ◇◆■◇●□●○▲▲□△◆△▲△△◇△ + ○◆○◇◆○◆□●△▲○△◆◇◇△ + ○△●○○◆□●◇□□ □◇□ + ◇▲■□○□▲◆□◇□ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_26.txt b/codex-rs/tui/frames/shapes/frame_26.txt new file mode 100644 index 0000000000..4aac44389a --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_26.txt @@ -0,0 +1,17 @@ + + ◆●□□□■□▲ + △□◇●△○◇□●◇▲ + △□■■◇●○◇○■■○▲ + ●□■▲◇◇◇◆◇◇◆□△○ + ◇◆▲○◇△◇■□○△●◇○● + ○ ■◇△△△■□◆○■○○△ + ◇ □■●◇◇△◇◇●●■□ + △▲ ○◇◇◇○○●◇◇△◇◇ + ◇ △○□●□◇□●●△○◇◇ + △◆◇△▲◇◆◆▲□○○□◇ + ◇◆■△◇□■○▲△◆□○◇◇ + ○◆◇◇△○ △△■◇◇◆ + □ □◇○ ○◆△◇△▲ + ◇■□○○■□◆□□● + ○△△○□◇◆○□ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_27.txt b/codex-rs/tui/frames/shapes/frame_27.txt new file mode 100644 index 0000000000..9896590f79 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_27.txt @@ -0,0 +1,17 @@ + + ●□□□□▲ + ◇●△△◇△○ + ●■◆ □◇△■◇ + ◇◇◇○◇◇●◇◇ + ◇ ◆◇◆▲■● + ◇◆△◆■◆◇◇◇◆ + ● ■◇◇◆□◇◇ + ◇ ◆◇◇◇●■◇◇ + ◇△ △ ◇□◇◇◇◇ + ■● △■◆◇◆□◇◇ + ◇▲ ◆○□□□△■ + ◇◇□□◇◇◆△◇ + ◇●●□●▲△◇○ + ○◆◆◇○●△△ + ■○■ ○○△ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_28.txt b/codex-rs/tui/frames/shapes/frame_28.txt new file mode 100644 index 0000000000..16b349dc3d --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_28.txt @@ -0,0 +1,17 @@ + + △□□● + ◇□◆◇◆ + ● ●◇◆ + ◇▲◆□◇ + ◇ ◇◇ + ◇ ▲■◇ + ○◇◇ ◆◇ + ◇▲■■◇ + △○ ◆◇ + ◇◇△△◇◇ + ◇ ◆◇ + ◇●□●◇ + ◇●□◇◇ + □◆◆△◇ + ◇ △□◇ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_29.txt b/codex-rs/tui/frames/shapes/frame_29.txt new file mode 100644 index 0000000000..24be1563b2 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_29.txt @@ -0,0 +1,17 @@ + + □□□□□▲ + ▲◇□△ □○ + ○▲◇◇ ■■◇ + ◇◇◇◇○○▲△ + ○ ◇■◇ ◇ + ◇▲◇◇◇ ◆◆ + ◇○○◇◇◇ ○ + ◇◇●◇◇ + ◇◇◇□◇ ◆ + ◆◇●◇◇ ◆ + □◇◇△◇○ ● + ◇△◇◇◇ ◆◇ + ◇◇◇◇◆◇◆◇ + ◇●◇□△■◇■ + ◇◇□ △▲ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_3.txt b/codex-rs/tui/frames/shapes/frame_3.txt new file mode 100644 index 0000000000..3f55b79ac5 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_3.txt @@ -0,0 +1,17 @@ + + ◆△●●□□●●●●▲◆ + ◆□▲△○◇◇□◇■●●◇●◆○◇□□◆ + ▲●△□●◇□■■◆ ◆■◇ □□□△○◇▲ + △□△○◇●▲□◆ ◆●□ ◇◇○ + ■△□◇△○△◇◇□○◆ ○○○◇◇◆ + △◇○○△ △▲◇○●○○ ◇ ○○◇ + ●□ ◇ ■□○◇◆■◇▲ △□△◇▲ + ▲▲◇▲◇ ▲▲◇■△○◇ ◇◆◇●◇ + ▲■■◇ ●◇□□◇◇□▲◇●□□◆◆◆□□◆◇○■●◇ + ▲○△○▲ △△□△●●◇ ◇□◇◆◆▲ ●△▲●○◆◇○◇◆ + ■○◇ ◇ ■◇◇□▲■ ■□□□■■■□□▲△△△▲△ + ■□◇ ○□ ◆ △○□○△△ + ●○△△□○▲ ▲□●△■▲◇■ + ●○□▲◆□□○●●●●▲△●□●◆◆□■ + ◆□□□◆△◇◆◆◆◆◇●△○■ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_30.txt b/codex-rs/tui/frames/shapes/frame_30.txt new file mode 100644 index 0000000000..54886a319d --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_30.txt @@ -0,0 +1,17 @@ + + ◆●■□□□▲ + ◆△●◇◇○□■●○ + ■■○◇▲○○◇□▲○ + ◇◇○◇△◇◆○◇○ ○▲ + ●□◇◇◆○◇▲◇▲ ◇ + ◇□◇○□ □◇◇◇◇△◇ + ○△◇◇◇○◆ ○△○◇ ●◆ + ■◇ ■□●◇▲◇■◇▲ ◆ + ■◇◆■○◇●◇○△◇▲ ◆ + ■◇◇○◇◆◆◇◇ □▲ ◆ + ○◇◇●○◆□◇◇◇□◇◇ + ◇□△△▲△□○◇◇■ ◇ + ○◇○◇◇△□◇◇▲◇△ + ▲○▲□●○△◇▲△■ + ○▲△◇○◆◆●■ + ◆◆◆◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_31.txt b/codex-rs/tui/frames/shapes/frame_31.txt new file mode 100644 index 0000000000..b3989b89df --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_31.txt @@ -0,0 +1,17 @@ + + ◆△△□□□□●▲ + ◆□□●□▲◆■□○■□▲ + ▲◇○△△▲●◆◆△■◇◆□○ + ▲◇△□◆◆□●◆▲○○◇○◇◇○ + ○◇◇◇◇□▲□○◆▲■○◇△◆◆ + ●◇○◆◇◆◇■■○●□▲△△◇▲■◇ + △◇◇ ◇○□◇○△●△●□◇□◇△◇ + ○○▲ ◇◇■◇○ ◇○■■◇◇○△◇ + ◇○▲◆◇■○◇◇◇△□◇◇◇◆ ◇ + ■◇◇◇△△◇◇◆◆◆○◆◇○◇◇ □ + ○□◆△□◇▲ △□□□◆△◇■◇◆ + ◇◇◇○○○▲ ◆●□ ◇ + ●◇□●◆ ▲ △ ◇□◆△◆ + △◇○◇△◆◇◆▲◇■▲◇◆ + ■■●◇◆□□△△●□ + ◆◆◆◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_32.txt b/codex-rs/tui/frames/shapes/frame_32.txt new file mode 100644 index 0000000000..919eee3b0f --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_32.txt @@ -0,0 +1,17 @@ + + ▲□□□□●●◇▲◆ + ●□◇□□◇○◇◇□□◇◇▲ + △○□●○▲□○△▲◆□◇□○■□▲ + ■△△◇◆▲◆●▲ ▲ ▲◆○◇□▲ ▲ + △△◇▲◇□○■□◇● ■◆▲◇○△○□○▲ + ○△○○▲○□◇◆△◇◇□◆ ◇□△ □ + □◇■●▲◆■○◇◇▲▲◇▲●◆△◆△△◇■◆ + ◇◇◇▲◆ ■◆◇◇■△■◇●▲◆■○◇■■◆ + ○◇◇▲◆ ■◆◇■◆◆◇□□□◇◇◇●◇■●◆ + ■■■◆◆◇□○■○◆◆◆◆◆◇◇□◇●◇▲◆ + ▲○□◇◇△ ◇□■■□□□○●△△△△△ + ○▲◇○○○ ▲○◇△■◇ + ■□□◇◇◇□◆ ◆△◆◇△ ▲ + ○▲○■◇□◇●●□◆◆□■◆△ + ◇●●◆◆▲□△□◆■■ + ◆◆◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_33.txt b/codex-rs/tui/frames/shapes/frame_33.txt new file mode 100644 index 0000000000..c5598aa7a7 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_33.txt @@ -0,0 +1,17 @@ + + ◆▲□●□●□●◇△◆ + ◆□□◇◇○□●◇△◇▲◇□◇□△ + ◆△○◇□□□▲●■◆ ■□△◇◇□■▲ + ▲○△◇△◆◇▲◆ □◇◇○◆□ + ◆△◇△◆◇◇△○○○ ◇□○○○ + △△▲ ○◆○○◆○▲ △○△◆○ + ◇◇□ ○▲□◇◆◇○ ◇□◇◇ + □◇▲▲ ▲■■○△●▲ ○■◇□ + ◇◇◇ ◇ ▲◆ △□▲▲▲●●●□◇◇□△◆◇○◇ + ○△◇■■△△▲△◆◇◇◆◆◆◆◆◇◇□○○○◇◇△ + ○●○▲ ◇△◇△ △ ■■■■□□□ ◇◇▲△○◆ + ○□○□▲■▲ △△●△●△ + □○■□▲□●▲ ◆□◇▲△□○■ + ○◇■□○□◇▲●□◆■●▲○□◇□ + ■●●□▲◆◆◆○□□●▲■ + ◆◆◆◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_34.txt b/codex-rs/tui/frames/shapes/frame_34.txt new file mode 100644 index 0000000000..5a44de8256 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_34.txt @@ -0,0 +1,17 @@ + + ◆▲●□□□□●◇▲◆ + ◆□□□△○●◇■◇□□●□□●▲●◆ + ◆△△▲◇□■△◇□◆ ◆○○○▲■□□▲ + ▲△◆◇□◆△▲◆ □◇▲□○○ + △△◇○▲△◇ ◇■ ▲ ○○□○○ + ▲△○◇◆△ ○○■◇○□○ ○▲○◇○ + ◇□○◇◆ ■○◆□◇◆○ ◇●◇◆ + ○◇●■△ ◇□◆◇△■◇ △ ◆○ + ▲■△△■ △○△△■◆●●□□□□□□◇◆◆■ ◇○◆ + ◇◇○▲△▲▲○■△△■◇◇◇◆◇△◆◆◆▲△◆◇◇◆◇○ + △◆○▲ ◇○◇□○ ■□□◆◆◆◆○ ▲△▲○◇■ + △▲○●●○◆ △●△◇△■ + ○□◆◇□○●▲ ◆□●■◆△▲◆ + ▲○△◇■◇□▲●▲□●□●□◆□□△■ + ■◇○●●◆◆◆◆◆●●□●○ + ◆◆◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_35.txt b/codex-rs/tui/frames/shapes/frame_35.txt new file mode 100644 index 0000000000..1c1728676b --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_35.txt @@ -0,0 +1,17 @@ + + ◆▲□●●□□□●□▲◆ + ▲□●□△◇□□□■◇□◇△■◇□●◆ + ◆△△◇●□□◇○□■◆ ◆■□●□△■◇□▲ + ▲△△□△▲●▲◆ □□◆○◇◆ + △△◇◇△△○ ■○□▲ ◇○□◇▲ + ●△●△□◆ ■◇◆■△△□◆ ◇○○◇ + ○ △△ ○○ ■□◆△ ◇○○○ + ◇◇◇△ △○○●△■ △ ■△ + △ ▲◆ ▲◇◇△●■△◇●●◆●◆●□◇◇ ◇◇●□ + ◇▲○●■ △△●■□□△◇● ○▲◆◆◆◆△■◇△■ ◇■ + △◆○▲■△○◆◇△○◆ ◆■○○○○□○○□△△◆▲◇ + ■△○○△◇ ◆△□ ▲○ + ○●◆○●▲△▲ ▲●△◆□□■ + ■○◆■◇□◇▲△◇◇□◇●△□■◆△●■ + ■○◇●●◆◆△◆◆□□□■○ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_36.txt b/codex-rs/tui/frames/shapes/frame_36.txt new file mode 100644 index 0000000000..0cac995ed7 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_36.txt @@ -0,0 +1,17 @@ + + ◆◆□●□□□□●□▲◆ + ◆●■■○□△●△□○□●□□■□□□◆ + ▲○■○▲□□▲□■◆◆ ◆■□◇□□◇▲□◇▲ + ◆◇■□□◆◆◆◆ ■□◇○■◇ + ▲△◆●○■◇○◆○▲△ ○○△□ + △ ▲△◆ □◆ ■◇△▲ ■○○□ + ◇ ● ◆ ○ ■○○ ◇○◇▲ + ◇◇○◇ ◆○ ◆△△ ○◇ ◇ + ◇■■◇ △△ ▲□■■▲□□◆□□□□□◆ ◇○◇◇ + ◆□◇○ ▲◇◆◆△◇△ ◆◇◆◆◆◆◆◆◆◇◇ ○△■◆ + ■ □◇○ □◆□△○ ■□□○○○○○■ ◇▲■△ + ■▲■○●△ ▲△◇■△ + ○△◇◇□◇▲ ▲□□■△▲◆ + □▲◆■□□●○●◇◆□◇●■▲■▲●□■ + ◆□□△◇◆▲▲◆▲▲□□□□■ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_4.txt b/codex-rs/tui/frames/shapes/frame_4.txt new file mode 100644 index 0000000000..31e55f9cb8 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_4.txt @@ -0,0 +1,17 @@ + + ◆△●●□●●□●□▲◆ + ◆▲■□□◇△ ◇○●△□●◇■△□▲◆ + ▲□●◇◇◇□□■◆ ◆○◇○○□◇△○○◆ + △△◇▲◇■△□▲ ■◇□□○□○ + △◇△◆◇●◇○●○◇▲ ○■○◇□○ + △◇◇○◇ ■◆◇◇△□○ ■ ○●◇▲ + ■○◇●◆ ■□□○□■◇▲ ▲ ■●◇ + ◇△○ ▲◇△□○◇◇ ◇◇◇ + ◆◇ ◇◆ ●◇△■○△△□◇□□□◆◆◆◆▲▲ ◇◇□ + ◇○△ ◇ ▲△△△▲◆◇◆●○◇▲△◆▲△△○●◇△△■◇ + ◆◇●■○▲○○▲○△ ■□□□□□□□■○▲◇◇◇◆ + ▲◇○■◇◆◆ ▲○●△□□■ + ○○▲△○ ▲◆ ◆△○▲□●◇△ + ◇◇◇●◆□□○●●●●▲□●□□○◇□◆ + □○○◇△◇◆◆◆◆◆●▲□◆ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_5.txt b/codex-rs/tui/frames/shapes/frame_5.txt new file mode 100644 index 0000000000..a8ae0ab819 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_5.txt @@ -0,0 +1,17 @@ + + ◆△●●●□●●●□▲◆ + ◆□■□△□△◇◇□◇●□●◆◇■□▲ + □◆△○□◇□■◆ ■○●◇□○ ▲□▲ + ▲◇△◇△◇△●▲ ▲○◇◇◇◇◆ + ▲○△□△○◆□◇◆○▲ ◆ ○◇○◇◆ + ◇◇◇◇△ ○◆◇○●△◇◆ □△◇◇ + ◇△◇ □ ◆○◆◇○■◇▲ ■■◇□◇▲ + ◇△◇◆■ ▲◆●◇△◆◇ □◇◆◇ + ◇▲◇○□ △◆◇■▲◇□●◆◇□◇◆◆◆□▲◆■◇△◇ + ◆○◇○▲▲△□□■ ◇■ △△○●○▲●△▲△◇△□◇◆ + ○▲◇◇▲◇▲○○△□◆ ■□□■■■■■▲◇●◇○△ + ○○□△○○ ◆ △◆△□▲○ + ○△□○◇●□◆ ◆●□▲□■●□ + ○◇□◇▲□□○●◇●◆▲□●□○◇●□ + ○▲□◆□■◆◆◆▲◆▲□□◆ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_6.txt b/codex-rs/tui/frames/shapes/frame_6.txt new file mode 100644 index 0000000000..e0b1f85454 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_6.txt @@ -0,0 +1,17 @@ + + ◆△●●●□●●□□◆◆ + ▲○●△□◇●□□◇□□●◆▲□□◆ + ▲▲▲◇◇◇□■ ◆■◇△●□□□△○◆ + △▲◇□◇□◆●▲ ○□◇◇◇◇▲ + ■●◇◇◇□○○□□○ △○○◇○▲ + ●▲△◇△◆○□●◇○◆◇▲ △●○△◇ + ◆ □◇◇ ○○◇△○○ ○□◇◆◇ + ◇ ◇◇◇ ◆◇●◇△◇◇ ◇□○◇◇ + ◆△◇▲◇ △■◇◇□●△□◆◇□◇◆◆□□◆△○△◇ + ◇◇○▲△◆○◆●□ ◇△●□▲◇◇▲●●●○◇▲◇○ + △ ◇ △◇◇◇●△■ ■□■■■■□■◆○○△◇ + ▲ ● △▲◆ ▲△◆△△◇◆ + △◆○◆□□▲ ◆□○◆△□▲□ + ◆■◇□▲■□ ●◇◆◆▲□□□ △●■ + ○▲●□□▲◆◆◆◆◆▲□□ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_7.txt b/codex-rs/tui/frames/shapes/frame_7.txt new file mode 100644 index 0000000000..7e69d68d57 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_7.txt @@ -0,0 +1,17 @@ + + ◆△◇●□□●●□▲◆ + ▲□◆□○◇□□□●●○● ◆□▲ + □ ▲◇◇◇□◆ ◆○◇◆ □△◆□▲ + ○○◇◇◇◇●□ ○◇○□◇△▲ + ◆■◇□◇◇○◇△○▲ △ □◇◇○ + ◇ ●◇◇■ ◆■○●◇○ ▲▲◇◇◇ + ◆○■◇ ○◆◇○◇○◇ □□○◇◇ + ◆■△◇◇ ●□△◇□◇◆ ■ ◇◇◇ + △■◇□ ▲■◆△◇○△◇◇●●◆◇◇●●□○◇◇ + ◇▲■◇◇●△◇◇△■◇△○◇◇○○▲●▲●○◇○◇ + ○ ●○△□◇□◆△ □□□□□□■■◆△◇◇ + ■◆ △◆△◆◆ ▲■▲△●△■ + ■●▲□○○○◆ ▲○◇▲□△□■ + ○◆■○◇□○●◇◆◆◆□□◇□□△ + ■◇□■◇△◇◆◆▲◆●□□ + \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_8.txt b/codex-rs/tui/frames/shapes/frame_8.txt new file mode 100644 index 0000000000..b7bddd4156 --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_8.txt @@ -0,0 +1,17 @@ + + ◆◆□◆●□□●□▲◆ + ▲■□△◇◇◇□●● ◇ ■□ + ◆◇●▲◇△△□ ▲■◇△◇□○□○▲ + ◆□○□△◇▲□◇ ■ ●○◇◇○ + ■ △◇△▲○◇△○ △■○◇◇▲ + ◇■▲◇○○○◆○◇◆□ ○□◇◇◇ + ◇□◇◇◇ ■◆●○◇◆◇ ◇○◇△◇▲ + ○▲◇◇△ ◇□○△◇▲□△ △◆△◇◇ + ○ ○◇◇◆○ △□●◇◇△□▲□▲▲○◇◇◇ + ○□△●◆◇■▲◇▲◇◇●◇●◆◆◇◇●■ + △△○○◇○◇◇◇△■○□○□■○□■△○◇ + ■▲■◇○◇◆◆ △▲△△△■ + ■○◆□○○○◆ ◆△○◆◇□△□ + △△■◇▲□ ●●□□●△●▲◇◆ + ◇◇◆□□○◇◆▲□△●◆ + ◆◆ \ No newline at end of file diff --git a/codex-rs/tui/frames/shapes/frame_9.txt b/codex-rs/tui/frames/shapes/frame_9.txt new file mode 100644 index 0000000000..4342d3c81e --- /dev/null +++ b/codex-rs/tui/frames/shapes/frame_9.txt @@ -0,0 +1,17 @@ + + △●○□△□□●▲ + △□◆△◇◇□■● ◆▲○◆ + △ ▲◇◇△□○○●△ ○◆◇▲ + ■ ◇◇△●●◆ ◆○▲◇○○◇□▲ + △□■●○□■◇□▲ □△■□△□◇◇ + ◇ ◇◇◇■○◇○●◆◆ ◇■◇□◇◇◇ + ◆ ◇□○◇□□◇○○▲■△▲△ ◆◇◇ + ◇ ◇△◆▲○◇◇◇◆△●○◆◇ ◇◇ + ■▲◇■ △◇■◇◇◇◇□◇◇▲◇◇◆ + ◇◆◇◇◇◆▲◇○◇◆◇◇◇◇◆◆◇◇◇ + ■ ◆○△○○◇△■□□□□◇◇■△○◇ + ○◇◇◇○▲◆ ▲△ ○△◇◆ + ○□○◇○○ △●◆●◇△□ + ○▲■○◆◇□△□●●●□◇◆ + ■▲◆ □○○◇●□△■ + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_1.txt b/codex-rs/tui/frames/slug/frame_1.txt new file mode 100644 index 0000000000..514dc8ac49 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_1.txt @@ -0,0 +1,17 @@ + + d-dcottoottd + dot5pot5tooeeod dgtd + tepetppgde egpegxoxeet + cpdoppttd 5pecet + odc5pdeoeoo g-eoot + xp te ep5ceet p-oeet + tdg-p poep5ged g e5e + eedee t55ecep gee + eoxpe ceedoeg-xttttttdtt og e + dxcp dcte 5p egeddd-cttte5t5te + oddgd dot-5e edpppp dpg5tcd5 + pdt gt e tp5pde + doteotd dodtedtg + dptodgptccocc-optdtep + epgpexxdddtdctpg + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_10.txt b/codex-rs/tui/frames/slug/frame_10.txt new file mode 100644 index 0000000000..bd3b8fafff --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_10.txt @@ -0,0 +1,17 @@ + + dtpppottd + ppetptox5dpt + ddtee5xx-xtott + edd5oecd-otppoot + 5 ceeged pt5d5e5 + ee pepx55o gedge + o xpgpeexep e5t + g eeot5tee-de-oee + g xo ooecxxtotcee + e teoted5dpdddepe + t geeeeegggotgoee + oeptotpg dxggt55 + ep eeexptct5e5e + cepp5etcdg55p + pt dpodtcp + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_11.txt b/codex-rs/tui/frames/slug/frame_11.txt new file mode 100644 index 0000000000..9eaf147a6a --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_11.txt @@ -0,0 +1,17 @@ + + tppppttd + 5g ceeeoot + 5gddeecop5ot + eddeeoctdo55 + dg-coetopcdeet + eteeetdcced5ee + pp teeeeeedeoo + e ee5eeo5 ege + 5 pe5eep5tede + pp de5otg5eded + pe- eeeeo5eooe + od-5edp5ppcee + gd peooddecg + otgpeetd5pe + od pptdte + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_12.txt b/codex-rs/tui/frames/slug/frame_12.txt new file mode 100644 index 0000000000..11163a99b9 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_12.txt @@ -0,0 +1,17 @@ + + tpppt- + toed5eto + g e5ott + 5txeeooge + e pxeee-5e + ep--pdgdeg + e x5oeeo + e 5toeeg + pt x5eetex + e 5epcpd + e- egopp5 + t pegdte + 5 ppetpoe + pd5gteoee + o pxo-5 + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_13.txt b/codex-rs/tui/frames/slug/frame_13.txt new file mode 100644 index 0000000000..eb072e40ad --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_13.txt @@ -0,0 +1,17 @@ + + 5pppt + eddee + eedeg + epped + p ee + gc-ee + t ee + t ge + 5t dx- + eg toe + pe-- xe + eddde + etted + pddeo + t -go + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_14.txt b/codex-rs/tui/frames/slug/frame_14.txt new file mode 100644 index 0000000000..100f309302 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_14.txt @@ -0,0 +1,17 @@ + + tpppc + t5dd-o + edee- e + ee5egdxt + eeeo e + xpee pe + eeee - p + eeoee o + eeex g + gd55 c5 + oeggt-te + epxeddde + 5ggeoooe + eo5pdd5 + dp po5 + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_15.txt b/codex-rs/tui/frames/slug/frame_15.txt new file mode 100644 index 0000000000..5761f309d4 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_15.txt @@ -0,0 +1,17 @@ + + ttpppxd + etoeedcpt + 55epooegpe + e5e 55t-dde + eeogooee5gde + oee-ee55e g + ee eeeexxte + ee5xeteee p-e + eetttpeeed-ce + edec5eoxp- -e + e5eeeede e c + epp-dxeo- o + peot 555e ce + edeeoo-to5 + odpdddd5 + ee \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_16.txt b/codex-rs/tui/frames/slug/frame_16.txt new file mode 100644 index 0000000000..f9001140ed --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_16.txt @@ -0,0 +1,17 @@ + + dotgpptxd + 5deepeeoeoo + e55go5ooee po + 555 cpdoeoeeppe + eecd5ppoeep5eeo + eeepep eoo ge x-e + ooe 5eteeee5pgt e + e5c eeee5eeegc ee + ooexetx5deegpt 5 + pgddtooope-de tde + eeetgg5poecgc-xee + eep ee e55t 5 + oep e 5t5dte + oexgdpx55tde + pc-docddcp + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_17.txt b/codex-rs/tui/frames/slug/frame_17.txt new file mode 100644 index 0000000000..696d932d40 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_17.txt @@ -0,0 +1,17 @@ + + totttccxtd + dcppexxpopetgdt + tpo5dooettgeeedgo + 5e5d5egde pecoxeeoo + e5d x eg5ooo55 t + eopt5e tc5e 5to5e-5 + pgc5e t55ed pgee5oe + -goeg g55ee5eteeocp + t5p5oootxodeodcoeee e + egdcdde5po5eeogotpto + ooo5gggppppodep55o op + oeedp e5eee c + doogpod tpt5dd5 + t xptootedcpcep + etc5dttxpdtp + e \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_18.txt b/codex-rs/tui/frames/slug/frame_18.txt new file mode 100644 index 0000000000..abb0da53d2 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_18.txt @@ -0,0 +1,17 @@ + + dootootcxtd + dtgdctttxddtgtccd + d5cepgpogtg-dgt55o p + teep-tdgp poed5oxocooot + do55 5e dgtdo5x5edocood + 5oe ttx-ddd5tptep-5d5e5xg + eeoc5 t5p5egd5gpeoeot + go-xe dogeecd eceg + ogg tooococtxetep5ot epee + dooepop xe5ddodxeedcxeo t + e5eoeggpppppe odd5e5p5e-e + oogtot eepg5pdp + odptdd- dpdd5ote + pe-ppttooodppd5dtp + gxed5ddt-tgctg + e \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_19.txt b/codex-rs/tui/frames/slug/frame_19.txt new file mode 100644 index 0000000000..ffc4d2b475 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_19.txt @@ -0,0 +1,17 @@ + + ddootxtoox-d + dteeeo5ooodpdteptt + tpcc5getpe epctepco + 5ceptde doottdept + ee5e5e tedg5geo eot + eo5pp depx5g-5 p-pe + doexp 5pd5ette 5c5te + eeee ecgoegt e eee + epeotoccoooxxxetpcpec o gee + dc5teop5dptotet dd codot5-ed + pog5tegggggppg dod5e55 55p + oodpdo e55d55p + pgdoxxpt tco-5ece + pg-ep5xtddoc5pg cpxp + gx-dc-pdt-dp-d + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_2.txt b/codex-rs/tui/frames/slug/frame_2.txt new file mode 100644 index 0000000000..f4419e3d69 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_2.txt @@ -0,0 +1,17 @@ + + d-dcotooottd + dtt5pcteexoxeodpeptd + tepeoppxpee egpop5eecet + de5d5ppttd -toe5et + tdg5pdeodood dteoet + p5tge epot5ot ooepe + teppe d5ecedet 5gege + eg oe tepeecp ep5-e + pggoe cedddeg-xtttttttttedexp + dope 5eep 5p eoodddd--ddet5geg + ooo p po--ep egpppppppgetpee + pod-5t e ttc5tp + -oddett todtgdeg + exdcddgptccocc-opedeep + eptptxxddddxc5pg + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_20.txt b/codex-rs/tui/frames/slug/frame_20.txt new file mode 100644 index 0000000000..0039bd880b --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_20.txt @@ -0,0 +1,17 @@ + + ddtoxxototdd + tcogctdtoooeeddpott + ttgdtpgxpg egdgotpetd + degdpep dtteo5poo + de tep d5gdeedpoeeo + 5etep tppceg5 poxeo + cecte tp -tpd toe5 + edd5e ggccegt exge + e5eectocoooooodtpcddoop 5 eo + pededg 5eeddddeo poogeoo t5 ee + otdopgggggggpg otoeete 5o + p dp5t d5p-e5 + oddptxd tcpecpp + dt--gxtdcctcgxget5pp + eptxdgoddddepgg + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_21.txt b/codex-rs/tui/frames/slug/frame_21.txt new file mode 100644 index 0000000000..87e3597d5d --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_21.txt @@ -0,0 +1,17 @@ + + ddtotootottdd + ttpeeddtxoxtcde-ptd + cpddtpdge edxptdept + tpecgp dtcptcpt + 5t5pe te5do ooddt + 5g5e tppd55 oodt + epee dg5et5p ocog + eo oc get e e + e e ttcccccttt detget c5 e + e xo ed dte dgepet 5g-5 + c g- eeggg pe ppdtc 5e t + pt ccd dpg 5 + pd d-d d-cpp te + pod pgptcxxccopgg -e + pttctddddtdctpe + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_22.txt b/codex-rs/tui/frames/slug/frame_22.txt new file mode 100644 index 0000000000..8dfe7daaab --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_22.txt @@ -0,0 +1,17 @@ + + dttotootottd + dt5pe-d5e5oeecet5ptd + tcpcxoppe egpopptddtt + cpxppg tteeedpo + oex5p td5eoe-5cpe + oep5e tx5ecd5e oeooe + etpo5 xteop5p xe5e + eeoee eoexdo edege + eetgt txoocccottdopedgot decgg + deo pdootg5tgx55e opcdgettg5oo + ooode gggggppge ecptd555gte + opodot dptgetp + pgtc ttd d-ptgpd5 + pcpttgpxcotcc5opggptp + gxgxdcddd-od-ope + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_23.txt b/codex-rs/tui/frames/slug/frame_23.txt new file mode 100644 index 0000000000..f573acb714 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_23.txt @@ -0,0 +1,17 @@ + + dttdotpttotdd + doeteodtdootedepetd + tgteptcpe gxcteoceet + 5cepc5e dccoeeco + 55ee5p t5ttpp5poeo + toeg5e dppppp5ppexoet + eeege 5c5- dee ggepp + x5e e egetdot e p5e + dgo etxcooooocoedpedgod e exe + eoodegog 5eo oedotx ode + 5pe e eggggggg pe5coed5d5e + teede- t5eod5e + o etp5dd d-gcp5t5 + oootcptoxoodttg-dtpe + gxgpooxddtddppe + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_24.txt b/codex-rs/tui/frames/slug/frame_24.txt new file mode 100644 index 0000000000..92833e8c58 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_24.txt @@ -0,0 +1,17 @@ + + dxdcttpootd + tgd5geddxoottdpt + tgpco5tgx -ecpxppt o + tp55t5eotoex5egdpoeodp + t 55o5t egg5odeeeoetp + xtotoe ptt5g-ecg5go + e exg t5dt5g5doeoded + e oee eto5odexd5-eee + e- eccccttxxxttdptde e ee + d 5 gpe5ttcctte-dotpe epe + o poeopgggggge ot-poeo5te + o otpo egg5c5 + o-poee- dogd5cdp + --ptodgxxcoocedd5e + pcdptcoddootp + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_25.txt b/codex-rs/tui/frames/slug/frame_25.txt new file mode 100644 index 0000000000..d8b8655dac --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_25.txt @@ -0,0 +1,17 @@ + + dtopcttttd + tgptpedcoepeet + 5e55ttg-etoooeeed + etpe 5g oe goetpo5 + tddot5pdc5deg e55o5p + otxexdpt-dec 5ete55et + e5epe edd5od5eo5dgeoe + eee5e-ggxdoo5eodxoeeo + dtoegeddooootxeooetpeo + 5-ge5etedeecpdeopo5oe + oxp5oeegggggpt5eoe5ee + edgectco-tpcd5t55e5 + dededodpc5td5dee5 + o-coodpoeppgpep + xtgpottdtep + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_26.txt b/codex-rs/tui/frames/slug/frame_26.txt new file mode 100644 index 0000000000..4be73d44de --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_26.txt @@ -0,0 +1,17 @@ + + dcpppgtt + 5pec5oetcet + 5pggecoeoggot + cpgteexdeedt5d + edtoe-xgpo5ceoc + o ge5c5gpdogoo5 + eg ppoee5eeccgt + 5- oeeeddoee5ee + e -opctxtoo5oee + g -de5teddtpoope + eeg5epgot5etoee + odxe5o 55geee + p peo de5e5t + egpoogpdppc + o5cdpxdop + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_27.txt b/codex-rs/tui/frames/slug/frame_27.txt new file mode 100644 index 0000000000..f333909d2b --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_27.txt @@ -0,0 +1,17 @@ + + cppptt + ecc5e5o + cpe pe5pe + exxdeecex + e eed-po + xd-dgeeeee + o geedpeeg + e eeexogee + e- -geteeee + po -gdedpee + e- ddppt5p + eetteed5e + eootot5ed + oddeoo55 + pog do5 + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_28.txt b/codex-rs/tui/frames/slug/frame_28.txt new file mode 100644 index 0000000000..3c0deb542c --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_28.txt @@ -0,0 +1,17 @@ + + 5ppc + etdee + o cee + e-epe + e xe + e -ge + dex de + e-gge + 5o de + ee-cxe + e de + eotoe + eopee + pdd5e + x -te + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_29.txt b/codex-rs/tui/frames/slug/frame_29.txt new file mode 100644 index 0000000000..0c6277f4d5 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_29.txt @@ -0,0 +1,17 @@ + + tppppt + tep5gpo + dtee pge + eeeedot5 + o xge e + etxee dd + eooeee d + eeoxe + eexpe e + deoee e + pee5ed o + e5xxe de + xeeeexde + eoep5gep + xep -t + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_3.txt b/codex-rs/tui/frames/slug/frame_3.txt new file mode 100644 index 0000000000..b1e9173608 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_3.txt @@ -0,0 +1,17 @@ + + d-octtooootd + dtt5oeetegooecddeptd + tc5pcepgge egxgppt5det + 5t5oecttd eopgeeo + p5pe5d5eepod odoeed + 5eoo5 -teocoo e ooe + op e ppoedget -p5et + t-ete t-eg5oe xdeoe + -gpe ceptxep-xottdddttdxdgce + tocot -5p5cce epeddtgo-tcoeeoee + pde e geettg gpppgggppt555t5 + ppx ot e 5dtd55 + od55pot ttc5gtep + odttdppdococtcopcedtg + eptpdcxddddxc5dg + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_30.txt b/codex-rs/tui/frames/slug/frame_30.txt new file mode 100644 index 0000000000..9dfd28bc20 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_30.txt @@ -0,0 +1,17 @@ + + dcgpptt + d5ceeoppoo + gpdetooetto + eeoe5edoeo ot + opeeeoetet e + epedt peeee-e + o5eeeod o5oe oe + ge ptoxtege- e + gedgoxoxo5et e + geeoeddxegtt e + goeecodpxeetxe + ep55t5poeeg e + oeoee5pxetx5 + tdttod5et5p + o--edddcp + eeee \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_31.txt b/codex-rs/tui/frames/slug/frame_31.txt new file mode 100644 index 0000000000..1dba8edd8f --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_31.txt @@ -0,0 +1,17 @@ + + d-cptptot + dtpcttdgtoppt + teo55tode-gedpo + tx5tddpcdtooeoxeo + deeeet-podtgoe5dd + cedexdepgocpt-5etge + 5ee edpeo-o5cpepe5e + oot exgeo edggexo-e + eotdepdxex5txxed e + geex55eedddodeoee p + dpd5tet 5pppe5epxdg + eeeooot dop e + cepodgt - epe5e + ceoe5deetegtee + pgoxdtp5-cp + eeee \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_32.txt b/codex-rs/tui/frames/slug/frame_32.txt new file mode 100644 index 0000000000..33160e7163 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_32.txt @@ -0,0 +1,17 @@ + + tttttccxtd + cpxppxoeeppext + 5dpodttdc-epepoppt + p55edtec- - tdoettgt + 55etepoppec petxo5opot + o5ootopeeceetd et5 p + pegctepoeettetoe5d55epd + eeetd gdeeg5pec-dgoegge + oee-d pdegddetttxxxoegoe + pggdeepopodddddeepecx-d + topee5 epggpppdc555-5 + otedoo toe5px + pppeextd d5de5 t + o-ogxtecopedtgd5 + xcoddtt5pdgg + eee \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_33.txt b/codex-rs/tui/frames/slug/frame_33.txt new file mode 100644 index 0000000000..ff8827f3d2 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_33.txt @@ -0,0 +1,17 @@ + + dttototox-d + dtpeeopoxce-epep- + d5oetpttoge gp5eetgt + to5e5detd peeodp + d-e5eee5odo etood + 55t odooeot 5o5do + eet g otpedeo epee + pett tppo5ot ogep + eee e te 5ptttcootxxt5deox + d5epg5ct5exedddddeepdddxe- + ooot e5e5 5 ggggppp eet5de + otoptgt 55c5o5 + pogptpct dtet5pop + oxgpotetctdgctopxp + goottddddtpc-g + eeee \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_34.txt b/codex-rs/tui/frames/slug/frame_34.txt new file mode 100644 index 0000000000..4b1eb6a5a2 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_34.txt @@ -0,0 +1,17 @@ + + dtottttoxtd + dtpt5ocegxtpoppctod + d55tepgcxpe edootgppt + t5depd5td petpoo + 55eo-5egeggt oopod + t5oee5 oogeopo otoeo + epdxd podpedd ecxd + oeogc epde5ge 5 do + tp5-g 5o55gdoottttttxddg xde + eeot5ttdg55pxeedx-dddt5deeeeo + 5dot eoepdg gppeeeed t5toep + 5tocood 5c-e5p + oteetoct dtogd5te + -o5xgettcttopopetpcp + gxocodddddcopod + eee \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_35.txt b/codex-rs/tui/frames/slug/frame_35.txt new file mode 100644 index 0000000000..f2432dc0ad --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_35.txt @@ -0,0 +1,17 @@ + + dttcotttottd + tpop-xpptgepxcgxpod + d55ectpedpge egpop-gept + t55t5tctd ptdoed + 55xe55o gopt eopet + c5c5te pedg--pd eooe + o g-5 oo ppd- edoo + xexc 5ooc5p 5 g5 + 5 td tee5cg5eoodcdotxx exop + etdcp 55cgpt5ec otdddd5gx5p ep + 5eotp5ode5de egddddpddp55dte + g-do5x d5p td + ocedctct tc5dppp + gddgxpx-cxxtxc5pgd5cg + gdxcodd5ddttpgd + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_36.txt b/codex-rs/tui/frames/slug/frame_36.txt new file mode 100644 index 0000000000..c84a104e4a --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_36.txt @@ -0,0 +1,17 @@ + + ddtottttottd + doggot5c5totcttgpptd + topottp-pgee egpxptetpet + degptdddd ppxoge + t5dcopeoeot- do-p + 5 t5e pd ge5t godp + e cge go goo edet + eeox do d55g oe e + epge 55 tpgptttdtttttd eoxe + dpeo tedd5x5 gexdddddddee o5pe + p peo tdt5d gppdddddg etg5 + ptgoc- t5eg5 + o5eetxt tttg5te + ptdgppodcxdtxcg-gtctp + ept5xdttdttttppg + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_4.txt b/codex-rs/tui/frames/slug/frame_4.txt new file mode 100644 index 0000000000..2eed2c8465 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_4.txt @@ -0,0 +1,17 @@ + + d-octootottd + d-gtpe5geoo5pceg5ptd + tpoeeetpge edxodpe5ood + 55eteg-tt geppopo + 5e5deoeocdet ogoepo + 5eede pdee5po p ooet + goece pppotget t gce + e-o te5pdee eee + deged ce5gd55txtttddddtt eep + eo5ge t555tdeeooet-dtc5dce55ge + eecpotooto5 gppppppppd-eeee + teogede tdc5ppp + ootcdgtd d-dtpce5 + xeeodppoccocttoptoepe + pooxcxdddddc-pe + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_5.txt b/codex-rs/tui/frames/slug/frame_5.txt new file mode 100644 index 0000000000..e0c7693a9e --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_5.txt @@ -0,0 +1,17 @@ + + d-occtooottd + dtgt5p5eetxotcdegtt + pd5otepge gdoepogtpt + te5e5e-ot -deeeed + to5p5ddtedot e oeoed + xeee5 odeoc5ed t5ee + e5egt eodeoget ppxtet + e5edg tdoe5de tede + etedp 5degtepodxtxdddttdge-e + doeott5tpg egg55oodto-t5e5pee + oteetxtoo5te gppgggggtxceo5 + oot5oo e 5d5ptd + d5poeotd dottppcp + depetptocxodttopdxcp + d-pdpgddd-dttpe + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_6.txt b/codex-rs/tui/frames/slug/frame_6.txt new file mode 100644 index 0000000000..d5ac091f39 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_6.txt @@ -0,0 +1,17 @@ + + d-occtoottdd + tdc5peoptettcdtptd + ttteeepg egx-optp5od + 5tepepdot oteeeet + poeeepootpo -ooeot + c-5e5edtceodet -oo5e + d txe gdoe5do dtede + x exe deox5ee xtoee + d-e-e 5peepc5tdxtxddttd-o5e + eeot5dddct e5opteetcoooeteog + 5 e 5xeec5g gpgggppgeoo5e + t c 5te tcd55ee + -eodppt dtdd5ptt + egxptgtgcxddttppgccp + d-cpttdddedttp + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_7.txt b/codex-rs/tui/frames/slug/frame_7.txt new file mode 100644 index 0000000000..02d1f1ae52 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_7.txt @@ -0,0 +1,17 @@ + + d-xcptoottd + tpetoetptooocgept + p teeepe edxegp5dpt + ooeeexct dxope5t + epepeede5ot - peeo + e ceeg epoceo t-eee + eoge ddeoeoe ppdee + dg5xe ot5epee p eee + 5gxp tgd5eo5xxccdxxocpoee + etpeeocxe5pe-oeeoototcoeoe + o od5pepd5 ppppppggd5ee + pd 5d5de tg-5c5p + pcttoood tdxtp5pp + odpoepocxdddtpept5 + gxpgxcxddtdcpp + \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_8.txt b/codex-rs/tui/frames/slug/frame_8.txt new file mode 100644 index 0000000000..d028ab360e --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_8.txt @@ -0,0 +1,17 @@ + + ddtdcttottd + tgp5eeepoogx gt + deote55pgtgx5xpotdt + dpop5ette p odeeo + p 5e5toe5o -poeet + epteodddoedp oteee + epeee pdcoeee ede5et + otee5 eto5etp- -e5ee + o oeedd g5poex5tttttoxee + g op5odegteteeceoddeeop + 55ooeoeee5pdpdpgopg5oe + ptgeoeee -t555p + podpoood d5odet5p + -cpetpgcctpc5otee + xxdppoedtt5oe + ee \ No newline at end of file diff --git a/codex-rs/tui/frames/slug/frame_9.txt b/codex-rs/tui/frames/slug/frame_9.txt new file mode 100644 index 0000000000..2481e07a35 --- /dev/null +++ b/codex-rs/tui/frames/slug/frame_9.txt @@ -0,0 +1,17 @@ + + -odp5ttot + 5pd5eepgogd-od + 5 tee5pddo5godxt + g ee5cod ddteodett + 5pgcopgept p-ptctee + e eeegdeocdd epepeee + e xpoeppeootg-t5 eee + e x5dtoxeed5oode gee + g gteg 5egexxetexteee + edeeedtededeeeeddeee + g ed5ooe5gppppeeg5oe + oxeeote t5 d5ee + otoeoo 5cdce5p + d-godep5toccpee + p-d pooect5g + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_1.txt b/codex-rs/tui/frames/vbars/frame_1.txt new file mode 100644 index 0000000000..0ca3a5d334 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_1.txt @@ -0,0 +1,17 @@ + + ▎▋▎▋▌▉▉▌▌▉▊▎ + ▎▌▊▋▉▍▉▋▉▍▌▏▏▌▎ ▎█▉▎ + ▊▏▉▏▉▉▉█▍▎ ▎█▉▎█▏▌▏▏▏▉ + ▌▉▎▍▉█▊▊▎ ▋▉▏▌▏▊ + ▍▍▌▋█▍▏▍▎▍▍ █▋▏▍▍▊ + ▏▉ ▉▎ ▏▉▋▌▏▏▊ █▋▍▏▏▊ + ▉▍█▊▉ █▍▏▉▋█▏▎ ▏▋▏ + ▏▏▎▏▎ ▊▋▋▏▌▏▉ █▎▏ + ▏▌▏█▎ ▌▏▏▍▍▏█▋▏▉▉▉▉▉▉▎▉▊ ▌█ ▏ + ▎▏▌▉ ▎▌▉▎ ▋▉ ▏█▏▎▎▎▋▋▊▊▊▏▋▊▋▊▏ + ▍▍▎█▍ ▍▍▊▋▋▎ ▎▍▉██▉ ▍▉█▋▊▌▎▋ + ▉▍▊ █▊ ▎ ▊█▋▉▎▏ + ▍▍▊▎▍▉▎ ▎▌▎▉▏▎▉█ + ▍▉▊▍▎ ▉▉▋▌▌▌▌▋▌▉▉▎▊▏▉ + ▎▉█▉▏▏▏▎▎▎▊▎▌▉▉█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_10.txt b/codex-rs/tui/frames/vbars/frame_10.txt new file mode 100644 index 0000000000..b422fb1274 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_10.txt @@ -0,0 +1,17 @@ + + ▎▉▉▉▉▍▉▉▎ + ▉█▎▉▉▉▍▏▋▎▉▊ + ▍▎▊▏▏▋▏▏▊▏▉▍▊▊ + ▏▎▎▋▍▏▌▎▋▍▊██▍▍▊ + ▋ ▌▏▏█▏▍ █▊▋▎▋▏▋ + ▏▎ █▏▉▏▋▋▍ ▎▎█▏ + ▍ ▏▉█▉▏▏▏▏▉ ▏▋▊ + █ ▏▏▍▉▋▉▏▏▊▎▎▋▍▏▏ + █ ▏▍ ▍▍▏▌▏▏▉▍▉▌▏▏ + ▏ ▊▏▍▊▏▎▋▎▉▎▎▎▏▉▎ + ▊ █▏▏▏▏▏██ ▍▊█▍▏▎ + ▍▎█▊▍▊▉█ ▎▏██▊▋▋ + ▏█ ▏▏▏▏▉▊▋▊▋▏▋▎ + ▌▎▉▉▋▏▉▌▎ ▋▋█ + ▉▊ ▎▉▍▎▊▌▉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_11.txt b/codex-rs/tui/frames/vbars/frame_11.txt new file mode 100644 index 0000000000..5d4524e293 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_11.txt @@ -0,0 +1,17 @@ + + ▊▉▉▉▉▉▉▎ + ▋█ ▌▏▏▏▍▍▊ + ▋█▎▎▏▏▌▍▉▋▍▊ + ▏▎▎▏▏▌▌▊▎▌▋▋ + ▎█▋▌▍▏▉▍█▌▎▏▏▊ + ▏▉▎▏▏▉▎▌▌▏▎▋▏▏ + ▉▉ ▊▏▏▏▏▏▏▎▏▌▍ + ▏ ▏▏▋▏▏▍▋ ▏█▏ + ▋ █▏▋▏▏▉▋▉▏▎▏ + ▉▉ ▎▏▋▌▊█▋▏▎▏▍ + █▎▊ ▏▏▏▏▌▋▏▍▍▏ + ▍▎▊▋▏▎▉▋▉▉▌▏▎ + ▎ ▉▏▍▍▍▎▏▌█ + ▍▉ ▉▏▏▊▎▋▉▎ + ▍▎ █▉▉▎▉▎ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_12.txt b/codex-rs/tui/frames/vbars/frame_12.txt new file mode 100644 index 0000000000..f81900edb1 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_12.txt @@ -0,0 +1,17 @@ + + ▉▉▉▉▉▋ + ▊▌▎▎▋▏▊▍ + █ ▏▋▍▉▊ + ▋▉▏▏▏▌▌█▏ + ▏ █▏▏▏▏▋▋▏ + ▏█▋▋▉▍█▎▏█ + ▏ ▏▋▍▏▏▍ + ▏ ▋▉▍▏▏█ + ▉▊ ▏▋▏▏▉▏▏ + ▏ ▋▏▉▌▉▎ + ▏▋ ▏█▌▉▉▋ + ▊ ▉▏ ▎▊▏ + ▋ ▉▉▏▊▉▍▏ + █▍▋█▊▏▍▏▎ + ▍ █▏▍▋▋ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_13.txt b/codex-rs/tui/frames/vbars/frame_13.txt new file mode 100644 index 0000000000..4231032a45 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_13.txt @@ -0,0 +1,17 @@ + + ▋▉▉▉▊ + ▏▎▎▏▏ + ▏▎▎▏█ + ▏▉▉▏▎ + ▉ ▏▏ + █▋▊▏▏ + ▊ ▏▏ + ▉ █▏ + ▋▉ ▎▏▋ + ▏█ ▉▌▏ + █▎▋▋ ▏▎ + ▏▎▎▎▏ + ▏▉▊▏▎ + ▉▎▎▏▌ + ▊ ▋█▌ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_14.txt b/codex-rs/tui/frames/vbars/frame_14.txt new file mode 100644 index 0000000000..6eab794e0a --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_14.txt @@ -0,0 +1,17 @@ + + ▉▉▉▉▌ + ▊▋▎▎▋▍ + ▏▎▏▏▋ ▏ + ▏▏▋▏█▍▏▊ + ▏▏▏▍ ▏ + ▏▉▏▏ █▏ + ▏▏▏▏ ▋ ▉ + ▏▏▍▏▎ ▍ + ▏▏▏▏ █ + █▍▋▋ ▌▋ + ▍▏██▊▋▊▏ + ▏▉▏▏▎▎▎▏ + ▋ █▏▌▌▌▎ + ▏▍▋▉▎▎▋ + ▎▉ █▌▋ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_15.txt b/codex-rs/tui/frames/vbars/frame_15.txt new file mode 100644 index 0000000000..fa9a859bd0 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_15.txt @@ -0,0 +1,17 @@ + + ▉▉▉▉▉▏▎ + ▎▊▌▏▏▍▋▉▊ + ▋▋▏▉▌▍▏█▉▏ + ▏▋▎ ▋▋▊▋▎▎▏ + ▏▏▌█▌▍▏▏▋█▍▏ + ▍▏▏▊▏▏▋▋▏ █ + ▏▏ ▏▏▏▏▏▏▊▏ + ▏▏▋▏▏▉▏▏▏ █▊▏ + ▏▏▉▊▊▉▏▏▏▎▋▋▏ + ▏▎▏▌▋▏▍▏▉▋ ▋▏ + ▏▋▏▏▏▏▎▏ ▎ ▌ + ▏▉▉▋▍▏▏▍▊ ▌ + █▏▍▊ ▋▋▋▎ ▌▎ + ▏▍▏▏▍▍▋▉▍▋ + ▍▍▉▍▎▎▎▋ + ▎▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_16.txt b/codex-rs/tui/frames/vbars/frame_16.txt new file mode 100644 index 0000000000..1fcc2090a2 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_16.txt @@ -0,0 +1,17 @@ + + ▎▌▉█▉▉▉▏▎ + ▋▍▏▏▉▏▏▍▏▌▍ + ▏▋▋█▍▋▌▍▏▏ █▍ + ▋▋▋ ▌▉▎▍▏▍▏▏▉▉▏ + ▏▏▌▎▋▉█▌▏▏▉▋▏▎▍ + ▏▏▏▉▏█ ▏▍▌ ▏ ▏▋▏ + ▍▍▏ ▋▎▊▏▏▏▏▋▉█▊ ▏ + ▏▋▌ ▏▎▏▏▋▏▏▏█▌ ▎▏ + ▍▍▏▏▏▉▏▋▍▏▏█▉▉ ▋ + ▉█▎▎▊▌▌▍▉▏▋▎▏ ▊▎▏ + ▏▏▏▉██▋▉▍▏▌█▌▋▏▏▎ + ▏▏▉ ▏▎ ▎▋▋▊ ▋ + ▍▏▉ ▏ ▋▊▋▎▊▏ + ▍▏▏█▎▉▏▋▋▉▎▏ + █▋▋▎▌▋▎▎▌▉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_17.txt b/codex-rs/tui/frames/vbars/frame_17.txt new file mode 100644 index 0000000000..1adf01af90 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_17.txt @@ -0,0 +1,17 @@ + + ▊▌▉▉▉▌▌▏▊▎ + ▎▌▉▉▏▏▏▉▌▉▏▊█▍▊ + ▊▉▍▋▎▌▌▎▉▊█▏▏▏▎█▍ + ▋▏▋▎▋▏█▎▎ █▏▌▍▏▏▏▌▍ + ▏▋▎ ▏ ▏█▋▍▌▍▋▋ ▊ + ▎▌▉▊▋▎ ▊▋▋▏ ▋▊▌▋▏▋▋ + ▉ ▌▋▏ ▊▋▋▏▎ ▉█▏▏▋▌▏ + ▊█▌▏ ▋▋▏▏▋▏▊▏▏▌▌▉ + ▊▋▉▋▍▌▌▉▏▍▎▏▍▍▋▍▏▏▏ ▏ + ▏█▎▌▎▎▏▋▉▍▋▏▏▍ ▍▉█▉▍ + ▍▍▍▋███▉▉▉▉▍▎▏▉▋▋▍ ▍█ + ▍▏▏▎▉ ▎▋▏▏▎ ▌ + ▎▍▍ ▉▍▎ ▊█▊▋▍▎▋ + ▊ ▏▉▉▌▍▉▎▎▌▉▋▏█ + ▎▉▌▋▎▊▉▏▉▎▉▉ + ▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_18.txt b/codex-rs/tui/frames/vbars/frame_18.txt new file mode 100644 index 0000000000..9c46c64821 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_18.txt @@ -0,0 +1,17 @@ + + ▎▌▌▉▌▌▉▌▏▊▎ + ▎▉█▎▌▊▉▉▏▎▎▊█▉▌▌▎ + ▎▋▋▏▉█▉▌█▊█▋▎█▉▋▋▍ ▉ + ▊▏▏▉▋▊▍█▉ █▍▎▎▋▌▏▍▌▍▍▍▊ + ▎▍▋▋ ▋▏ ▎█▉▎▍▋▏▋▏▎▍▌▍▍▎ + ▋▍▏ ▊▊▏▋▎▎▎▋▊▉▊▏█▊▋▍▋▎▋▏ + ▏▏▍▋▋ ▉▋▉▋▏█▎▋█▉▏▌▏▌▊ + █▍▊▏▏ ▍▍█▏▏▌▍ ▏▌▏█ + ▍██ ▊▍▌▌▌▌▌▉▏▏▊▏▉▋▍▊ ▏▉▏▎ + ▎▍▍▏▉▍▉ ▏▏▋▎▎▍▎▏▏▏▎▌▏▎▍ ▊ + ▏▋▏▍▎██▉▉▉▉▉▎ ▍▎▎▋▏▋▉▋▎▊▎ + ▍▍ ▊▍▊ ▎▎▉█▋▉▎█ + ▍▍▉▉▍▍▋ ▎▉▍▎▋▍▊▎ + █▏▋▉▉▉▉▌▌▌▍█▉▎▋▎▊▉ + █▏▏▎▋▎▎▊▋▉█▌▉█ + ▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_19.txt b/codex-rs/tui/frames/vbars/frame_19.txt new file mode 100644 index 0000000000..572f5ffc32 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_19.txt @@ -0,0 +1,17 @@ + + ▎▎▌▌▉▏▉▌▌▏▋▎ + ▎▉▏▏▏▍▋▌▌▌▎▉▎▊▏▉▊▊ + ▊▉▌▌▋█▏▉▉▎ ▎▉▋▊▎▉▌▍ + ▋▌▏▉▊▍▎ ▎▌▌▉▊▍▏▉▊ + ▏▏▋▎▋▎ ▊▏▍█▋█▏▍ ▏▍▊ + ▏▍▋▉█ ▎▏▉▏▋ ▋▋ █▋▉▏ + ▍▌▏▏█ ▋▉▍▋▏▉▊▎ ▋▋▋▉▏ + ▏▏▏▏ ▏▌█▍▏█▊ ▏ ▏▏▏ + ▏▉▏▍▊▌▌▌▌▌▌▏▏▏▏▉▉▌▉▏▌ ▍ █▏▏ + ▍▌▋▊▏▌▉▋▍▉▉▍▊▎▊ ▍▎ ▋▍▎▍▊▋▋▏▎ + █▍█▋▉▏█████▉▉█ ▍▍▎▋▏▋▋ ▋▋█ + ▍▍▍▉▎▍ ▎▋▋▎▋▋█ + █ ▎▍▏▏▉▊ ▊▌▌▋▋▏▌▎ + ██▋▏▉▋▏▉▎▎▌▌▋▉█ ▌▉▏█ + █▏▋▎▋▊█▎▊▋▍▉▊▍ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_2.txt b/codex-rs/tui/frames/vbars/frame_2.txt new file mode 100644 index 0000000000..0e0c021f43 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_2.txt @@ -0,0 +1,17 @@ + + ▎▋▎▋▌▉▌▌▌▉▊▎ + ▎▉▊▋▉▌▉▏▏▏▌▏▏▌▎█▏▉▉▎ + ▊▏▉▏▍▉▉▏▉▎▎ ▎█▉▌▉▋▏▏▌▏▊ + ▎▏▋▎▋▉█▊▊▎ ▊▊▍▏▋▏▊ + ▊▍█▋▉▍▏▍▎▍▍▎ ▍▊▏▍▏▊ + █▋▉█▎ ▏▉▍▉▋▍▉ ▍▍▏▉▏ + ▊▏█▉▏ ▍▋▏▌▏▎▏▊ ▋█▏█▏ + ▏█ ▍▎ ▊▏▉▏▏▌▉ ▏█▋▋▏ + ▉██▌▏ ▌▏▍▍▎▏█▋▏▉▉▉▉▉▉▉▉▊▏▎▏▏▉ + ▎▌█▏ ▋▏▏█ ▋▉ ▏▌▍▎▎▎▎▋▋▎▎▏▉▋ ▏ + ▍▍▍ ▉ ▉▍▋▋▏█ ▎█▉▉▉▉▉▉▉█▏▊▉▏▏ + █▍▎▋▋▊ ▎ ▊▉▌▋▊▉ + ▋▍▎▎▏▉▊ ▊▌▎▉ ▎▏█ + ▎▏▍▌▎▎█▉▉▋▌▌▌▌▋▌▉▎▎▏▏▉ + ▎▉▉▉▉▏▏▎▎▎▎▏▌▋▉█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_20.txt b/codex-rs/tui/frames/vbars/frame_20.txt new file mode 100644 index 0000000000..42c288df92 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_20.txt @@ -0,0 +1,17 @@ + + ▎▎▉▌▏▏▌▉▌▊▎▎ + ▊▌▌█▌▊▎▊▌▌▌▏▏▎▍▉▍▉▊ + ▊▊█▎▉▉█▏▉█ ▎█▍█▍▉▉▏▉▎ + ▎▏█▎▉▏▉ ▎▊▉▏▍▋▉▍▍ + ▎▏ ▊▏▉ ▎▋ ▎▏▏▍▉▍▏▏▍ + ▋▎▊▏█ ▉▉█▌▏█▋ █▍▏▏▍ + ▌▏▌▉▏ ▊▉ ▋▉▉▍ ▊▍▏▋ + ▏▎▍▋▎ ██▌▋▏█▊ ▏▏█▏ + ▏▋▏▏▌▊▌▌▌▌▌▌▌▌▎▊█▌▍▍▍▍▉ ▋ ▏▍ + █▏▍▏▎█ ▋▎▎▎▎▎▎▏▍ ▉▍▍█▏▌▍ ▊▋ ▏▏ + ▍▊▍▍████████▉█ ▍▊▌▏▏▊▏ ▋▍ + ▉ ▍▉▋▊ ▎▋▉▋▏▋ + ▍▎▍▉▊▏▎ ▊▌▉▎▌▉█ + ▍▊▊▋█▏▉▍▌▌▊▋█▏█▎▊▋▉█ + ▎▉▉▏▎ ▌▎▎▎▎▏▉██ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_21.txt b/codex-rs/tui/frames/vbars/frame_21.txt new file mode 100644 index 0000000000..aa5d4f7274 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_21.txt @@ -0,0 +1,17 @@ + + ▎▎▊▌▉▌▌▉▌▉▊▎▎ + ▊▉▉▎▎▎▎▉▏▌▏▉▌▎▎▊▉▉▎ + ▌▉▍▎▉▉▍█▎ ▎▍▏▉▉▎▎▉▊ + ▊▉▏▌██ ▎▊▌▉▊▌▉▊ + ▋▊▋▉▎ ▊▏▋▎▍ ▍▍▎▍▊ + ▋█▋▏ ▊▉▉▎▋▋ ▍▍▍▊ + ▏█▏▎ ▎ ▋▎▊▋█ ▍▌▍█ + ▎▍ ▍▌ █▏▊ ▏ ▏ + ▏ ▏ ▊▉▌▌▌▌▌▉▉▉ ▍▏▊█▏▊ ▌▋ ▏ + ▏ ▏▍ ▏▎ ▎▊▏ ▍█▎▉▏▊ ▋█▋▋ + ▌ █▋ ▎▎███ █▎ █▉▎▊▌ ▋▎ ▊ + █▉ ▋▌▎ ▎▉█ ▋ + ▉▎ ▍▊▎ ▎▋▌▉█ ▊▎ + ▉▌▎ ▉█▉▉▋▏▏▌▋▌▉██ ▊▎ + ▉▉▉▌▉▎▎▎▎▊▎▌▉▉▎ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_22.txt b/codex-rs/tui/frames/vbars/frame_22.txt new file mode 100644 index 0000000000..3b1ce4ecde --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_22.txt @@ -0,0 +1,17 @@ + + ▎▊▉▌▉▌▌▉▌▉▊▎ + ▎▉▋▉▏▋▎▋▏▋▍▏▏▌▏▉▋▉▉▎ + ▊▌▉▌▏▍▉▉▎ ▎█▉▍▉▉▉▎▎▉▊ + ▌▉▏▉▉█ ▊▊▏▏▏▎▉▍ + ▍▏▏▋█ ▊▎▋▏▌▏▋▋▌█▏ + ▍▏▉▋▎ ▊▏▋▏▌▍▋▎ ▍▏▍▌▏ + ▏▉▉▍▋ ▏▉▏▍▉▋█ ▏▏▋▏ + ▏▏▌▏▎ ▏▍▏▏▍▍ ▏▍▏█▏ + ▏▏▊█▊ ▉▏▌▌▌▌▌▌▉▉▎▍▉▏▎ ▍▊ ▎▏▌█ + ▍▏▌ ▉▎▍▍▊ ▋▊█▏▋▋▏ ▍▉▌▎█▏▊▊ ▋▍▌ + ▍▍▍▎▏ █████▉▉█▎ ▎▋▉▉▎▋▋▋█▊▎ + ▍▉▍▎▍▊ ▎▉▊█▏▊█ + ██▉▌ ▉▉▎ ▎▋▉▊█▉▎▋ + █▋▉▉▊█▉▏▌▌▉▌▌▋▌▉███▊▉ + █▏█▏▎▌▎▎▎▊▌▎▋▌▉▎ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_23.txt b/codex-rs/tui/frames/vbars/frame_23.txt new file mode 100644 index 0000000000..0b99396129 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_23.txt @@ -0,0 +1,17 @@ + + ▎▊▉▎▌▉▉▉▉▌▉▎▎ + ▎▌▏▉▏▍▎▊▎▌▌▊▏▎▏▉▏▉▎ + ▊█▉▏█▊▌▉▎ █▏▋▉▏▍▌▏▏▊ + ▋▌▏▉▌▋▎ ▎▌▌▍▏▏▌▍ + ▋▋▏▎▋█ ▊▋▊▊█▉▋▉▍▏▍ + ▊▍▏█▋▎ ▎▉▉▉██▋▉█▏▏▍▏▊ + ▎▏▏█▏ ▋▋▋▋ ▎▏▎ █ ▏█▉ + ▏▋▏ ▏ ▏█▏▊▎▍▊ ▏ ▉▋▏ + ▍█▍ ▏▉▏▌▌▌▌▌▌▌▌▏▎▉▏▎█▍▎ ▏ ▏▏▏ + ▏▍▍▎▏█▌█ ▋▎▍ ▍▏▎▍▊▏ ▍▎▏ + ▋█▏ ▏ ▎███████ █▎▋▌▌▏▎▋▍▋▎ + ▊▏▏▎▏▋ ▊▋▏▍▍▋▎ + ▍ ▏▊█▋▎▎ ▎▋█▌▉▋▉▋ + ▍▌▍▉▌▉▉▍▏▌▌▎▉▉█▊▎▉▉▎ + █▏ ▉▌▍▏▎▎▉▎▎▉▉▎ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_24.txt b/codex-rs/tui/frames/vbars/frame_24.txt new file mode 100644 index 0000000000..5e26d7a27b --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_24.txt @@ -0,0 +1,17 @@ + + ▎▏▎▌▉▉▉▌▌▊▎ + ▊█▎▋█▏▎▎▏▌▌▉▊▎█▉ + ▊██▌▍▋▉█▏ ▋▎▋▉▏▉▉▊ ▍ + ▊█▋▋▊▋▏▌▊▍▎▏▋▎ ▎▉▍▏▍▎█ + ▊ ▋▋▍▋▊ ▎██▋▍▎▏▎▎▍▏▊█ + ▏▊▍▉▍▎ ▉▊▊▋ ▋▏▌ ▋█▍ + ▏ ▏▏ ▊▋▎▊▋█▋▍▍▏▍▍▏▍ + ▏ ▍▏▏ ▏▊▌▋▍▎▏▏▎▋▋▎▏▏ + ▏▋ ▏▌▌▌▋▉▉▏▏▏▉▉▎▉▊▎▏ ▏ ▏▏ + ▎ ▋ ▉▏▋▊▊▌▌▊▊▏▋▍▍▉▉▏ ▏▉▏ + ▍ █▍▏▍▉██████▎ ▍▊▋▉▍▏▌▋▊▎ + ▍ ▍▊▉▍ ▏ █▋▌▋ + ▍▋▉▍▎▏▋ ▎▌█▎▋▋▎▉ + ▋▊▉▊▍▍█▏▏▋▌▌▌▏▍▎▋▎ + ▉▋▎▉▉▌▍▎▎▌▌▉▉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_25.txt b/codex-rs/tui/frames/vbars/frame_25.txt new file mode 100644 index 0000000000..5009b8b66d --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_25.txt @@ -0,0 +1,17 @@ + + ▎▉▌▉▌▉▉▉▉▎ + ▊ ▉▊▉▎▎▌▍▏▉▏▏▊ + ▋▏▋▋▊▊█▋▏▉▍▌▍▏▏▏▎ + ▏▉▉▏ ▋ ▌▏ █▍▏▊▉▍▋ + ▊▎▎▍▊▋█▍▌▋▎▏█ ▏▋▋▍▋▉ + ▍▊▏▏▏▎▉▉▋▍▏▋ ▋▏▊▏▋▋▏▊ + ▏▋▏▉▏ ▏▎▎▋▍▎▋▏▍▋▎█▏▌▏ + ▏▏▏▋▏▋█ ▏▎▌▍▋▏▍▎▏▌▏▏▍ + ▍▉▍▏█▏▎▎▌▌▌▌▉▏▏▍▍▏▉▉▏▍ + ▋▊█▏▋▏▊▏▎▏▏▌▉▎▏▍▉▌▋▍▏ + ▍▏▉▋▍▏▎██████▉▋▏▍▏▋▏▎ + ▏▎█▏▌▉▌▍▊▊▉▋▎▋▊▋▋▏▋ + ▍▎▍▏▎▍▎▉▌▋▊▍▋▎▏▏▋ + ▍▋▌▍▍▎▉▌▏▉▉ ▉▏▉ + ▏▊█▉▍▉▊▎▉▏▉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_26.txt b/codex-rs/tui/frames/vbars/frame_26.txt new file mode 100644 index 0000000000..900a51c3b5 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_26.txt @@ -0,0 +1,17 @@ + + ▎▌▉▉▉█▉▊ + ▋▉▏▌▋▍▏▉▌▏▊ + ▋▉██▏▌▍▏▍██▍▊ + ▌▉█▊▏▏▏▎▏▏▎▉▋▍ + ▏▎▊▍▏▋▏█▉▍▋▌▏▍▌ + ▍ █▏▋▋▋█▉▎▍█▍▍▋ + ▏ ▉█▌▏▏▋▏▏▌▌█▉ + ▋▊ ▍▏▏▏▍▍▌▏▏▋▏▏ + ▏ ▋▍▉▌▉▏▉▌▌▋▍▏▏ + ▋▎▏▋▊▏▎▎▊▉▍▍▉▏ + ▏▎█▋▏▉█▍▊▋▎▉▍▏▏ + ▍▎▏▏▋▍ ▋▋█▏▏▎ + ▉ ▉▏▍ ▍▎▋▏▋▊ + ▏█▉▍▍█▉▎▉▉▌ + ▍▋▋▍▉▏▎▍▉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_27.txt b/codex-rs/tui/frames/vbars/frame_27.txt new file mode 100644 index 0000000000..0b2e8c7306 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_27.txt @@ -0,0 +1,17 @@ + + ▌▉▉▉▉▊ + ▏▌▋▋▏▋▍ + ▌█▎ ▉▏▋█▏ + ▏▏▏▍▏▏▌▏▏ + ▏ ▎▏▎▊█▌ + ▏▎▋▎█▎▏▏▏▎ + ▌ █▏▏▎▉▏▏ + ▏ ▎▏▏▏▌█▏▏ + ▏▋ ▋ ▏▉▏▏▏▏ + █▌ ▋█▎▏▎▉▏▏ + ▏▊ ▎▍▉▉▉▋█ + ▏▏▉▉▏▏▎▋▏ + ▏▌▌▉▌▊▋▏▍ + ▍▎▎▏▍▌▋▋ + █▍█ ▍▍▋ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_28.txt b/codex-rs/tui/frames/vbars/frame_28.txt new file mode 100644 index 0000000000..01ce82b6d3 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_28.txt @@ -0,0 +1,17 @@ + + ▋▉▉▌ + ▏▉▎▏▎ + ▌ ▌▏▎ + ▏▊▎▉▏ + ▏ ▏▏ + ▏ ▊█▏ + ▍▏▏ ▎▏ + ▏▊██▏ + ▋▍ ▎▏ + ▏▏▋▋▏▏ + ▏ ▎▏ + ▏▌▉▌▏ + ▏▌▉▏▏ + ▉▎▎▋▏ + ▏ ▋▉▏ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_29.txt b/codex-rs/tui/frames/vbars/frame_29.txt new file mode 100644 index 0000000000..c682a6082c --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_29.txt @@ -0,0 +1,17 @@ + + ▉▉▉▉▉▊ + ▊▏▉▋ ▉▍ + ▍▊▏▏ ██▏ + ▏▏▏▏▍▍▊▋ + ▍ ▏█▏ ▏ + ▏▊▏▏▏ ▎▎ + ▏▍▍▏▏▏ ▍ + ▏▏▌▏▏ + ▏▏▏▉▏ ▎ + ▎▏▌▏▏ ▎ + ▉▏▏▋▏▍ ▌ + ▏▋▏▏▏ ▎▏ + ▏▏▏▏▎▏▎▏ + ▏▌▏▉▋█▏█ + ▏▏▉ ▋▊ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_3.txt b/codex-rs/tui/frames/vbars/frame_3.txt new file mode 100644 index 0000000000..6c202bc0c3 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_3.txt @@ -0,0 +1,17 @@ + + ▎▋▌▌▉▉▌▌▌▌▊▎ + ▎▉▊▋▍▏▏▉▏█▌▌▏▌▎▍▏▉▉▎ + ▊▌▋▉▌▏▉██▎ ▎█▏ ▉▉▉▋▍▏▊ + ▋▉▋▍▏▌▊▉▎ ▎▌▉ ▏▏▍ + █▋▉▏▋▍▋▏▏▉▍▎ ▍▍▍▏▏▎ + ▋▏▍▍▋ ▋▊▏▍▌▍▍ ▏ ▍▍▏ + ▌▉ ▏ █▉▍▏▎█▏▊ ▋▉▋▏▊ + ▊▊▏▊▏ ▊▊▏█▋▍▏ ▏▎▏▌▏ + ▊██▏ ▌▏▉▉▏▏▉▊▏▌▉▉▎▎▎▉▉▎▏▍█▌▏ + ▊▍▋▍▊ ▋▋▉▋▌▌▏ ▏▉▏▎▎▊ ▌▋▊▌▍▎▏▍▏▎ + █▍▏ ▏ █▏▏▉▊█ █▉▉▉███▉▉▊▋▋▋▊▋ + █▉▏ ▍▉ ▎ ▋▍▉▍▋▋ + ▌▍▋▋▉▍▊ ▊▉▌▋█▊▏█ + ▌▍▉▊▎▉▉▍▌▌▌▌▊▋▌▉▌▎▎▉█ + ▎▉▉▉▎▋▏▎▎▎▎▏▌▋▍█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_30.txt b/codex-rs/tui/frames/vbars/frame_30.txt new file mode 100644 index 0000000000..a44dbb6ed0 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_30.txt @@ -0,0 +1,17 @@ + + ▎▌█▉▉▉▊ + ▎▋▌▏▏▍▉█▌▍ + ██▍▏▊▍▍▏▉▊▍ + ▏▏▍▏▋▏▎▍▏▍ ▍▊ + ▌▉▏▏▎▍▏▊▏▊ ▏ + ▏▉▏▍▉ ▉▏▏▏▏▋▏ + ▍▋▏▏▏▍▎ ▍▋▍▏ ▌▎ + █▏ █▉▌▏▊▏█▏▊ ▎ + █▏▎█▍▏▌▏▍▋▏▊ ▎ + █▏▏▍▏▎▎▏▏ ▉▊ ▎ + ▍▏▏▌▍▎▉▏▏▏▉▏▏ + ▏▉▋▋▊▋▉▍▏▏█ ▏ + ▍▏▍▏▏▋▉▏▏▊▏▋ + ▊▍▊▉▌▍▋▏▊▋█ + ▍▊▋▏▍▎▎▌█ + ▎▎▎▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_31.txt b/codex-rs/tui/frames/vbars/frame_31.txt new file mode 100644 index 0000000000..70da8799e2 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_31.txt @@ -0,0 +1,17 @@ + + ▎▋▋▉▉▉▉▌▊ + ▎▉▉▌▉▊▎█▉▍█▉▊ + ▊▏▍▋▋▊▌▎▎▋█▏▎▉▍ + ▊▏▋▉▎▎▉▌▎▊▍▍▏▍▏▏▍ + ▍▏▏▏▏▉▊▉▍▎▊█▍▏▋▎▎ + ▌▏▍▎▏▎▏██▍▌▉▊▋▋▏▊█▏ + ▋▏▏ ▏▍▉▏▍▋▌▋▌▉▏▉▏▋▏ + ▍▍▊ ▏▏█▏▍ ▏▍██▏▏▍▋▏ + ▏▍▊▎▏█▍▏▏▏▋▉▏▏▏▎ ▏ + █▏▏▏▋▋▏▏▎▎▎▍▎▏▍▏▏ ▉ + ▍▉▎▋▉▏▊ ▋▉▉▉▎▋▏█▏▎ + ▏▏▏▍▍▍▊ ▎▌▉ ▏ + ▌▏▉▌▎ ▊ ▋ ▏▉▎▋▎ + ▋▏▍▏▋▎▏▎▊▏█▊▏▎ + ██▌▏▎▉▉▋▋▌▉ + ▎▎▎▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_32.txt b/codex-rs/tui/frames/vbars/frame_32.txt new file mode 100644 index 0000000000..ddfb4be3fe --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_32.txt @@ -0,0 +1,17 @@ + + ▊▉▉▉▉▌▌▏▊▎ + ▌▉▏▉▉▏▍▏▏▉▉▏▏▊ + ▋▍▉▌▍▊▉▍▋▊▎▉▏▉▍█▉▊ + █▋▋▏▎▊▎▌▊ ▊ ▊▎▍▏▉▊ ▊ + ▋▋▏▊▏▉▍█▉▏▌ █▎▊▏▍▋▍▉▍▊ + ▍▋▍▍▊▍▉▏▎▋▏▏▉▎ ▏▉▋ ▉ + ▉▏█▌▊▎█▍▏▏▊▊▏▊▌▎▋▎▋▋▏█▎ + ▏▏▏▊▎ █▎▏▏█▋█▏▌▊▎█▍▏██▎ + ▍▏▏▊▎ █▎▏█▎▎▏▉▉▉▏▏▏▌▏█▌▎ + ███▎▎▏▉▍█▍▎▎▎▎▎▏▏▉▏▌▏▊▎ + ▊▍▉▏▏▋ ▏▉██▉▉▉▍▌▋▋▋▋▋ + ▍▊▏▍▍▍ ▊▍▏▋█▏ + █▉▉▏▏▏▉▎ ▎▋▎▏▋ ▊ + ▍▊▍█▏▉▏▌▌▉▎▎▉█▎▋ + ▏▌▌▎▎▊▉▋▉▎██ + ▎▎▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_33.txt b/codex-rs/tui/frames/vbars/frame_33.txt new file mode 100644 index 0000000000..7fa5ac29bc --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_33.txt @@ -0,0 +1,17 @@ + + ▎▊▉▌▉▌▉▌▏▋▎ + ▎▉▉▏▏▍▉▌▏▋▏▊▏▉▏▉▋ + ▎▋▍▏▉▉▉▊▌█▎ █▉▋▏▏▉█▊ + ▊▍▋▏▋▎▏▊▎ ▉▏▏▍▎▉ + ▎▋▏▋▎▏▏▋▍▍▍ ▏▉▍▍▍ + ▋▋▊ ▍▎▍▍▎▍▊ ▋▍▋▎▍ + ▏▏▉ ▍▊▉▏▎▏▍ ▏▉▏▏ + ▉▏▊▊ ▊██▍▋▌▊ ▍█▏▉ + ▏▏▏ ▏ ▊▎ ▋▉▊▊▊▌▌▌▉▏▏▉▋▎▏▍▏ + ▍▋▏██▋▋▊▋▎▏▏▎▎▎▎▎▏▏▉▍▍▍▏▏▋ + ▍▌▍▊ ▏▋▏▋ ▋ ████▉▉▉ ▏▏▊▋▍▎ + ▍▉▍▉▊█▊ ▋▋▌▋▌▋ + ▉▍█▉▊▉▌▊ ▎▉▏▊▋▉▍█ + ▍▏█▉▍▉▏▊▌▉▎█▌▊▍▉▏▉ + █▌▌▉▊▎▎▎▍▉▉▌▊█ + ▎▎▎▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_34.txt b/codex-rs/tui/frames/vbars/frame_34.txt new file mode 100644 index 0000000000..a8c447ff18 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_34.txt @@ -0,0 +1,17 @@ + + ▎▊▌▉▉▉▉▌▏▊▎ + ▎▉▉▉▋▍▌▏█▏▉▉▌▉▉▌▊▌▎ + ▎▋▋▊▏▉█▋▏▉▎ ▎▍▍▍▊█▉▉▊ + ▊▋▎▏▉▎▋▊▎ ▉▏▊▉▍▍ + ▋▋▏▍▊▋▏ ▏█ ▊ ▍▍▉▍▍ + ▊▋▍▏▎▋ ▍▍█▏▍▉▍ ▍▊▍▏▍ + ▏▉▍▏▎ █▍▎▉▏▎▍ ▏▌▏▎ + ▍▏▌█▋ ▏▉▎▏▋█▏ ▋ ▎▍ + ▊█▋▋█ ▋▍▋▋█▎▌▌▉▉▉▉▉▉▏▎▎█ ▏▍▎ + ▏▏▍▊▋▊▊▍█▋▋█▏▏▏▎▏▋▎▎▎▊▋▎▏▏▎▏▍ + ▋▎▍▊ ▏▍▏▉▍ █▉▉▎▎▎▎▍ ▊▋▊▍▏█ + ▋▊▍▌▌▍▎ ▋▌▋▏▋█ + ▍▉▎▏▉▍▌▊ ▎▉▌█▎▋▊▎ + ▊▍▋▏█▏▉▊▌▊▉▌▉▌▉▎▉▉▋█ + █▏▍▌▌▎▎▎▎▎▌▌▉▌▍ + ▎▎▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_35.txt b/codex-rs/tui/frames/vbars/frame_35.txt new file mode 100644 index 0000000000..ba905231e1 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_35.txt @@ -0,0 +1,17 @@ + + ▎▊▉▌▌▉▉▉▌▉▊▎ + ▊▉▌▉▋▏▉▉▉█▏▉▏▋█▏▉▌▎ + ▎▋▋▏▌▉▉▏▍▉█▎ ▎█▉▌▉▋█▏▉▊ + ▊▋▋▉▋▊▌▊▎ ▉▉▎▍▏▎ + ▋▋▏▏▋▋▍ █▍▉▊ ▏▍▉▏▊ + ▌▋▌▋▉▎ █▏▎█▋▋▉▎ ▏▍▍▏ + ▍ ▋▋ ▍▍ █▉▎▋ ▏▍▍▍ + ▏▏▏▋ ▋▍▍▌▋█ ▋ █▋ + ▋ ▊▎ ▊▏▏▋▌█▋▏▌▌▎▌▎▌▉▏▏ ▏▏▌▉ + ▏▊▍▌█ ▋▋▌█▉▉▋▏▌ ▍▊▎▎▎▎▋█▏▋█ ▏█ + ▋▎▍▊█▋▍▎▏▋▍▎ ▎█▍▍▍▍▉▍▍▉▋▋▎▊▏ + █▋▍▍▋▏ ▎▋▉ ▊▍ + ▍▌▎▍▌▊▋▊ ▊▌▋▎▉▉█ + █▍▎█▏▉▏▊▋▏▏▉▏▌▋▉█▎▋▌█ + █▍▏▌▌▎▎▋▎▎▉▉▉█▍ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_36.txt b/codex-rs/tui/frames/vbars/frame_36.txt new file mode 100644 index 0000000000..246ed3d692 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_36.txt @@ -0,0 +1,17 @@ + + ▎▎▉▌▉▉▉▉▌▉▊▎ + ▎▌██▍▉▋▌▋▉▍▉▌▉▉█▉▉▉▎ + ▊▍█▍▊▉▉▊▉█▎▎ ▎█▉▏▉▉▏▊▉▏▊ + ▎▏█▉▉▎▎▎▎ █▉▏▍█▏ + ▊▋▎▌▍█▏▍▎▍▊▋ ▍▍▋▉ + ▋ ▊▋▎ ▉▎ █▏▋▊ █▍▍▉ + ▏ ▌ ▎ ▍ █▍▍ ▏▍▏▊ + ▏▏▍▏ ▎▍ ▎▋▋ ▍▏ ▏ + ▏██▏ ▋▋ ▊▉██▊▉▉▎▉▉▉▉▉▎ ▏▍▏▏ + ▎▉▏▍ ▊▏▎▎▋▏▋ ▎▏▎▎▎▎▎▎▎▏▏ ▍▋█▎ + █ ▉▏▍ ▉▎▉▋▍ █▉▉▍▍▍▍▍█ ▏▊█▋ + █▊█▍▌▋ ▊▋▏█▋ + ▍▋▏▏▉▏▊ ▊▉▉█▋▊▎ + ▉▊▎█▉▉▌▍▌▏▎▉▏▌█▊█▊▌▉█ + ▎▉▉▋▏▎▊▊▎▊▊▉▉▉▉█ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_4.txt b/codex-rs/tui/frames/vbars/frame_4.txt new file mode 100644 index 0000000000..5dcae750bc --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_4.txt @@ -0,0 +1,17 @@ + + ▎▋▌▌▉▌▌▉▌▉▊▎ + ▎▊█▉▉▏▋ ▏▍▌▋▉▌▏█▋▉▊▎ + ▊▉▌▏▏▏▉▉█▎ ▎▍▏▍▍▉▏▋▍▍▎ + ▋▋▏▊▏█▋▉▊ █▏▉▉▍▉▍ + ▋▏▋▎▏▌▏▍▌▍▏▊ ▍█▍▏▉▍ + ▋▏▏▍▏ █▎▏▏▋▉▍ █ ▍▌▏▊ + █▍▏▌▎ █▉▉▍▉█▏▊ ▊ █▌▏ + ▏▋▍ ▊▏▋▉▍▏▏ ▏▏▏ + ▎▏ ▏▎ ▌▏▋█▍▋▋▉▏▉▉▉▎▎▎▎▊▊ ▏▏▉ + ▏▍▋ ▏ ▊▋▋▋▊▎▏▎▌▍▏▊▋▎▊▋▋▍▌▏▋▋█▏ + ▎▏▌█▍▊▍▍▊▍▋ █▉▉▉▉▉▉▉█▍▊▏▏▏▎ + ▊▏▍█▏▎▎ ▊▍▌▋▉▉█ + ▍▍▊▋▍ ▊▎ ▎▋▍▊▉▌▏▋ + ▏▏▏▌▎▉▉▍▌▌▌▌▊▉▌▉▉▍▏▉▎ + ▉▍▍▏▋▏▎▎▎▎▎▌▊▉▎ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_5.txt b/codex-rs/tui/frames/vbars/frame_5.txt new file mode 100644 index 0000000000..cab16091cb --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_5.txt @@ -0,0 +1,17 @@ + + ▎▋▌▌▌▉▌▌▌▉▊▎ + ▎▉█▉▋▉▋▏▏▉▏▌▉▌▎▏█▉▊ + ▉▎▋▍▉▏▉█▎ █▍▌▏▉▍ ▊▉▊ + ▊▏▋▏▋▏▋▌▊ ▊▍▏▏▏▏▎ + ▊▍▋▉▋▍▎▉▏▎▍▊ ▎ ▍▏▍▏▎ + ▏▏▏▏▋ ▍▎▏▍▌▋▏▎ ▉▋▏▏ + ▏▋▏ ▉ ▎▍▎▏▍█▏▊ ██▏▉▏▊ + ▏▋▏▎█ ▊▎▌▏▋▎▏ ▉▏▎▏ + ▏▊▏▍▉ ▋▎▏█▊▏▉▌▎▏▉▏▎▎▎▉▊▎█▏▋▏ + ▎▍▏▍▊▊▋▉▉█ ▏█ ▋▋▍▌▍▊▌▋▊▋▏▋▉▏▎ + ▍▊▏▏▊▏▊▍▍▋▉▎ █▉▉█████▊▏▌▏▍▋ + ▍▍▉▋▍▍ ▎ ▋▎▋▉▊▍ + ▍▋▉▍▏▌▉▎ ▎▌▉▊▉█▌▉ + ▍▏▉▏▊▉▉▍▌▏▌▎▊▉▌▉▍▏▌▉ + ▍▊▉▎▉█▎▎▎▊▎▊▉▉▎ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_6.txt b/codex-rs/tui/frames/vbars/frame_6.txt new file mode 100644 index 0000000000..e41e013ab0 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_6.txt @@ -0,0 +1,17 @@ + + ▎▋▌▌▌▉▌▌▉▉▎▎ + ▊▍▌▋▉▏▌▉▉▏▉▉▌▎▊▉▉▎ + ▊▊▊▏▏▏▉█ ▎█▏▋▌▉▉▉▋▍▎ + ▋▊▏▉▏▉▎▌▊ ▍▉▏▏▏▏▊ + █▌▏▏▏▉▍▍▉▉▍ ▋▍▍▏▍▊ + ▌▊▋▏▋▎▍▉▌▏▍▎▏▊ ▋▌▍▋▏ + ▎ ▉▏▏ ▍▍▏▋▍▍ ▍▉▏▎▏ + ▏ ▏▏▏ ▎▏▌▏▋▏▏ ▏▉▍▏▏ + ▎▋▏▊▏ ▋█▏▏▉▌▋▉▎▏▉▏▎▎▉▉▎▋▍▋▏ + ▏▏▍▊▋▎▍▎▌▉ ▏▋▌▉▊▏▏▊▌▌▌▍▏▊▏▍ + ▋ ▏ ▋▏▏▏▌▋█ █▉████▉█▎▍▍▋▏ + ▊ ▌ ▋▊▎ ▊▋▎▋▋▏▎ + ▋▎▍▎▉▉▊ ▎▉▍▎▋▉▊▉ + ▎█▏▉▊█▉ ▌▏▎▎▊▉▉▉ ▋▌█ + ▍▊▌▉▉▊▎▎▎▎▎▊▉▉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_7.txt b/codex-rs/tui/frames/vbars/frame_7.txt new file mode 100644 index 0000000000..7a88d5ef14 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_7.txt @@ -0,0 +1,17 @@ + + ▎▋▏▌▉▉▌▌▉▊▎ + ▊▉▎▉▍▏▉▉▉▌▌▍▌ ▎▉▊ + ▉ ▊▏▏▏▉▎ ▎▍▏▎ ▉▋▎▉▊ + ▍▍▏▏▏▏▌▉ ▍▏▍▉▏▋▊ + ▎█▏▉▏▏▍▏▋▍▊ ▋ ▉▏▏▍ + ▏ ▌▏▏█ ▎█▍▌▏▍ ▊▊▏▏▏ + ▎▍█▏ ▍▎▏▍▏▍▏ ▉▉▍▏▏ + ▎█▋▏▏ ▌▉▋▏▉▏▎ █ ▏▏▏ + ▋█▏▉ ▊█▎▋▏▍▋▏▏▌▌▎▏▏▌▌▉▍▏▏ + ▏▊█▏▏▌▋▏▏▋█▏▋▍▏▏▍▍▊▌▊▌▍▏▍▏ + ▍ ▌▍▋▉▏▉▎▋ ▉▉▉▉▉▉██▎▋▏▏ + █▎ ▋▎▋▎▎ ▊█▊▋▌▋█ + █▌▊▉▍▍▍▎ ▊▍▏▊▉▋▉█ + ▍▎█▍▏▉▍▌▏▎▎▎▉▉▏▉▉▋ + █▏▉█▏▋▏▎▎▊▎▌▉▉ + \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_8.txt b/codex-rs/tui/frames/vbars/frame_8.txt new file mode 100644 index 0000000000..bbf2016fab --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_8.txt @@ -0,0 +1,17 @@ + + ▎▎▉▎▌▉▉▌▉▊▎ + ▊█▉▋▏▏▏▉▌▌ ▏ █▉ + ▎▏▌▊▏▋▋▉ ▊█▏▋▏▉▍▉▍▊ + ▎▉▍▉▋▏▊▉▏ █ ▌▍▏▏▍ + █ ▋▏▋▊▍▏▋▍ ▋█▍▏▏▊ + ▏█▊▏▍▍▍▎▍▏▎▉ ▍▉▏▏▏ + ▏▉▏▏▏ █▎▌▍▏▎▏ ▏▍▏▋▏▊ + ▍▊▏▏▋ ▏▉▍▋▏▊▉▋ ▋▎▋▏▏ + ▍ ▍▏▏▎▍ ▋▉▌▏▏▋▉▊▉▊▊▍▏▏▏ + ▍▉▋▌▎▏█▊▏▊▏▏▌▏▌▎▎▏▏▌█ + ▋▋▍▍▏▍▏▏▏▋█▍▉▍▉█▍▉█▋▍▏ + █▊█▏▍▏▎▎ ▋▊▋▋▋█ + █▍▎▉▍▍▍▎ ▎▋▍▎▏▉▋▉ + ▋▋█▏▊▉ ▌▌▉▉▌▋▌▊▏▎ + ▏▏▎▉▉▍▏▎▊▉▋▌▎ + ▎▎ \ No newline at end of file diff --git a/codex-rs/tui/frames/vbars/frame_9.txt b/codex-rs/tui/frames/vbars/frame_9.txt new file mode 100644 index 0000000000..4e36e6e126 --- /dev/null +++ b/codex-rs/tui/frames/vbars/frame_9.txt @@ -0,0 +1,17 @@ + + ▋▌▍▉▋▉▉▌▊ + ▋▉▎▋▏▏▉█▌ ▎▊▍▎ + ▋ ▊▏▏▋▉▍▍▌▋ ▍▎▏▊ + █ ▏▏▋▌▌▎ ▎▍▊▏▍▍▏▉▊ + ▋▉█▌▍▉█▏▉▊ ▉▋█▉▋▉▏▏ + ▏ ▏▏▏█▍▏▍▌▎▎ ▏█▏▉▏▏▏ + ▎ ▏▉▍▏▉▉▏▍▍▊█▋▊▋ ▎▏▏ + ▏ ▏▋▎▊▍▏▏▏▎▋▌▍▎▏ ▏▏ + █▊▏█ ▋▏█▏▏▏▏▉▏▏▊▏▏▎ + ▏▎▏▏▏▎▊▏▍▏▎▏▏▏▏▎▎▏▏▏ + █ ▎▍▋▍▍▏▋█▉▉▉▉▏▏█▋▍▏ + ▍▏▏▏▍▊▎ ▊▋ ▍▋▏▎ + ▍▉▍▏▍▍ ▋▌▎▌▏▋▉ + ▍▊█▍▎▏▉▋▉▌▌▌▉▏▎ + █▊▎ ▉▍▍▏▌▉▋█ + \ No newline at end of file diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index 5680c2265c..205986c916 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -14,6 +14,7 @@ use codex_core::config::Config; use codex_core::config::persist_model_selection; use codex_core::model_family::find_family_for_model; use codex_core::protocol::TokenUsage; +use codex_core::protocol_config_types::ReasoningEffort as ReasoningEffortConfig; use color_eyre::eyre::Result; use color_eyre::eyre::WrapErr; use crossterm::event::KeyCode; @@ -36,12 +37,11 @@ pub(crate) struct App { pub(crate) server: Arc, pub(crate) app_event_tx: AppEventSender, pub(crate) chat_widget: ChatWidget, + pub(crate) auth_manager: Arc, /// Config is stored here so we can recreate ChatWidgets as needed. pub(crate) config: Config, pub(crate) active_profile: Option, - model_saved_to_profile: bool, - model_saved_to_global: bool, pub(crate) file_search: FileSearchManager, @@ -88,6 +88,7 @@ impl App { initial_prompt: initial_prompt.clone(), initial_images: initial_images.clone(), enhanced_keys_supported, + auth_manager: auth_manager.clone(), }; ChatWidget::new(init, conversation_manager.clone()) } @@ -109,6 +110,7 @@ impl App { initial_prompt: initial_prompt.clone(), initial_images: initial_images.clone(), enhanced_keys_supported, + auth_manager: auth_manager.clone(), }; ChatWidget::new_from_existing( init, @@ -124,10 +126,9 @@ impl App { server: conversation_manager, app_event_tx, chat_widget, + auth_manager: auth_manager.clone(), config, active_profile, - model_saved_to_profile: false, - model_saved_to_global: false, file_search, enhanced_keys_supported, transcript_lines: Vec::new(), @@ -176,6 +177,7 @@ impl App { self.chat_widget.handle_paste(pasted); } TuiEvent::Draw => { + self.chat_widget.maybe_post_pending_notification(tui); if self .chat_widget .handle_paste_burst_tick(tui.frame_requester()) @@ -207,6 +209,7 @@ impl App { initial_prompt: None, initial_images: Vec::new(), enhanced_keys_supported: self.enhanced_keys_supported, + auth_manager: self.auth_manager.clone(), }; self.chat_widget = ChatWidget::new(init, self.server.clone()); tui.frame_requester().schedule_frame(); @@ -297,17 +300,46 @@ impl App { self.chat_widget.apply_file_search_result(query, matches); } AppEvent::UpdateReasoningEffort(effort) => { - self.chat_widget.set_reasoning_effort(effort); + self.on_update_reasoning_effort(effort); } AppEvent::UpdateModel(model) => { - self.chat_widget.set_model(model.clone()); + self.chat_widget.set_model(&model); self.config.model = model.clone(); if let Some(family) = find_family_for_model(&model) { self.config.model_family = family; } - self.model_saved_to_profile = false; - self.model_saved_to_global = false; - self.show_model_save_hint(); + } + AppEvent::PersistModelSelection { model, effort } => { + let profile = self.active_profile.as_deref(); + match persist_model_selection(&self.config.codex_home, profile, &model, effort) + .await + { + Ok(()) => { + if let Some(profile) = profile { + self.chat_widget.add_info_message( + format!("Model changed to {model} for {profile} profile"), + None, + ); + } else { + self.chat_widget + .add_info_message(format!("Model changed to {model}"), None); + } + } + Err(err) => { + tracing::error!( + error = %err, + "failed to persist model selection" + ); + if let Some(profile) = profile { + self.chat_widget.add_error_message(format!( + "Failed to save model for profile `{profile}`: {err}" + )); + } else { + self.chat_widget + .add_error_message(format!("Failed to save default model: {err}")); + } + } + } } AppEvent::UpdateAskForApprovalPolicy(policy) => { self.chat_widget.set_approval_policy(policy); @@ -323,90 +355,9 @@ impl App { self.chat_widget.token_usage() } - fn show_model_save_hint(&mut self) { - let model = self.config.model.clone(); - if self.active_profile.is_some() { - self.chat_widget.add_info_message(format!( - "Model switched to {model}. Press Ctrl+S to save it for this profile, then press Ctrl+S again to set it as your global default." - )); - } else { - self.chat_widget.add_info_message(format!( - "Model switched to {model}. Press Ctrl+S to save it as your global default." - )); - } - } - - async fn persist_model_shortcut(&mut self) { - enum SaveScope<'a> { - Profile(&'a str), - Global, - AlreadySaved, - } - - let scope = if let Some(profile) = self - .active_profile - .as_deref() - .filter(|_| !self.model_saved_to_profile) - { - SaveScope::Profile(profile) - } else if !self.model_saved_to_global { - SaveScope::Global - } else { - SaveScope::AlreadySaved - }; - - let model = self.config.model.clone(); - let effort = self.config.model_reasoning_effort; - let codex_home = self.config.codex_home.clone(); - - match scope { - SaveScope::Profile(profile) => { - match persist_model_selection(&codex_home, Some(profile), &model, Some(effort)) - .await - { - Ok(()) => { - self.model_saved_to_profile = true; - self.chat_widget.add_info_message(format!( - "Saved model {model} ({effort}) for profile `{profile}`. Press Ctrl+S again to make this your global default." - )); - } - Err(err) => { - tracing::error!( - error = %err, - "failed to persist model selection via shortcut" - ); - self.chat_widget.add_error_message(format!( - "Failed to save model preference for profile `{profile}`: {err}" - )); - } - } - } - SaveScope::Global => { - match persist_model_selection(&codex_home, None, &model, Some(effort)).await { - Ok(()) => { - self.model_saved_to_global = true; - self.chat_widget.add_info_message(format!( - "Saved model {model} ({effort}) as your global default." - )); - } - Err(err) => { - tracing::error!( - error = %err, - "failed to persist global model selection via shortcut" - ); - self.chat_widget.add_error_message(format!( - "Failed to save global model preference: {err}" - )); - } - } - } - SaveScope::AlreadySaved => { - self.chat_widget.add_info_message( - "Model preference already saved globally; no further action needed." - .to_string(), - ); - } - } + fn on_update_reasoning_effort(&mut self, effort: Option) { + self.chat_widget.set_reasoning_effort(effort); + self.config.model_reasoning_effort = effort; } async fn handle_key_event(&mut self, tui: &mut tui::Tui, key_event: KeyEvent) { @@ -422,14 +373,6 @@ impl App { self.overlay = Some(Overlay::new_transcript(self.transcript_lines.clone())); tui.frame_requester().schedule_frame(); } - KeyEvent { - code: KeyCode::Char('s'), - modifiers: crossterm::event::KeyModifiers::CONTROL, - kind: KeyEventKind::Press, - .. - } => { - self.persist_model_shortcut().await; - } // Esc primes/advances backtracking only in normal (not working) mode // with an empty composer. In any other state, forward Esc so the // active UI (e.g. status indicator, modals, popups) handles it. @@ -476,3 +419,65 @@ impl App { }; } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::app_backtrack::BacktrackState; + use crate::chatwidget::tests::make_chatwidget_manual_with_sender; + use crate::file_search::FileSearchManager; + use codex_core::AuthManager; + use codex_core::CodexAuth; + use codex_core::ConversationManager; + use ratatui::text::Line; + use std::sync::Arc; + use std::sync::atomic::AtomicBool; + + fn make_test_app() -> App { + let (chat_widget, app_event_tx, _rx, _op_rx) = make_chatwidget_manual_with_sender(); + let config = chat_widget.config_ref().clone(); + + let server = Arc::new(ConversationManager::with_auth(CodexAuth::from_api_key( + "Test API Key", + ))); + let auth_manager = + AuthManager::from_auth_for_testing(CodexAuth::from_api_key("Test API Key")); + let file_search = FileSearchManager::new(config.cwd.clone(), app_event_tx.clone()); + + App { + server, + app_event_tx, + chat_widget, + auth_manager, + config, + active_profile: None, + file_search, + transcript_lines: Vec::>::new(), + overlay: None, + deferred_history_lines: Vec::new(), + has_emitted_history_lines: false, + enhanced_keys_supported: false, + commit_anim_running: Arc::new(AtomicBool::new(false)), + backtrack: BacktrackState::default(), + } + } + + #[test] + fn update_reasoning_effort_updates_config() { + let mut app = make_test_app(); + app.config.model_reasoning_effort = Some(ReasoningEffortConfig::Medium); + app.chat_widget + .set_reasoning_effort(Some(ReasoningEffortConfig::Medium)); + + app.on_update_reasoning_effort(Some(ReasoningEffortConfig::High)); + + assert_eq!( + app.config.model_reasoning_effort, + Some(ReasoningEffortConfig::High) + ); + assert_eq!( + app.chat_widget.config_ref().model_reasoning_effort, + Some(ReasoningEffortConfig::High) + ); + } +} diff --git a/codex-rs/tui/src/app_backtrack.rs b/codex-rs/tui/src/app_backtrack.rs index d1765c1976..4e716c90ec 100644 --- a/codex-rs/tui/src/app_backtrack.rs +++ b/codex-rs/tui/src/app_backtrack.rs @@ -328,6 +328,7 @@ impl App { initial_prompt: None, initial_images: Vec::new(), enhanced_keys_supported: self.enhanced_keys_supported, + auth_manager: self.auth_manager.clone(), }; self.chat_widget = crate::chatwidget::ChatWidget::new_from_existing(init, conv, session_configured); diff --git a/codex-rs/tui/src/app_event.rs b/codex-rs/tui/src/app_event.rs index cbd6f3d8f0..41992cddcc 100644 --- a/codex-rs/tui/src/app_event.rs +++ b/codex-rs/tui/src/app_event.rs @@ -46,11 +46,17 @@ pub(crate) enum AppEvent { CommitTick, /// Update the current reasoning effort in the running app and widget. - UpdateReasoningEffort(ReasoningEffort), + UpdateReasoningEffort(Option), /// Update the current model slug in the running app and widget. UpdateModel(String), + /// Persist the selected model and reasoning effort to the appropriate config. + PersistModelSelection { + model: String, + effort: Option, + }, + /// Update the current approval policy in the running app and widget. UpdateAskForApprovalPolicy(AskForApproval), diff --git a/codex-rs/tui/src/bottom_pane/chat_composer.rs b/codex-rs/tui/src/bottom_pane/chat_composer.rs index 410701a629..bf11ff571d 100644 --- a/codex-rs/tui/src/bottom_pane/chat_composer.rs +++ b/codex-rs/tui/src/bottom_pane/chat_composer.rs @@ -38,6 +38,7 @@ use crate::bottom_pane::textarea::TextAreaState; use crate::clipboard_paste::normalize_pasted_path; use crate::clipboard_paste::pasted_image_format; use crate::key_hint; +use crate::ui_consts::LIVE_PREFIX_COLS; use codex_file_search::FileMatch; use std::cell::RefCell; use std::collections::HashMap; @@ -95,6 +96,10 @@ enum ActivePopup { File(FileSearchPopup), } +const FOOTER_HINT_HEIGHT: u16 = 1; +const FOOTER_SPACING_HEIGHT: u16 = 1; +const FOOTER_HEIGHT_WITH_HINT: u16 = FOOTER_HINT_HEIGHT + FOOTER_SPACING_HEIGHT; + impl ChatComposer { pub fn new( has_input_focus: bool, @@ -132,25 +137,30 @@ impl ChatComposer { } pub fn desired_height(&self, width: u16) -> u16 { - self.textarea.desired_height(width - 1) + // Leave 1 column for the left border and 1 column for left padding + self.textarea + .desired_height(width.saturating_sub(LIVE_PREFIX_COLS)) + match &self.active_popup { - ActivePopup::None => 1u16, - ActivePopup::Command(c) => c.calculate_required_height(), + ActivePopup::None => FOOTER_HEIGHT_WITH_HINT, + ActivePopup::Command(c) => c.calculate_required_height(width), ActivePopup::File(c) => c.calculate_required_height(), } } pub fn cursor_pos(&self, area: Rect) -> Option<(u16, u16)> { - let popup_height = match &self.active_popup { - ActivePopup::Command(popup) => popup.calculate_required_height(), - ActivePopup::File(popup) => popup.calculate_required_height(), - ActivePopup::None => 1, + let popup_constraint = match &self.active_popup { + ActivePopup::Command(popup) => { + Constraint::Max(popup.calculate_required_height(area.width)) + } + ActivePopup::File(popup) => Constraint::Max(popup.calculate_required_height()), + ActivePopup::None => Constraint::Max(FOOTER_HEIGHT_WITH_HINT), }; let [textarea_rect, _] = - Layout::vertical([Constraint::Min(1), Constraint::Max(popup_height)]).areas(area); + Layout::vertical([Constraint::Min(1), popup_constraint]).areas(area); let mut textarea_rect = textarea_rect; - textarea_rect.width = textarea_rect.width.saturating_sub(1); - textarea_rect.x += 1; + // Leave 1 for border and 1 for padding + textarea_rect.width = textarea_rect.width.saturating_sub(LIVE_PREFIX_COLS); + textarea_rect.x = textarea_rect.x.saturating_add(LIVE_PREFIX_COLS); let state = self.textarea_state.borrow(); self.textarea.cursor_pos_with_state(textarea_rect, &state) } @@ -1223,13 +1233,19 @@ impl ChatComposer { impl WidgetRef for ChatComposer { fn render_ref(&self, area: Rect, buf: &mut Buffer) { - let popup_height = match &self.active_popup { - ActivePopup::Command(popup) => popup.calculate_required_height(), - ActivePopup::File(popup) => popup.calculate_required_height(), - ActivePopup::None => 1, + let (popup_constraint, hint_spacing) = match &self.active_popup { + ActivePopup::Command(popup) => ( + Constraint::Max(popup.calculate_required_height(area.width)), + 0, + ), + ActivePopup::File(popup) => (Constraint::Max(popup.calculate_required_height()), 0), + ActivePopup::None => ( + Constraint::Length(FOOTER_HEIGHT_WITH_HINT), + FOOTER_SPACING_HEIGHT, + ), }; let [textarea_rect, popup_rect] = - Layout::vertical([Constraint::Min(1), Constraint::Max(popup_height)]).areas(area); + Layout::vertical([Constraint::Min(1), popup_constraint]).areas(area); match &self.active_popup { ActivePopup::Command(popup) => { popup.render_ref(popup_rect, buf); @@ -1238,7 +1254,16 @@ impl WidgetRef for ChatComposer { popup.render_ref(popup_rect, buf); } ActivePopup::None => { - let bottom_line_rect = popup_rect; + let hint_rect = if hint_spacing > 0 { + let [_, hint_rect] = Layout::vertical([ + Constraint::Length(hint_spacing), + Constraint::Length(FOOTER_HINT_HEIGHT), + ]) + .areas(popup_rect); + hint_rect + } else { + popup_rect + }; let mut hint: Vec> = if self.ctrl_c_quit_hint { let ctrl_c_followup = if self.is_task_running { " to interrupt" @@ -1258,7 +1283,6 @@ impl WidgetRef for ChatComposer { key_hint::ctrl('J') }; vec![ - " ".into(), key_hint::plain('⏎'), " send ".into(), newline_hint_key, @@ -1309,7 +1333,7 @@ impl WidgetRef for ChatComposer { Line::from(hint) .style(Style::default().dim()) - .render_ref(bottom_line_rect, buf); + .render_ref(hint_rect, buf); } } let border_style = if self.has_focus { @@ -1326,15 +1350,16 @@ impl WidgetRef for ChatComposer { buf, ); let mut textarea_rect = textarea_rect; - textarea_rect.width = textarea_rect.width.saturating_sub(1); - textarea_rect.x += 1; + // Leave 1 for border and 1 for padding + textarea_rect.width = textarea_rect.width.saturating_sub(LIVE_PREFIX_COLS); + textarea_rect.x = textarea_rect.x.saturating_add(LIVE_PREFIX_COLS); let mut state = self.textarea_state.borrow_mut(); StatefulWidgetRef::render_ref(&(&self.textarea), textarea_rect, buf, &mut state); if self.textarea.text().is_empty() { Line::from(self.placeholder_text.as_str()) .style(Style::default().dim()) - .render_ref(textarea_rect.inner(Margin::new(1, 0)), buf); + .render_ref(textarea_rect.inner(Margin::new(0, 0)), buf); } } } @@ -1344,6 +1369,7 @@ mod tests { use super::*; use image::ImageBuffer; use image::Rgba; + use pretty_assertions::assert_eq; use std::path::PathBuf; use tempfile::tempdir; @@ -1356,6 +1382,60 @@ mod tests { use crate::bottom_pane::textarea::TextArea; use tokio::sync::mpsc::unbounded_channel; + #[test] + fn footer_hint_row_is_separated_from_composer() { + let (tx, _rx) = unbounded_channel::(); + let sender = AppEventSender::new(tx); + let composer = ChatComposer::new( + true, + sender, + false, + "Ask Codex to do anything".to_string(), + false, + ); + + let area = Rect::new(0, 0, 40, 6); + let mut buf = Buffer::empty(area); + composer.render_ref(area, &mut buf); + + let row_to_string = |y: u16| { + let mut row = String::new(); + for x in 0..area.width { + row.push(buf[(x, y)].symbol().chars().next().unwrap_or(' ')); + } + row + }; + + let mut hint_row: Option<(u16, String)> = None; + for y in 0..area.height { + let row = row_to_string(y); + if row.contains(" send") { + hint_row = Some((y, row)); + break; + } + } + + let (hint_row_idx, hint_row_contents) = + hint_row.expect("expected footer hint row to be rendered"); + assert_eq!( + hint_row_idx, + area.height - 1, + "hint row should occupy the bottom line: {hint_row_contents:?}", + ); + + assert!( + hint_row_idx > 0, + "expected a spacing row above the footer hints", + ); + + let spacing_row = row_to_string(hint_row_idx - 1); + assert_eq!( + spacing_row.trim(), + "", + "expected blank spacing row above hints but saw: {spacing_row:?}", + ); + } + #[test] fn test_current_at_token_basic_cases() { let test_cases = vec![ diff --git a/codex-rs/tui/src/bottom_pane/command_popup.rs b/codex-rs/tui/src/bottom_pane/command_popup.rs index a5961e3188..8de266f819 100644 --- a/codex-rs/tui/src/bottom_pane/command_popup.rs +++ b/codex-rs/tui/src/bottom_pane/command_popup.rs @@ -92,10 +92,35 @@ impl CommandPopup { .ensure_visible(matches_len, MAX_POPUP_ROWS.min(matches_len)); } - /// Determine the preferred height of the popup. This is the number of - /// rows required to show at most MAX_POPUP_ROWS commands. - pub(crate) fn calculate_required_height(&self) -> u16 { - self.filtered_items().len().clamp(1, MAX_POPUP_ROWS) as u16 + /// Determine the preferred height of the popup for a given width. + /// Accounts for wrapped descriptions so that long tooltips don't overflow. + pub(crate) fn calculate_required_height(&self, width: u16) -> u16 { + use super::selection_popup_common::GenericDisplayRow; + use super::selection_popup_common::measure_rows_height; + let matches = self.filtered(); + let rows_all: Vec = if matches.is_empty() { + Vec::new() + } else { + matches + .into_iter() + .map(|(item, indices, _)| match item { + CommandItem::Builtin(cmd) => GenericDisplayRow { + name: format!("/{}", cmd.command()), + match_indices: indices.map(|v| v.into_iter().map(|i| i + 1).collect()), + is_current: false, + description: Some(cmd.description().to_string()), + }, + CommandItem::UserPrompt(i) => GenericDisplayRow { + name: format!("/{}", self.prompts[i].name), + match_indices: indices.map(|v| v.into_iter().map(|i| i + 1).collect()), + is_current: false, + description: Some("send saved prompt".to_string()), + }, + }) + .collect() + }; + + measure_rows_height(&rows_all, &self.state, MAX_POPUP_ROWS, width) } /// Compute fuzzy-filtered matches over built-in commands and user prompts, diff --git a/codex-rs/tui/src/bottom_pane/list_selection_view.rs b/codex-rs/tui/src/bottom_pane/list_selection_view.rs index 357639693b..5d5dbf0f33 100644 --- a/codex-rs/tui/src/bottom_pane/list_selection_view.rs +++ b/codex-rs/tui/src/bottom_pane/list_selection_view.rs @@ -17,6 +17,7 @@ use super::bottom_pane_view::BottomPaneView; use super::popup_consts::MAX_POPUP_ROWS; use super::scroll_state::ScrollState; use super::selection_popup_common::GenericDisplayRow; +use super::selection_popup_common::measure_rows_height; use super::selection_popup_common::render_rows; /// One selectable item in the generic selection list. @@ -135,13 +136,39 @@ impl BottomPaneView for ListSelectionView { CancellationEvent::Handled } - fn desired_height(&self, _width: u16) -> u16 { - let rows = (self.items.len()).clamp(1, MAX_POPUP_ROWS); - // +1 for the title row, +1 for optional subtitle, +1 for optional footer - let mut height = rows as u16 + 1; + fn desired_height(&self, width: u16) -> u16 { + // Measure wrapped height for up to MAX_POPUP_ROWS items at the given width. + // Build the same display rows used by the renderer so wrapping math matches. + let rows: Vec = self + .items + .iter() + .enumerate() + .map(|(i, it)| { + let is_selected = self.state.selected_idx == Some(i); + let prefix = if is_selected { '>' } else { ' ' }; + let name_with_marker = if it.is_current { + format!("{} (current)", it.name) + } else { + it.name.clone() + }; + let display_name = format!("{} {}. {}", prefix, i + 1, name_with_marker); + GenericDisplayRow { + name: display_name, + match_indices: None, + is_current: it.is_current, + description: it.description.clone(), + } + }) + .collect(); + + let rows_height = measure_rows_height(&rows, &self.state, MAX_POPUP_ROWS, width); + + // +1 for the title row, +1 for a spacer line beneath the header, + // +1 for optional subtitle, +1 for optional footer (2 lines incl. spacing) + let mut height = rows_height + 2; if self.subtitle.is_some() { - // +1 for subtitle, +1 for a blank spacer line beneath it - height = height.saturating_add(2); + // +1 for subtitle (the spacer is accounted for above) + height = height.saturating_add(1); } if self.footer_hint.is_some() { height = height.saturating_add(2); @@ -178,17 +205,18 @@ impl BottomPaneView for ListSelectionView { vec![Self::dim_prefix_span(), sub.clone().dim()]; let subtitle_para = Paragraph::new(Line::from(subtitle_spans)); subtitle_para.render(subtitle_area, buf); - // Render the extra spacer line with the dimmed prefix to align with title/subtitle - let spacer_area = Rect { - x: area.x, - y: next_y.saturating_add(1), - width: area.width, - height: 1, - }; - Self::render_dim_prefix_line(spacer_area, buf); - next_y = next_y.saturating_add(2); + next_y = next_y.saturating_add(1); } + let spacer_area = Rect { + x: area.x, + y: next_y, + width: area.width, + height: 1, + }; + Self::render_dim_prefix_line(spacer_area, buf); + next_y = next_y.saturating_add(1); + let footer_reserved = if self.footer_hint.is_some() { 2 } else { 0 }; let rows_area = Rect { x: area.x, @@ -245,3 +273,78 @@ impl BottomPaneView for ListSelectionView { } } } + +#[cfg(test)] +mod tests { + use super::BottomPaneView; + use super::*; + use crate::app_event::AppEvent; + use insta::assert_snapshot; + use ratatui::layout::Rect; + use tokio::sync::mpsc::unbounded_channel; + + fn make_selection_view(subtitle: Option<&str>) -> ListSelectionView { + let (tx_raw, _rx) = unbounded_channel::(); + let tx = AppEventSender::new(tx_raw); + let items = vec![ + SelectionItem { + name: "Read Only".to_string(), + description: Some("Codex can read files".to_string()), + is_current: true, + actions: vec![], + }, + SelectionItem { + name: "Full Access".to_string(), + description: Some("Codex can edit files".to_string()), + is_current: false, + actions: vec![], + }, + ]; + ListSelectionView::new( + "Select Approval Mode".to_string(), + subtitle.map(str::to_string), + Some("Press Enter to confirm or Esc to go back".to_string()), + items, + tx, + ) + } + + fn render_lines(view: &ListSelectionView) -> String { + let width = 48; + let height = BottomPaneView::desired_height(view, width); + let area = Rect::new(0, 0, width, height); + let mut buf = Buffer::empty(area); + view.render(area, &mut buf); + + let lines: Vec = (0..area.height) + .map(|row| { + let mut line = String::new(); + for col in 0..area.width { + let symbol = buf[(area.x + col, area.y + row)].symbol(); + if symbol.is_empty() { + line.push(' '); + } else { + line.push_str(symbol); + } + } + line + }) + .collect(); + lines.join("\n") + } + + #[test] + fn renders_blank_line_between_title_and_items_without_subtitle() { + let view = make_selection_view(None); + assert_snapshot!( + "list_selection_spacing_without_subtitle", + render_lines(&view) + ); + } + + #[test] + fn renders_blank_line_between_subtitle_and_items() { + let view = make_selection_view(Some("Switch between Codex approval presets")); + assert_snapshot!("list_selection_spacing_with_subtitle", render_lines(&view)); + } +} diff --git a/codex-rs/tui/src/bottom_pane/selection_popup_common.rs b/codex-rs/tui/src/bottom_pane/selection_popup_common.rs index 3852d10bc1..61a26f9341 100644 --- a/codex-rs/tui/src/bottom_pane/selection_popup_common.rs +++ b/codex-rs/tui/src/bottom_pane/selection_popup_common.rs @@ -1,6 +1,7 @@ use ratatui::buffer::Buffer; use ratatui::layout::Rect; -use ratatui::prelude::Constraint; +// Note: Table-based layout previously used Constraint; the manual renderer +// below no longer requires it. use ratatui::style::Color; use ratatui::style::Modifier; use ratatui::style::Style; @@ -10,9 +11,7 @@ use ratatui::text::Span; use ratatui::widgets::Block; use ratatui::widgets::BorderType; use ratatui::widgets::Borders; -use ratatui::widgets::Cell; -use ratatui::widgets::Row; -use ratatui::widgets::Table; +use ratatui::widgets::Paragraph; use ratatui::widgets::Widget; use super::scroll_state::ScrollState; @@ -27,6 +26,61 @@ pub(crate) struct GenericDisplayRow { impl GenericDisplayRow {} +/// Compute a shared description-column start based on the widest visible name +/// plus two spaces of padding. Ensures at least one column is left for the +/// description. +fn compute_desc_col( + rows_all: &[GenericDisplayRow], + start_idx: usize, + visible_items: usize, + content_width: u16, +) -> usize { + let visible_range = start_idx..(start_idx + visible_items); + let max_name_width = rows_all + .iter() + .enumerate() + .filter(|(i, _)| visible_range.contains(i)) + .map(|(_, r)| Line::from(r.name.clone()).width()) + .max() + .unwrap_or(0); + let mut desc_col = max_name_width.saturating_add(2); + if (desc_col as u16) >= content_width { + desc_col = content_width.saturating_sub(1) as usize; + } + desc_col +} + +/// Build the full display line for a row with the description padded to start +/// at `desc_col`. Applies fuzzy-match bolding when indices are present and +/// dims the description. +fn build_full_line(row: &GenericDisplayRow, desc_col: usize) -> Line<'static> { + let mut name_spans: Vec = Vec::with_capacity(row.name.len()); + if let Some(idxs) = row.match_indices.as_ref() { + let mut idx_iter = idxs.iter().peekable(); + for (char_idx, ch) in row.name.chars().enumerate() { + if idx_iter.peek().is_some_and(|next| **next == char_idx) { + idx_iter.next(); + name_spans.push(ch.to_string().bold()); + } else { + name_spans.push(ch.to_string().into()); + } + } + } else { + name_spans.push(row.name.clone().into()); + } + + let this_name_width = Line::from(name_spans.clone()).width(); + let mut full_spans: Vec = name_spans; + if let Some(desc) = row.description.as_ref() { + let gap = desc_col.saturating_sub(this_name_width); + if gap > 0 { + full_spans.push(" ".repeat(gap).into()); + } + full_spans.push(desc.clone().dim()); + } + Line::from(full_spans) +} + /// Render a list of rows using the provided ScrollState, with shared styling /// and behavior for selection popups. pub(crate) fn render_rows( @@ -38,84 +92,168 @@ pub(crate) fn render_rows( _dim_non_selected: bool, empty_message: &str, ) { - let mut rows: Vec = Vec::new(); + // Always draw a dim left border to match other popups. + let block = Block::default() + .borders(Borders::LEFT) + .border_type(BorderType::QuadrantOutside) + .border_style(Style::default().add_modifier(Modifier::DIM)); + block.render(area, buf); + + // Content renders to the right of the border. + let content_area = Rect { + x: area.x.saturating_add(1), + y: area.y, + width: area.width.saturating_sub(1), + height: area.height, + }; + if rows_all.is_empty() { - rows.push(Row::new(vec![Cell::from(Line::from( - empty_message.dim().italic(), - ))])); - } else { - let max_rows_from_area = area.height as usize; - let visible_rows = max_results - .min(rows_all.len()) - .min(max_rows_from_area.max(1)); - - // Compute starting index based on scroll state and selection. - let mut start_idx = state.scroll_top.min(rows_all.len().saturating_sub(1)); - if let Some(sel) = state.selected_idx { - if sel < start_idx { - start_idx = sel; - } else if visible_rows > 0 { - let bottom = start_idx + visible_rows - 1; - if sel > bottom { - start_idx = sel + 1 - visible_rows; - } - } + if content_area.height > 0 { + let para = Paragraph::new(Line::from(empty_message.dim().italic())); + para.render( + Rect { + x: content_area.x, + y: content_area.y, + width: content_area.width, + height: 1, + }, + buf, + ); } + return; + } - for (i, row) in rows_all - .iter() - .enumerate() - .skip(start_idx) - .take(visible_rows) - { - let GenericDisplayRow { - name, - match_indices, - is_current: _is_current, - description, - } = row; + // Determine which logical rows (items) are visible given the selection and + // the max_results clamp. Scrolling is still item-based for simplicity. + let max_rows_from_area = content_area.height as usize; + let visible_items = max_results + .min(rows_all.len()) + .min(max_rows_from_area.max(1)); - // Highlight fuzzy indices when present. - let mut spans: Vec = Vec::with_capacity(name.len()); - if let Some(idxs) = match_indices.as_ref() { - let mut idx_iter = idxs.iter().peekable(); - for (char_idx, ch) in name.chars().enumerate() { - if idx_iter.peek().is_some_and(|next| **next == char_idx) { - idx_iter.next(); - spans.push(ch.to_string().bold()); - } else { - spans.push(ch.to_string().into()); - } - } - } else { - spans.push(name.clone().into()); + let mut start_idx = state.scroll_top.min(rows_all.len().saturating_sub(1)); + if let Some(sel) = state.selected_idx { + if sel < start_idx { + start_idx = sel; + } else if visible_items > 0 { + let bottom = start_idx + visible_items - 1; + if sel > bottom { + start_idx = sel + 1 - visible_items; } - - if let Some(desc) = description.as_ref() { - spans.push(" ".into()); - spans.push(desc.clone().dim()); - } - - let mut cell = Cell::from(Line::from(spans)); - if Some(i) == state.selected_idx { - cell = cell.style( - Style::default() - .fg(Color::Cyan) - .add_modifier(Modifier::BOLD), - ); - } - rows.push(Row::new(vec![cell])); } } - let table = Table::new(rows, vec![Constraint::Percentage(100)]) - .block( - Block::default() - .borders(Borders::LEFT) - .border_type(BorderType::QuadrantOutside) - .border_style(Style::default().add_modifier(Modifier::DIM)), - ) - .widths([Constraint::Percentage(100)]); + let desc_col = compute_desc_col(rows_all, start_idx, visible_items, content_area.width); - table.render(area, buf); + // Render items, wrapping descriptions and aligning wrapped lines under the + // shared description column. Stop when we run out of vertical space. + let mut cur_y = content_area.y; + for (i, row) in rows_all + .iter() + .enumerate() + .skip(start_idx) + .take(visible_items) + { + if cur_y >= content_area.y + content_area.height { + break; + } + + let GenericDisplayRow { + name, + match_indices, + is_current: _is_current, + description, + } = row; + + let full_line = build_full_line( + &GenericDisplayRow { + name: name.clone(), + match_indices: match_indices.clone(), + is_current: *_is_current, + description: description.clone(), + }, + desc_col, + ); + + // Wrap with subsequent indent aligned to the description column. + use crate::wrapping::RtOptions; + use crate::wrapping::word_wrap_line; + let options = RtOptions::new(content_area.width as usize) + .initial_indent(Line::from("")) + .subsequent_indent(Line::from(" ".repeat(desc_col))); + let wrapped = word_wrap_line(&full_line, options); + + // Render the wrapped lines. + for mut line in wrapped { + if cur_y >= content_area.y + content_area.height { + break; + } + if Some(i) == state.selected_idx { + // Match previous behavior: cyan + bold for the selected row. + line.style = Style::default() + .fg(Color::Cyan) + .add_modifier(Modifier::BOLD); + } + let para = Paragraph::new(line); + para.render( + Rect { + x: content_area.x, + y: cur_y, + width: content_area.width, + height: 1, + }, + buf, + ); + cur_y = cur_y.saturating_add(1); + } + } +} + +/// Compute the number of terminal rows required to render up to `max_results` +/// items from `rows_all` given the current scroll/selection state and the +/// available `width`. Accounts for description wrapping and alignment so the +/// caller can allocate sufficient vertical space. +pub(crate) fn measure_rows_height( + rows_all: &[GenericDisplayRow], + state: &ScrollState, + max_results: usize, + width: u16, +) -> u16 { + if rows_all.is_empty() { + return 1; // placeholder "no matches" line + } + + let content_width = width.saturating_sub(1).max(1); + + let visible_items = max_results.min(rows_all.len()); + let mut start_idx = state.scroll_top.min(rows_all.len().saturating_sub(1)); + if let Some(sel) = state.selected_idx { + if sel < start_idx { + start_idx = sel; + } else if visible_items > 0 { + let bottom = start_idx + visible_items - 1; + if sel > bottom { + start_idx = sel + 1 - visible_items; + } + } + } + + let desc_col = compute_desc_col(rows_all, start_idx, visible_items, content_width); + + use crate::wrapping::RtOptions; + use crate::wrapping::word_wrap_line; + let mut total: u16 = 0; + for row in rows_all + .iter() + .enumerate() + .skip(start_idx) + .take(visible_items) + .map(|(_, r)| r) + { + let full_line = build_full_line(row, desc_col); + let opts = RtOptions::new(content_width as usize) + .initial_indent(Line::from("")) + .subsequent_indent(Line::from(" ".repeat(desc_col))); + total = total.saturating_add(word_wrap_line(&full_line, opts).len() as u16); + } + total.max(1) } diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__backspace_after_pastes.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__backspace_after_pastes.snap index 0c278fd7f7..c9f5cb9720 100644 --- a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__backspace_after_pastes.snap +++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__backspace_after_pastes.snap @@ -2,7 +2,7 @@ source: tui/src/bottom_pane/chat_composer.rs expression: terminal.backend() --- -"▌[Pasted Content 1002 chars][Pasted Content 1004 chars] " +"▌ [Pasted Content 1002 chars][Pasted Content 1004 chars] " "▌ " "▌ " "▌ " @@ -10,5 +10,5 @@ expression: terminal.backend() "▌ " "▌ " "▌ " -"▌ " -" ⏎ send ⌃J newline ⌃T transcript ⌃C quit " +" " +"⏎ send ⌃J newline ⌃T transcript ⌃C quit " diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__empty.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__empty.snap index c61924854f..823a41cf62 100644 --- a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__empty.snap +++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__empty.snap @@ -10,5 +10,5 @@ expression: terminal.backend() "▌ " "▌ " "▌ " -"▌ " -" ⏎ send ⌃J newline ⌃T transcript ⌃C quit " +" " +"⏎ send ⌃J newline ⌃T transcript ⌃C quit " diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__large.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__large.snap index 1660bb49c3..d89c4033de 100644 --- a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__large.snap +++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__large.snap @@ -2,7 +2,7 @@ source: tui/src/bottom_pane/chat_composer.rs expression: terminal.backend() --- -"▌[Pasted Content 1005 chars] " +"▌ [Pasted Content 1005 chars] " "▌ " "▌ " "▌ " @@ -10,5 +10,5 @@ expression: terminal.backend() "▌ " "▌ " "▌ " -"▌ " -" ⏎ send ⌃J newline ⌃T transcript ⌃C quit " +" " +"⏎ send ⌃J newline ⌃T transcript ⌃C quit " diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__multiple_pastes.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__multiple_pastes.snap index 21869a0758..636d5c22af 100644 --- a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__multiple_pastes.snap +++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__multiple_pastes.snap @@ -2,7 +2,7 @@ source: tui/src/bottom_pane/chat_composer.rs expression: terminal.backend() --- -"▌[Pasted Content 1003 chars][Pasted Content 1007 chars] another short paste " +"▌ [Pasted Content 1003 chars][Pasted Content 1007 chars] another short paste " "▌ " "▌ " "▌ " @@ -10,5 +10,5 @@ expression: terminal.backend() "▌ " "▌ " "▌ " -"▌ " -" ⏎ send ⌃J newline ⌃T transcript ⌃C quit " +" " +"⏎ send ⌃J newline ⌃T transcript ⌃C quit " diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__slash_popup_mo.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__slash_popup_mo.snap index 63f9b3a964..f908fb6144 100644 --- a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__slash_popup_mo.snap +++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__slash_popup_mo.snap @@ -2,7 +2,7 @@ source: tui/src/bottom_pane/chat_composer.rs expression: terminal.backend() --- -"▌/mo " +"▌ /mo " "▌ " -"▌/model choose what model and reasoning effort to use " +"▌/model choose what model and reasoning effort to use " "▌/mention mention a file " diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__small.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__small.snap index 1f25731722..111e45b65b 100644 --- a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__small.snap +++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__chat_composer__tests__small.snap @@ -2,7 +2,7 @@ source: tui/src/bottom_pane/chat_composer.rs expression: terminal.backend() --- -"▌short " +"▌ short " "▌ " "▌ " "▌ " @@ -10,5 +10,5 @@ expression: terminal.backend() "▌ " "▌ " "▌ " -"▌ " -" ⏎ send ⌃J newline ⌃T transcript ⌃C quit " +" " +"⏎ send ⌃J newline ⌃T transcript ⌃C quit " diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__list_selection_view__tests__list_selection_spacing_with_subtitle.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__list_selection_view__tests__list_selection_spacing_with_subtitle.snap new file mode 100644 index 0000000000..65606ed7d0 --- /dev/null +++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__list_selection_view__tests__list_selection_spacing_with_subtitle.snap @@ -0,0 +1,11 @@ +--- +source: tui/src/bottom_pane/list_selection_view.rs +expression: render_lines(&view) +--- +▌ Select Approval Mode +▌ Switch between Codex approval presets +▌ +▌> 1. Read Only (current) Codex can read files +▌ 2. Full Access Codex can edit files + +Press Enter to confirm or Esc to go back diff --git a/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__list_selection_view__tests__list_selection_spacing_without_subtitle.snap b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__list_selection_view__tests__list_selection_spacing_without_subtitle.snap new file mode 100644 index 0000000000..b42a5f8c6b --- /dev/null +++ b/codex-rs/tui/src/bottom_pane/snapshots/codex_tui__bottom_pane__list_selection_view__tests__list_selection_spacing_without_subtitle.snap @@ -0,0 +1,10 @@ +--- +source: tui/src/bottom_pane/list_selection_view.rs +expression: render_lines(&view) +--- +▌ Select Approval Mode +▌ +▌> 1. Read Only (current) Codex can read files +▌ 2. Full Access Codex can edit files + +Press Enter to confirm or Esc to go back diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index f9987a68b3..c03e7d3bc5 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -4,6 +4,7 @@ use std::path::PathBuf; use std::sync::Arc; use codex_core::config::Config; +use codex_core::config_types::Notifications; use codex_core::protocol::AgentMessageDeltaEvent; use codex_core::protocol::AgentMessageEvent; use codex_core::protocol::AgentReasoningDeltaEvent; @@ -59,6 +60,7 @@ use crate::bottom_pane::InputResult; use crate::bottom_pane::SelectionAction; use crate::bottom_pane::SelectionItem; use crate::clipboard_paste::paste_image_to_temp_png; +use crate::diff_render::display_path_for; use crate::get_git_diff::get_git_diff; use crate::history_cell; use crate::history_cell::CommandOutput; @@ -66,6 +68,7 @@ use crate::history_cell::ExecCell; use crate::history_cell::HistoryCell; use crate::history_cell::PatchEventType; use crate::slash_command::SlashCommand; +use crate::text_formatting::truncate_text; use crate::tui::FrameRequester; // streaming internals are provided by crate::streaming and crate::markdown_stream use crate::user_approval_widget::ApprovalRequest; @@ -74,12 +77,15 @@ use self::interrupts::InterruptManager; mod agent; use self::agent::spawn_agent; use self::agent::spawn_agent_from_existing; +mod session_header; +use self::session_header::SessionHeader; use crate::streaming::controller::AppEventHistorySink; use crate::streaming::controller::StreamController; use codex_common::approval_presets::ApprovalPreset; use codex_common::approval_presets::builtin_approval_presets; use codex_common::model_presets::ModelPreset; use codex_common::model_presets::builtin_model_presets; +use codex_core::AuthManager; use codex_core::ConversationManager; use codex_core::protocol::AskForApproval; use codex_core::protocol::SandboxPolicy; @@ -101,6 +107,7 @@ pub(crate) struct ChatWidgetInit { pub(crate) initial_prompt: Option, pub(crate) initial_images: Vec, pub(crate) enhanced_keys_supported: bool, + pub(crate) auth_manager: Arc, } pub(crate) struct ChatWidget { @@ -109,6 +116,8 @@ pub(crate) struct ChatWidget { bottom_pane: BottomPane, active_exec_cell: Option, config: Config, + auth_manager: Arc, + session_header: SessionHeader, initial_user_message: Option, token_info: Option, // Stream lifecycle controller @@ -130,6 +139,8 @@ pub(crate) struct ChatWidget { suppress_session_configured_redraw: bool, // User messages queued while a turn is in progress queued_user_messages: VecDeque, + // Pending notification to show when unfocused on next Draw + pending_notification: Option, } struct UserMessage { @@ -165,14 +176,16 @@ impl ChatWidget { .set_history_metadata(event.history_log_id, event.history_entry_count); self.conversation_id = Some(event.session_id); let initial_messages = event.initial_messages.clone(); - if let Some(messages) = initial_messages { - self.replay_initial_messages(messages); - } + let model_for_header = event.model.clone(); + self.session_header.set_model(&model_for_header); self.add_to_history(history_cell::new_session_info( &self.config, event, self.show_welcome_banner, )); + if let Some(messages) = initial_messages { + self.replay_initial_messages(messages); + } // Ask codex-core to enumerate custom prompts for this session. self.submit_op(Op::ListCustomPrompts); if let Some(user_message) = self.initial_user_message.take() { @@ -257,6 +270,8 @@ impl ChatWidget { // If there is a queued user message, send exactly one now to begin the next turn. self.maybe_send_next_queued_input(); + // Emit a notification when the turn completes (suppressed if focused). + self.notify(Notification::AgentTurnComplete); } pub(crate) fn set_token_info(&mut self, info: Option) { @@ -289,7 +304,9 @@ impl ChatWidget { /// separated by newlines rather than auto‑submitting the next one. fn on_interrupted_turn(&mut self) { // Finalize, log a gentle prompt, and clear running state. - self.finalize_turn_with_error_message("Tell the model what to do differently".to_owned()); + self.finalize_turn_with_error_message( + "Conversation interrupted - tell the model what to do differently".to_owned(), + ); // If any messages were queued during the task, restore them into the composer. if !self.queued_user_messages.is_empty() { @@ -521,6 +538,9 @@ impl ChatWidget { self.flush_answer_stream_with_separator(); // Emit the proposed command into history (like proposed patches) self.add_to_history(history_cell::new_proposed_command(&ev.command)); + let command = shlex::try_join(ev.command.iter().map(|s| s.as_str())) + .unwrap_or_else(|_| ev.command.join(" ")); + self.notify(Notification::ExecApprovalRequested { command }); let request = ApprovalRequest::Exec { id, @@ -550,6 +570,10 @@ impl ChatWidget { }; self.bottom_pane.push_approval_request(request); self.request_redraw(); + self.notify(Notification::EditApprovalRequested { + cwd: self.config.cwd.clone(), + changes: ev.changes.keys().cloned().collect(), + }); } pub(crate) fn handle_exec_begin_now(&mut self, ev: ExecCommandBeginEvent) { @@ -607,14 +631,23 @@ impl ChatWidget { )); } - fn layout_areas(&self, area: Rect) -> [Rect; 2] { + fn layout_areas(&self, area: Rect) -> [Rect; 3] { + let bottom_min = self.bottom_pane.desired_height(area.width).min(area.height); + let remaining = area.height.saturating_sub(bottom_min); + + let active_desired = self + .active_exec_cell + .as_ref() + .map_or(0, |c| c.desired_height(area.width) + 1); + let active_height = active_desired.min(remaining); + // Note: no header area; remaining is not used beyond computing active height. + + let header_height = 0u16; + Layout::vertical([ - Constraint::Max( - self.active_exec_cell - .as_ref() - .map_or(0, |c| c.desired_height(area.width) + 1), - ), - Constraint::Min(self.bottom_pane.desired_height(area.width)), + Constraint::Length(header_height), + Constraint::Length(active_height), + Constraint::Min(bottom_min), ]) .areas(area) } @@ -630,6 +663,7 @@ impl ChatWidget { initial_prompt, initial_images, enhanced_keys_supported, + auth_manager, } = common; let mut rng = rand::rng(); let placeholder = EXAMPLE_PROMPTS[rng.random_range(0..EXAMPLE_PROMPTS.len())].to_string(); @@ -649,6 +683,8 @@ impl ChatWidget { }), active_exec_cell: None, config: config.clone(), + auth_manager, + session_header: SessionHeader::new(config.model.clone()), initial_user_message: create_initial_user_message( initial_prompt.unwrap_or_default(), initial_images, @@ -664,6 +700,7 @@ impl ChatWidget { queued_user_messages: VecDeque::new(), show_welcome_banner: true, suppress_session_configured_redraw: false, + pending_notification: None, } } @@ -680,6 +717,7 @@ impl ChatWidget { initial_prompt, initial_images, enhanced_keys_supported, + auth_manager, } = common; let mut rng = rand::rng(); let placeholder = EXAMPLE_PROMPTS[rng.random_range(0..EXAMPLE_PROMPTS.len())].to_string(); @@ -701,6 +739,8 @@ impl ChatWidget { }), active_exec_cell: None, config: config.clone(), + auth_manager, + session_header: SessionHeader::new(config.model.clone()), initial_user_message: create_initial_user_message( initial_prompt.unwrap_or_default(), initial_images, @@ -714,8 +754,9 @@ impl ChatWidget { full_reasoning_buffer: String::new(), conversation_id: None, queued_user_messages: VecDeque::new(), - show_welcome_banner: false, + show_welcome_banner: true, suppress_session_configured_redraw: true, + pending_notification: None, } } @@ -1035,8 +1076,9 @@ impl ChatWidget { | EventMsg::AgentReasoningRawContentDelta(AgentReasoningRawContentDeltaEvent { delta, }) => self.on_agent_reasoning_delta(delta), - EventMsg::AgentReasoning(AgentReasoningEvent { .. }) - | EventMsg::AgentReasoningRawContent(AgentReasoningRawContentEvent { .. }) => { + EventMsg::AgentReasoning(AgentReasoningEvent { .. }) => self.on_agent_reasoning_final(), + EventMsg::AgentReasoningRawContent(AgentReasoningRawContentEvent { text }) => { + self.on_agent_reasoning_delta(text); self.on_agent_reasoning_final() } EventMsg::AgentReasoningSectionBreak(_) => self.on_reasoning_section_break(), @@ -1087,6 +1129,8 @@ impl ChatWidget { self.app_event_tx .send(crate::app_event::AppEvent::ConversationHistory(ev)); } + EventMsg::EnteredReviewMode(_) => {} + EventMsg::ExitedReviewMode(_) => {} } } @@ -1109,6 +1153,20 @@ impl ChatWidget { self.frame_requester.schedule_frame(); } + fn notify(&mut self, notification: Notification) { + if !notification.allowed_for(&self.config.tui_notifications) { + return; + } + self.pending_notification = Some(notification); + self.request_redraw(); + } + + pub(crate) fn maybe_post_pending_notification(&mut self, tui: &mut crate::tui::Tui) { + if let Some(notif) = self.pending_notification.take() { + tui.notify(notif.display()); + } + } + /// Mark the active exec cell as failed (✗) and flush it into history. fn finalize_active_exec_cell_as_failed(&mut self) { if let Some(cell) = self.active_exec_cell.take() { @@ -1167,7 +1225,8 @@ impl ChatWidget { pub(crate) fn open_model_popup(&mut self) { let current_model = self.config.model.clone(); let current_effort = self.config.model_reasoning_effort; - let presets: &[ModelPreset] = builtin_model_presets(); + let auth_mode = self.auth_manager.auth().map(|auth| auth.mode); + let presets: Vec = builtin_model_presets(auth_mode); let mut items: Vec = Vec::new(); for preset in presets.iter() { @@ -1188,12 +1247,20 @@ impl ChatWidget { })); tx.send(AppEvent::UpdateModel(model_slug.clone())); tx.send(AppEvent::UpdateReasoningEffort(effort)); + tx.send(AppEvent::PersistModelSelection { + model: model_slug.clone(), + effort, + }); tracing::info!( "New model: {}, New effort: {}, Current model: {}, Current effort: {}", model_slug.clone(), - effort, + effort + .map(|effort| effort.to_string()) + .unwrap_or_else(|| "none".to_string()), current_model, current_effort + .map(|effort| effort.to_string()) + .unwrap_or_else(|| "none".to_string()) ); })]; items.push(SelectionItem { @@ -1207,7 +1274,7 @@ impl ChatWidget { self.bottom_pane.show_selection_view( "Select model and reasoning level".to_string(), Some("Switch between OpenAI models for this and future Codex CLI session".to_string()), - Some("Press Enter to confirm, Esc to go back, Ctrl+S to save".to_string()), + Some("Press Enter to confirm or Esc to go back".to_string()), items, ); } @@ -1264,17 +1331,18 @@ impl ChatWidget { } /// Set the reasoning effort in the widget's config copy. - pub(crate) fn set_reasoning_effort(&mut self, effort: ReasoningEffortConfig) { + pub(crate) fn set_reasoning_effort(&mut self, effort: Option) { self.config.model_reasoning_effort = effort; } /// Set the model in the widget's config copy. - pub(crate) fn set_model(&mut self, model: String) { - self.config.model = model; + pub(crate) fn set_model(&mut self, model: &str) { + self.session_header.set_model(model); + self.config.model = model.to_string(); } - pub(crate) fn add_info_message(&mut self, message: String) { - self.add_to_history(history_cell::new_info_event(message)); + pub(crate) fn add_info_message(&mut self, message: String, hint: Option) { + self.add_to_history(history_cell::new_info_event(message, hint)); self.request_redraw(); } @@ -1391,14 +1459,14 @@ impl ChatWidget { } pub fn cursor_pos(&self, area: Rect) -> Option<(u16, u16)> { - let [_, bottom_pane_area] = self.layout_areas(area); + let [_, _, bottom_pane_area] = self.layout_areas(area); self.bottom_pane.cursor_pos(bottom_pane_area) } } impl WidgetRef for &ChatWidget { fn render_ref(&self, area: Rect, buf: &mut Buffer) { - let [active_cell_area, bottom_pane_area] = self.layout_areas(area); + let [_, active_cell_area, bottom_pane_area] = self.layout_areas(area); (&self.bottom_pane).render(bottom_pane_area, buf); if !active_cell_area.is_empty() && let Some(cell) = &self.active_exec_cell @@ -1411,6 +1479,49 @@ impl WidgetRef for &ChatWidget { } } +enum Notification { + AgentTurnComplete, + ExecApprovalRequested { command: String }, + EditApprovalRequested { cwd: PathBuf, changes: Vec }, +} + +impl Notification { + fn display(&self) -> String { + match self { + Notification::AgentTurnComplete => "Agent turn complete".to_string(), + Notification::ExecApprovalRequested { command } => { + format!("Approval requested: {}", truncate_text(command, 30)) + } + Notification::EditApprovalRequested { cwd, changes } => { + format!( + "Codex wants to edit {}", + if changes.len() == 1 { + #[allow(clippy::unwrap_used)] + display_path_for(changes.first().unwrap(), cwd) + } else { + format!("{} files", changes.len()) + } + ) + } + } + } + + fn type_name(&self) -> &str { + match self { + Notification::AgentTurnComplete => "agent-turn-complete", + Notification::ExecApprovalRequested { .. } + | Notification::EditApprovalRequested { .. } => "approval-requested", + } + } + + fn allowed_for(&self, settings: &Notifications) -> bool { + match settings { + Notifications::Enabled(enabled) => *enabled, + Notifications::Custom(allowed) => allowed.iter().any(|a| a == self.type_name()), + } + } +} + const EXAMPLE_PROMPTS: [&str; 6] = [ "Explain this codebase", "Summarize recent commits", @@ -1451,4 +1562,4 @@ fn extract_first_bold(s: &str) -> Option { } #[cfg(test)] -mod tests; +pub(crate) mod tests; diff --git a/codex-rs/tui/src/chatwidget/session_header.rs b/codex-rs/tui/src/chatwidget/session_header.rs new file mode 100644 index 0000000000..32e31b6682 --- /dev/null +++ b/codex-rs/tui/src/chatwidget/session_header.rs @@ -0,0 +1,16 @@ +pub(crate) struct SessionHeader { + model: String, +} + +impl SessionHeader { + pub(crate) fn new(model: String) -> Self { + Self { model } + } + + /// Updates the header's model text. + pub(crate) fn set_model(&mut self, model: &str) { + if self.model != model { + self.model = model.to_string(); + } + } +} diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_exec.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_exec.snap index f306381f4a..6087853902 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_exec.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_exec.snap @@ -1,6 +1,5 @@ --- source: tui/src/chatwidget/tests.rs -assertion_line: 728 expression: terminal.backend() --- " " diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_patch.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_patch.snap index 0b9b10f309..183a295063 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_patch.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__approval_modal_patch.snap @@ -1,6 +1,5 @@ --- source: tui/src/chatwidget/tests.rs -assertion_line: 794 expression: terminal.backend() --- " " diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h2.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h2.snap index 41f43babf0..48e6154eb2 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h2.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_idle_h2.snap @@ -3,4 +3,4 @@ source: tui/src/chatwidget/tests.rs expression: terminal.backend() --- "▌ Ask Codex to do anything " -" ⏎ send ⌃J newline ⌃T transcript ⌃" +" " diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h2.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h2.snap index f509728658..917f012603 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h2.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chat_small_running_h2.snap @@ -2,5 +2,5 @@ source: tui/src/chatwidget/tests.rs expression: terminal.backend() --- -" Thinking (0s • Esc to interrupt) " +" Thinking (0s • Esc to interrupt) " "▌ Ask Codex to do anything " diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chatwidget_exec_and_status_layout_vt100_snapshot.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chatwidget_exec_and_status_layout_vt100_snapshot.snap index c6d5b00291..9a2859046a 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chatwidget_exec_and_status_layout_vt100_snapshot.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__chatwidget_exec_and_status_layout_vt100_snapshot.snap @@ -9,7 +9,8 @@ expression: visual └ Search Change Approved Read diff_render.rs - Investigating rendering code (0s • Esc to interrupt) + Investigating rendering code (0s • Esc to interrupt) -▌Summarize recent commits - ⏎ send ⌃J newline ⌃T transcript ⌃C quit +▌ Summarize recent commits + +⏎ send ⌃J newline ⌃T transcript ⌃C quit diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__disabled_slash_command_while_task_running_snapshot.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__disabled_slash_command_while_task_running_snapshot.snap index 52b6807b4d..e8f08a437a 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__disabled_slash_command_while_task_running_snapshot.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__disabled_slash_command_while_task_running_snapshot.snap @@ -2,4 +2,4 @@ source: tui/src/chatwidget/tests.rs expression: blob --- -🖐  '/model' is disabled while a task is in progress. +■ '/model' is disabled while a task is in progress. diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_active.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_active.snap index 088b43a74d..e28659e2aa 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_active.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_active.snap @@ -3,8 +3,9 @@ source: tui/src/chatwidget/tests.rs expression: terminal.backend() --- " " -" Analyzing (0s • Esc to interrupt) " +" Analyzing (0s • Esc to interrupt) " " " "▌ Ask Codex to do anything " -" ⏎ send ⌃J newline ⌃T transcript ⌃C quit " +" " +"⏎ send ⌃J newline ⌃T transcript ⌃C quit " " " diff --git a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_and_approval_modal.snap b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_and_approval_modal.snap index 63fb213e1b..6087853902 100644 --- a/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_and_approval_modal.snap +++ b/codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__status_widget_and_approval_modal.snap @@ -1,6 +1,5 @@ --- source: tui/src/chatwidget/tests.rs -assertion_line: 921 expression: terminal.backend() --- " " diff --git a/codex-rs/tui/src/chatwidget/tests.rs b/codex-rs/tui/src/chatwidget/tests.rs index dc1da26eb4..fb4ea5e888 100644 --- a/codex-rs/tui/src/chatwidget/tests.rs +++ b/codex-rs/tui/src/chatwidget/tests.rs @@ -1,6 +1,7 @@ use super::*; use crate::app_event::AppEvent; use crate::app_event_sender::AppEventSender; +use codex_core::AuthManager; use codex_core::CodexAuth; use codex_core::config::Config; use codex_core::config::ConfigOverrides; @@ -79,7 +80,9 @@ fn final_answer_without_newline_is_flushed_immediately() { // Set up a VT100 test terminal to capture ANSI visual output let width: u16 = 80; - let height: u16 = 2000; + // Increased height to keep the initial banner/help lines in view even if + // the session renders an extra header line or minor layout changes occur. + let height: u16 = 2500; let viewport = Rect::new(0, height - 1, width, 1); let backend = ratatui::backend::TestBackend::new(width, height); let mut terminal = crate::custom_terminal::Terminal::with_options(backend) @@ -138,7 +141,7 @@ fn resumed_initial_messages_render_history() { let configured = codex_core::protocol::SessionConfiguredEvent { session_id: conversation_id, model: "test-model".to_string(), - reasoning_effort: ReasoningEffortConfig::default(), + reasoning_effort: Some(ReasoningEffortConfig::default()), history_log_id: 0, history_entry_count: 0, initial_messages: Some(vec![ @@ -193,6 +196,7 @@ async fn helpers_are_available_and_do_not_panic() { let conversation_manager = Arc::new(ConversationManager::with_auth(CodexAuth::from_api_key( "test", ))); + let auth_manager = AuthManager::from_auth_for_testing(CodexAuth::from_api_key("test")); let init = ChatWidgetInit { config: cfg, frame_requester: FrameRequester::test_dummy(), @@ -200,6 +204,7 @@ async fn helpers_are_available_and_do_not_panic() { initial_prompt: None, initial_images: Vec::new(), enhanced_keys_supported: false, + auth_manager, }; let mut w = ChatWidget::new(init, conversation_manager); // Basic construction sanity. @@ -224,12 +229,15 @@ fn make_chatwidget_manual() -> ( placeholder_text: "Ask Codex to do anything".to_string(), disable_paste_burst: false, }); + let auth_manager = AuthManager::from_auth_for_testing(CodexAuth::from_api_key("test")); let widget = ChatWidget { app_event_tx, codex_op_tx: op_tx, bottom_pane: bottom, active_exec_cell: None, config: cfg.clone(), + auth_manager, + session_header: SessionHeader::new(cfg.model.clone()), initial_user_message: None, token_info: None, stream: StreamController::new(cfg), @@ -243,10 +251,22 @@ fn make_chatwidget_manual() -> ( show_welcome_banner: true, queued_user_messages: VecDeque::new(), suppress_session_configured_redraw: false, + pending_notification: None, }; (widget, rx, op_rx) } +pub(crate) fn make_chatwidget_manual_with_sender() -> ( + ChatWidget, + AppEventSender, + tokio::sync::mpsc::UnboundedReceiver, + tokio::sync::mpsc::UnboundedReceiver, +) { + let (widget, rx, op_rx) = make_chatwidget_manual(); + let app_event_tx = widget.app_event_tx.clone(); + (widget, app_event_tx, rx, op_rx) +} + fn drain_insert_history( rx: &mut tokio::sync::mpsc::UnboundedReceiver, ) -> Vec>> { @@ -762,10 +782,10 @@ async fn binary_size_transcript_snapshot() { // Consider content only after the last session banner marker. Skip the transient // 'thinking' header if present, and start from the first non-empty content line // that follows. This keeps the snapshot stable across sessions. - const MARKER_PREFIX: &str = ">_ You are using OpenAI Codex in "; + const MARKER_PREFIX: &str = "To get started, describe a task or try one of these commands:"; let last_marker_line_idx = lines .iter() - .rposition(|l| l.starts_with(MARKER_PREFIX)) + .rposition(|l| l.trim_start().starts_with(MARKER_PREFIX)) .expect("marker not found in visible output"); // Prefer the first assistant content line (blockquote '>' prefix) after the marker; // fallback to the first non-empty, non-'thinking' line. diff --git a/codex-rs/tui/src/cli.rs b/codex-rs/tui/src/cli.rs index cb5f8ac778..f0630a34c5 100644 --- a/codex-rs/tui/src/cli.rs +++ b/codex-rs/tui/src/cli.rs @@ -7,41 +7,25 @@ use std::path::PathBuf; #[command(version)] pub struct Cli { /// Optional user prompt to start the session. + #[arg(value_name = "PROMPT")] pub prompt: Option, /// Optional image(s) to attach to the initial prompt. #[arg(long = "image", short = 'i', value_name = "FILE", value_delimiter = ',', num_args = 1..)] pub images: Vec, - /// Open an interactive picker to resume a previous session recorded on disk - /// instead of starting a new one. - /// - /// Notes: - /// - Mutually exclusive with `--continue`. - /// - The picker displays recent sessions and a preview of the first real user - /// message to help you select the right one. - #[arg( - long = "resume", - default_value_t = false, - conflicts_with = "continue", - hide = true - )] - pub resume: bool, + // Internal controls set by the top-level `codex resume` subcommand. + // These are not exposed as user flags on the base `codex` command. + #[clap(skip)] + pub resume_picker: bool, - /// Continue the most recent conversation without showing the picker. - /// - /// Notes: - /// - Mutually exclusive with `--resume`. - /// - If no recorded sessions are found, this behaves like starting fresh. - /// - Equivalent to picking the newest item in the resume picker. - #[arg( - id = "continue", - long = "continue", - default_value_t = false, - conflicts_with = "resume", - hide = true - )] - pub r#continue: bool, + #[clap(skip)] + pub resume_last: bool, + + /// Internal: resume a specific recorded session by id (UUID). Set by the + /// top-level `codex resume ` wrapper; not exposed as a public flag. + #[clap(skip)] + pub resume_session_id: Option, /// Model the agent should use. #[arg(long, short = 'm')] diff --git a/codex-rs/tui/src/diff_render.rs b/codex-rs/tui/src/diff_render.rs index 20d26106b2..2787f76607 100644 --- a/codex-rs/tui/src/diff_render.rs +++ b/codex-rs/tui/src/diff_render.rs @@ -265,7 +265,7 @@ fn render_changes_block( out } -fn display_path_for(path: &Path, cwd: &Path) -> String { +pub(crate) fn display_path_for(path: &Path, cwd: &Path) -> String { let path_in_same_repo = match (get_git_repo_root(cwd), get_git_repo_root(path)) { (Some(cwd_repo), Some(path_repo)) => cwd_repo == path_repo, _ => false, diff --git a/codex-rs/tui/src/exec_command.rs b/codex-rs/tui/src/exec_command.rs index 1923fa3b69..93c937e0d1 100644 --- a/codex-rs/tui/src/exec_command.rs +++ b/codex-rs/tui/src/exec_command.rs @@ -1,6 +1,7 @@ use std::path::Path; use std::path::PathBuf; +use dirs::home_dir; use shlex::try_join; pub(crate) fn escape_command(command: &[String]) -> String { @@ -27,13 +28,9 @@ where return None; } - if let Some(home_dir) = std::env::var_os("HOME").map(PathBuf::from) - && let Ok(rel) = path.strip_prefix(&home_dir) - { - return Some(rel.to_path_buf()); - } - - None + let home_dir = home_dir()?; + let rel = path.strip_prefix(&home_dir).ok()?; + Some(rel.to_path_buf()) } #[cfg(test)] diff --git a/codex-rs/tui/src/frames.rs b/codex-rs/tui/src/frames.rs new file mode 100644 index 0000000000..19a70578d4 --- /dev/null +++ b/codex-rs/tui/src/frames.rs @@ -0,0 +1,71 @@ +use std::time::Duration; + +// Embed animation frames for each variant at compile time. +macro_rules! frames_for { + ($dir:literal) => { + [ + include_str!(concat!("../frames/", $dir, "/frame_1.txt")), + include_str!(concat!("../frames/", $dir, "/frame_2.txt")), + include_str!(concat!("../frames/", $dir, "/frame_3.txt")), + include_str!(concat!("../frames/", $dir, "/frame_4.txt")), + include_str!(concat!("../frames/", $dir, "/frame_5.txt")), + include_str!(concat!("../frames/", $dir, "/frame_6.txt")), + include_str!(concat!("../frames/", $dir, "/frame_7.txt")), + include_str!(concat!("../frames/", $dir, "/frame_8.txt")), + include_str!(concat!("../frames/", $dir, "/frame_9.txt")), + include_str!(concat!("../frames/", $dir, "/frame_10.txt")), + include_str!(concat!("../frames/", $dir, "/frame_11.txt")), + include_str!(concat!("../frames/", $dir, "/frame_12.txt")), + include_str!(concat!("../frames/", $dir, "/frame_13.txt")), + include_str!(concat!("../frames/", $dir, "/frame_14.txt")), + include_str!(concat!("../frames/", $dir, "/frame_15.txt")), + include_str!(concat!("../frames/", $dir, "/frame_16.txt")), + include_str!(concat!("../frames/", $dir, "/frame_17.txt")), + include_str!(concat!("../frames/", $dir, "/frame_18.txt")), + include_str!(concat!("../frames/", $dir, "/frame_19.txt")), + include_str!(concat!("../frames/", $dir, "/frame_20.txt")), + include_str!(concat!("../frames/", $dir, "/frame_21.txt")), + include_str!(concat!("../frames/", $dir, "/frame_22.txt")), + include_str!(concat!("../frames/", $dir, "/frame_23.txt")), + include_str!(concat!("../frames/", $dir, "/frame_24.txt")), + include_str!(concat!("../frames/", $dir, "/frame_25.txt")), + include_str!(concat!("../frames/", $dir, "/frame_26.txt")), + include_str!(concat!("../frames/", $dir, "/frame_27.txt")), + include_str!(concat!("../frames/", $dir, "/frame_28.txt")), + include_str!(concat!("../frames/", $dir, "/frame_29.txt")), + include_str!(concat!("../frames/", $dir, "/frame_30.txt")), + include_str!(concat!("../frames/", $dir, "/frame_31.txt")), + include_str!(concat!("../frames/", $dir, "/frame_32.txt")), + include_str!(concat!("../frames/", $dir, "/frame_33.txt")), + include_str!(concat!("../frames/", $dir, "/frame_34.txt")), + include_str!(concat!("../frames/", $dir, "/frame_35.txt")), + include_str!(concat!("../frames/", $dir, "/frame_36.txt")), + ] + }; +} + +pub(crate) const FRAMES_DEFAULT: [&str; 36] = frames_for!("default"); +pub(crate) const FRAMES_CODEX: [&str; 36] = frames_for!("codex"); +pub(crate) const FRAMES_OPENAI: [&str; 36] = frames_for!("openai"); +pub(crate) const FRAMES_BLOCKS: [&str; 36] = frames_for!("blocks"); +pub(crate) const FRAMES_DOTS: [&str; 36] = frames_for!("dots"); +pub(crate) const FRAMES_HASH: [&str; 36] = frames_for!("hash"); +pub(crate) const FRAMES_HBARS: [&str; 36] = frames_for!("hbars"); +pub(crate) const FRAMES_VBARS: [&str; 36] = frames_for!("vbars"); +pub(crate) const FRAMES_SHAPES: [&str; 36] = frames_for!("shapes"); +pub(crate) const FRAMES_SLUG: [&str; 36] = frames_for!("slug"); + +pub(crate) const ALL_VARIANTS: &[&[&str]] = &[ + &FRAMES_DEFAULT, + &FRAMES_CODEX, + &FRAMES_OPENAI, + &FRAMES_BLOCKS, + &FRAMES_DOTS, + &FRAMES_HASH, + &FRAMES_HBARS, + &FRAMES_VBARS, + &FRAMES_SHAPES, + &FRAMES_SLUG, +]; + +pub(crate) const FRAME_TICK_DEFAULT: Duration = Duration::from_millis(80); diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 42a79d60c5..d6add6d328 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -5,8 +5,8 @@ use crate::markdown::append_markdown; use crate::render::line_utils::line_to_static; use crate::render::line_utils::prefix_lines; use crate::render::line_utils::push_owned_lines; -use crate::slash_command::SlashCommand; use crate::text_formatting::format_and_truncate_tool_result; +use crate::ui_consts::LIVE_PREFIX_COLS; use crate::wrapping::RtOptions; use crate::wrapping::word_wrap_line; use crate::wrapping::word_wrap_lines; @@ -27,6 +27,7 @@ use codex_core::protocol::McpInvocation; use codex_core::protocol::SandboxPolicy; use codex_core::protocol::SessionConfiguredEvent; use codex_core::protocol::TokenUsage; +use codex_core::protocol_config_types::ReasoningEffort as ReasoningEffortConfig; use codex_protocol::mcp_protocol::ConversationId; use codex_protocol::num_format::format_with_separators; use codex_protocol::parse_command::ParsedCommand; @@ -99,7 +100,7 @@ impl HistoryCell for UserHistoryCell { let mut lines: Vec> = Vec::new(); // Wrap the content first, then prefix each wrapped line with the marker. - let wrap_width = width.saturating_sub(1); // account for the ▌ prefix + let wrap_width = width.saturating_sub(LIVE_PREFIX_COLS); // account for the ▌ prefix and trailing space let wrapped = textwrap::wrap( &self.message, textwrap::Options::new(wrap_width as usize) @@ -107,7 +108,7 @@ impl HistoryCell for UserHistoryCell { ); for line in wrapped { - lines.push(vec!["▌".cyan().dim(), line.to_string().dim()].into()); + lines.push(vec!["▌ ".cyan().dim(), line.to_string().dim()].into()); } lines } @@ -429,9 +430,16 @@ impl ExecCell { if let Some(output) = call.output.as_ref() && output.exit_code != 0 { - let out = output_lines(Some(output), false, false, false) - .into_iter() - .join("\n"); + let out = output_lines( + Some(output), + OutputLinesParams { + only_err: false, + include_angle_pipe: false, + include_prefix: false, + }, + ) + .into_iter() + .join("\n"); if !out.trim().is_empty() { // Wrap the output. for line in out.lines() { @@ -566,6 +574,7 @@ impl HistoryCell for CompletedMcpToolCallWithImageOutput { } const TOOL_CALL_MAX_LINES: usize = 5; +const SESSION_HEADER_MAX_INNER_WIDTH: usize = 56; // Just an eyeballed value fn title_case(s: &str) -> String { if s.is_empty() { @@ -598,10 +607,10 @@ pub(crate) fn new_session_info( config: &Config, event: SessionConfiguredEvent, is_first_event: bool, -) -> PlainHistoryCell { +) -> CompositeHistoryCell { let SessionConfiguredEvent { model, - reasoning_effort: _, + reasoning_effort, session_id: _, history_log_id: _, history_entry_count: _, @@ -609,58 +618,59 @@ pub(crate) fn new_session_info( rollout_path: _, } = event; if is_first_event { - let cwd_str = match relativize_to_home(&config.cwd) { - Some(rel) if !rel.as_os_str().is_empty() => { - let sep = std::path::MAIN_SEPARATOR; - format!("~{sep}{}", rel.display()) - } - Some(_) => "~".to_string(), - None => config.cwd.display().to_string(), - }; - // Discover AGENTS.md files to decide whether to suggest `/init`. - let has_agents_md = discover_project_doc_paths(config) - .map(|v| !v.is_empty()) - .unwrap_or(false); + // Header box rendered as history (so it appears at the very top) + let header = SessionHeaderHistoryCell::new( + model, + reasoning_effort, + config.cwd.clone(), + crate::version::CODEX_CLI_VERSION, + ); - let mut lines: Vec> = Vec::new(); - lines.push(Line::from(vec![ - ">_ ".dim(), - "You are using OpenAI Codex in".bold(), - format!(" {cwd_str}").dim(), - ])); - lines.push(Line::from("".dim())); - lines.push(Line::from( - " To get started, describe a task or try one of these commands:".dim(), - )); - lines.push(Line::from("".dim())); - if !has_agents_md { - lines.push(Line::from(vec![ - " /init".bold(), - format!(" - {}", SlashCommand::Init.description()).dim(), - ])); + // Help lines below the header (new copy and list) + let help_lines: Vec> = vec![ + " To get started, describe a task or try one of these commands:" + .dim() + .into(), + Line::from(""), + Line::from(vec![ + " ".into(), + "/init".into(), + " - create an AGENTS.md file with instructions for Codex".dim(), + ]), + Line::from(vec![ + " ".into(), + "/status".into(), + " - show current session configuration".dim(), + ]), + Line::from(vec![ + " ".into(), + "/approvals".into(), + " - choose what Codex can do without approval".dim(), + ]), + Line::from(vec![ + " ".into(), + "/model".into(), + " - choose what model and reasoning effort to use".dim(), + ]), + ]; + + CompositeHistoryCell { + parts: vec![ + Box::new(header), + Box::new(PlainHistoryCell { lines: help_lines }), + ], } - lines.push(Line::from(vec![ - " /status".bold(), - format!(" - {}", SlashCommand::Status.description()).dim(), - ])); - lines.push(Line::from(vec![ - " /approvals".bold(), - format!(" - {}", SlashCommand::Approvals.description()).dim(), - ])); - lines.push(Line::from(vec![ - " /model".bold(), - format!(" - {}", SlashCommand::Model.description()).dim(), - ])); - PlainHistoryCell { lines } } else if config.model == model { - PlainHistoryCell { lines: Vec::new() } + CompositeHistoryCell { parts: vec![] } } else { let lines = vec![ "model changed:".magenta().bold().into(), format!("requested: {}", config.model).into(), format!("used: {model}").into(), ]; - PlainHistoryCell { lines } + CompositeHistoryCell { + parts: vec![Box::new(PlainHistoryCell { lines })], + } } } @@ -687,6 +697,197 @@ pub(crate) fn new_active_exec_command( }) } +#[derive(Debug)] +struct SessionHeaderHistoryCell { + version: &'static str, + model: String, + reasoning_effort: Option, + directory: PathBuf, +} + +impl SessionHeaderHistoryCell { + fn new( + model: String, + reasoning_effort: Option, + directory: PathBuf, + version: &'static str, + ) -> Self { + Self { + version, + model, + reasoning_effort, + directory, + } + } + + fn format_directory(&self, max_width: Option) -> String { + Self::format_directory_inner(&self.directory, max_width) + } + + fn format_directory_inner(directory: &Path, max_width: Option) -> String { + let formatted = if let Some(rel) = relativize_to_home(directory) { + if rel.as_os_str().is_empty() { + "~".to_string() + } else { + format!("~{}{}", std::path::MAIN_SEPARATOR, rel.display()) + } + } else { + directory.display().to_string() + }; + + if let Some(max_width) = max_width { + if max_width == 0 { + return String::new(); + } + if UnicodeWidthStr::width(formatted.as_str()) > max_width { + return crate::text_formatting::center_truncate_path(&formatted, max_width); + } + } + + formatted + } + + fn reasoning_label(&self) -> Option<&'static str> { + self.reasoning_effort.map(|effort| match effort { + ReasoningEffortConfig::Minimal => "minimal", + ReasoningEffortConfig::Low => "low", + ReasoningEffortConfig::Medium => "medium", + ReasoningEffortConfig::High => "high", + }) + } +} + +impl HistoryCell for SessionHeaderHistoryCell { + fn display_lines(&self, width: u16) -> Vec> { + let mut out: Vec> = Vec::new(); + if width < 4 { + return out; + } + + let inner_width = std::cmp::min( + width.saturating_sub(2) as usize, + SESSION_HEADER_MAX_INNER_WIDTH, + ); + // Top border without a title on the border + let mut top = String::with_capacity(inner_width + 2); + top.push('╭'); + top.push_str(&"─".repeat(inner_width)); + top.push('╮'); + out.push(Line::from(top.dim())); + + // Title line rendered inside the box: " >_ OpenAI Codex (vX)" + let title_text = format!(" >_ OpenAI Codex (v{})", self.version); + let title_w = UnicodeWidthStr::width(title_text.as_str()); + let pad_w = inner_width.saturating_sub(title_w); + let mut title_spans: Vec> = vec![ + Span::from("│").dim(), + Span::from(" ").dim(), + Span::from(">_ ").dim(), + Span::from("OpenAI Codex").bold(), + Span::from(" ").dim(), + Span::from(format!("(v{})", self.version)).dim(), + ]; + if pad_w > 0 { + title_spans.push(Span::from(" ".repeat(pad_w)).dim()); + } + title_spans.push(Span::from("│").dim()); + out.push(Line::from(title_spans)); + + // Spacer row between title and details + out.push(Line::from(vec![ + Span::from(format!("│{}│", " ".repeat(inner_width))).dim(), + ])); + + // Model line: " model: (change with /model)" + const CHANGE_MODEL_HINT_COMMAND: &str = "/model"; + const CHANGE_MODEL_HINT_EXPLANATION: &str = " to change"; + const DIR_LABEL: &str = "directory:"; + let label_width = DIR_LABEL.len(); + let model_label = format!( + "{model_label:> = vec![ + Span::from(format!("│ {model_label} ")).dim(), + Span::from(self.model.clone()), + ]; + if let Some(reasoning) = reasoning_label { + spans.push(Span::from(" ")); + spans.push(Span::from(reasoning)); + } + spans.push(Span::from(" ").dim()); + spans.push(Span::from(CHANGE_MODEL_HINT_COMMAND).cyan()); + spans.push(Span::from(CHANGE_MODEL_HINT_EXPLANATION).dim()); + if pad_w > 0 { + spans.push(Span::from(" ".repeat(pad_w)).dim()); + } + spans.push(Span::from("│").dim()); + out.push(Line::from(spans)); + + // Directory line: " Directory: " + let dir_label = format!("{DIR_LABEL:> = vec![ + Span::from("│").dim(), + Span::from(" ").dim(), + Span::from(dir_label).dim(), + Span::from(" ").dim(), + Span::from(dir), + ]; + if pad_w > 0 { + spans.push(Span::from(" ".repeat(pad_w)).dim()); + } + spans.push(Span::from("│").dim()); + out.push(Line::from(spans)); + + // Bottom border + let bottom = format!("╰{}╯", "─".repeat(inner_width)); + out.push(Line::from(bottom.dim())); + + out + } +} + +#[derive(Debug)] +pub(crate) struct CompositeHistoryCell { + parts: Vec>, +} + +impl HistoryCell for CompositeHistoryCell { + fn display_lines(&self, width: u16) -> Vec> { + let mut out: Vec> = Vec::new(); + let mut first = true; + for part in &self.parts { + let mut lines = part.display_lines(width); + if !lines.is_empty() { + if !first { + out.push(Line::from("")); + } + out.append(&mut lines); + first = false; + } + } + out + } +} + fn spinner(start_time: Option) -> Span<'static> { const FRAMES: &[char] = &['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']; let idx = start_time @@ -1053,9 +1254,13 @@ pub(crate) fn new_mcp_tools_output( PlainHistoryCell { lines } } -pub(crate) fn new_info_event(message: String) -> PlainHistoryCell { - let lines: Vec> = - vec![vec![padded_emoji("💾").green(), " ".into(), message.into()].into()]; +pub(crate) fn new_info_event(message: String, hint: Option) -> PlainHistoryCell { + let mut line = vec!["> ".into(), message.into()]; + if let Some(hint) = hint { + line.push(" ".into()); + line.push(hint.dark_gray()); + } + let lines: Vec> = vec![line.into()]; PlainHistoryCell { lines } } @@ -1063,8 +1268,7 @@ pub(crate) fn new_error_event(message: String) -> PlainHistoryCell { // Use a hair space (U+200A) to create a subtle, near-invisible separation // before the text. VS16 is intentionally omitted to keep spacing tighter // in terminals like Ghostty. - let lines: Vec> = - vec![vec![padded_emoji("🖐").red().bold(), " ".into(), message.into()].into()]; + let lines: Vec> = vec![vec![format!("■ {message}").red()].into()]; PlainHistoryCell { lines } } @@ -1168,9 +1372,11 @@ pub(crate) fn new_patch_apply_failure(stderr: String) -> PlainHistoryCell { stderr, formatted_output: String::new(), }), - true, - true, - true, + OutputLinesParams { + only_err: true, + include_angle_pipe: true, + include_prefix: true, + }, )); } @@ -1251,12 +1457,18 @@ pub(crate) fn new_reasoning_summary_block( vec![Box::new(new_reasoning_block(full_reasoning_buffer, config))] } -fn output_lines( - output: Option<&CommandOutput>, +struct OutputLinesParams { only_err: bool, include_angle_pipe: bool, include_prefix: bool, -) -> Vec> { +} + +fn output_lines(output: Option<&CommandOutput>, params: OutputLinesParams) -> Vec> { + let OutputLinesParams { + only_err, + include_angle_pipe, + include_prefix, + } = params; let CommandOutput { exit_code, stdout, @@ -1345,6 +1557,7 @@ mod tests { use codex_core::config::Config; use codex_core::config::ConfigOverrides; use codex_core::config::ConfigToml; + use dirs::home_dir; fn test_config() -> Config { Config::load_from_base_config_with_overrides( @@ -1371,6 +1584,49 @@ mod tests { render_lines(&cell.transcript_lines()) } + #[test] + fn session_header_includes_reasoning_level_when_present() { + let cell = SessionHeaderHistoryCell::new( + "gpt-4o".to_string(), + Some(ReasoningEffortConfig::High), + std::env::temp_dir(), + "test", + ); + + let lines = render_lines(&cell.display_lines(80)); + let model_line = lines + .into_iter() + .find(|line| line.contains("model:")) + .expect("model line"); + + assert!(model_line.contains("gpt-4o high")); + assert!(model_line.contains("/model to change")); + } + + #[test] + fn session_header_directory_center_truncates() { + let mut dir = home_dir().expect("home directory"); + for part in ["hello", "the", "fox", "is", "very", "fast"] { + dir.push(part); + } + + let formatted = SessionHeaderHistoryCell::format_directory_inner(&dir, Some(24)); + let sep = std::path::MAIN_SEPARATOR; + let expected = format!("~{sep}hello{sep}the{sep}…{sep}very{sep}fast"); + assert_eq!(formatted, expected); + } + + #[test] + fn session_header_directory_front_truncates_long_segment() { + let mut dir = home_dir().expect("home directory"); + dir.push("supercalifragilisticexpialidocious"); + + let formatted = SessionHeaderHistoryCell::format_directory_inner(&dir, Some(18)); + let sep = std::path::MAIN_SEPARATOR; + let expected = format!("~{sep}…cexpialidocious"); + assert_eq!(formatted, expected); + } + #[test] fn coalesces_sequential_reads_within_one_call() { // Build one exec cell with a Search followed by two Reads @@ -1760,7 +2016,7 @@ mod tests { message: msg.to_string(), }; - // Small width to force wrapping more clearly. Effective wrap width is width-1 due to the ▌ prefix. + // Small width to force wrapping more clearly. Effective wrap width is width-2 due to the ▌ prefix and trailing space. let width: u16 = 12; let lines = cell.display_lines(width); let rendered = render_lines(&lines).join("\n"); diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index 7ce175286b..995ca17a6b 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -11,10 +11,11 @@ use codex_core::RolloutRecorder; use codex_core::config::Config; use codex_core::config::ConfigOverrides; use codex_core::config::ConfigToml; -use codex_core::config::GPT5_HIGH_MODEL; +use codex_core::config::GPT_5_CODEX_MEDIUM_MODEL; use codex_core::config::find_codex_home; use codex_core::config::load_config_as_toml_with_cli_overrides; use codex_core::config::persist_model_selection; +use codex_core::find_conversation_path_by_id_str; use codex_core::protocol::AskForApproval; use codex_core::protocol::SandboxPolicy; use codex_ollama::DEFAULT_OSS_MODEL; @@ -41,6 +42,7 @@ pub mod custom_terminal; mod diff_render; mod exec_command; mod file_search; +mod frames; mod get_git_diff; mod history_cell; pub mod insert_history; @@ -61,6 +63,7 @@ mod status_indicator_widget; mod streaming; mod text_formatting; mod tui; +mod ui_consts; mod user_approval_widget; mod version; mod wrapping; @@ -86,7 +89,7 @@ pub async fn run_main( let (sandbox_mode, approval_policy) = if cli.full_auto { ( Some(SandboxMode::WorkspaceWrite), - Some(AskForApproval::OnFailure), + Some(AskForApproval::OnRequest), ) } else if cli.dangerously_bypass_approvals_and_sandbox { ( @@ -122,6 +125,7 @@ pub async fn run_main( let overrides = ConfigOverrides { model, + review_model: None, approval_policy, sandbox_mode, cwd, @@ -342,7 +346,16 @@ async fn run_ratatui_app( } } - let resume_selection = if cli.r#continue { + // Determine resume behavior: explicit id, then resume last, then picker. + let resume_selection = if let Some(id_str) = cli.resume_session_id.as_deref() { + match find_conversation_path_by_id_str(&config.codex_home, id_str).await? { + Some(path) => resume_picker::ResumeSelection::Resume(path), + None => { + error!("Error finding conversation path: {id_str}"); + resume_picker::ResumeSelection::StartFresh + } + } + } else if cli.resume_last { match RolloutRecorder::list_conversations(&config.codex_home, 1, None).await { Ok(page) => page .items @@ -351,7 +364,7 @@ async fn run_ratatui_app( .unwrap_or(resume_picker::ResumeSelection::StartFresh), Err(_) => resume_picker::ResumeSelection::StartFresh, } - } else if cli.resume { + } else if cli.resume_picker { match resume_picker::run_resume_picker(&mut tui, &config.codex_home).await? { resume_picker::ResumeSelection::Exit => { restore(); @@ -368,9 +381,9 @@ async fn run_ratatui_app( &cli, &config, active_profile.as_deref(), - internal_storage.gpt_5_high_model_prompt_seen, + internal_storage.gpt_5_codex_model_prompt_seen, ) { - internal_storage.gpt_5_high_model_prompt_seen = true; + internal_storage.gpt_5_codex_model_prompt_seen = true; if let Err(e) = internal_storage.persist().await { error!("Failed to persist internal storage: {e:?}"); } @@ -379,12 +392,13 @@ async fn run_ratatui_app( let switch_to_new_model = upgrade_decision == ModelUpgradeDecision::Switch; if switch_to_new_model { - config.model = GPT5_HIGH_MODEL.to_owned(); + config.model = GPT_5_CODEX_MEDIUM_MODEL.to_owned(); + config.model_reasoning_effort = None; if let Err(e) = persist_model_selection( &config.codex_home, active_profile.as_deref(), &config.model, - None, + config.model_reasoning_effort, ) .await { @@ -511,18 +525,15 @@ fn should_show_model_rollout_prompt( cli: &Cli, config: &Config, active_profile: Option<&str>, - gpt_5_high_model_prompt_seen: bool, + gpt_5_codex_model_prompt_seen: bool, ) -> bool { - // TODO(jif) drop. - let debug_high_enabled = std::env::var("DEBUG_HIGH") - .map(|v| v.eq_ignore_ascii_case("1")) - .unwrap_or(false); + let login_status = get_login_status(config); active_profile.is_none() - && debug_high_enabled && cli.model.is_none() - && !gpt_5_high_model_prompt_seen + && !gpt_5_codex_model_prompt_seen && config.model_provider.requires_openai_auth + && matches!(login_status, LoginStatus::AuthMode(AuthMode::ChatGPT)) && !cli.oss } @@ -530,29 +541,63 @@ fn should_show_model_rollout_prompt( mod tests { use super::*; use clap::Parser; - use std::sync::Once; - - fn enable_debug_high_env() { - static DEBUG_HIGH_ONCE: Once = Once::new(); - DEBUG_HIGH_ONCE.call_once(|| { - // SAFETY: Tests run in a controlled environment and require this env variable to - // opt into the GPT-5 High rollout prompt gating. We only set it once. - unsafe { - std::env::set_var("DEBUG_HIGH", "1"); - } - }); - } - + use codex_core::auth::AuthDotJson; + use codex_core::auth::get_auth_file; + use codex_core::auth::login_with_api_key; + use codex_core::auth::write_auth_json; + use codex_core::token_data::IdTokenInfo; + use codex_core::token_data::TokenData; fn make_config() -> Config { - enable_debug_high_env(); + // Create a unique CODEX_HOME per test to isolate auth.json writes. + let mut codex_home = std::env::temp_dir(); + let unique_suffix = format!( + "codex_tui_test_{}_{}", + std::process::id(), + std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_nanos() + ); + codex_home.push(unique_suffix); + std::fs::create_dir_all(&codex_home).expect("create unique CODEX_HOME"); + Config::load_from_base_config_with_overrides( ConfigToml::default(), ConfigOverrides::default(), - std::env::temp_dir(), + codex_home, ) .expect("load default config") } + /// Test helper to write an `auth.json` with the requested auth mode into the + /// provided CODEX_HOME directory. This ensures `get_login_status()` reads the + /// intended mode deterministically. + fn set_auth_method(codex_home: &std::path::Path, mode: AuthMode) { + match mode { + AuthMode::ApiKey => { + login_with_api_key(codex_home, "sk-test-key").expect("write api key auth.json"); + } + AuthMode::ChatGPT => { + // Minimal valid JWT payload: header.payload.signature (all base64url, no padding) + const FAKE_JWT: &str = "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.e30.c2ln"; // {"alg":"none","typ":"JWT"}.{}."sig" + let mut id_info = IdTokenInfo::default(); + id_info.raw_jwt = FAKE_JWT.to_string(); + let auth = AuthDotJson { + openai_api_key: None, + tokens: Some(TokenData { + id_token: id_info, + access_token: "access-token".to_string(), + refresh_token: "refresh-token".to_string(), + account_id: None, + }), + last_refresh: None, + }; + let file = get_auth_file(codex_home); + write_auth_json(&file, &auth).expect("write chatgpt auth.json"); + } + } + } + #[test] fn shows_login_when_not_authenticated() { let cfg = make_config(); @@ -566,27 +611,39 @@ mod tests { fn shows_model_rollout_prompt_for_default_model() { let cli = Cli::parse_from(["codex"]); let cfg = make_config(); - assert!(should_show_model_rollout_prompt(&cli, &cfg, None, false)); + set_auth_method(&cfg.codex_home, AuthMode::ChatGPT); + assert!(should_show_model_rollout_prompt(&cli, &cfg, None, false,)); + } + + #[test] + fn hides_model_rollout_prompt_when_api_auth_mode() { + let cli = Cli::parse_from(["codex"]); + let cfg = make_config(); + set_auth_method(&cfg.codex_home, AuthMode::ApiKey); + assert!(!should_show_model_rollout_prompt(&cli, &cfg, None, false,)); } #[test] fn hides_model_rollout_prompt_when_marked_seen() { let cli = Cli::parse_from(["codex"]); let cfg = make_config(); - assert!(!should_show_model_rollout_prompt(&cli, &cfg, None, true)); + set_auth_method(&cfg.codex_home, AuthMode::ChatGPT); + assert!(!should_show_model_rollout_prompt(&cli, &cfg, None, true,)); } #[test] fn hides_model_rollout_prompt_when_cli_overrides_model() { let cli = Cli::parse_from(["codex", "--model", "gpt-4.1"]); let cfg = make_config(); - assert!(!should_show_model_rollout_prompt(&cli, &cfg, None, false)); + set_auth_method(&cfg.codex_home, AuthMode::ChatGPT); + assert!(!should_show_model_rollout_prompt(&cli, &cfg, None, false,)); } #[test] fn hides_model_rollout_prompt_when_profile_active() { let cli = Cli::parse_from(["codex"]); let cfg = make_config(); + set_auth_method(&cfg.codex_home, AuthMode::ChatGPT); assert!(!should_show_model_rollout_prompt( &cli, &cfg, diff --git a/codex-rs/tui/src/new_model_popup.rs b/codex-rs/tui/src/new_model_popup.rs index e89fb67ef5..12325074c0 100644 --- a/codex-rs/tui/src/new_model_popup.rs +++ b/codex-rs/tui/src/new_model_popup.rs @@ -1,10 +1,13 @@ +use crate::frames::ALL_VARIANTS as FRAME_VARIANTS; +use crate::frames::FRAME_TICK_DEFAULT; use crate::tui::FrameRequester; use crate::tui::Tui; use crate::tui::TuiEvent; -use codex_core::config::GPT5_HIGH_MODEL; use color_eyre::eyre::Result; use crossterm::event::KeyCode; use crossterm::event::KeyEvent; +use crossterm::event::KeyModifiers; +use rand::Rng as _; use ratatui::buffer::Buffer; use ratatui::layout::Rect; use ratatui::prelude::Widget; @@ -14,8 +17,13 @@ use ratatui::widgets::Clear; use ratatui::widgets::Paragraph; use ratatui::widgets::WidgetRef; use ratatui::widgets::Wrap; +use std::time::Duration; use tokio_stream::StreamExt; +const FRAME_TICK: Duration = FRAME_TICK_DEFAULT; +const MIN_ANIMATION_HEIGHT: u16 = 24; +const MIN_ANIMATION_WIDTH: u16 = 60; + #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub(crate) enum ModelUpgradeDecision { Switch, @@ -32,6 +40,8 @@ struct ModelUpgradePopup { highlighted: ModelUpgradeOption, decision: Option, request_frame: FrameRequester, + frame_idx: usize, + variant_idx: usize, } impl ModelUpgradePopup { @@ -40,6 +50,8 @@ impl ModelUpgradePopup { highlighted: ModelUpgradeOption::TryNewModel, decision: None, request_frame, + frame_idx: 0, + variant_idx: 0, } } @@ -51,6 +63,11 @@ impl ModelUpgradePopup { KeyCode::Char('2') => self.select(ModelUpgradeOption::KeepCurrent), KeyCode::Enter => self.select(self.highlighted), KeyCode::Esc => self.select(ModelUpgradeOption::KeepCurrent), + KeyCode::Char('.') => { + if key_event.modifiers.contains(KeyModifiers::CONTROL) { + self.pick_random_variant(); + } + } _ => {} } } @@ -66,6 +83,30 @@ impl ModelUpgradePopup { self.decision = Some(option.into()); self.request_frame.schedule_frame(); } + + fn advance_animation(&mut self) { + let len = self.frames().len(); + self.frame_idx = (self.frame_idx + 1) % len; + self.request_frame.schedule_frame_in(FRAME_TICK); + } + + fn frames(&self) -> &'static [&'static str] { + FRAME_VARIANTS[self.variant_idx] + } + + fn pick_random_variant(&mut self) { + let total = FRAME_VARIANTS.len(); + if total <= 1 { + return; + } + let mut rng = rand::rng(); + let mut next = self.variant_idx; + while next == self.variant_idx { + next = rng.random_range(0..total); + } + self.variant_idx = next; + self.request_frame.schedule_frame(); + } } impl From for ModelUpgradeDecision { @@ -81,15 +122,28 @@ impl WidgetRef for &ModelUpgradePopup { fn render_ref(&self, area: Rect, buf: &mut Buffer) { Clear.render(area, buf); - let mut lines: Vec = vec![ - Line::from(vec![ - "> ".into(), - format!("Try {GPT5_HIGH_MODEL} as your default model").bold(), - ]), - format!(" {GPT5_HIGH_MODEL} is our latest model tuned for coding workflows.").into(), - " Switch now or keep your current default – you can change models any time.".into(), - "".into(), - ]; + // Skip the animation entirely when the viewport is too small so we don't clip frames. + let show_animation = + area.height >= MIN_ANIMATION_HEIGHT && area.width >= MIN_ANIMATION_WIDTH; + + let mut lines: Vec = Vec::new(); + if show_animation { + let frame = self.frames()[self.frame_idx]; + lines.extend(frame.lines().map(|l| l.into())); + // Spacer between animation and text content. + lines.push("".into()); + } + + lines.push(Line::from(vec![ + " ".into(), + "Introducing GPT-5-Codex".bold(), + ])); + lines.push("".into()); + lines.push( + " GPT-5-Codex works faster through easy tasks and harder on complex tasks,".into(), + ); + lines.push(" improves on code quality, and is more steerable with AGENTS.md.".into()); + lines.push("".into()); let create_option = |index: usize, option: ModelUpgradeOption, text: &str| -> Line<'static> { @@ -106,12 +160,13 @@ impl WidgetRef for &ModelUpgradePopup { lines.push(create_option( 0, ModelUpgradeOption::TryNewModel, - &format!("Yes, switch me to {GPT5_HIGH_MODEL}"), + "Try the new GPT-5-Codex model", )); + lines.push("".into()); lines.push(create_option( 1, ModelUpgradeOption::KeepCurrent, - "Not right now", + "Continue using current model", )); lines.push("".into()); lines.push( @@ -133,6 +188,8 @@ pub(crate) async fn run_model_upgrade_popup(tui: &mut Tui) -> Result Result popup.handle_key_event(key_event), TuiEvent::Draw => { + popup.advance_animation(); let _ = tui.draw(u16::MAX, |frame| { frame.render_widget_ref(&popup, frame.area()); }); diff --git a/codex-rs/tui/src/onboarding/auth.rs b/codex-rs/tui/src/onboarding/auth.rs index d419badada..2ea59a312a 100644 --- a/codex-rs/tui/src/onboarding/auth.rs +++ b/codex-rs/tui/src/onboarding/auth.rs @@ -137,12 +137,12 @@ impl AuthModeWidget { fn render_pick_mode(&self, area: Rect, buf: &mut Buffer) { let mut lines: Vec = vec![ Line::from(vec![ - "> ".into(), - "Sign in with ChatGPT to use Codex as part of your paid plan".bold(), + " ".into(), + "Sign in with ChatGPT to use Codex as part of your paid plan".into(), ]), Line::from(vec![ " ".into(), - "or connect an API key for usage-based billing".bold(), + "or connect an API key for usage-based billing".into(), ]), "".into(), ]; @@ -182,6 +182,7 @@ impl AuthModeWidget { "Sign in with ChatGPT", "Usage included with Plus, Pro, and Team plans", )); + lines.push("".into()); lines.extend(create_mode_item( 1, AuthMode::ApiKey, @@ -205,7 +206,7 @@ impl AuthModeWidget { } fn render_continue_in_browser(&self, area: Rect, buf: &mut Buffer) { - let mut spans = vec!["> ".into()]; + let mut spans = vec![" ".into()]; // Schedule a follow-up frame to keep the shimmer animation going. self.request_frame .schedule_frame_in(std::time::Duration::from_millis(100)); @@ -217,7 +218,8 @@ impl AuthModeWidget { && !state.auth_url.is_empty() { lines.push(" If the link doesn't open automatically, open the following link to authenticate:".into()); - lines.push(vec![" ".into(), state.auth_url.as_str().cyan().underlined()].into()); + lines.push("".into()); + lines.push(Line::from(state.auth_url.as_str().cyan().underlined())); lines.push("".into()); } @@ -231,7 +233,7 @@ impl AuthModeWidget { let lines = vec![ "✓ Signed in with your ChatGPT account".fg(Color::Green).into(), "".into(), - "> Before you start:".into(), + " Before you start:".into(), "".into(), " Decide how much autonomy you want to grant Codex".into(), Line::from(vec![ diff --git a/codex-rs/tui/src/onboarding/onboarding_screen.rs b/codex-rs/tui/src/onboarding/onboarding_screen.rs index c9617d796b..12a2b4b134 100644 --- a/codex-rs/tui/src/onboarding/onboarding_screen.rs +++ b/codex-rs/tui/src/onboarding/onboarding_screen.rs @@ -24,6 +24,7 @@ use crate::tui::TuiEvent; use color_eyre::eyre::Result; use std::sync::Arc; use std::sync::RwLock; +use std::time::Instant; #[allow(clippy::large_enum_variant)] enum Step { @@ -74,6 +75,8 @@ impl OnboardingScreen { let codex_home = config.codex_home; let mut steps: Vec = vec![Step::Welcome(WelcomeWidget { is_logged_in: !matches!(login_status, LoginStatus::NotAuthenticated), + request_frame: tui.frame_requester(), + start: Instant::now(), })]; if show_login_screen { steps.push(Step::Auth(AuthModeWidget { @@ -316,6 +319,8 @@ pub(crate) async fn run_onboarding_app( use tokio_stream::StreamExt; let mut onboarding_screen = OnboardingScreen::new(tui, args); + // One-time guard to fully clear the screen after ChatGPT login success message is shown + let mut did_full_clear_after_success = false; tui.draw(u16::MAX, |frame| { frame.render_widget_ref(&onboarding_screen, frame.area()); @@ -334,6 +339,36 @@ pub(crate) async fn run_onboarding_app( onboarding_screen.handle_paste(text); } TuiEvent::Draw => { + if !did_full_clear_after_success + && onboarding_screen.steps.iter().any(|step| { + if let Step::Auth(w) = step { + w.sign_in_state.read().is_ok_and(|g| { + matches!(&*g, super::auth::SignInState::ChatGptSuccessMessage) + }) + } else { + false + } + }) + { + // Reset any lingering SGR (underline/color) before clearing + let _ = ratatui::crossterm::execute!( + std::io::stdout(), + ratatui::crossterm::style::SetAttribute( + ratatui::crossterm::style::Attribute::Reset + ), + ratatui::crossterm::style::SetAttribute( + ratatui::crossterm::style::Attribute::NoUnderline + ), + ratatui::crossterm::style::SetForegroundColor( + ratatui::crossterm::style::Color::Reset + ), + ratatui::crossterm::style::SetBackgroundColor( + ratatui::crossterm::style::Color::Reset + ) + ); + let _ = tui.terminal.clear(); + did_full_clear_after_success = true; + } let _ = tui.draw(u16::MAX, |frame| { frame.render_widget_ref(&onboarding_screen, frame.area()); }); diff --git a/codex-rs/tui/src/onboarding/welcome.rs b/codex-rs/tui/src/onboarding/welcome.rs index 5e6906bf95..578e2b429f 100644 --- a/codex-rs/tui/src/onboarding/welcome.rs +++ b/codex-rs/tui/src/onboarding/welcome.rs @@ -3,23 +3,70 @@ use ratatui::layout::Rect; use ratatui::prelude::Widget; use ratatui::style::Stylize; use ratatui::text::Line; +use ratatui::widgets::Paragraph; use ratatui::widgets::WidgetRef; +use ratatui::widgets::Wrap; +use crate::frames::FRAME_TICK_DEFAULT; +use crate::frames::FRAMES_DEFAULT; use crate::onboarding::onboarding_screen::StepStateProvider; +use crate::tui::FrameRequester; use super::onboarding_screen::StepState; +use std::time::Duration; +use std::time::Instant; + +const FRAME_TICK: Duration = FRAME_TICK_DEFAULT; +const MIN_ANIMATION_HEIGHT: u16 = 20; +const MIN_ANIMATION_WIDTH: u16 = 60; pub(crate) struct WelcomeWidget { pub is_logged_in: bool, + pub request_frame: FrameRequester, + pub start: Instant, } impl WidgetRef for &WelcomeWidget { fn render_ref(&self, area: Rect, buf: &mut Buffer) { - let line = Line::from(vec![ - ">_ ".into(), - "Welcome to Codex, OpenAI's command-line coding agent".bold(), - ]); - line.render(area, buf); + let elapsed_ms = self.start.elapsed().as_millis(); + + // Align next draw to the next FRAME_TICK boundary to reduce jitter. + { + let tick_ms = FRAME_TICK.as_millis(); + let rem_ms = elapsed_ms % tick_ms; + let delay_ms = if rem_ms == 0 { + tick_ms + } else { + tick_ms - rem_ms + }; + // Safe cast: delay_ms < tick_ms and FRAME_TICK is small. + self.request_frame + .schedule_frame_in(Duration::from_millis(delay_ms as u64)); + } + + let frames = &FRAMES_DEFAULT; + let idx = ((elapsed_ms / FRAME_TICK.as_millis()) % frames.len() as u128) as usize; + // Skip the animation entirely when the viewport is too small so we don't clip frames. + let show_animation = + area.height >= MIN_ANIMATION_HEIGHT && area.width >= MIN_ANIMATION_WIDTH; + + let mut lines: Vec = Vec::new(); + if show_animation { + let frame_line_count = frames[idx].lines().count(); + lines.reserve(frame_line_count + 2); + lines.extend(frames[idx].lines().map(|l| l.into())); + lines.push("".into()); + } + lines.push(Line::from(vec![ + " ".into(), + "Welcome to ".into(), + "Codex".bold(), + ", OpenAI's command-line coding agent".into(), + ])); + + Paragraph::new(lines) + .wrap(Wrap { trim: false }) + .render(area, buf); } } @@ -31,3 +78,14 @@ impl StepStateProvider for WelcomeWidget { } } } + +#[cfg(test)] +mod tests { + use super::*; + + /// A number of things break down if FRAME_TICK is zero. + #[test] + fn frame_tick_must_be_nonzero() { + assert!(FRAME_TICK.as_millis() > 0); + } +} diff --git a/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__user_history_cell_wraps_and_prefixes_each_line_snapshot.snap b/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__user_history_cell_wraps_and_prefixes_each_line_snapshot.snap index 8b8cc38a03..ef0ceabc48 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__user_history_cell_wraps_and_prefixes_each_line_snapshot.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__user_history_cell_wraps_and_prefixes_each_line_snapshot.snap @@ -2,7 +2,7 @@ source: tui/src/history_cell.rs expression: rendered --- -▌one two -▌three four -▌five six -▌seven +▌ one two +▌ three four +▌ five six +▌ seven diff --git a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_truncated.snap b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_truncated.snap index 19dc5d3137..6aa3401770 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_truncated.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_truncated.snap @@ -2,5 +2,5 @@ source: tui/src/status_indicator_widget.rs expression: terminal.backend() --- -" Working (0s • Esc t" +" Working (0s • Esc " " " diff --git a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snap b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snap index 0290eb6976..061f3a1393 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_queued_messages.snap @@ -2,11 +2,11 @@ source: tui/src/status_indicator_widget.rs expression: terminal.backend() --- -" Working (0s • Esc to interrupt) " +" Working (0s • Esc to interrupt) " +" " " ↳ first " " ↳ second " " ⌥↑ edit " " " " " " " -" " diff --git a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_working_header.snap b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_working_header.snap index fe9eebedd6..debf282118 100644 --- a/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_working_header.snap +++ b/codex-rs/tui/src/snapshots/codex_tui__status_indicator_widget__tests__renders_with_working_header.snap @@ -2,5 +2,5 @@ source: tui/src/status_indicator_widget.rs expression: terminal.backend() --- -" Working (0s • Esc to interrupt) " +" Working (0s • Esc to interrupt) " " " diff --git a/codex-rs/tui/src/status_indicator_widget.rs b/codex-rs/tui/src/status_indicator_widget.rs index 5b2fe720c3..96f2c49fee 100644 --- a/codex-rs/tui/src/status_indicator_widget.rs +++ b/codex-rs/tui/src/status_indicator_widget.rs @@ -17,6 +17,7 @@ use crate::app_event_sender::AppEventSender; use crate::key_hint; use crate::shimmer::shimmer_spans; use crate::tui::FrameRequester; +use crate::ui_consts::LIVE_PREFIX_COLS; pub(crate) struct StatusIndicatorWidget { /// Animated header text (defaults to "Working"). @@ -32,7 +33,7 @@ pub(crate) struct StatusIndicatorWidget { } // Format elapsed seconds into a compact human-friendly form used by the status line. -// Examples: 0s, 59s, 1m00s, 59m59s, 1h00m00s, 2h03m09s +// Examples: 0s, 59s, 1m 00s, 59m 59s, 1h 00m 00s, 2h 03m 09s fn fmt_elapsed_compact(elapsed_secs: u64) -> String { if elapsed_secs < 60 { return format!("{elapsed_secs}s"); @@ -40,12 +41,12 @@ fn fmt_elapsed_compact(elapsed_secs: u64) -> String { if elapsed_secs < 3600 { let minutes = elapsed_secs / 60; let seconds = elapsed_secs % 60; - return format!("{minutes}m{seconds:02}s"); + return format!("{minutes}m {seconds:02}s"); } let hours = elapsed_secs / 3600; let minutes = (elapsed_secs % 3600) / 60; let seconds = elapsed_secs % 60; - format!("{hours}h{minutes:02}m{seconds:02}s") + format!("{hours}h {minutes:02}m {seconds:02}s") } impl StatusIndicatorWidget { @@ -63,10 +64,13 @@ impl StatusIndicatorWidget { } pub fn desired_height(&self, width: u16) -> u16 { - // Status line + wrapped queued messages (up to 3 lines per message) + // Status line + optional blank line + wrapped queued messages (up to 3 lines per message) // + optional ellipsis line per truncated message + 1 spacer line let inner_width = width.max(1) as usize; let mut total: u16 = 1; // status line + if !self.queued_messages.is_empty() { + total = total.saturating_add(1); // blank line between status and queued messages + } let text_width = inner_width.saturating_sub(3); // account for " ↳ " prefix if text_width > 0 { for q in &self.queued_messages { @@ -156,7 +160,7 @@ impl WidgetRef for StatusIndicatorWidget { let pretty_elapsed = fmt_elapsed_compact(elapsed); // Plain rendering: no borders or padding so the live cell is visually indistinguishable from terminal scrollback. - let mut spans = vec![" ".into()]; + let mut spans = vec![" ".repeat(LIVE_PREFIX_COLS as usize).into()]; spans.extend(shimmer_spans(&self.header)); spans.extend(vec![ " ".into(), @@ -168,6 +172,9 @@ impl WidgetRef for StatusIndicatorWidget { // Build lines: status, then queued messages, then spacer. let mut lines: Vec> = Vec::new(); lines.push(Line::from(spans)); + if !self.queued_messages.is_empty() { + lines.push(Line::from("")); + } // Wrap queued messages using textwrap and show up to the first 3 lines per message. let text_width = area.width.saturating_sub(3); // " ↳ " prefix for q in &self.queued_messages { @@ -209,13 +216,13 @@ mod tests { assert_eq!(fmt_elapsed_compact(0), "0s"); assert_eq!(fmt_elapsed_compact(1), "1s"); assert_eq!(fmt_elapsed_compact(59), "59s"); - assert_eq!(fmt_elapsed_compact(60), "1m00s"); - assert_eq!(fmt_elapsed_compact(61), "1m01s"); - assert_eq!(fmt_elapsed_compact(3 * 60 + 5), "3m05s"); - assert_eq!(fmt_elapsed_compact(59 * 60 + 59), "59m59s"); - assert_eq!(fmt_elapsed_compact(3600), "1h00m00s"); - assert_eq!(fmt_elapsed_compact(3600 + 60 + 1), "1h01m01s"); - assert_eq!(fmt_elapsed_compact(25 * 3600 + 2 * 60 + 3), "25h02m03s"); + assert_eq!(fmt_elapsed_compact(60), "1m 00s"); + assert_eq!(fmt_elapsed_compact(61), "1m 01s"); + assert_eq!(fmt_elapsed_compact(3 * 60 + 5), "3m 05s"); + assert_eq!(fmt_elapsed_compact(59 * 60 + 59), "59m 59s"); + assert_eq!(fmt_elapsed_compact(3600), "1h 00m 00s"); + assert_eq!(fmt_elapsed_compact(3600 + 60 + 1), "1h 01m 01s"); + assert_eq!(fmt_elapsed_compact(25 * 3600 + 2 * 60 + 3), "25h 02m 03s"); } #[test] diff --git a/codex-rs/tui/src/text_formatting.rs b/codex-rs/tui/src/text_formatting.rs index 3c4cfc31bb..91d1c84f22 100644 --- a/codex-rs/tui/src/text_formatting.rs +++ b/codex-rs/tui/src/text_formatting.rs @@ -1,4 +1,6 @@ use unicode_segmentation::UnicodeSegmentation; +use unicode_width::UnicodeWidthChar; +use unicode_width::UnicodeWidthStr; /// Truncate a tool result to fit within the given height and width. If the text is valid JSON, we format it in a compact way before truncating. /// This is a best-effort approach that may not work perfectly for text where 1 grapheme is rendered as multiple terminal cells. @@ -100,6 +102,219 @@ pub(crate) fn truncate_text(text: &str, max_graphemes: usize) -> String { } } +/// Truncate a path-like string to the given display width, keeping leading and trailing segments +/// where possible and inserting a single Unicode ellipsis between them. If an individual segment +/// cannot fit, it is front-truncated with an ellipsis. +pub(crate) fn center_truncate_path(path: &str, max_width: usize) -> String { + if max_width == 0 { + return String::new(); + } + if UnicodeWidthStr::width(path) <= max_width { + return path.to_string(); + } + + let sep = std::path::MAIN_SEPARATOR; + let has_leading_sep = path.starts_with(sep); + let has_trailing_sep = path.ends_with(sep); + let mut raw_segments: Vec<&str> = path.split(sep).collect(); + if has_leading_sep && !raw_segments.is_empty() && raw_segments[0].is_empty() { + raw_segments.remove(0); + } + if has_trailing_sep + && !raw_segments.is_empty() + && raw_segments.last().is_some_and(|last| last.is_empty()) + { + raw_segments.pop(); + } + + if raw_segments.is_empty() { + if has_leading_sep { + let root = sep.to_string(); + if UnicodeWidthStr::width(root.as_str()) <= max_width { + return root; + } + } + return "…".to_string(); + } + + struct Segment<'a> { + original: &'a str, + text: String, + truncatable: bool, + is_suffix: bool, + } + + let assemble = |leading: bool, segments: &[Segment<'_>]| -> String { + let mut result = String::new(); + if leading { + result.push(sep); + } + for segment in segments { + if !result.is_empty() && !result.ends_with(sep) { + result.push(sep); + } + result.push_str(segment.text.as_str()); + } + result + }; + + let front_truncate = |original: &str, allowed_width: usize| -> String { + if allowed_width == 0 { + return String::new(); + } + if UnicodeWidthStr::width(original) <= allowed_width { + return original.to_string(); + } + if allowed_width == 1 { + return "…".to_string(); + } + + let mut kept: Vec = Vec::new(); + let mut used_width = 1; // reserve space for leading ellipsis + for ch in original.chars().rev() { + let ch_width = UnicodeWidthChar::width(ch).unwrap_or(0); + if used_width + ch_width > allowed_width { + break; + } + used_width += ch_width; + kept.push(ch); + } + kept.reverse(); + let mut truncated = String::from("…"); + for ch in kept { + truncated.push(ch); + } + truncated + }; + + let mut combos: Vec<(usize, usize)> = Vec::new(); + let segment_count = raw_segments.len(); + for left in 1..=segment_count { + let min_right = if left == segment_count { 0 } else { 1 }; + for right in min_right..=(segment_count - left) { + combos.push((left, right)); + } + } + let desired_suffix = if segment_count > 1 { + std::cmp::min(2, segment_count - 1) + } else { + 0 + }; + let mut prioritized: Vec<(usize, usize)> = Vec::new(); + let mut fallback: Vec<(usize, usize)> = Vec::new(); + for combo in combos { + if combo.1 >= desired_suffix { + prioritized.push(combo); + } else { + fallback.push(combo); + } + } + let sort_combos = |items: &mut Vec<(usize, usize)>| { + items.sort_by(|(left_a, right_a), (left_b, right_b)| { + left_b + .cmp(left_a) + .then_with(|| right_b.cmp(right_a)) + .then_with(|| (left_b + right_b).cmp(&(left_a + right_a))) + }); + }; + sort_combos(&mut prioritized); + sort_combos(&mut fallback); + + let fit_segments = + |segments: &mut Vec>, allow_front_truncate: bool| -> Option { + loop { + let candidate = assemble(has_leading_sep, segments); + let width = UnicodeWidthStr::width(candidate.as_str()); + if width <= max_width { + return Some(candidate); + } + + if !allow_front_truncate { + return None; + } + + let mut indices: Vec = Vec::new(); + for (idx, seg) in segments.iter().enumerate().rev() { + if seg.truncatable && seg.is_suffix { + indices.push(idx); + } + } + for (idx, seg) in segments.iter().enumerate().rev() { + if seg.truncatable && !seg.is_suffix { + indices.push(idx); + } + } + + if indices.is_empty() { + return None; + } + + let mut changed = false; + for idx in indices { + let original_width = UnicodeWidthStr::width(segments[idx].original); + if original_width <= max_width && segment_count > 2 { + continue; + } + let seg_width = UnicodeWidthStr::width(segments[idx].text.as_str()); + let other_width = width.saturating_sub(seg_width); + let allowed_width = max_width.saturating_sub(other_width).max(1); + let new_text = front_truncate(segments[idx].original, allowed_width); + if new_text != segments[idx].text { + segments[idx].text = new_text; + changed = true; + break; + } + } + + if !changed { + return None; + } + } + }; + + for (left_count, right_count) in prioritized.into_iter().chain(fallback.into_iter()) { + let mut segments: Vec> = raw_segments[..left_count] + .iter() + .map(|seg| Segment { + original: seg, + text: (*seg).to_string(), + truncatable: true, + is_suffix: false, + }) + .collect(); + + let need_ellipsis = left_count + right_count < segment_count; + if need_ellipsis { + segments.push(Segment { + original: "…", + text: "…".to_string(), + truncatable: false, + is_suffix: false, + }); + } + + if right_count > 0 { + segments.extend( + raw_segments[segment_count - right_count..] + .iter() + .map(|seg| Segment { + original: seg, + text: (*seg).to_string(), + truncatable: true, + is_suffix: true, + }), + ); + } + + let allow_front_truncate = need_ellipsis || segment_count <= 2; + if let Some(candidate) = fit_segments(&mut segments, allow_front_truncate) { + return candidate; + } + } + + front_truncate(path, max_width) +} + #[cfg(test)] mod tests { use super::*; @@ -203,6 +418,49 @@ mod tests { ); } + #[test] + fn test_center_truncate_doesnt_truncate_short_path() { + let sep = std::path::MAIN_SEPARATOR; + let path = format!("{sep}Users{sep}codex{sep}Public"); + let truncated = center_truncate_path(&path, 40); + + assert_eq!(truncated, path); + } + + #[test] + fn test_center_truncate_truncates_long_path() { + let sep = std::path::MAIN_SEPARATOR; + let path = format!("~{sep}hello{sep}the{sep}fox{sep}is{sep}very{sep}fast"); + let truncated = center_truncate_path(&path, 24); + + assert_eq!( + truncated, + format!("~{sep}hello{sep}the{sep}…{sep}very{sep}fast") + ); + } + + #[test] + fn test_center_truncate_truncates_long_windows_path() { + let sep = std::path::MAIN_SEPARATOR; + let path = format!( + "C:{sep}Users{sep}codex{sep}Projects{sep}super{sep}long{sep}windows{sep}path{sep}file.txt" + ); + let truncated = center_truncate_path(&path, 36); + + let expected = format!("C:{sep}Users{sep}codex{sep}…{sep}path{sep}file.txt"); + + assert_eq!(truncated, expected); + } + + #[test] + fn test_center_truncate_handles_long_segment() { + let sep = std::path::MAIN_SEPARATOR; + let path = format!("~{sep}supercalifragilisticexpialidocious"); + let truncated = center_truncate_path(&path, 18); + + assert_eq!(truncated, format!("~{sep}…cexpialidocious")); + } + #[test] fn test_format_json_compact_array() { let json = r#"[ 1, 2, { "key": "value" }, "string" ]"#; diff --git a/codex-rs/tui/src/tui.rs b/codex-rs/tui/src/tui.rs index 26c188668d..6d7b9e8101 100644 --- a/codex-rs/tui/src/tui.rs +++ b/codex-rs/tui/src/tui.rs @@ -17,7 +17,9 @@ use crossterm::SynchronizedUpdate; use crossterm::cursor; use crossterm::cursor::MoveTo; use crossterm::event::DisableBracketedPaste; +use crossterm::event::DisableFocusChange; use crossterm::event::EnableBracketedPaste; +use crossterm::event::EnableFocusChange; use crossterm::event::Event; use crossterm::event::KeyEvent; use crossterm::event::KeyboardEnhancementFlags; @@ -60,6 +62,8 @@ pub fn set_modes() -> Result<()> { | KeyboardEnhancementFlags::REPORT_ALTERNATE_KEYS ) ); + + let _ = execute!(stdout(), EnableFocusChange); Ok(()) } @@ -111,6 +115,7 @@ pub fn restore() -> Result<()> { // Pop may fail on platforms that didn't support the push; ignore errors. let _ = execute!(stdout(), PopKeyboardEnhancementFlags); execute!(stdout(), DisableBracketedPaste)?; + let _ = execute!(stdout(), DisableFocusChange); disable_raw_mode()?; let _ = execute!(stdout(), crossterm::cursor::Show); Ok(()) @@ -163,6 +168,8 @@ pub struct Tui { suspend_cursor_y: Arc, // Bottom line of inline viewport // True when overlay alt-screen UI is active alt_screen_active: Arc, + // True when terminal/tab is focused; updated internally from crossterm events + terminal_focused: Arc, } #[cfg(unix)] @@ -214,6 +221,16 @@ impl FrameRequester { } impl Tui { + /// Emit a desktop notification now if the terminal is unfocused. + /// Returns true if a notification was posted. + pub fn notify(&mut self, message: impl AsRef) -> bool { + if !self.terminal_focused.load(Ordering::Relaxed) { + let _ = execute!(stdout(), PostNotification(message.as_ref().to_string())); + true + } else { + false + } + } pub fn new(terminal: Terminal) -> Self { let (frame_schedule_tx, frame_schedule_rx) = tokio::sync::mpsc::unbounded_channel(); let (draw_tx, _) = tokio::sync::broadcast::channel(1); @@ -270,6 +287,7 @@ impl Tui { #[cfg(unix)] suspend_cursor_y: Arc::new(AtomicU16::new(0)), alt_screen_active: Arc::new(AtomicBool::new(false)), + terminal_focused: Arc::new(AtomicBool::new(true)), } } @@ -289,6 +307,7 @@ impl Tui { let alt_screen_active = self.alt_screen_active.clone(); #[cfg(unix)] let suspend_cursor_y = self.suspend_cursor_y.clone(); + let terminal_focused = self.terminal_focused.clone(); let event_stream = async_stream::stream! { loop { select! { @@ -332,6 +351,12 @@ impl Tui { Event::Paste(pasted) => { yield TuiEvent::Paste(pasted); } + Event::FocusGained => { + terminal_focused.store(true, Ordering::Relaxed); + } + Event::FocusLost => { + terminal_focused.store(false, Ordering::Relaxed); + } _ => {} } } @@ -535,3 +560,25 @@ impl Tui { })? } } + +/// Command that emits an OSC 9 desktop notification with a message. +#[derive(Debug, Clone)] +pub struct PostNotification(pub String); + +impl Command for PostNotification { + fn write_ansi(&self, f: &mut impl std::fmt::Write) -> std::fmt::Result { + write!(f, "\x1b]9;{}\x07", self.0) + } + + #[cfg(windows)] + fn execute_winapi(&self) -> std::io::Result<()> { + Err(std::io::Error::other( + "tried to execute PostNotification using WinAPI; use ANSI instead", + )) + } + + #[cfg(windows)] + fn is_ansi_code_supported(&self) -> bool { + true + } +} diff --git a/codex-rs/tui/src/ui_consts.rs b/codex-rs/tui/src/ui_consts.rs new file mode 100644 index 0000000000..b249cd5fcf --- /dev/null +++ b/codex-rs/tui/src/ui_consts.rs @@ -0,0 +1,10 @@ +//! Shared UI constants for layout and alignment within the TUI. + +/// Width (in terminal columns) reserved for the left gutter/prefix used by +/// live cells and aligned widgets. +/// +/// Semantics: +/// - Chat composer reserves this many columns for the left border + padding. +/// - Status indicator lines begin with this many spaces for alignment. +/// - User history lines account for this many columns (e.g., "▌ ") when wrapping. +pub(crate) const LIVE_PREFIX_COLS: u16 = 2; diff --git a/docs/advanced.md b/docs/advanced.md index 38fbd0db45..4edca7646f 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -12,6 +12,40 @@ Run Codex head-less in pipelines. Example GitHub Action step: codex exec --full-auto "update CHANGELOG for next release" ``` +### Resuming non-interactive sessions + +You can resume a previous headless run to continue the same conversation context and append to the same rollout file. + +Interactive TUI equivalent: + +```shell +codex resume # picker +codex resume --last # most recent +codex resume +``` + +Compatibility: + +- Latest source builds include `codex exec resume` (examples below). +- Current released CLI may not include this yet. If `codex exec --help` shows no `resume`, use the workaround in the next subsection. + +```shell +# Resume the most recent recorded session and run with a new prompt (source builds) +codex exec "ship a release draft changelog" resume --last + +# Alternatively, pass the prompt via stdin (source builds) +# Note: omit the trailing '-' to avoid it being parsed as a SESSION_ID +echo "ship a release draft changelog" | codex exec resume --last + +# Or resume a specific session by id (UUID) (source builds) +codex exec resume 7f9f9a2e-1b3c-4c7a-9b0e-123456789abc "continue the task" +``` + +Notes: + +- When using `--last`, Codex picks the newest recorded session; if none exist, it behaves like starting fresh. +- Resuming appends new events to the existing session file and maintains the same conversation id. + ## Tracing / verbose logging Because Codex is written in Rust, it honors the `RUST_LOG` environment variable to configure its logging behavior. @@ -54,22 +88,22 @@ Send a `tools/list` request and you will see that there are two tools available: Property | Type | Description -------------------|----------|---------------------------------------------------------------------------------------------------------- -approval-policy | string | Approval policy for shell commands generated by the model: `untrusted`, `on-failure`, `never`. -base-instructions | string | The set of instructions to use instead of the default ones. -config | object | Individual [config settings](https://github.com/openai/codex/blob/main/docs/config.md#config) that will override what is in CODEX_HOME/config.toml. -cwd | string | Working directory for the session. If relative, resolved against the server process's current directory. -include-plan-tool | boolean | Whether to include the plan tool in the conversation. -model | string | Optional override for the model name (e.g. "o3", "o4-mini"). -profile | string | Configuration profile from config.toml to specify default options. -**prompt** (required) | string | The initial user prompt to start the Codex conversation. -sandbox | string | Sandbox mode: `read-only`, `workspace-write`, or `danger-full-access`. +**`prompt`** (required) | string | The initial user prompt to start the Codex conversation. +`approval-policy` | string | Approval policy for shell commands generated by the model: `untrusted`, `on-failure`, `never`. +`base-instructions` | string | The set of instructions to use instead of the default ones. +`config` | object | Individual [config settings](https://github.com/openai/codex/blob/main/docs/config.md#config) that will override what is in `$CODEX_HOME/config.toml`. +`cwd` | string | Working directory for the session. If relative, resolved against the server process's current directory. +`include-plan-tool` | boolean | Whether to include the plan tool in the conversation. +`model` | string | Optional override for the model name (e.g. `o3`, `o4-mini`). +`profile` | string | Configuration profile from `config.toml` to specify default options. +`sandbox` | string | Sandbox mode: `read-only`, `workspace-write`, or `danger-full-access`. -**`codex-reply`** - Continue a Codex session by providing the session id and prompt. The `codex-reply` tool takes the following properties: +**`codex-reply`** - Continue a Codex session by providing the conversation id and prompt. The `codex-reply` tool takes the following properties: Property | Type | Description -----------|--------|--------------------------------------------------------------- -**prompt** (required) | string | The next user prompt to continue the Codex conversation. -**conversationId** (required) | string | The id of the conversation to continue. +**`prompt`** (required) | string | The next user prompt to continue the Codex conversation. +**`conversationId`** (required) | string | The id of the conversation to continue. ### Trying it Out > [!TIP] diff --git a/docs/config.md b/docs/config.md index efd152aa46..01b3efe0a1 100644 --- a/docs/config.md +++ b/docs/config.md @@ -367,6 +367,24 @@ env = { "API_KEY" = "value" } startup_timeout_ms = 20_000 ``` +You can also manage these entries from the CLI [experimental]: + +```shell +# Add a server (env can be repeated; `--` separates the launcher command) +codex mcp add docs -- docs-server --port 4000 + +# List configured servers (pretty table or JSON) +codex mcp list +codex mcp list --json + +# Show one server (table or JSON) +codex mcp get docs +codex mcp get docs --json + +# Remove a server +codex mcp remove docs +``` + ## shell_environment_policy Codex spawns subprocesses (e.g. when executing a `local_shell` tool-call suggested by the assistant). By default it now passes **your full environment** to those subprocesses. You can tune this behavior via the **`shell_environment_policy`** block in `config.toml`: @@ -486,6 +504,9 @@ To have Codex use this script for notifications, you would configure it via `not notify = ["python3", "/Users/mbolin/.codex/notify.py"] ``` +> [!NOTE] +> Use `notify` for automation and integrations: Codex invokes your external program with a single JSON argument for each event, independent of the TUI. If you only want lightweight desktop notifications while using the TUI, prefer `tui.notifications`, which uses terminal escape codes and requires no external program. You can enable both; `tui.notifications` covers in‑TUI alerts (e.g., approval prompts), while `notify` is best for system‑level hooks or custom notifiers. Currently, `notify` emits only `agent-turn-complete`, whereas `tui.notifications` supports `agent-turn-complete` and `approval-requested` with optional filtering. + ## history By default, Codex CLI records messages sent to the model in `$CODEX_HOME/history.jsonl`. Note that on UNIX, the file permissions are set to `o600`, so it should only be readable and writable by the owner. @@ -558,9 +579,21 @@ Options that are specific to the TUI. ```toml [tui] -# More to come here +# Send desktop notifications when approvals are required or a turn completes. +# Defaults to false. +notifications = true + +# You can optionally filter to specific notification types. +# Available types are "agent-turn-complete" and "approval-requested". +notifications = [ "agent-turn-complete", "approval-requested" ] ``` +> [!NOTE] +> Codex emits desktop notifications using terminal escape codes. Not all terminals support these (notably, macOS Terminal.app and VS Code's terminal do not support custom notifications. iTerm2, Ghostty and WezTerm do support these notifications). + +> [!NOTE] +> `tui.notifications` is built‑in and limited to the TUI session. For programmatic or cross‑environment notifications—or to integrate with OS‑specific notifiers—use the top‑level `notify` option to run an external program that receives event JSON. The two settings are independent and can be used together. + ## Config reference | Key | Type / Values | Notes | @@ -598,7 +631,8 @@ Options that are specific to the TUI. | `history.persistence` | `save-all` \| `none` | History file persistence (default: `save-all`). | | `history.max_bytes` | number | Currently ignored (not enforced). | | `file_opener` | `vscode` \| `vscode-insiders` \| `windsurf` \| `cursor` \| `none` | URI scheme for clickable citations (default: `vscode`). | -| `tui` | table | TUI‑specific options (reserved). | +| `tui` | table | TUI‑specific options. | +| `tui.notifications` | boolean \| array | Enable desktop notifications in the tui (default: false). | | `hide_agent_reasoning` | boolean | Hide model reasoning events. | | `show_raw_agent_reasoning` | boolean | Show raw reasoning (when available). | | `model_reasoning_effort` | `minimal` \| `low` \| `medium` \| `high` | Responses API reasoning effort. | diff --git a/docs/getting-started.md b/docs/getting-started.md index cc7dd1293c..e97de6a048 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -10,19 +10,24 @@ Key flags: `--model/-m`, `--ask-for-approval/-a`. - ### Running with a prompt as input