mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
chore: remove https restricton
This commit is contained in:
@@ -46,7 +46,7 @@ export class WebFetchTool extends BaseTool<WebFetchToolParams, ToolResult> {
|
|||||||
super(
|
super(
|
||||||
WebFetchTool.Name,
|
WebFetchTool.Name,
|
||||||
'WebFetch',
|
'WebFetch',
|
||||||
'Fetches content from a specified URL and processes it using an AI model\n- Takes a URL and a prompt as input\n- Fetches the URL content, converts HTML to markdown\n- Processes the content with the prompt using a small, fast model\n- Returns the model\'s response about the content\n- Use this tool when you need to retrieve and analyze web content\n\nUsage notes:\n - IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions. All MCP-provided tools start with "mcp__".\n - The URL must be a fully-formed valid URL\n - HTTP URLs will be automatically upgraded to HTTPS\n - The prompt should describe what information you want to extract from the page\n - This tool is read-only and does not modify any files\n - Results may be summarized if the content is very large',
|
'Fetches content from a specified URL and processes it using an AI model\n- Takes a URL and a prompt as input\n- Fetches the URL content, converts HTML to markdown\n- Processes the content with the prompt using a small, fast model\n- Returns the model\'s response about the content\n- Use this tool when you need to retrieve and analyze web content\n\nUsage notes:\n - IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions. All MCP-provided tools start with "mcp__".\n - The URL must be a fully-formed valid URL\n - The prompt should describe what information you want to extract from the page\n - This tool is read-only and does not modify any files\n - Results may be summarized if the content is very large',
|
||||||
Icon.Globe,
|
Icon.Globe,
|
||||||
{
|
{
|
||||||
properties: {
|
properties: {
|
||||||
@@ -82,11 +82,6 @@ export class WebFetchTool extends BaseTool<WebFetchToolParams, ToolResult> {
|
|||||||
.replace('/blob/', '/');
|
.replace('/blob/', '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Upgrade HTTP to HTTPS
|
|
||||||
if (url.startsWith('http://')) {
|
|
||||||
url = url.replace('http://', 'https://');
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetchWithTimeout(url, URL_FETCH_TIMEOUT_MS);
|
const response = await fetchWithTimeout(url, URL_FETCH_TIMEOUT_MS);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user