Skip to content

Commit 456398d

Browse files
committed
use any
1 parent 2807fa2 commit 456398d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/q_cli/src/cli/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,11 @@ impl Cli {
353353
CliRootCommands::Version { changelog } => Self::print_version(changelog),
354354
CliRootCommands::Dashboard => launch_dashboard(false).await,
355355
CliRootCommands::Chat { args } => Self::execute_chat("chat", Some(args), true).await,
356-
CliRootCommands::Mcp { mut args } => {
357-
if args.is_empty() || matches!(args.first().map(|s| s.as_str()), Some("--help" | "-h")) {
358-
args = vec!["--help".into()];
356+
CliRootCommands::Mcp {args } => {
357+
if args.iter().any(|arg| ["--help", "-h"].contains(&arg.as_str())) {
358+
return Self::execute_chat("mcp", Some(vec!["--help".to_owned()]), false).await;
359359
}
360+
360361
Self::execute_chat("mcp", Some(args), true).await
361362
},
362363
CliRootCommands::Inline(subcommand) => subcommand.execute(&cli_context).await,

0 commit comments

Comments
 (0)