MCPcopy Index your code
hub / github.com/anomalyco/opencode / remappedFs

Function remappedFs

packages/opencode/test/cli/run/variant.shared.test.ts:116–128  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

114}
115
116function remappedFs(root: string) {
117 return Layer.effect(
118 FSUtil.Service,
119 Effect.gen(function* () {
120 const fs = yield* FSUtil.Service
121 return FSUtil.Service.of({
122 ...fs,
123 readJson: (file) => fs.readJson(remap(root, file)),
124 writeJson: (file, data, mode) => fs.writeJson(remap(root, file), data, mode),
125 })
126 }),
127 ).pipe(Layer.provide(LayerNode.compile(FSUtil.node)))
128}
129
130describe("run variant shared", () => {
131 test("prefers cli then session then saved variants", () => {

Callers 1

Calls 1

remapFunction · 0.70

Tested by

no test coverage detected