[mcp-server] Expose fuzzy file search in MCP (#2677)

## Summary
Expose a simple fuzzy file search implementation for mcp clients to work
with

## Testing
- [x] Tested locally
This commit is contained in:
Dylan
2025-09-29 12:19:09 -07:00
committed by GitHub
parent 04c1782e52
commit 197f45a3be
11 changed files with 313 additions and 3 deletions

View File

@@ -357,6 +357,23 @@ impl McpProcess {
self.send_request("logoutChatGpt", None).await
}
/// Send a `fuzzyFileSearch` JSON-RPC request.
pub async fn send_fuzzy_file_search_request(
&mut self,
query: &str,
roots: Vec<String>,
cancellation_token: Option<String>,
) -> anyhow::Result<i64> {
let mut params = serde_json::json!({
"query": query,
"roots": roots,
});
if let Some(token) = cancellation_token {
params["cancellationToken"] = serde_json::json!(token);
}
self.send_request("fuzzyFileSearch", Some(params)).await
}
async fn send_request(
&mut self,
method: &str,