chore: generate

pull/20567/head
opencode-agent[bot] 2026-04-01 23:48:30 +00:00
parent d9d4f895bc
commit 4214ae205d
2 changed files with 10 additions and 13 deletions

View File

@ -64,9 +64,7 @@ async function patchWithMock(
// Wait for the agent loop to actually start before checking idle.
// promptAsync is fire-and-forget — without this, waitSessionIdle can
// return immediately because the session status is still undefined.
await expect
.poll(() => llm.calls().then((c) => c > callsBefore), { timeout: 30_000 })
.toBe(true)
await expect.poll(() => llm.calls().then((c) => c > callsBefore), { timeout: 30_000 }).toBe(true)
await waitSessionIdle(sdk, sessionID, 120_000)
}

View File

@ -183,15 +183,11 @@ it.live("tool execution produces non-empty session diff (snapshot race)", () =>
// Use bash tool (always registered) to create a file
const command = `echo 'snapshot race test content' > ${path.join(dir, "race-test.txt")}`
yield* llm.toolMatch(
(hit) => JSON.stringify(hit.body).includes("create the file"),
"bash",
{ command, description: "create test file" },
)
yield* llm.textMatch(
(hit) => JSON.stringify(hit.body).includes("bash"),
"done",
)
yield* llm.toolMatch((hit) => JSON.stringify(hit.body).includes("create the file"), "bash", {
command,
description: "create test file",
})
yield* llm.textMatch((hit) => JSON.stringify(hit.body).includes("bash"), "done")
// Seed user message
yield* prompt.prompt({
@ -208,7 +204,10 @@ it.live("tool execution produces non-empty session diff (snapshot race)", () =>
// Verify the file was created
const filePath = path.join(dir, "race-test.txt")
const fileExists = yield* Effect.promise(() =>
fs.access(filePath).then(() => true).catch(() => false),
fs
.access(filePath)
.then(() => true)
.catch(() => false),
)
expect(fileExists).toBe(true)