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

Function serverWorkspaceTarget

packages/app/src/utils/persist.ts:374–377  ·  view source on GitHub ↗
(scope: ServerScopeValue, dir: string, key: string, legacy?: string[])

Source from the content-addressed store, hash-verified

372}
373
374function serverWorkspaceTarget(scope: ServerScopeValue, dir: string, key: string, legacy?: string[]): PersistTarget {
375 if (scope !== ServerScope.local) return { storage: workspaceStorage(ScopedKey.from(scope, pathKey(dir))), key }
376 return { storage: workspaceStorage(pathKey(dir)), legacyStorageNames: legacyWorkspaceStorage(dir), key, legacy }
377}
378
379function localStorageWithPrefix(prefix: string): SyncStorage {
380 const base = `${prefix}:`

Callers 4

workspaceFunction · 0.85
serverWorkspaceFunction · 0.85
sessionFunction · 0.85
serverSessionFunction · 0.85

Calls 4

pathKeyFunction · 0.90
workspaceStorageFunction · 0.85
legacyWorkspaceStorageFunction · 0.85
fromMethod · 0.45

Tested by

no test coverage detected