* Extract file paths from apply_patch content. * The patch format uses markers like "*** Add File: path", "*** Delete File: path", "*** Update File: path" * @param patchContent The patch content string * @returns Array of file paths found in the patch
(patchContent: string)
| 85 | * @returns Array of file paths found in the patch |
| 86 | */ |
| 87 | function extractFilePathsFromPatch(patchContent: string): string[] { |
| 88 | const filePaths: string[] = [] |
| 89 | const lines = patchContent.split("\n") |
| 90 | |
| 91 | for (const line of lines) { |
| 92 | for (const marker of PATCH_FILE_MARKERS) { |
| 93 | if (line.startsWith(marker)) { |
| 94 | const path = line.substring(marker.length).trim() |
| 95 | if (path) { |
| 96 | filePaths.push(path) |
| 97 | } |
| 98 | break |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | return filePaths |
| 104 | } |
| 105 | |
| 106 | function getGroupOptions(group: GroupEntry): GroupOptions | undefined { |
| 107 | return Array.isArray(group) ? group[1] : undefined |
no outgoing calls
no test coverage detected