(filter)
| 40 | const model = process.env.EVAL_MODEL; |
| 41 | |
| 42 | async function loadTasks(filter) { |
| 43 | const files = (await fs.readdir(tasksDir)).filter(f => f.endsWith('.json')).sort(); |
| 44 | const tasks = []; |
| 45 | for (const f of files) { |
| 46 | const task = JSON.parse(await fs.readFile(path.join(tasksDir, f), 'utf-8')); |
| 47 | if (!filter.length || filter.includes(task.id)) tasks.push(task); |
| 48 | } |
| 49 | return tasks; |
| 50 | } |
| 51 | |
| 52 | function runAgent(prompt, cwd) { |
| 53 | return new Promise((resolve) => { |