<Thinking>
我需要分析这个git diff,并生成一个与之前完全不同的commit message。 让我先分析变更内容: 1. **主要变更**: - 在 `anti_injector.py` 中添加了新的 `auto` 处理模式 - 添加了命令跳过列表功能 (`command_skip_list`) - 重构了反注入管理命令,从独立插件移动到核心动作插件 - 更新了配置文件以支持新功能 - 在插件管理器中添加了跳过列表刷新逻辑 2. **之前的commit message重点**: - 强调了"advanced anti-injection capabilities" - 重点描述了"intelligent 'auto' mode" - 提到了"command skip list" - 强调了"dynamically assesses threats" - 提到了"refactored and integrated into core actions plugin" 3. **我需要完全不同的角度**: - 可以从架构重构的角度 - 可以从用户体验改进的角度 - 可以从系统集成的角度 - 可以从性能优化的角度 让我从**系统架构优化和插件整合**的角度来写这个commit message,重点强调: - 插件系统的重构和整合 - 管理命令的迁移和统一 - 跳过机制的实现 - 自动化决策系统的引入 这样就能避免使用之前message中的关键词和结构。 </Thinking> refactor(plugins): 重构反注入插件架构并优化命令管理体系 将反注入管理功能从独立插件迁移至核心动作模块,实现更好的系统集成。新增智能跳过机制,允许已注册的插件命令绕过检测流程,有效减少误判。同时引入自适应处理策略,系统可根据威胁评估结果自主选择最适当的响应方式。 插件管理器现已集成自动刷新功能,确保跳过列表与插件状态保持同步。配置系统扩展支持多种跳过模式和自定义规则,提升了整体可维护性和用户体验。 ps:谢谢雅诺狐姐姐投喂的提交喵^ω^
This commit is contained in:
@@ -28,6 +28,11 @@
|
||||
"type": "action",
|
||||
"name": "emoji",
|
||||
"description": "发送表情包辅助表达情绪"
|
||||
},
|
||||
{
|
||||
"type": "action",
|
||||
"name": "anti_injector_manager",
|
||||
"description": "管理和监控反注入系统"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -11,10 +11,14 @@ from typing import List, Tuple, Type
|
||||
from src.plugin_system import BasePlugin, register_plugin, ComponentInfo
|
||||
from src.plugin_system.base.config_types import ConfigField
|
||||
|
||||
|
||||
# 导入依赖的系统组件
|
||||
from src.common.logger import get_logger
|
||||
|
||||
from src.plugins.built_in.emoji_plugin.emoji import EmojiAction
|
||||
# 导入API模块 - 标准Python包方式
|
||||
from src.plugins.built_in.core_actions.no_reply import NoReplyAction
|
||||
from src.plugins.built_in.core_actions.emoji import EmojiAction
|
||||
from src.plugins.built_in.core_actions.anti_injector_manager import AntiInjectorStatusCommand, AntiInjectorSkipListCommand
|
||||
|
||||
logger = get_logger("core_actions")
|
||||
|
||||
@@ -52,6 +56,7 @@ class CoreActionsPlugin(BasePlugin):
|
||||
},
|
||||
"components": {
|
||||
"enable_emoji": ConfigField(type=bool, default=True, description="是否启用发送表情/图片动作"),
|
||||
"enable_anti_injector_manager": ConfigField(type=bool, default=True, description="是否启用反注入系统管理命令"),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -62,6 +67,9 @@ class CoreActionsPlugin(BasePlugin):
|
||||
components = []
|
||||
if self.get_config("components.enable_emoji", True):
|
||||
components.append((EmojiAction.get_action_info(), EmojiAction))
|
||||
if self.get_config("components.enable_anti_injector_manager", True):
|
||||
components.append((AntiInjectorStatusCommand.get_command_info(), AntiInjectorStatusCommand))
|
||||
components.append((AntiInjectorSkipListCommand.get_command_info(), AntiInjectorSkipListCommand))
|
||||
|
||||
|
||||
return components
|
||||
|
||||
Reference in New Issue
Block a user