()
| 362 | |
| 363 | // This method is called when your extension is deactivated. |
| 364 | export 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 | } |
nothing calls this directly
no test coverage detected