mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 21:03:05 -07:00
fix(core): remove invalid third argument to fetchWithTimeout in web-fetch
This commit is contained in:
@@ -171,7 +171,7 @@ class WebFetchToolInvocation extends BaseToolInvocation<
|
|||||||
|
|
||||||
const response = await retryWithBackoff(
|
const response = await retryWithBackoff(
|
||||||
async () => {
|
async () => {
|
||||||
const res = await fetchWithTimeout(fetchUrl, URL_FETCH_TIMEOUT_MS, signal);
|
const res = await fetchWithTimeout(fetchUrl, URL_FETCH_TIMEOUT_MS);
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
const error = new Error(
|
const error = new Error(
|
||||||
`Request failed with status code ${res.status} ${res.statusText}`,
|
`Request failed with status code ${res.status} ${res.statusText}`,
|
||||||
@@ -221,7 +221,11 @@ class WebFetchToolInvocation extends BaseToolInvocation<
|
|||||||
const perUrlBudget = Math.floor(MAX_CONTENT_LENGTH / urls.length);
|
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, perUrlBudget);
|
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