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

Function recordRunEvent

packages/ai-devtools/src/store/ai-context.tsx:1191–1207  ·  view source on GitHub ↗
(
      eventName:
        | 'run:created'
        | 'run:started'
        | 'run:updated'
        | 'run:completed'
        | 'run:errored'
        | 'run:cancelled',
      payload: RunLifecycleEvent,
    )

Source from the content-addressed store, hash-verified

1189 )
1190
1191 const recordRunEvent = (
1192 eventName:
1193 | 'run:created'
1194 | 'run:started'
1195 | 'run:updated'
1196 | 'run:completed'
1197 | 'run:errored'
1198 | 'run:cancelled',
1199 payload: RunLifecycleEvent,
1200 ) => {
1201 setState(
1202 'hooks',
1203 produce((hooks: HookRegistryState) => {
1204 applyHookEvent(hooks, eventName, payload)
1205 }),
1206 )
1207 }
1208
1209 cleanupFns.push(
1210 aiEventClient.on('run:created', (e) => {

Callers 1

AIProviderFunction · 0.85

Calls 1

applyHookEventFunction · 0.90

Tested by

no test coverage detected