MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / validatePatchContextLines

Function validatePatchContextLines

projects/electron/src/modules/code/git.ts:1831–1835  ·  view source on GitHub ↗
(contextLines: number)

Source from the content-addressed store, hash-verified

1829}
1830
1831function validatePatchContextLines(contextLines: number): asserts contextLines is 1 | 3 | 10 | 25 | 100 {
1832 if (!FILE_PATCH_CONTEXT_LINES.has(contextLines)) {
1833 throw new Error(`Invalid contextLines value: ${contextLines}`)
1834 }
1835}
1836
1837function getFilePatchPathspecs(filePath: string, oldPath?: string): string[] {
1838 if (oldPath && oldPath !== filePath) {

Callers 2

handleGetCommitFilePatchFunction · 0.85

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected