mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-06 08:21:50 +00:00
chore: generate
This commit is contained in:
parent
ca77b8f8e9
commit
837cc92586
1 changed files with 2 additions and 6 deletions
|
|
@ -27,12 +27,8 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|||
|
||||
beforeEach(() => {
|
||||
captured = null
|
||||
const handle = async (
|
||||
input: Parameters<typeof fetch>[0],
|
||||
init?: Parameters<typeof fetch>[1],
|
||||
): Promise<Response> => {
|
||||
const url =
|
||||
typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url
|
||||
const handle = async (input: Parameters<typeof fetch>[0], init?: Parameters<typeof fetch>[1]): Promise<Response> => {
|
||||
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url
|
||||
if (url.startsWith("https://gateway.ai.cloudflare.com/")) {
|
||||
const bodyText = typeof init?.body === "string" ? init.body : ""
|
||||
captured = { url, outerBody: bodyText ? JSON.parse(bodyText) : null }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue