diff --git a/src/cortex-cli/src/agent_cmd/tests.rs b/src/cortex-cli/src/agent_cmd/tests.rs index e2ff07f9f..18f7ba753 100644 --- a/src/cortex-cli/src/agent_cmd/tests.rs +++ b/src/cortex-cli/src/agent_cmd/tests.rs @@ -3,10 +3,9 @@ #[cfg(test)] mod tests { use crate::agent_cmd::cli::{CopyArgs, ExportArgs}; - use crate::agent_cmd::loader::{ - load_builtin_agents, parse_frontmatter, read_file_with_encoding, - }; + use crate::agent_cmd::loader::{load_builtin_agents, parse_frontmatter}; use crate::agent_cmd::types::AgentMode; + use crate::utils::file::read_file_with_encoding; #[test] fn test_read_file_with_utf8() { diff --git a/src/cortex-cli/src/cli/args.rs b/src/cortex-cli/src/cli/args.rs index 641d63a4a..22707c034 100644 --- a/src/cortex-cli/src/cli/args.rs +++ b/src/cortex-cli/src/cli/args.rs @@ -187,7 +187,7 @@ pub struct InteractiveArgs { )] pub dangerously_bypass_approvals_and_sandbox: bool, - /// Tell the agent to use the specified directory as its working root + /// Tell the agent to use the specified directory as its working directory #[arg( long = "cd", short = 'C', @@ -857,6 +857,7 @@ pub struct HistoryClearArgs { #[cfg(test)] mod tests { use super::*; + use clap::CommandFactory; use clap::Parser; // ========================================================================== @@ -969,6 +970,14 @@ mod tests { assert!(args.prompt.is_empty()); } + #[test] + fn test_cd_help_uses_working_directory() { + let help = Cli::command().render_long_help().to_string(); + + assert!(help.contains("working directory")); + assert!(!help.contains("working root")); + } + // ========================================================================== // Cli parsing tests // ==========================================================================