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

Method dispose

packages/ai-client/src/devtools.ts:533–553  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

531 }
532
533 dispose(): void {
534 if (this.disposed) {
535 return
536 }
537
538 this.disposed = true
539 if (!this.registered) {
540 this.deactivate()
541 return
542 }
543
544 const payload = {
545 ...this.createEnvelope('hook:unregistered'),
546 ...this.createMetadataPayload(),
547 reason: 'disposed',
548 } as const
549
550 emitAIDevtoolsEvent('hook:unregistered', payload)
551
552 this.deactivate()
553 }
554
555 private prepareForEmit(): boolean {
556 if (this.disposed || this.superseded) {

Callers

nothing calls this directly

Calls 4

deactivateMethod · 0.95
createEnvelopeMethod · 0.95
createMetadataPayloadMethod · 0.95
emitAIDevtoolsEventFunction · 0.90

Tested by

no test coverage detected