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

Method incidentalCapFor

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

Source from the content-addressed store, hash-verified

7517 // below it that are not on the spine are held to `fileBudget`, so room a
7518 // spine cluster's incidental members take past it is room they never get.
7519 const incidentalCapFor = (p: number, room: number): number | undefined => {
7520 const owedBelow = owedFrom[p + 1]!;
7521 if (owedBelow === 0) return undefined;
7522 const spent = projectedChars + (chosenIndices.size > 0 ? GAP_MARKER.length : 0);
7523 return Math.min(room, fileBudget - spent) - owedBelow;
7524 };
7525 /** Rendered cost of a cluster's EXACT members on their own. */
7526 const exactCostOf = (c: ExploreCluster): number =>
7527 renderedSizeOfKept(c.members.filter((m) => m.importance >= EXACT_IMPORTANCE));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected