chore: remove unused variables and tracing dependency in nvim-core
This commit is contained in:
1 parent
f76d8ccce8
commit
78e94c6aea
2 files changed
+3
-23
No files matched your search
+1
-21
@@ -524,20 +524,7 @@ pub async fn run_mcp_loop(app_name: &str, app_version: &str) {
|
||||
let app_version = app_version.to_string();
|
||||
|
||||
tokio::spawn(async move {
|
||||
let id = msg.id.clone().unwrap_or(json!(null));
|
||||
let id_clone = id.clone();
|
||||
let start_time = std::time::Instant::now();
|
||||
let method_clone = if msg.method == "tools/call" {
|
||||
let tool_name = msg
|
||||
.params
|
||||
.as_ref()
|
||||
.and_then(|p| p.get("name"))
|
||||
.and_then(|n| n.as_str())
|
||||
.unwrap_or("unknown");
|
||||
format!("ToolCall[{tool_name}]")
|
||||
} else {
|
||||
msg.method.clone()
|
||||
};
|
||||
let id = msg.id.unwrap_or(json!(null));
|
||||
|
||||
match msg.method.as_str() {
|
||||
"initialize" => {
|
||||
@@ -1026,13 +1013,6 @@ pub async fn run_mcp_loop(app_name: &str, app_version: &str) {
|
||||
}
|
||||
}
|
||||
}
|
||||
let elapsed = start_time.elapsed();
|
||||
tracing::info!(
|
||||
"<<< [Nvim] {} (id: {}) completed in {:?}",
|
||||
method_clone,
|
||||
id_clone,
|
||||
elapsed
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user