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

Function protectedSessions

packages/app/src/context/server-session.ts:420–438  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

418 }
419
420 const protectedSessions = () =>
421 new Set([
422 ...pinned.keys(),
423 ...requests.keys(),
424 ...inflight.keys(),
425 ...inflightDiff.keys(),
426 ...inflightTodo.keys(),
427 ...messageLoads.keys(),
428 ...optimistic.keys(),
429 ...Object.entries(data.permission)
430 .filter(([, items]) => items.length > 0)
431 .map(([sessionID]) => sessionID),
432 ...Object.entries(data.question)
433 .filter(([, items]) => items.length > 0)
434 .map(([sessionID]) => sessionID),
435 ...Object.entries(data.session_status)
436 .filter(([, status]) => status.type !== "idle")
437 .map(([sessionID]) => sessionID),
438 ])
439
440 const touch = (sessionID: string) =>
441 evict(

Callers 2

touchFunction · 0.85
evictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected