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

Method paddedCost

src/mcp/tools.ts:7042–7047  ·  view source on GitHub ↗
(r: ExploreRange)

Source from the content-addressed store, hash-verified

7040
7041 /** Rendered cost of one member on its own, context padding included. */
7042 const paddedCost = (r: ExploreRange): number => {
7043 let chars = 0;
7044 const hi = Math.min(fileLines.length, r.end + contextPadding);
7045 for (let ln = Math.max(1, r.start - contextPadding); ln <= hi; ln++) chars += lineCost(ln);
7046 return chars;
7047 };
7048 /**
7049 * A member the query asked for: one it named or that is an entry point
7050 * (importance >= 9), or one on the rendered call path. The rest of a

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected