Update packages/core/src/tools/web-fetch.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Bryan Morgan
2026-02-22 15:04:11 -05:00
parent 2594201bee
commit aed28faf0f

View File

@@ -218,9 +218,10 @@ class WebFetchToolInvocation extends BaseToolInvocation<
const fetchedUrls: string[] = [];
const errors: string[] = [];
const perUrlBudget = Math.floor(MAX_CONTENT_LENGTH / urls.length);
for (const url of urls) {
try {
const result = await this.executeFallbackForUrl(url, signal);
const result = await this.executeFallbackForUrl(url, signal, perUrlBudget);
allContent.push(`--- Content from ${url} ---\n${result.content}`);
fetchedUrls.push(url);
} catch (e) {