| 208 | } |
| 209 | |
| 210 | function extractReferencedFiles(turnData: XcodeTurnData): string[] { |
| 211 | const referencedFiles: string[] = []; |
| 212 | if (Array.isArray(turnData.references)) { |
| 213 | for (const ref of turnData.references) { |
| 214 | if (typeof ref !== 'object' || !ref) continue; |
| 215 | const refPath = ref.uri || ref.path || ref.external || ''; |
| 216 | if (refPath) referencedFiles.push(String(refPath)); |
| 217 | } |
| 218 | } |
| 219 | return referencedFiles; |
| 220 | } |
| 221 | |
| 222 | function computeElapsed(turns: XcodeTurnRow[], i: number, turn: XcodeTurnRow): number | null { |
| 223 | if (i + 1 < turns.length && turns[i + 1].role === 'assistant') { |