( page: Page, )
| 272 | * Parse the JSON event log from #event-log-json. |
| 273 | */ |
| 274 | export async function getEventLog( |
| 275 | page: Page, |
| 276 | ): Promise<Array<{ type: string; toolName: string; timestamp: number }>> { |
| 277 | return page.evaluate(() => { |
| 278 | const el = document.getElementById('event-log-json') |
| 279 | if (!el) return [] |
| 280 | try { |
| 281 | return JSON.parse(el.textContent || '[]') |
| 282 | } catch { |
| 283 | return [] |
| 284 | } |
| 285 | }) |
| 286 | } |
| 287 | |
| 288 | /** |
| 289 | * Parse the JSON tool-calls list from #tool-calls-json. |
no test coverage detected