more tools

This commit is contained in:
Dax Raad
2025-05-26 14:09:17 -04:00
parent 113c49457f
commit 80555f13e0
10 changed files with 701 additions and 53 deletions

View File

@@ -1,6 +1,7 @@
import { describe, expect, test } from "bun:test";
import { App } from "../../src/app";
import { glob } from "../../src/tool/glob";
import { ls } from "../../src/tool/ls";
describe("tool.glob", () => {
test("truncate", async () => {
@@ -35,3 +36,20 @@ describe("tool.glob", () => {
});
});
});
describe("tool.ls", () => {
test("basic", async () => {
const result = await App.provide({ directory: process.cwd() }, async () => {
return await ls.execute(
{
path: ".",
},
{
toolCallId: "test",
messages: [],
},
);
});
expect(result.output).toMatchSnapshot();
});
});