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

Method paddedCost

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

Source from the content-addressed store, hash-verified

7096
7097 /** Rendered cost of one member on its own, context padding included. */
7098 const paddedCost = (r: ExploreRange): number => {
7099 let chars = 0;
7100 const hi = Math.min(fileLines.length, r.end + contextPadding);
7101 for (let ln = Math.max(1, r.start - contextPadding); ln <= hi; ln++) chars += lineCost(ln);
7102 return chars;
7103 };
7104 /**
7105 * A member the query asked for: one it named or that is an entry point
7106 * (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