From 2b5a6d73103f6a791842920c23ade4c36defc44f Mon Sep 17 00:00:00 2001 From: Tony Holdstock-Brown Date: Tue, 10 Dec 2024 08:02:52 -0800 Subject: [PATCH] nit in readfile tool --- examples/swebench/inngest.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/swebench/inngest.ts b/examples/swebench/inngest.ts index 48f882d..cbab11d 100644 --- a/examples/swebench/inngest.ts +++ b/examples/swebench/inngest.ts @@ -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; },