refactor(tool): read repo overview directory from instance state (#27717)

This commit is contained in:
Shoubhit Dash
2026-05-15 16:14:49 +05:30
committed by GitHub
parent 12b666e2c9
commit e65383810a
2 changed files with 17 additions and 2 deletions

View File

@@ -97,6 +97,21 @@ describe("tool.repo_overview", () => {
),
)
it.live("resolves relative paths from the instance directory", () =>
provideTmpdirInstance((dir) =>
Effect.gen(function* () {
const fs = yield* AppFileSystem.Service
yield* fs.writeWithDirs(path.join(dir, "nested", "README.md"), "# Nested\n")
const tool = yield* init()
const result = yield* tool.execute({ path: "nested" }, ctx)
expect(result.metadata.path).toBe(path.join(dir, "nested"))
expect(result.output).toContain("README.md")
}),
),
)
it.live("resolves a cached repository from repository shorthand", () =>
provideTmpdirInstance((_dir) =>
Effect.gen(function* () {