Skip to content

Commit

Permalink
nit in readfile tool
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhb committed Dec 10, 2024
1 parent 5ab9e35 commit 2b5a6d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/swebench/inngest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ const planningAgent = createAgent({
name: "list_files",
description: "Lists all files within the project, returned as a JSON string",
handler: (_input, opts) => {
const files = fs.readdirSync(opts.network?.state.kv.get("repo") || "./", { recursive: true });
// NOTE: In this repo, all files are stored in "./opt/" as the prefix.
const path = "./opt/" + opts.network?.state.kv.get("repo")
const files = fs.readdirSync(path, { recursive: true });
opts.network && opts.network.state.kv.set("files", files);
return files;
},
Expand Down

0 comments on commit 2b5a6d7

Please sign in to comment.