@@ -4,8 +4,8 @@ import { getCurrentSession, getSessionFilePath } from "../session.js";
44import { logger } from "../util/logger.js" ;
55
66import { BaseService } from "./BaseService.js" ;
7-
8- import { services } from "./index .js" ;
7+ import { serviceContainer } from "./ServiceContainer.js" ;
8+ import type { ModelServiceState } from "./types .js" ;
99
1010interface GitAiHookInput {
1111 session_id : string ;
@@ -124,10 +124,10 @@ export class GitAiIntegrationService extends BaseService<GitAiIntegrationService
124124 const session = getCurrentSession ( ) ;
125125 const sessionFilePath = getSessionFilePath ( ) ;
126126
127- // Get current model from ModelService
128- const modelState = services . model . getState ( ) ;
129- console . log ( "modelState" , modelState ) ;
130- const modelName = modelState ?. model ?. model ;
127+ // Get current model from ModelService via serviceContainer
128+ const modelState =
129+ serviceContainer . getSync < ModelServiceState > ( "model" ) ;
130+ const modelName = modelState ?. value ?. model ?. model ;
131131
132132 const hookInput : GitAiHookInput = {
133133 session_id : session . sessionId ,
@@ -167,10 +167,10 @@ export class GitAiIntegrationService extends BaseService<GitAiIntegrationService
167167 const session = getCurrentSession ( ) ;
168168 const sessionFilePath = getSessionFilePath ( ) ;
169169
170- // Get current model from ModelService
171- const modelState = services . model . getState ( ) ;
172- console . log ( "modelState" , modelState ) ;
173- const modelName = modelState ?. model ?. model ;
170+ // Get current model from ModelService via serviceContainer
171+ const modelState =
172+ serviceContainer . getSync < ModelServiceState > ( "model" ) ;
173+ const modelName = modelState ?. value ?. model ?. model ;
174174
175175 const hookInput : GitAiHookInput = {
176176 session_id : session . sessionId ,
0 commit comments