瀏覽代碼

chore: generate

opencode-agent[bot] 2 周之前
父節點
當前提交
0a125e5d4d

+ 8 - 2
packages/app/e2e/backend.ts

@@ -85,8 +85,14 @@ export async function startBackend(label: string): Promise<Handle> {
       stdio: ["ignore", "pipe", "pipe"],
     },
   )
-  proc.stdout?.on("data", (chunk) => { out.push(String(chunk)); cap(out) })
-  proc.stderr?.on("data", (chunk) => { err.push(String(chunk)); cap(err) })
+  proc.stdout?.on("data", (chunk) => {
+    out.push(String(chunk))
+    cap(out)
+  })
+  proc.stderr?.on("data", (chunk) => {
+    err.push(String(chunk))
+    cap(err)
+  })
 
   const url = `http://127.0.0.1:${port}`
   try {

+ 2 - 6
packages/app/e2e/fixtures.ts

@@ -186,9 +186,7 @@ export const test = base.extend<TestFixtures, WorkerFixtures>({
     await use(gotoSession)
   },
   withProject: async ({ page }, use) => {
-    await use((callback, options) =>
-      runProject(page, callback, options),
-    )
+    await use((callback, options) => runProject(page, callback, options))
   },
   withBackendProject: async ({ page, backend }, use) => {
     await use((callback, options) =>
@@ -241,9 +239,7 @@ async function runProject<T>(
   } finally {
     setHealthPhase(page, "cleanup")
     await Promise.allSettled(
-      Array.from(sessions, ([sessionID, directory]) =>
-        cleanupSession({ sessionID, directory, serverUrl: url }),
-      ),
+      Array.from(sessions, ([sessionID, directory]) => cleanupSession({ sessionID, directory, serverUrl: url })),
     )
     await Promise.allSettled(Array.from(dirs, (directory) => cleanupTestProject(directory)))
     await cleanupTestProject(root)

+ 1 - 3
packages/app/e2e/prompt/prompt-async.spec.ts

@@ -38,9 +38,7 @@ test("prompt succeeds when sync message endpoint is unreachable", async ({
 
           await expect.poll(() => llm.calls()).toBeGreaterThanOrEqual(1)
 
-          await expect
-            .poll(() => assistantText(project.sdk, sessionID), { timeout: 90_000 })
-            .toContain(token)
+          await expect.poll(() => assistantText(project.sdk, sessionID), { timeout: 90_000 }).toContain(token)
         },
         {
           model: openaiModel,

+ 1 - 3
packages/app/e2e/prompt/prompt.spec.ts

@@ -40,9 +40,7 @@ test("can send a prompt and receive a reply", async ({ page, llm, backend, withB
 
             await expect.poll(() => llm.calls()).toBeGreaterThanOrEqual(1)
 
-            await expect
-              .poll(() => assistantText(project.sdk, sessionID), { timeout: 30_000 })
-              .toContain(token)
+            await expect.poll(() => assistantText(project.sdk, sessionID), { timeout: 30_000 }).toContain(token)
           },
           {
             model: openaiModel,