Add proper cleanup override to complete the EventEmitter memory leak fix

This ensures the nested ToolPermissionService EventEmitter is properly
cleaned up when ModeService is disposed, addressing the root cause
rather than just suppressing the warning.
This commit is contained in:
Chad Metcalf 2025-08-04 11:49:37 -07:00
parent 5c4f210496
commit 5933b8121f
No known key found for this signature in database

View file

@ -111,6 +111,14 @@ export class ModeService extends BaseService<ModeServiceState> {
];
}
/**
* Override cleanup to properly clean up nested ToolPermissionService
*/
override async cleanup(): Promise<void> {
await this.currentState.toolPermissionService.cleanup();
await super.cleanup();
}
/**
* Override isReady since this is a singleton with immediate availability
*/