fix: correct KeepMcpServer import path and remove unused imports
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -1,14 +1,15 @@
|
|||||||
pub mod server;
|
pub mod server;
|
||||||
pub mod tools;
|
pub mod tools;
|
||||||
|
|
||||||
|
pub use server::KeepMcpServer;
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::State,
|
extract::State,
|
||||||
http::StatusCode,
|
http::StatusCode,
|
||||||
response::IntoResponse,
|
response::IntoResponse,
|
||||||
Json,
|
Json,
|
||||||
};
|
};
|
||||||
use log::error;
|
use serde::Deserialize;
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
|
||||||
use crate::modes::server::common::AppState;
|
use crate::modes::server::common::AppState;
|
||||||
@@ -24,7 +25,7 @@ pub async fn handle_mcp_request(
|
|||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
Json(request): Json<McpRequest>,
|
Json(request): Json<McpRequest>,
|
||||||
) -> impl IntoResponse {
|
) -> impl IntoResponse {
|
||||||
let mcp_server = server::KeepMcpServer::new(state);
|
let mcp_server = KeepMcpServer::new(state);
|
||||||
|
|
||||||
match mcp_server.handle_request(&request.method, request.params).await {
|
match mcp_server.handle_request(&request.method, request.params).await {
|
||||||
Ok(result) => {
|
Ok(result) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user