(fileChanges)
| 124 | } |
| 125 | |
| 126 | function collectTouchedFiles(fileChanges) { |
| 127 | const paths = new Set(); |
| 128 | for (const fileChange of fileChanges) { |
| 129 | for (const change of fileChange.changes ?? []) { |
| 130 | if (change.path) { |
| 131 | paths.add(change.path); |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | return [...paths]; |
| 136 | } |
| 137 | |
| 138 | function normalizeReasoningText(text) { |
| 139 | return String(text ?? "").replace(/\s+/g, " ").trim(); |