@@ -17,6 +17,7 @@ import { ContextDocumentService } from '../context/context-document.service';
1717import { ModelResolverService } from '../model' ;
1818import { StateService } from '../state/state.service' ;
1919import { DiagnosticLogService } from '../diagnostic/diagnostic-log.service' ;
20+ import type { ImpactEventService } from '../impact' ;
2021import type { ToolHandler } from './handlers' ;
2122import {
2223 RulesHandler ,
@@ -450,6 +451,7 @@ interface CreateMcpServiceOptions {
450451 modelResolverService ?: Partial < ModelResolverService > ;
451452 stateService ?: Partial < StateService > ;
452453 diagnosticLogService ?: Partial < DiagnosticLogService > ;
454+ impactEventService ?: Partial < ImpactEventService > ;
453455}
454456
455457function createMcpServiceWithHandlers (
@@ -462,6 +464,7 @@ function createMcpServiceWithHandlers(
462464 new RulesHandler (
463465 services . rulesService as RulesService ,
464466 services . modelResolverService as ModelResolverService ,
467+ services . impactEventService as ImpactEventService ,
465468 ) ,
466469 new ConfigHandler (
467470 services . configService as ConfigService ,
@@ -472,7 +475,10 @@ function createMcpServiceWithHandlers(
472475 services . skillRecommendationService as SkillRecommendationService ,
473476 services . rulesService as RulesService ,
474477 ) ,
475- new AgentHandler ( services . agentService as AgentService ) ,
478+ new AgentHandler (
479+ services . agentService as AgentService ,
480+ services . impactEventService as ImpactEventService ,
481+ ) ,
476482 new ModeHandler (
477483 services . keywordService as KeywordService ,
478484 services . configService as ConfigService ,
@@ -482,10 +488,12 @@ function createMcpServiceWithHandlers(
482488 services . contextDocService as ContextDocumentService ,
483489 services . diagnosticLogService as DiagnosticLogService ,
484490 services . agentService as AgentService ,
491+ services . impactEventService as ImpactEventService ,
485492 ) ,
486493 new ChecklistContextHandler (
487494 services . checklistService as ChecklistService ,
488495 services . contextService as ContextService ,
496+ services . impactEventService as ImpactEventService ,
489497 ) ,
490498 ] ;
491499
@@ -573,6 +581,7 @@ describe('McpService', () => {
573581 modelResolverService : mockModelResolverService ,
574582 stateService : mockStateService ,
575583 diagnosticLogService : mockDiagnosticLogService ,
584+ impactEventService : { logEvent : vi . fn ( ) } ,
576585 } ;
577586
578587 const mcpService = createMcpServiceWithHandlers ( defaultMocks ) ;
0 commit comments