Add BaseService and refactor ChatService for improved dependency management

- Introduce BaseService as a foundational class for services, providing standardized dependency injection and initialization logic.
- Refactor ChatService to extend BaseService, enhancing its initialization process and dependency handling.
- Implement service metadata and structured initialization in ChatService, allowing for better tracking and error handling during service setup.
- Update chat module to initialize ChatService with dependency management, ensuring readiness before use.
This commit is contained in:
padreug 2025-09-05 06:19:08 +02:00
parent c7fcd51990
commit 8d4c389f71
4 changed files with 398 additions and 66 deletions

View file

@ -1,5 +1,7 @@
import type { DIContainer, ServiceToken } from './types'
export type { ServiceToken } from './types'
interface ServiceRegistration {
service: any
scope: 'singleton' | 'transient'