MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / extractPlainTextHeader

Function extractPlainTextHeader

src/tools/semantic-search.ts:69–79  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

67}
68
69function extractPlainTextHeader(content: string): string {
70 const lines = content.split("\n");
71 const headerLines: string[] = [];
72 for (const line of lines) {
73 const trimmed = line.trim();
74 if (!trimmed) continue;
75 headerLines.push(trimmed.slice(0, 120));
76 if (headerLines.length >= 2) break;
77 }
78 return headerLines.join(" | ");
79}
80
81function hashContent(text: string): string {
82 let h = 0;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected