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:
asepharyana
2026-07-20 13:12:04 +07:00
parent 89ee213454
commit 148ba4e07b
17 changed files with 242 additions and 82 deletions
+9 -3
View File
@@ -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) {