diff --git a/e2e/src/suite/task.test.ts b/e2e/src/suite/task.test.ts index e83f2734d1f..434d1fcc4f9 100644 --- a/e2e/src/suite/task.test.ts +++ b/e2e/src/suite/task.test.ts @@ -23,11 +23,11 @@ suite("Roo Code Task", () => { await waitUntilCompleted({ api, taskId }) - const completion = messages.find(({ say, partial }) => say === "completion_result") - assert.ok( - completion?.text?.includes("My name is Roo"), - `Completion should include "My name is Roo" - ${completion?.text}`, + !!messages.find( + ({ say, text }) => (say === "completion_result" || say === "text") && text?.includes("My name is Roo"), + ), + `Completion should include "My name is Roo"`, ) }) }) diff --git a/evals/apps/web/src/app/runs/new/settings-diff.tsx b/evals/apps/web/src/app/runs/new/settings-diff.tsx index 2b4c5b87cf8..774ee4680f3 100644 --- a/evals/apps/web/src/app/runs/new/settings-diff.tsx +++ b/evals/apps/web/src/app/runs/new/settings-diff.tsx @@ -28,7 +28,7 @@ export function SettingsDiff({ const isDefault = JSON.stringify(defaultValue) === JSON.stringify(customValue) return isDefault ? null : ( - & { customValue?: string } -export function SetttingDiff({ name, defaultValue, customValue, ...props }: SettingDiffProps) { +export function SettingDiff({ name, defaultValue, customValue, ...props }: SettingDiffProps) { return (
{name}
diff --git a/evals/apps/web/src/lib/server/processes.ts b/evals/apps/web/src/lib/server/processes.ts index c2fdd1903ca..fdf2f22b377 100644 --- a/evals/apps/web/src/lib/server/processes.ts +++ b/evals/apps/web/src/lib/server/processes.ts @@ -3,32 +3,33 @@ import psTree from "ps-tree" import { exec } from "child_process" -export const getProcessList = async (pid: number) => { - const promise = new Promise((resolve, reject) => { - exec(`ps -p ${pid} -o pid=`, (err, stdout, stderr) => { - if (err) { - reject(stderr) +const asyncExec = (command: string): Promise<{ stdout: string; stderr: string }> => + new Promise((resolve, reject) => { + exec(command, (error, stdout, stderr) => { + if (error) { + reject(error) + } else { + resolve({ stdout, stderr }) } - - resolve(stdout) }) }) +export const getProcessList = async (pid: number) => { try { - await promise - } catch (_) { - return null - } + await asyncExec(`ps -p ${pid} -o pid=`) - return new Promise((resolve, reject) => { - psTree(pid, (err, children) => { - if (err) { - reject(err) - } + return new Promise((resolve, reject) => { + psTree(pid, (err, children) => { + if (err) { + reject(err) + } - resolve(children.map((p) => parseInt(p.PID))) + resolve(children.map((p) => parseInt(p.PID))) + }) }) - }) + } catch (_) { + return null + } } export const killProcessTree = async (pid: number) => { @@ -39,8 +40,16 @@ export const killProcessTree = async (pid: number) => { } if (descendants.length > 0) { - await exec(`kill -9 ${descendants.join(" ")}`) + try { + await asyncExec(`kill -9 ${descendants.join(" ")}`) + } catch (error) { + console.error("Error killing descendant processes:", error) + } } - await exec(`kill -9 ${pid}`) + try { + await asyncExec(`kill -9 ${pid}`) + } catch (error) { + console.error("Error killing main process:", error) + } } diff --git a/evals/packages/db/README.md b/evals/packages/db/README.md index d5cca7332cc..cd5edc3f232 100644 --- a/evals/packages/db/README.md +++ b/evals/packages/db/README.md @@ -6,7 +6,7 @@ Update `src/schema.ts` as needed, and then run: pnpm db:generate ``` -Inspect the generated sql in the migration filed added to `drizzle/`. +Inspect the sql in the migration file added to `drizzle/`. If it looks okay, then run: