MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / buildPreview

Function buildPreview

src/core/symbol-references.ts:56–62  ·  view source on GitHub ↗
(content: string, lineOffset: number)

Source from the content-addressed store, hash-verified

54}
55
56function buildPreview(content: string, lineOffset: number): string {
57 const lines = content.split('\n');
58 const start = Math.max(0, lineOffset - 1);
59 const end = Math.min(lines.length, lineOffset + 2);
60 const previewLines = lines.slice(start, end);
61 return previewLines.join('\n').trim();
62}
63
64function buildPreviewFromFileLines(lines: string[], line: number): string {
65 const start = Math.max(0, line - 2);

Callers 1

findSymbolReferencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected