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

Method incidentalCapFor

src/mcp/tools.ts:7463–7468  ·  view source on GitHub ↗
(p: number, room: number)

Source from the content-addressed store, hash-verified

7461 // below it that are not on the spine are held to `fileBudget`, so room a
7462 // spine cluster's incidental members take past it is room they never get.
7463 const incidentalCapFor = (p: number, room: number): number | undefined => {
7464 const owedBelow = owedFrom[p + 1]!;
7465 if (owedBelow === 0) return undefined;
7466 const spent = projectedChars + (chosenIndices.size > 0 ? GAP_MARKER.length : 0);
7467 return Math.min(room, fileBudget - spent) - owedBelow;
7468 };
7469 /** Rendered cost of a cluster's EXACT members on their own. */
7470 const exactCostOf = (c: ExploreCluster): number =>
7471 renderedSizeOfKept(c.members.filter((m) => m.importance >= EXACT_IMPORTANCE));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected