Browse Source

chore: generate

opencode-agent[bot] 5 months ago
parent
commit
4214ae205d

+ 1 - 3
packages/app/e2e/session/session-review.spec.ts

@@ -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)
 }

+ 9 - 10
packages/opencode/test/session/snapshot-tool-race.test.ts

@@ -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)