MCPcopy Index your code
hub / github.com/codeaashu/claude-code / parseSearchResults

Function parseSearchResults

web/lib/api/files.ts:194–203  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

192const GREP_LINE_RE = /^([^:]+):(\d+):(.*)$/;
193
194function parseSearchResults(text: string): SearchResult[] {
195 const results: SearchResult[] = [];
196 for (const line of text.split("\n")) {
197 const match = GREP_LINE_RE.exec(line.trim());
198 if (!match) continue;
199 const [, path, lineStr, content] = match;
200 results.push({ path, line: parseInt(lineStr, 10), content: content.trim() });
201 }
202 return results;
203}
204
205// ---------------------------------------------------------------------------
206// FileAPI

Callers 1

searchFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected