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

Function createRgJsonContext

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

Source from the content-addressed store, hash-verified

78
79/** Helper to create ripgrep JSON context output (for -A, -B, -C flags). */
80export function createRgJsonContext(
81 filePath: string,
82 lineNumber: number,
83 lineText: string,
84): string {
85 return JSON.stringify({
86 type: 'context',
87 data: {
88 path: { text: filePath },
89 lines: { text: lineText },
90 line_number: lineNumber,
91 },
92 })
93}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected