From 36aec772f6f4a2822570ff1bb18e1a700197cd2d Mon Sep 17 00:00:00 2001 From: minecraft1024a Date: Thu, 21 Aug 2025 12:47:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(antipromptinjector):=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E5=87=BD=E6=95=B0=E5=88=B7=E6=96=B0=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E5=91=BD=E4=BB=A4(=E6=88=91=E6=80=A7=E5=8E=8B?= =?UTF-8?q?=E6=8A=91=E4=BA=86=EF=BC=8C=E6=88=91=E8=A6=81=E8=89=B9=E6=AD=BB?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=BC=80=E5=8F=91=E8=80=85)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat/antipromptinjector/processors/command_skip_list.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chat/antipromptinjector/processors/command_skip_list.py b/src/chat/antipromptinjector/processors/command_skip_list.py index c5e9c36c4..d999d496c 100644 --- a/src/chat/antipromptinjector/processors/command_skip_list.py +++ b/src/chat/antipromptinjector/processors/command_skip_list.py @@ -187,7 +187,7 @@ class CommandSkipListManager: return False, None - def refresh_plugin_commands(self): + async def refresh_plugin_commands(self): """刷新插件命令列表""" if not self.config.auto_collect_plugin_commands: return @@ -243,9 +243,9 @@ def should_skip_injection_detection(message_text: str) -> tuple[bool, Optional[s return skip_list_manager.should_skip_detection(message_text) -def refresh_plugin_commands(): +async def refresh_plugin_commands(): """刷新插件命令列表""" - skip_list_manager.refresh_plugin_commands() + await skip_list_manager.refresh_plugin_commands() def get_skip_patterns_info():