MCPcopy Create free account
hub / github.com/anomalyco/opencode / sdkFor

Function sdkFor

packages/app/src/context/server-sync.tsx:112–122  ·  view source on GitHub ↗
(directory: string)

Source from the content-addressed store, hash-verified

110 const sessionMeta = new Map<string, { limit: number }>()
111
112 const sdkFor = (directory: string) => {
113 const key = directoryKey(directory)
114 const cached = sdkCache.get(key)
115 if (cached) return cached
116 const sdk = serverSDK.createClient({
117 directory,
118 throwOnError: true,
119 })
120 sdkCache.set(key, sdk)
121 return sdk
122 }
123
124 const queryOptionsApi = makeQueryOptionsApi(serverSDK.scope, () => serverSDK.client, sdkFor)
125

Callers 3

makeQueryOptionsApiFunction · 0.85
bootstrapInstanceFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected