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

Method setItem

packages/app/src/utils/persist.test.ts:32–38  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

30 }
31
32 setItem(key: string, value: string) {
33 this.calls.set += 1
34 this.events.push(`set:${key}`)
35 if (key.startsWith("opencode.quota")) throw new DOMException("quota", "QuotaExceededError")
36 if (key.startsWith("opencode.throw")) throw new Error("storage set failed")
37 this.values.set(key, value)
38 }
39
40 removeItem(key: string) {
41 this.calls.remove += 1

Callers 15

setLastActiveUrlFunction · 0.80
setStorageFunction · 0.80
evictFunction · 0.80
writeFunction · 0.80
readCurrentFunction · 0.80
migrateLegacyFunction · 0.80
readCurrentAsyncFunction · 0.80
migrateLegacyAsyncFunction · 0.80
persistedFunction · 0.80
persist.test.tsFile · 0.80

Calls 2

pushMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected