MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / resolveOutlineParent

Function resolveOutlineParent

src/ui-server/api/file.ts:221–229  ·  view source on GitHub ↗

* The outline parent of a symbol: its container within the file, or null when * that container is the file node itself (a top-level symbol has no parent row).

(
  id: string,
  parentOf: Map<string, string>,
  fileNodeId: string | undefined
)

Source from the content-addressed store, hash-verified

219 * that container is the file node itself (a top-level symbol has no parent row).
220 */
221function resolveOutlineParent(
222 id: string,
223 parentOf: Map<string, string>,
224 fileNodeId: string | undefined
225): string | null {
226 const parent = parentOf.get(id);
227 if (!parent || parent === fileNodeId) return null;
228 return parent;
229}
230
231function depthOf(
232 id: string,

Callers 1

buildOutlineEntriesFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected