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

Method sectionCost

src/mcp/tools.ts:6639–6640  ·  view source on GitHub ↗
(ps: ReadonlyArray<{ text: string }>)

Source from the content-addressed store, hash-verified

6637 let parts = dd.parts;
6638 let trimmedSigs = 0;
6639 const sectionCost = (ps: ReadonlyArray<{ text: string }>) =>
6640 header.length + 2 + (ps.length > 0 ? withTail(ps, trimmedSigs).length + lang.length + 11 : 0);
6641 while (parts.length > 1 && totalChars + sectionCost(parts) > renderCeiling) {
6642 let drop = -1;
6643 for (let k = parts.length - 1; k >= 0; k--) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected