MCPcopy Create free account
hub / github.com/Noumena-Network/code / resolve

Function resolve

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

Source from the content-addressed store, hash-verified

2170 // compression: after resolving, seed the map with the resolved link so
2171 // subsequent survivors sharing the same chain segment don't re-walk.
2172 const resolve = (start: UUID): UUID | null => {
2173 const path: UUID[] = []
2174 let cur: UUID | null | undefined = start
2175 while (cur && toDelete.has(cur)) {
2176 path.push(cur)
2177 cur = deletedParent.get(cur)
2178 if (cur === undefined) {
2179 cur = null
2180 break
2181 }
2182 }
2183 for (const p of path) deletedParent.set(p, cur)
2184 return cur
2185 }
2186 let relinkedCount = 0
2187 for (const [uuid, msg] of messages) {
2188 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 1

closeFunction · 0.40