fix: pnpm testcase bug
This commit is contained in:
parent
ea6fc87d6d
commit
bcd80f857d
@ -124,7 +124,8 @@ function resolveSearchApiKey(search?: WebSearchConfig): string | undefined {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resolveProxy(search?: WebSearchConfig): string | undefined {
|
function resolveProxy(search?: WebSearchConfig): string | undefined {
|
||||||
const fromConfig = search && "proxy" in search && typeof search.proxy === "string" ? search.proxy.trim() : "";
|
const fromConfig =
|
||||||
|
search && "proxy" in search && typeof search.proxy === "string" ? search.proxy.trim() : "";
|
||||||
return fromConfig || undefined;
|
return fromConfig || undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,7 +303,7 @@ async function runPerplexitySearch(params: {
|
|||||||
}),
|
}),
|
||||||
signal: withTimeout(undefined, params.timeoutSeconds * 1000),
|
signal: withTimeout(undefined, params.timeoutSeconds * 1000),
|
||||||
dispatcher,
|
dispatcher,
|
||||||
});
|
} as RequestInit);
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
const detail = await readResponseText(res);
|
const detail = await readResponseText(res);
|
||||||
@ -393,7 +394,7 @@ async function runWebSearch(params: {
|
|||||||
},
|
},
|
||||||
signal: withTimeout(undefined, params.timeoutSeconds * 1000),
|
signal: withTimeout(undefined, params.timeoutSeconds * 1000),
|
||||||
dispatcher,
|
dispatcher,
|
||||||
});
|
} as RequestInit);
|
||||||
|
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
const detail = await readResponseText(res);
|
const detail = await readResponseText(res);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user