diff --git a/packages/core/src/tools/web-fetch.ts b/packages/core/src/tools/web-fetch.ts index 739745a5..01070537 100644 --- a/packages/core/src/tools/web-fetch.ts +++ b/packages/core/src/tools/web-fetch.ts @@ -171,28 +171,11 @@ ${textContent} return false; } - // Perform GitHub URL conversion here to differentiate between user-provided - // URL and the actual URL to be fetched. - let url = params.url; - try { - const parsedUrl = new URL(url); - if ( - parsedUrl.hostname === 'github.com' && - parsedUrl.pathname.includes('/blob/') - ) { - url = url - .replace('github.com', 'raw.githubusercontent.com') - .replace('/blob/', '/'); - } - } catch (e) { - // If the URL is invalid, leave it unchanged (or handle as needed) - } - const confirmationDetails: ToolCallConfirmationDetails = { type: 'info', title: `Confirm Web Fetch`, prompt: `Fetch content from ${params.url} and process with: ${params.prompt}`, - urls: [url], + urls: [params.url], onConfirm: async (outcome: ToolConfirmationOutcome) => { if (outcome === ToolConfirmationOutcome.ProceedAlways) { this.config.setApprovalMode(ApprovalMode.AUTO_EDIT);