mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 22:14:52 -07:00
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:
@@ -218,9 +218,10 @@ class WebFetchToolInvocation extends BaseToolInvocation<
|
|||||||
const fetchedUrls: string[] = [];
|
const fetchedUrls: string[] = [];
|
||||||
const errors: string[] = [];
|
const errors: string[] = [];
|
||||||
|
|
||||||
|
const perUrlBudget = Math.floor(MAX_CONTENT_LENGTH / urls.length);
|
||||||
for (const url of urls) {
|
for (const url of urls) {
|
||||||
try {
|
try {
|
||||||
const result = await this.executeFallbackForUrl(url, signal);
|
const result = await this.executeFallbackForUrl(url, signal, perUrlBudget);
|
||||||
allContent.push(`--- Content from ${url} ---\n${result.content}`);
|
allContent.push(`--- Content from ${url} ---\n${result.content}`);
|
||||||
fetchedUrls.push(url);
|
fetchedUrls.push(url);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user