Skip to content

Commit 9477b31

Browse files
committed
tweak
1 parent d27e643 commit 9477b31

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

evals/buffbench/agent-runner.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ export interface AgentStep {
1313
toolResults: any[]
1414
}
1515

16-
export interface AgentRunResult {
17-
diff: string
18-
contextFiles: Record<string, string>
19-
durationMs: number
20-
cost: number
21-
error?: string
22-
trace: AgentStep[]
23-
}
24-
2516
export async function runAgentOnCommit({
2617
client,
2718
agentId,
@@ -34,7 +25,14 @@ export async function runAgentOnCommit({
3425
commit: EvalCommitV2
3526
repoUrl: string
3627
initCommand?: string
37-
}): Promise<AgentRunResult> {
28+
}): Promise<{
29+
diff: string
30+
contextFiles: Record<string, string>
31+
durationMs: number
32+
cost: number
33+
error?: string
34+
trace: AgentStep[]
35+
}> {
3836
console.log(`[${commit.id}] Running agent ${agentId}...`)
3937
const startTime = Date.now()
4038
let diff = ''
@@ -94,7 +92,12 @@ export async function runAgentOnCommit({
9492
} else if (event.type === 'finish') {
9593
flushStep()
9694
} else if (event.type === 'error') {
97-
console.error(`[${agentId}] Error event:`, event.message)
95+
console.error(
96+
`[${agentId}] Error event:`,
97+
event.message,
98+
'trace:',
99+
trace,
100+
)
98101
}
99102
},
100103
})

0 commit comments

Comments
 (0)