The solution from the reference doc is not suitable in this case for two reasons
It's specifically designed for activity processing that is supposed to be long-running, whereas in our case a long-running query is treated as irregular and only happens in rare case e.g. server error/network issue. This results in the actively queuing and prompting approach from the doc causing unnecessary user prompting and development overhead if applied to SophieBot.
The sample from the doc is based on Bot Framework SDK which uses different bot implementation, turn context and dialogs than the adaptive variations we're using, thus is not usable directly.
Implement a new IMiddleware to do "long operation monitoring" tasks. This implementation will see on each turn if the bot takes too long to respond. If so, let the user know that the bot is still processing.
Cc: @duanxinhuan
Pain
This feature is to implement long operation prompt as mentioned in https://github.com/SSWConsulting/SSW.SophieBot/issues/500#issuecomment-1156010371
Suggested Solution
Tasks
More Information
https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-long-operations-guidance?view=azure-bot-service-4.0
Definition of Done
Thanks!