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

Function resolve

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

Source from the content-addressed store, hash-verified

2012 // compression: after resolving, seed the map with the resolved link so
2013 // subsequent survivors sharing the same chain segment don't re-walk.
2014 const resolve = (start: UUID): UUID | null => {
2015 const path: UUID[] = []
2016 let cur: UUID | null | undefined = start
2017 while (cur && toDelete.has(cur)) {
2018 path.push(cur)
2019 cur = deletedParent.get(cur)
2020 if (cur === undefined) {
2021 cur = null
2022 break
2023 }
2024 }
2025 for (const p of path) deletedParent.set(p, cur)
2026 return cur
2027 }
2028 let relinkedCount = 0
2029 for (const [uuid, msg] of messages) {
2030 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
getProjectDirsUpToHomeFunction · 0.70
setCwdFunction · 0.70

Calls 4

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

Tested by

no test coverage detected