MCPcopy Create free account
hub / github.com/TanStack/ai / getEventLog

Function getEventLog

testing/e2e/tests/tools-test/helpers.ts:274–286  ·  view source on GitHub ↗
(
  page: Page,
)

Source from the content-addressed store, hash-verified

272 * Parse the JSON event log from #event-log-json.
273 */
274export 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.

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected