MCPcopy
hub / github.com/anomalyco/opencode / location

Function location

packages/core/test/fixture/location.ts:7–14  ·  view source on GitHub ↗
(ref: Location.Ref, input: { projectDirectory?: AbsolutePath; vcs?: Project.Vcs } = {})

Source from the content-addressed store, hash-verified

5import { tmpdir } from "./tmpdir"
6
7export function location(ref: Location.Ref, input: { projectDirectory?: AbsolutePath; vcs?: Project.Vcs } = {}) {
8 return {
9 directory: ref.directory,
10 workspaceID: ref.workspaceID,
11 project: { id: Project.ID.global, directory: input.projectDirectory ?? ref.directory },
12 vcs: input.vcs,
13 } satisfies Location.Interface
14}
15
16export const tempLocationLayer = Layer.unwrap(
17 Effect.acquireRelease(

Callers 15

policy.test.tsFile · 0.90
provideFunction · 0.90
permission.test.tsFile · 0.90
withToolFunction · 0.90
withToolFunction · 0.90
provideFunction · 0.90
provideFunction · 0.90
withToolFunction · 0.90
tool-read.test.tsFile · 0.90
catalog.test.tsFile · 0.90
withToolFunction · 0.90
agent.test.tsFile · 0.90

Calls

no outgoing calls

Tested by 9

provideFunction · 0.72
withToolFunction · 0.72
withToolFunction · 0.72
provideFunction · 0.72
provideFunction · 0.72
withToolFunction · 0.72
withToolFunction · 0.72
provideFunction · 0.72
testLayerFunction · 0.72