MCPcopy
hub / github.com/claude-code-best/claude-code / resolve

Function resolve

src/utils/sessionStorage.ts:2051–2064  ·  view source on GitHub ↗
(start: UUID)

Source from the content-addressed store, hash-verified

2049 // compression: after resolving, seed the map with the resolved link so
2050 // subsequent survivors sharing the same chain segment don't re-walk.
2051 const resolve = (start: UUID): UUID | null => {
2052 const path: UUID[] = []
2053 let cur: UUID | null | undefined = start
2054 while (cur && toDelete.has(cur)) {
2055 path.push(cur)
2056 cur = deletedParent.get(cur)
2057 if (cur === undefined) {
2058 cur = null
2059 break
2060 }
2061 }
2062 for (const p of path) deletedParent.set(p, cur)
2063 return cur
2064 }
2065 let relinkedCount = 0
2066 for (const [uuid, msg] of messages) {
2067 if (!msg.parentUuid || !toDelete.has(msg.parentUuid)) continue

Callers 15

execFileNoThrowWithCwdFunction · 0.70
constructorMethod · 0.70
onOpenMethod · 0.70
sendMethod · 0.70
getDirectoriesToProcessFunction · 0.70
git.tsFile · 0.70
applySnipRemovalsFunction · 0.70
resolveAutonomyFlowsPathFunction · 0.70
startManagedAutonomyFlowFunction · 0.70

Calls 4

setMethod · 0.80
getMethod · 0.65
hasMethod · 0.45
pushMethod · 0.45

Tested by 1

closeServerFunction · 0.40