File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ pub enum CliRootCommands {
201201 args : Vec < String > ,
202202 } ,
203203 /// Model Context Protocol (MCP)
204+ #[ command( disable_help_flag = true ) ]
204205 Mcp {
205206 /// Args for the MCP subcommand (passed through to `qchat mcp …`)
206207 #[ arg( trailing_var_arg = true , allow_hyphen_values = true ) ]
@@ -352,7 +353,12 @@ impl Cli {
352353 CliRootCommands :: Version { changelog } => Self :: print_version ( changelog) ,
353354 CliRootCommands :: Dashboard => launch_dashboard ( false ) . await ,
354355 CliRootCommands :: Chat { args } => Self :: execute_chat ( "chat" , Some ( args) , true ) . await ,
355- CliRootCommands :: Mcp { args } => Self :: execute_chat ( "mcp" , Some ( args) , true ) . await ,
356+ CliRootCommands :: Mcp { mut args } => {
357+ if args. is_empty ( ) || matches ! ( args. get( 0 ) . map( |s| s. as_str( ) ) , Some ( "--help" | "-h" ) ) {
358+ args = vec ! [ "--help" . into( ) ] ;
359+ }
360+ Self :: execute_chat ( "mcp" , Some ( args) , true ) . await
361+ } ,
356362 CliRootCommands :: Inline ( subcommand) => subcommand. execute ( & cli_context) . await ,
357363 } ,
358364 // Root command
You can’t perform that action at this time.
0 commit comments