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

Function get

packages/app/src/context/directory-sync.ts:31–35  ·  view source on GitHub ↗
(_, property: keyof State)

Source from the content-addressed store, hash-verified

29 const absolute = (path: string) => (current()[0].path.directory + "/" + path).replace("//", "/")
30 const data = new Proxy({} as State, {
31 get(_, property: keyof State) {
32 if (property === "session_working") return serverSync.session.data.session_working.bind(serverSync.session.data)
33 if (sessionFields.has(property)) return serverSync.session.data[property as keyof typeof serverSync.session.data]
34 return current()[0][property]
35 },
36 })
37 const set = ((...input: unknown[]) => {
38 if (typeof input[0] === "string" && sessionFields.has(input[0])) {

Callers

nothing calls this directly

Calls 2

currentFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected