(state: State<'_, AppState>, server_id: String)
| 386 | |
| 387 | #[tauri::command] |
| 388 | pub async fn start_mcp_server(state: State<'_, AppState>, server_id: String) -> Result<(), String> { |
| 389 | let mcp_service = state |
| 390 | .mcp_service |
| 391 | .as_ref() |
| 392 | .ok_or_else(|| "MCP service not initialized".to_string())?; |
| 393 | |
| 394 | mcp_service |
| 395 | .server_manager() |
| 396 | .start_server(&server_id) |
| 397 | .await |
| 398 | .map_err(|e| e.to_string())?; |
| 399 | |
| 400 | Ok(()) |
| 401 | } |
| 402 | |
| 403 | #[tauri::command] |
| 404 | pub async fn stop_mcp_server(state: State<'_, AppState>, server_id: String) -> Result<(), String> { |
nothing calls this directly
no test coverage detected