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

Method lineCost

src/mcp/tools.ts:6258–6259  ·  view source on GitHub ↗
(ln: number)

Source from the content-addressed store, hash-verified

6256 const MIN_WINDOW_LINES = 12;
6257 /** Rendered cost of one source line, line numbering included. */
6258 const lineCost = (ln: number): number =>
6259 (fileLines[ln - 1] ?? '').length + 1 + (withLineNumbers ? String(ln).length + 1 : 0);
6260 /** `lineCostPrefix[n]` = rendered chars of lines 1..n, newlines included. */
6261 let lineCostPrefix: number[] | null = null;
6262 /** Rendered chars of lines `start..end` (line numbers included), in O(1). */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected