forked from Aschen/func-test-agent-llm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.ts
24 lines (18 loc) · 829 Bytes
/
run.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { readFileSync } from "fs";
import { ExtractEntrypointsAgent } from "./ExtractEntrypointsAgent";
import { WalkCallStackAgent } from "./WalkCallStackAgent";
import { DocumentationAgent} from "./DocumentationAgent";
import { WriteTestsAgent } from "./WriteTestsAgent";
async function run() {
const extractEntrypoint = new ExtractEntrypointsAgent('./examples/fastify/app.js');
await extractEntrypoint.run();
for (const entrypoint of extractEntrypoint.output) {
const walkCallStack = new WalkCallStackAgent(entrypoint);
await walkCallStack.run();
const documentation = new DocumentationAgent(entrypoint, walkCallStack.output.slice(1));
await documentation.run();
const writeTests = new WriteTestsAgent(documentation.output[1]);
await writeTests.run();
}
}
run()