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

Function remap

packages/opencode/test/cli/run/variant.shared.test.ts:104–114  ·  view source on GitHub ↗
(root: string, file: string)

Source from the content-addressed store, hash-verified

102const it = testEffect(Layer.mergeAll(LayerNode.compile(FSUtil.node), NodeFileSystem.layer))
103
104function remap(root: string, file: string) {
105 if (file === Global.Path.state) {
106 return root
107 }
108
109 if (file.startsWith(Global.Path.state + path.sep)) {
110 return path.join(root, path.relative(Global.Path.state, file))
111 }
112
113 return file
114}
115
116function remappedFs(root: string) {
117 return Layer.effect(

Callers 1

remappedFsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected