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

Function buildPreviewFromFileLines

src/core/symbol-references.ts:64–68  ·  view source on GitHub ↗
(lines: string[], line: number)

Source from the content-addressed store, hash-verified

62}
63
64function buildPreviewFromFileLines(lines: string[], line: number): string {
65 const start = Math.max(0, line - 2);
66 const end = Math.min(lines.length, line + 1);
67 return lines.slice(start, end).join('\n').trim();
68}
69
70function resolveAbsoluteChunkPath(rootPath: string, chunk: IndexedChunk): string | null {
71 const resolvedRoot = path.resolve(rootPath);

Callers 1

findSymbolReferencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected