feat(mcp): enhance MCP server registration with error handling and improve transport process management
refactor: update various tools for better error handling and path resolution fix: improve markdown rendering and input display in TUI
This commit is contained in:
@@ -427,9 +427,15 @@ fn handle_open_editor(state: &mut AppStateRest, path: String) {
|
||||
|
||||
fn handle_mcp_add(state: &mut AppStateRest, name: String, command: String) {
|
||||
tracing::info!("adding MCP server: {name}");
|
||||
state.mcp_manager.register(&name, &command);
|
||||
state.toast_success(format!("MCP server '{name}' added with command: {command}"));
|
||||
state.dirty = true;
|
||||
match state.mcp_manager.register(&name, &command) {
|
||||
Ok(()) => {
|
||||
state.toast_success(format!("MCP server '{name}' added with command: {command}"));
|
||||
state.dirty = true;
|
||||
}
|
||||
Err(e) => {
|
||||
state.toast_error(format!("Failed to add MCP server '{name}': {e}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_start_oauth(state: &mut AppStateRest, provider: String) {
|
||||
|
||||
Reference in New Issue
Block a user