MCPcopy
hub / github.com/chenglou/pretext / getLineContent

Function getLineContent

pages/diagnostic-utils.ts:33–39  ·  view source on GitHub ↗
(text: string, end: number)

Source from the content-addressed store, hash-verified

31}
32
33export function getLineContent(text: string, end: number): { text: string, end: number } {
34 const trimmed = text.trimEnd()
35 return {
36 text: trimmed,
37 end: end - (text.length - trimmed.length),
38 }
39}
40
41export function formatBreakContext(text: string, breakOffset: number, radius = 32): string {
42 const start = Math.max(0, breakOffset - radius)

Callers 4

pushDiagnosticLineFunction · 0.90
getOurLinesFunction · 0.90
pushLineFunction · 0.90
getPublicLinesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…