MCPcopy Create free account
hub / github.com/backnotprop/plannotator / formatWithLineNumbers

Function formatWithLineNumbers

apps/opencode-plugin/plan-edits.ts:97–103  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

95 * Returned in the tool response so the agent can track line positions.
96 */
97export function formatWithLineNumbers(content: string): string {
98 const lines = content.split("\n");
99 const width = String(lines.length).length;
100 return lines
101 .map((line, i) => `${String(i + 1).padStart(width)}| ${line}`)
102 .join("\n");
103}

Callers 2

executeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected