[ai completion] JBAI-3547 Fix probable not logging scenario

Merge-request: IJ-MR-135936
Merged-by: Gleb Marin <Gleb.Marin@jetbrains.com>

GitOrigin-RevId: 8f6e1eb94e2234dfd55a284a19ed506cad03bbb1
This commit is contained in:
Gleb.Marin
2024-06-05 11:58:21 +00:00
committed by intellij-monorepo-bot
parent 1f38d81dd7
commit ae57c80650

View File

@@ -29,7 +29,8 @@ class AnalysisLogger<M : MLModel<P>, P : Any>(
val patchOnBeforeStarted = mlSessionLogger.acquirePatchLogger(false)
apiPlatform.coroutineScope.launch {
sessionAnalyser?.onBeforeSessionStarted()?.let { patchOnBeforeStarted.logSession(it) }
val analysis = sessionAnalyser?.onBeforeSessionStarted() ?: emptyList()
patchOnBeforeStarted.logSession(analysis)
}
return object : MLApproachListener<M, P> {