chore: generate

This commit is contained in:
opencode-agent[bot]
2026-04-11 02:36:59 +00:00
parent c5fb6281f0
commit 577139c626
12 changed files with 693 additions and 549 deletions

View File

@@ -32,14 +32,16 @@ describe("tool.grep", () => {
directory: projectRoot,
fn: async () => {
const grep = await initGrep()
const result = await Effect.runPromise(grep.execute(
{
pattern: "export",
path: path.join(projectRoot, "src/tool"),
include: "*.ts",
},
ctx,
))
const result = await Effect.runPromise(
grep.execute(
{
pattern: "export",
path: path.join(projectRoot, "src/tool"),
include: "*.ts",
},
ctx,
),
)
expect(result.metadata.matches).toBeGreaterThan(0)
expect(result.output).toContain("Found")
},
@@ -56,13 +58,15 @@ describe("tool.grep", () => {
directory: tmp.path,
fn: async () => {
const grep = await initGrep()
const result = await Effect.runPromise(grep.execute(
{
pattern: "xyznonexistentpatternxyz123",
path: tmp.path,
},
ctx,
))
const result = await Effect.runPromise(
grep.execute(
{
pattern: "xyznonexistentpatternxyz123",
path: tmp.path,
},
ctx,
),
)
expect(result.metadata.matches).toBe(0)
expect(result.output).toBe("No files found")
},
@@ -81,13 +85,15 @@ describe("tool.grep", () => {
directory: tmp.path,
fn: async () => {
const grep = await initGrep()
const result = await Effect.runPromise(grep.execute(
{
pattern: "line",
path: tmp.path,
},
ctx,
))
const result = await Effect.runPromise(
grep.execute(
{
pattern: "line",
path: tmp.path,
},
ctx,
),
)
expect(result.metadata.matches).toBeGreaterThan(0)
},
})