MCPcopy Index your code
hub / github.com/TanStack/ai / emitRunLifecycle

Method emitRunLifecycle

packages/ai-client/src/devtools.ts:495–510  ·  view source on GitHub ↗
(
    eventType: AIDevtoolsRunEventType,
    runId: string,
    status: AIDevtoolsRunStatus,
    options: { error?: string } = {},
  )

Source from the content-addressed store, hash-verified

493 }
494
495 emitRunLifecycle(
496 eventType: AIDevtoolsRunEventType,
497 runId: string,
498 status: AIDevtoolsRunStatus,
499 options: { error?: string } = {},
500 ): void {
501 if (!this.prepareForEmit()) {
502 return
503 }
504 emitAIDevtoolsEvent(eventType, {
505 ...this.createEnvelope(eventType, 'client-state', { runId }),
506 runId,
507 status,
508 ...(options.error ? { error: options.error } : {}),
509 })
510 }
511
512 deactivate(): void {
513 const activeBridgeByHookId = getActiveBridgeRegistry()

Callers 3

streamResponseMethod · 0.45
ensureRunStartedMethod · 0.45
finishRunMethod · 0.45

Calls 3

prepareForEmitMethod · 0.95
createEnvelopeMethod · 0.95
emitAIDevtoolsEventFunction · 0.90

Tested by

no test coverage detected