File tree Expand file tree Collapse file tree
src/cortex-tui/src/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ impl CommandExecutor {
9898 "mcp" => self . cmd_mcp ( cmd) ,
9999 "mcp-tools" | "tools" | "lt" => CommandResult :: OpenModal ( ModalType :: McpManager ) ,
100100 "mcp-auth" | "auth" => CommandResult :: OpenModal ( ModalType :: McpManager ) ,
101+ "mcp-remove" | "mcp-rm" => CommandResult :: OpenModal ( ModalType :: McpManager ) ,
101102 "mcp-reload" => CommandResult :: OpenModal ( ModalType :: McpManager ) ,
102103 "mcp-logs" => CommandResult :: OpenModal ( ModalType :: McpManager ) ,
103104
Original file line number Diff line number Diff line change @@ -256,6 +256,18 @@ fn test_async_commands() {
256256 ) ) ;
257257}
258258
259+ #[ test]
260+ fn test_mcp_remove_commands_open_mcp_manager ( ) {
261+ let executor = CommandExecutor :: new ( ) ;
262+
263+ for command in [ "/mcp-remove" , "/mcp-rm" ] {
264+ assert ! ( matches!(
265+ executor. execute_str( command) ,
266+ CommandResult :: OpenModal ( ModalType :: McpManager )
267+ ) ) ;
268+ }
269+ }
270+
259271#[ test]
260272fn test_add_command ( ) {
261273 let executor = CommandExecutor :: new ( ) ;
Original file line number Diff line number Diff line change @@ -590,6 +590,15 @@ pub fn register_builtin_commands(registry: &mut CommandRegistry) {
590590 false ,
591591 ) ) ;
592592
593+ registry. register ( CommandDef :: new (
594+ "mcp-remove" ,
595+ & [ "mcp-rm" ] ,
596+ "Remove MCP servers" ,
597+ "/mcp-remove" ,
598+ CommandCategory :: Mcp ,
599+ false ,
600+ ) ) ;
601+
593602 registry. register ( CommandDef :: new (
594603 "mcp-reload" ,
595604 & [ ] ,
Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ mod tests {
195195 assert ! ( registry. exists( "mcp" ) ) ;
196196 assert ! ( registry. exists( "mcp-tools" ) ) ;
197197 assert ! ( registry. exists( "mcp-auth" ) ) ;
198+ assert ! ( registry. exists( "mcp-remove" ) ) ;
199+ assert ! ( registry. exists( "mcp-rm" ) ) ;
198200 assert ! ( registry. exists( "mcp-reload" ) ) ;
199201
200202 // Auth
You can’t perform that action at this time.
0 commit comments