MCPcopy Create free account
hub / github.com/WJX20/claude-code / resolve

Function resolve

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

Source from the content-addressed store, hash-verified

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

setMethod · 0.80
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected