File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments