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

Function workspaceStorage

packages/app/src/utils/persist.ts:340–344  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

338}
339
340function workspaceStorage(dir: string) {
341 const head = (dir.slice(0, 12) || "workspace").replace(/[^a-zA-Z0-9._-]/g, "-")
342 const sum = checksum(dir) ?? "0"
343 return `opencode.workspace.${head}.${sum}.dat`
344}
345
346function draftStorage(draftID: string) {
347 const head = (draftID.slice(0, 12) || "draft").replace(/[^a-zA-Z0-9._-]/g, "-")

Callers 2

legacyWorkspaceStorageFunction · 0.85
serverWorkspaceTargetFunction · 0.85

Calls 1

checksumFunction · 0.90

Tested by

no test coverage detected