minecraft1024a
e7fa3d79ff
Reapply "【迁移】工具系统再完善:工具缓存、ttl支持、自动记录、长期保存、自动清理缓存、将记录与执行分离、api记录查询、时间聊天工具筛选查询..."
...
This reverts commit 3d93bc4079 .
2025-11-19 22:48:31 +08:00
Furina-1013-create
1f800be3d1
feat(plugin_system): 增加工具执行日志记录
...
feat(plugin_system): 增加工具执行日志记录
在工具执行前添加一行日志,用于记录正在调用的工具名称和参数,方便调试和追踪。
2025-11-19 22:48:25 +08:00
Windpicker-owo
e068663ef9
Revert "【迁移】工具系统再完善:工具缓存、ttl支持、自动记录、长期保存、自动清理缓存、将记录与执行分离、api记录查询、时间聊天工具筛选查询..."
...
This reverts commit 80ab0c687c .
2025-11-19 22:48:24 +08:00
Windpicker-owo
adfacd883c
【迁移】工具系统再完善:工具缓存、ttl支持、自动记录、长期保存、自动清理缓存、将记录与执行分离、api记录查询、时间聊天工具筛选查询...
2025-11-19 22:48:23 +08:00
minecraft1024a
dd9aecea14
feat(maizone): 新增QQ空间互通组功能,根据聊天上下文生成说说
...
引入了全新的“QQ空间互通组”功能。用户可以配置多个群聊为一个互通组。
在通过指令发布说说时,系统会自动获取这些群聊的近期聊天记录作为上下文,从而生成与当前讨论话题更相关的说说内容。
- 在 `config.toml` 中新增了 `[maizone_intercom]` 配置项用于定义互通组。
- 重构并增强了动态(说说)的拉取逻辑,提高了对不同数据格式的兼容性和解析的稳定性。
- 对项目中的多个文件进行了代码清理,移除了未使用的导入,使代码更加整洁。
2025-11-19 22:48:02 +08:00
Windpicker-owo
dfd8d4ca9e
注册EventHandler组件
2025-11-19 22:46:30 +08:00
Windpicker-owo
5d1390d546
event重构暂时完成,待测试
2025-11-19 22:46:26 +08:00
Windpicker-owo
902a031a9d
feat: 迁移Windpicker-owo的Event系统重构\n\n- 引入新的BaseEvent和HandlerResult架构\n- 实现灵活的事件订阅与激活机制\n- 添加事件管理器单例模式\n- 支持事件缓存和权重排序\n- 统一事件处理接口
2025-11-19 22:46:25 +08:00
雅诺狐
978af6b2ca
Update permission_manager.py
2025-11-19 22:46:18 +08:00
雅诺狐
34252ea4a0
refactor: 清理代码质量和移除未使用文件
...
- 移除未使用的导入语句和变量
- 修复代码风格问题(空格、格式化等)
- 删除备份文件和测试文件
- 改进异常处理链式调用
- 添加权限系统数据库模型和配置
- 更新版本号至6.4.4
- 优化SQL查询使用正确的布尔表达式
2025-11-19 22:46:18 +08:00
雅诺狐
3360b22dca
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-11-19 22:46:06 +08:00
minecraft1024a
2f1a9fa966
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-11-19 22:45:22 +08:00
雅诺狐
95bbce355a
Improve anti-injection detection logging and text extraction
...
Added detailed debug logs for text extraction and LLM detection input in the anti-injector module. Refactored message processing to only use user-added content for detection, avoiding duplicate text. Fixed import paths for command_skip_list in plugin manager and anti_injector_manager to reflect new module structure.
2025-11-19 22:45:01 +08:00
雅诺狐
bb4592846c
Refactor config system to use Pydantic validation
...
Refactored configuration classes to inherit from a new ValidatedConfigBase using Pydantic for robust validation and error reporting. Updated api_ada_configs.py, config.py, config_base.py, and official_configs.py to replace dataclasses with Pydantic models, add field validation, and improve error messages. This change enhances configuration reliability and developer feedback for misconfigurations. Also includes minor code cleanups and removal of unused variables in other modules.
2025-11-19 22:44:45 +08:00
minecraft1024a
808954a372
refactor(chat): 禁用工具执行器的缓存功能(因为这玩意真的没几次命中过的)
2025-11-19 22:44:41 +08:00
雅诺狐
383f704b53
Remove unused imports across multiple modules
...
Cleaned up various files by removing unused or redundant import statements to improve code readability and reduce potential confusion. No functional changes were made.
2025-11-19 22:44:32 +08:00
tt-P607
3e20d11eec
<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:谢谢雅诺狐姐姐投喂的提交喵^ω^
2025-11-19 22:44:03 +08:00
minecraft1024a
bf9e1e60c4
优化插件热重载管理,支持多个监听目录
2025-11-19 22:39:07 +08:00
雅诺狐
b966a2f09c
小修复
2025-11-19 22:35:34 +08:00
雅诺狐
23ee3767ef
初始化
2025-11-19 22:34:56 +08:00
UnCLAS-Prommer
41e8966ae7
更多events
2025-08-09 17:33:24 +08:00
SengokuCola
d1f15a932a
fix:缺少stream的报错
2025-08-08 21:20:28 +08:00
UnCLAS-Prommer
2feb3ebe6b
OnPlan事件
2025-08-08 00:05:12 +08:00
UnCLAS-Prommer
3d98b56c15
空响应就raise
2025-08-06 13:06:53 +08:00
Windpicker-owo
cd7c1bb3ca
Merge branch 'dev' of https://github.com/Windpicker-owo/MaiBot into dev
2025-08-06 12:02:48 +08:00
Windpicker-owo
94a66bd235
使Tool支持读取配置文件,优化了开始执行工具调用时的日志输出
2025-08-06 12:01:31 +08:00
UnCLAS-Prommer
1e5db5d7e1
正确使用lpmm构建prompt
2025-08-03 19:52:31 +08:00
UnCLAS-Prommer
37e52a1566
tools系统
2025-07-31 11:41:15 +08:00
UnCLAS-Prommer
6c0edd0ad7
调整对应的调用
2025-07-30 17:07:55 +08:00
UnCLAS-Prommer
16c644a666
转换原来的tools到新的(虽然没转)
2025-07-29 00:15:29 +08:00
UnCLAS-Prommer
6062b6bd3c
Merge pull request #1149 from Windpicker-owo/dev
...
在一些细节上完善工具
2025-07-29 00:01:47 +08:00
UnCLAS-Prommer
af27d0dbf0
tools整合彻底完成
2025-07-28 23:57:55 +08:00
Windpicker-owo
3692015ce5
update
2025-07-28 23:53:54 +08:00
Windpicker-owo
33f6377dad
Merge branch 'dev' of https://github.com/Windpicker-owo/MaiBot into dev
2025-07-28 22:57:20 +08:00
Windpicker-owo
8131e65e9e
tool支持是否启用,更人性化的直接调用
2025-07-28 22:56:52 +08:00
UnCLAS-Prommer
82c4dfbb88
Merge branch 'dev' into dev
2025-07-28 21:59:48 +08:00
UnCLAS-Prommer
c0375f5dd9
合并utils_api
2025-07-28 12:37:37 +08:00
UnCLAS-Prommer
0c302c9ca5
修复插件中使用相对导入时会爆炸
2025-07-28 09:46:40 +08:00
Windpicker-owo
4ac487dd14
将ToolExecutor迁移进tool_use,顺便改了两处typing
2025-07-27 00:24:40 +08:00
Windpicker-owo
8cc6636b20
修改了一处注释
2025-07-26 22:37:46 +08:00
Windpicker-owo
3021acff59
修复了一些bug,修改了插件加载输出
2025-07-26 20:49:22 +08:00
Windpicker-owo
934ad25d32
Merge branch 'MaiM-with-u:dev' into dev
2025-07-26 18:54:45 +08:00
Windpicker-owo
44d86c8847
尝试整合工具和插件系统
2025-07-26 18:37:29 +08:00
UnCLAS-Prommer
ecfa25bf5a
移除了dependency_manager,dependency文档修改
2025-07-26 17:13:12 +08:00
UnCLAS-Prommer
229d45083d
command简化,修复unregister的bug
2025-07-25 13:39:27 +08:00
UnCLAS-Prommer
d6284b6b4c
插件管理API测试与修改通过
2025-07-24 00:31:53 +08:00
UnCLAS-Prommer
56c2adbaec
插件和组件管理API
2025-07-23 11:07:26 +08:00
UnCLAS-Prommer
10bf424540
增加了组件的局部禁用方法
2025-07-23 00:41:31 +08:00
UnCLAS-Prommer
35ec390dfd
增加了组件的全局启用和禁用功能
2025-07-22 22:38:40 +08:00
UnCLAS-Prommer
76025032a9
增加了卸载和重载插件功能
2025-07-22 18:52:11 +08:00