chore: generate

This commit is contained in:
opencode-agent[bot]
2026-06-03 21:00:33 +00:00
parent 889e0f9545
commit a41f774cad
7 changed files with 47 additions and 24 deletions
+8 -6
View File
@@ -110,7 +110,9 @@ describe("Config", () => {
const config = yield* Config.Service
const entries = yield* config.entries()
expect(entries).toEqual([new Config.Directory({ type: "directory", path: AbsolutePath.make(path.join(tmp.path, "global")) })])
expect(entries).toEqual([
new Config.Directory({ type: "directory", path: AbsolutePath.make(path.join(tmp.path, "global")) }),
])
}).pipe(Effect.provide(testLayer(tmp.path))),
),
),
@@ -157,11 +159,11 @@ describe("Config", () => {
yield* Effect.promise(() =>
fs.writeFile(path.join(tmp.path, "opencode.jsonc"), JSON.stringify({ $schema: "changed" })),
)
expect((yield* config.entries()).filter((entry) => entry.type === "document").map((document) => document.info.$schema)).toEqual([
"base",
"middle",
"last",
])
expect(
(yield* config.entries())
.filter((entry) => entry.type === "document")
.map((document) => document.info.$schema),
).toEqual(["base", "middle", "last"])
}).pipe(Effect.provide(testLayer(tmp.path)))
}),
),
+4 -2
View File
@@ -57,11 +57,13 @@ describe("ConfigSkillPlugin.Plugin", () => {
expect(sources).toEqual([
new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make(path.join(directory, "skills")) }),
new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make(path.join("/home/test", "shared-skills")) }),
new SkillV2.DirectorySource({
type: "directory",
path: AbsolutePath.make(path.join("/home/test", "shared-skills")),
}),
new SkillV2.DirectorySource({ type: "directory", path: AbsolutePath.make("/opt/skills") }),
new SkillV2.UrlSource({ type: "url", url: "https://example.test/skills/" }),
])
}),
)
})
+1 -4
View File
@@ -254,10 +254,7 @@ function testLayer(input: {
),
),
),
Layer.succeed(
Config.Service,
Config.Service.of({ entries: () => Effect.succeed(input.documents) }),
),
Layer.succeed(Config.Service, Config.Service.of({ entries: () => Effect.succeed(input.documents) })),
Layer.succeed(RepositoryCache.Service, RepositoryCache.Service.of({ ensure: input.ensure })),
),
),