(content: string)
| 95 | * Returned in the tool response so the agent can track line positions. |
| 96 | */ |
| 97 | export 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 | } |
no outgoing calls
no test coverage detected