Skip to content

Commit f22879e

Browse files
committed
fix bug
1 parent 3359013 commit f22879e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

evals/git-evals2/agent-runner.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ export async function runAgentOnCommit({
108108

109109
const contextFilePaths = new Set<string>([
110110
...commit.supplementalFiles,
111-
...commit.fileDiffs
112-
.filter((fd) => fd.status !== 'added')
113-
.map((fd) => fd.path),
111+
...commit.fileDiffs.map((fd) => fd.path),
114112
])
113+
for (const { status, path } of commit.fileDiffs) {
114+
if (status === 'added') {
115+
contextFilePaths.delete(path)
116+
}
117+
}
115118

116119
for (const filePath of contextFilePaths) {
117120
try {

evals/git-evals2/example.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import path from 'path'
22
import { runGitEvals2 } from './run-git-evals2'
33

44
async function main() {
5-
console.log('Comparing base and base-lite agents on first 3 commits\n')
6-
75
const results = await runGitEvals2({
86
evalDataPath: path.join(__dirname, 'eval-codebuff.json'),
97
agents: ['base', 'base2'],

0 commit comments

Comments
 (0)