(r: Run | undefined)
| 154 | ): string | undefined { |
| 155 | let latest: number = 0 |
| 156 | const considerRun = (r: Run | undefined) => { |
| 157 | if (!r) return |
| 158 | for (const a of r.actions || []) { |
| 159 | if (a.kind === 'user_message' && a.timestamp) { |
| 160 | const t = Date.parse(a.timestamp) |
| 161 | if (!Number.isNaN(t) && t > latest) latest = t |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | // Prefer provided order to iterate runs deterministically |
| 166 | for (const id of order) considerRun(runs[id]) |
| 167 | // In case some runs are missing from order, also scan remaining runs |
no outgoing calls
no test coverage detected