feat: add FetchUrlTool with proxy support and cross-OS path sanitization
- Implement native FetchUrlTool using reqwest for HTTP fetching, which respects HTTP_PROXY, HTTPS_PROXY, and NO_PROXY natively. - Introduce sanitize_path in utils to bidirectionally handle Windows/WSL path mapping, applying it to various search/git handlers. - Update .gitignore to exclude mcp_store.redb and tantivy_index.
This commit is contained in:
1 parent
250b70d329
commit
5583132cdc
10 files changed
+191
-5
No files matched your search
@@ -1033,3 +1033,12 @@ pub struct ClipboardTool {
|
||||
/// Image path (for 'write').
|
||||
pub image_path: Option<String>,
|
||||
}
|
||||
|
||||
/// Fetch content from a URL via an HTTP GET request natively (supports proxy config via environment variables: HTTP_PROXY, HTTPS_PROXY, NO_PROXY).
|
||||
#[derive(Debug, Deserialize, Serialize, JsonSchema)]
|
||||
pub struct FetchUrlTool {
|
||||
/// URL to fetch content from.
|
||||
pub url: String,
|
||||
/// Optional custom user-agent string.
|
||||
pub user_agent: Option<String>,
|
||||
}
|
||||
Reference in new issue
Block a user