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

Method lineCost

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

Source from the content-addressed store, hash-verified

6200 const MIN_WINDOW_LINES = 12;
6201 /** Rendered cost of one source line, line numbering included. */
6202 const lineCost = (ln: number): number =>
6203 (fileLines[ln - 1] ?? '').length + 1 + (withLineNumbers ? String(ln).length + 1 : 0);
6204 /** `lineCostPrefix[n]` = rendered chars of lines 1..n, newlines included. */
6205 let lineCostPrefix: number[] | null = null;
6206 /** 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