fix(antipromptinjector): 使用异步函数刷新插件命令(我性压抑了,我要艹死所有开发者)
This commit is contained in:
@@ -187,7 +187,7 @@ class CommandSkipListManager:
|
|||||||
|
|
||||||
return False, None
|
return False, None
|
||||||
|
|
||||||
def refresh_plugin_commands(self):
|
async def refresh_plugin_commands(self):
|
||||||
"""刷新插件命令列表"""
|
"""刷新插件命令列表"""
|
||||||
if not self.config.auto_collect_plugin_commands:
|
if not self.config.auto_collect_plugin_commands:
|
||||||
return
|
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)
|
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():
|
def get_skip_patterns_info():
|
||||||
|
|||||||
Reference in New Issue
Block a user