From 637713178d49b15c1d94db01af0069470c04ec95 Mon Sep 17 00:00:00 2001 From: jimmyfraiture Date: Fri, 10 Oct 2025 17:15:45 +0200 Subject: [PATCH] Fix merge 2 --- codex-rs/Cargo.lock | 1 + codex-rs/git-tooling/src/ghost_commits.rs | 2 +- codex-rs/tui/Cargo.toml | 1 + codex-rs/tui/src/chatwidget.rs | 7 ------- codex-rs/tui/src/slash_command.rs | 8 +------- 5 files changed, 4 insertions(+), 15 deletions(-) diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index a3381054e0..177cee1005 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -1390,6 +1390,7 @@ dependencies = [ "codex-common", "codex-core", "codex-file-search", + "codex-git-tooling", "codex-login", "codex-ollama", "codex-protocol", diff --git a/codex-rs/git-tooling/src/ghost_commits.rs b/codex-rs/git-tooling/src/ghost_commits.rs index e5449a9ce7..ec31c377d3 100644 --- a/codex-rs/git-tooling/src/ghost_commits.rs +++ b/codex-rs/git-tooling/src/ghost_commits.rs @@ -269,7 +269,7 @@ fn remove_new_untracked( } let preserved_file_set: HashSet = preserved_files.iter().cloned().collect(); - let preserved_dirs_vec: Vec = preserved_dirs.iter().cloned().collect(); + let preserved_dirs_vec: Vec = preserved_dirs.to_vec(); for path in current.files { if should_preserve(&path, &preserved_file_set, &preserved_dirs_vec) { diff --git a/codex-rs/tui/Cargo.toml b/codex-rs/tui/Cargo.toml index 4c1d2c5e30..2c6f32a20a 100644 --- a/codex-rs/tui/Cargo.toml +++ b/codex-rs/tui/Cargo.toml @@ -35,6 +35,7 @@ codex-common = { workspace = true, features = [ ] } codex-core = { workspace = true } codex-file-search = { workspace = true } +codex-git-tooling = { workspace = true } codex-login = { workspace = true } codex-ollama = { workspace = true } codex-protocol = { workspace = true } diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 06571b6585..e71b581ea7 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -106,16 +106,9 @@ use codex_core::protocol::AskForApproval; use codex_core::protocol::SandboxPolicy; use codex_core::protocol_config_types::ReasoningEffort as ReasoningEffortConfig; use codex_file_search::FileMatch; -use codex_git_tooling::CreateGhostCommitOptions; -use codex_git_tooling::GhostCommit; -use codex_git_tooling::GitToolingError; -use codex_git_tooling::create_ghost_commit; -use codex_git_tooling::restore_ghost_commit; use codex_protocol::plan_tool::UpdatePlanArgs; use strum::IntoEnumIterator; -const MAX_TRACKED_GHOST_COMMITS: usize = 20; - // Track information about an in-flight exec command. struct RunningCommand { command: Vec, diff --git a/codex-rs/tui/src/slash_command.rs b/codex-rs/tui/src/slash_command.rs index e9a2321ff8..f9a9e74c73 100644 --- a/codex-rs/tui/src/slash_command.rs +++ b/codex-rs/tui/src/slash_command.rs @@ -85,13 +85,7 @@ pub fn built_in_slash_commands() -> Vec<(&'static str, SlashCommand)> { let show_beta_features = beta_features_enabled(); SlashCommand::iter() - .filter(|cmd| { - if *cmd == SlashCommand::Undo { - true - } else { - true - } - }) + .filter(|cmd| show_beta_features || *cmd != SlashCommand::Undo) .map(|c| (c.command(), c)) .collect() }