mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
Fix evals
This commit is contained in:
parent
e41438faaf
commit
dc7579f63d
1 changed files with 15 additions and 7 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import * as fs from "fs"
|
||||
import * as path from "path"
|
||||
import * as os from "node:os"
|
||||
|
||||
|
|
@ -20,7 +19,7 @@ import { mergeToolUsage, waitForSubprocessWithTimeout } from "./utils.js"
|
|||
*/
|
||||
export const runTaskWithCli = async ({ run, task, publish, logger, jobToken }: RunTaskOptions) => {
|
||||
const { language, exercise } = task
|
||||
const prompt = fs.readFileSync(path.resolve(EVALS_REPO_PATH, `prompts/${language}.md`), "utf-8")
|
||||
const promptSourcePath = path.resolve(EVALS_REPO_PATH, `prompts/${language}.md`)
|
||||
const workspacePath = path.resolve(EVALS_REPO_PATH, language, exercise)
|
||||
const ipcSocketPath = path.resolve(os.tmpdir(), `evals-cli-${run.id}-${task.id}.sock`)
|
||||
|
||||
|
|
@ -36,7 +35,19 @@ export const runTaskWithCli = async ({ run, task, publish, logger, jobToken }: R
|
|||
const controller = new AbortController()
|
||||
const cancelSignal = controller.signal
|
||||
|
||||
const cliArgs = ["--filter", "@roo-code/cli", "start", "--yes", "--print", "--reasoning-effort", "disabled"]
|
||||
const cliArgs = [
|
||||
"--filter",
|
||||
"@roo-code/cli",
|
||||
"start",
|
||||
"--prompt-file",
|
||||
promptSourcePath,
|
||||
"--workspace",
|
||||
workspacePath,
|
||||
"--yes",
|
||||
"--reasoning-effort",
|
||||
"disabled",
|
||||
"--oneshot",
|
||||
]
|
||||
|
||||
if (run.settings?.mode) {
|
||||
cliArgs.push("--mode", run.settings.mode)
|
||||
|
|
@ -52,11 +63,8 @@ export const runTaskWithCli = async ({ run, task, publish, logger, jobToken }: R
|
|||
cliArgs.push("--model", modelId)
|
||||
}
|
||||
|
||||
cliArgs.push(prompt)
|
||||
|
||||
logger.info(`CLI command: pnpm ${cliArgs.join(" ")}`)
|
||||
|
||||
const subprocess = execa("pnpm", cliArgs, { env, cancelSignal, cwd: workspacePath })
|
||||
const subprocess = execa("pnpm", cliArgs, { env, cancelSignal, cwd: process.cwd() })
|
||||
|
||||
// Buffer for accumulating streaming output until we have complete lines.
|
||||
let stdoutBuffer = ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue