✨ feat(AsyncChatListener, DirectMessageCommand): convert runPreProces…#120
Merged
Conversation
…sors to suspend function for async processing
twisti-dev
approved these changes
Jun 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the chat pre-processing pipeline to support suspending (coroutine-based) pre-chat processing, enabling processors to perform asynchronous work where needed, and bumps the project version.
Changes:
- Made
runPreProcessorsasuspendfunction and switched pre-processor invocation toprocessAsync. - Added
processAsyncas a new suspending API onPreChatProcessor(defaulting toprocess). - Removed committed IntelliJ
.ideaproject files and bumpedversionto4.5.1.
Reviewed changes
Copilot reviewed 4 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| surf-chat-paper/src/main/kotlin/dev/slne/surf/chat/paper/listener/AsyncChatListener.kt | Runs pre-chat processors via the new suspending path (bridged with runBlocking) before setting cancel/renderer. |
| surf-chat-paper/src/main/kotlin/dev/slne/surf/chat/paper/command/direct/DirectMessageCommand.kt | Updates direct message pre-processing to use the new suspending processor API. |
| surf-chat-api/src/main/kotlin/dev/slne/surf/chat/api/processor/PreChatProcessor.kt | Introduces processAsync as a new suspending method on the public processor interface. |
| gradle.properties | Version bump to 4.5.1. |
| .idea/inspectionProfiles/Project_Default.xml | Removes IDE-specific project configuration from VCS. |
| .idea/copilot.data.migration.edit.xml | Removes IDE-specific project configuration from VCS. |
| .idea/copilot.data.migration.ask2agent.xml | Removes IDE-specific project configuration from VCS. |
| .idea/copilot.data.migration.ask.xml | Removes IDE-specific project configuration from VCS. |
| .idea/copilot.data.migration.agent.xml | Removes IDE-specific project configuration from VCS. |
| .idea/codeStyles/Project.xml | Removes IDE-specific project configuration from VCS. |
| .idea/codeStyles/codeStyleConfig.xml | Removes IDE-specific project configuration from VCS. |
Files not reviewed (7)
- .idea/codeStyles/Project.xml: Language not supported
- .idea/codeStyles/codeStyleConfig.xml: Language not supported
- .idea/copilot.data.migration.agent.xml: Language not supported
- .idea/copilot.data.migration.ask.xml: Language not supported
- .idea/copilot.data.migration.ask2agent.xml: Language not supported
- .idea/copilot.data.migration.edit.xml: Language not supported
- .idea/inspectionProfiles/Project_Default.xml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
8
to
+9
| fun process(context: MessageContext): MessageContext | ||
| suspend fun processAsync(context: MessageContext): MessageContext = process(context) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…sors to suspend function for async processing