MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createRgJsonMatch

Function createRgJsonMatch

common/src/testing/mocks/child-process.ts:64–77  ·  view source on GitHub ↗
(
  filePath: string,
  lineNumber: number,
  lineText: string,
)

Source from the content-addressed store, hash-verified

62
63/** Helper to create ripgrep JSON match output. */
64export function createRgJsonMatch(
65 filePath: string,
66 lineNumber: number,
67 lineText: string,
68): string {
69 return JSON.stringify({
70 type: 'match',
71 data: {
72 path: { text: filePath },
73 lines: { text: lineText },
74 line_number: lineNumber,
75 },
76 })
77}
78
79/** Helper to create ripgrep JSON context output (for -A, -B, -C flags). */
80export function createRgJsonContext(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected