Commit Graph

8 Commits

Author SHA1 Message Date
Windpicker-owo
255e3627b4 feat(chat): refactor logging and integrate no_reply system action
将日志前缀管理集中到context,新增willing_manager依赖,并把no_reply提升为系统级可用动作

- CycleProcessor 统一改从 context 获取 log_prefix
- HeartFChatting 引入 willing_manager
- ResponseHandler _send_response -> send_response 去下划线统一对外接口
- ActionPlanner 将 no_reply 添加至 current_available_actions
2025-09-01 22:41:42 +08:00
Windpicker-owo
8149731925 修复代码格式和文件名大小写问题 2025-08-31 20:50:17 +08:00
雅诺狐
f308adcf5b refactor: 清理代码质量和移除未使用文件
- 移除未使用的导入语句和变量
- 修复代码风格问题(空格、格式化等)
- 删除备份文件和测试文件
- 改进异常处理链式调用
- 添加权限系统数据库模型和配置
- 更新版本号至6.4.4
- 优化SQL查询使用正确的布尔表达式
2025-08-24 22:11:20 +08:00
雅诺狐
8d8d9fbda1 Refactor anti-injection system and remove command skip list
Removed the command skip list feature and related code from the anti-injection system, including configuration options, plugin command collection, and management commands. Refactored anti-injector logic to operate directly on message dictionaries and simplified whitelist and message content extraction. Updated response handling to perform anti-injection checks before reply generation, and removed skip list refresh logic from the plugin manager.
2025-08-22 15:48:21 +08:00
minecraft1024a
87ee286614 refactor(cleanup): 移除未使用的导入项与冗余代码
清理了整个代码库中所有无用的模块导入、重复定义以及冗余变量引用,具体包括:
- bot.py 去掉了 random、typing 的未使用 import
- antipromptinjector 模块统一移除未引用的 DetectionResult、Dict、List 等
- chat_loop 中删除了未调用的 Timer、mai_thinking_manager、events_manager 等引用
- qzone_service 删除多余 f-string 大括号,避免日志警告格式问题
- 其他模块同步剔除各自范围内的冗余 import(asyncio、datetime 等共 20+ 处)

保持功能不变,仅作代码整洁度优化,无破坏性变更。(并添加了一个现在暂时还没加进去的必应搜索源文件)
2025-08-21 21:09:52 +08:00
minecraft1024a
e3cedd54ff style(chat): 统一 chat_loop 模块 logger 命名并添加业务注释
将各子模块 logger 由 hfc.* 缩减为统一 "hfc"

涉及的子模块:
- cycle_tracker / energy_manager / hfc_utils / proactive_thinker / response_handler
2025-08-21 15:32:57 +08:00
Furina-1013-create
4c51f59c96 为拆分heartFC_chat后的几个文件 添加亿点注释 2025-08-21 14:55:58 +08:00
minecraft1024a
9c3b750328 refactor(chat): 重构HeartFChatting为模块化架构
将原本超长的heartFC_chat.py拆分为6个功能内聚的子模块:
- hfc_context:上下文数据容器
- cycle_tracker:循环状态记录
- energy_manager:能量值独立管理
- proactive_thinker:主动思考逻辑抽离
- cycle_processor:单次循环处理器
- response_handler / normal_mode_handler:响应策略

删除冗余常量、错误样板及旧逻辑;大幅减少类体积;降低耦合度,提升可维护性。
2025-08-21 14:27:12 +08:00