Skip to content

Commit 7bfe9f0

Browse files
committed
fix(agent chat processor): add flow collect to improve concurrency
The `CustomAgentChatProcessor` now uses `kotlinx.coroutines.flow.collect` to process chat messages in a more concurrent and efficient manner, reducing the potential for blocking operations and improving overall system responsiveness.
1 parent cdfc911 commit 7bfe9f0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/kotlin/cc/unitmesh/devti/agent/CustomAgentChatProcessor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import com.intellij.openapi.components.service
1414
import com.intellij.openapi.diagnostic.logger
1515
import com.intellij.openapi.project.Project
1616
import kotlinx.coroutines.launch
17+
import kotlinx.coroutines.flow.collect
1718
import kotlinx.coroutines.runBlocking
1819

1920
@Service(Service.Level.PROJECT)

0 commit comments

Comments
 (0)