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

Function pin

packages/app/src/context/server-session.ts:1092–1095  ·  view source on GitHub ↗
(sessionID: string)

Source from the content-addressed store, hash-verified

1090 evict([sessionID])
1091 },
1092 pin(sessionID: string) {
1093 pinned.set(sessionID, (pinned.get(sessionID) ?? 0) + 1)
1094 touch(sessionID)
1095 },
1096 unpin(sessionID: string) {
1097 const count = pinned.get(sessionID)
1098 if (!count || count === 1) pinned.delete(sessionID)

Callers

nothing calls this directly

Calls 3

touchFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected