MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / deactivate

Function deactivate

src/extension.ts:364–393  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

362
363// This method is called when your extension is deactivated.
364export async function deactivate() {
365 outputChannel.appendLine(`${Package.name} extension deactivated`)
366
367 if (cloudService && CloudService.hasInstance()) {
368 try {
369 if (authStateChangedHandler) {
370 CloudService.instance.off("auth-state-changed", authStateChangedHandler)
371 }
372
373 if (settingsUpdatedHandler) {
374 CloudService.instance.off("settings-updated", settingsUpdatedHandler)
375 }
376
377 if (userInfoHandler) {
378 CloudService.instance.off("user-info", userInfoHandler as any)
379 }
380
381 outputChannel.appendLine("CloudService event handlers cleaned up")
382 } catch (error) {
383 outputChannel.appendLine(
384 `Failed to clean up CloudService event handlers: ${error instanceof Error ? error.message : String(error)}`,
385 )
386 }
387 }
388
389 await McpServerManager.cleanup(extensionContext)
390 TelemetryService.instance.shutdown()
391 Terminal.setTerminalProfile(undefined)
392 TerminalRegistry.cleanup()
393}

Callers

nothing calls this directly

Calls 7

appendLineMethod · 0.80
offMethod · 0.65
shutdownMethod · 0.65
setTerminalProfileMethod · 0.65
StringInterface · 0.50
hasInstanceMethod · 0.45
cleanupMethod · 0.45

Tested by

no test coverage detected