-
Notifications
You must be signed in to change notification settings - Fork 154
fixes #1972 [Bot Engine]: fix story listener #1974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes issue #1972 related to the story listener and improves coroutine debugging in story handlers. The main issue was that AsyncBotBus.botBus was being used where the synchronous bus should be accessed, causing listener methods to receive the wrong bus type.
Key Changes:
- Renamed
AsyncBotBus.botBustoAsyncBotBus.syncBusto clarify it provides access to the synchronousBotBus, with the old property name deprecated - Fixed the incorrect package name for
AsyncStoryHandlerListener(moved fromai.tock.bot.definition.definitiontoai.tock.bot.definition) - Added coroutine naming for debug purposes when running in development environment
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/src/main/kotlin/coroutines/TockCoroutines.kt | Refactored fire-and-forget functions: extracted logger to module level, improved documentation, updated return types to Job for better lifecycle management |
| bot/engine/src/test/kotlin/definition/AsyncBotEngineTest.kt | Fixed test to use syncBus instead of deprecated botBus property |
| bot/engine/src/main/kotlin/engine/dialog/Story.kt | Fixed story listener to correctly pass syncBus to non-async listeners; corrected package import for AsyncStoryHandlerListener |
| bot/engine/src/main/kotlin/engine/Bot.kt | Added helper function to generate debug coroutine names in dev environment; integrated coroutine naming into story handler execution |
| bot/engine/src/main/kotlin/engine/AsyncBotBus.kt | Renamed botBus property to syncBus throughout the class with proper deprecation; updated all internal references to use new name |
| bot/engine/src/main/kotlin/definition/AsyncStoryHandlerListener.kt | Fixed incorrect package name from ai.tock.bot.definition.definition to ai.tock.bot.definition |
| bot/engine/src/main/kotlin/definition/AsyncStoryHandlerBase.kt | Updated to use syncBus; added deprecated handle(BotBus) override with coroutine naming support; refactored findStoryDefinition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fixes #1972 and adds some debug info to story handler coroutines