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

Function topmost

ui/src/lib/steps-model.ts:943–946  ·  view source on GitHub ↗
(ids: string[])

Source from the content-addressed store, hash-verified

941 // lines down inside the region and the line from the start had to reach
942 // past everything above it to get there.
943 const topmost = (ids: string[]): string | null =>
944 ids
945 .filter((id) => pos.has(id))
946 .sort((a, b) => pos.get(a)!.line - pos.get(b)!.line || pos.get(a)!.x - pos.get(b)!.x)[0] ?? null;
947 const entry =
948 topmost(region.members.filter((m) => fromAnchor.has(m.id)).map((m) => m.id)) ??
949 topmost(region.members.map((m) => m.id)) ??

Callers 1

layoutAtFunction · 0.85

Calls 2

hasMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected