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

Function draftStorage

packages/app/src/utils/persist.ts:346–350  ·  view source on GitHub ↗
(draftID: string)

Source from the content-addressed store, hash-verified

344}
345
346function draftStorage(draftID: string) {
347 const head = (draftID.slice(0, 12) || "draft").replace(/[^a-zA-Z0-9._-]/g, "-")
348 const sum = checksum(draftID) ?? "0"
349 return `opencode.draft.${head}.${sum}.dat`
350}
351
352function windowStorage(windowID: string) {
353 const safe = (windowID || "browser").replace(/[^a-zA-Z0-9._-]/g, "-")

Callers 1

draftFunction · 0.85

Calls 1

checksumFunction · 0.90

Tested by

no test coverage detected