mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-21 03:46:11 +00:00
feat(plugin): report deferred response delivery failures (#2287)
* feat(plugin): report deferred response delivery failures * style: fix ruff format issues in plugin_diagnostics and test_handler_actions --------- Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import typing
|
||||
|
||||
from .. import handler
|
||||
from ... import entities
|
||||
from ... import plugin_diagnostics
|
||||
import langbot_plugin.api.entities.builtin.provider.message as provider_message
|
||||
import langbot_plugin.api.entities.builtin.provider.session as provider_session
|
||||
import langbot_plugin.api.entities.builtin.pipeline.query as pipeline_query
|
||||
@@ -52,6 +53,13 @@ class CommandHandler(handler.MessageHandler):
|
||||
if event_ctx.is_prevented_default():
|
||||
if event_ctx.event.reply_message_chain is not None:
|
||||
mc = event_ctx.event.reply_message_chain
|
||||
plugin_diagnostics.record_pending_plugin_response_source(
|
||||
query,
|
||||
mc,
|
||||
plugin_diagnostics.get_response_sources(event_ctx),
|
||||
plugin_diagnostics.get_emitted_plugins(event_ctx),
|
||||
event.event_name,
|
||||
)
|
||||
|
||||
query.resp_messages.append(mc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user