Windpicker-owo
5217b78952
ruff
2025-08-31 00:34:21 +08:00
Windpicker-owo
d1d59591d8
ruff
2025-08-31 00:20:17 +08:00
Windpicker-owo
c7823245d2
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-30 22:06:03 +08:00
Windpicker-owo
79eec5f66e
修复ada插件
2025-08-30 22:06:00 +08:00
Furina-1013-create
eb4965a828
最小化侵入性方案让ui日志记录适配MoFox-Bot
2025-08-30 22:01:13 +08:00
雅诺狐
1a0e9da584
更新 send_feed_command.py
2025-08-30 21:57:40 +08:00
Windpicker-owo
7ca9ac9ee6
test
2025-08-30 21:39:25 +08:00
Windpicker-owo
8f9dea12b9
更新todo
2025-08-30 21:20:12 +08:00
Windpicker-owo
3719dc411c
ruff
2025-08-30 21:14:54 +08:00
minecraft1024a
901a3f0ed5
refactor(plugin_system): 重构插件配置同步逻辑
...
将插件配置同步逻辑重构为更清晰、更健壮的实现。此更改将复杂的同步过程分解为两个独立的、职责单一的方法:
- `_sync_central_config_to_plugin`: 专注于将中央配置单向同步到插件目录。
- `_is_file_content_identical`: 提供一个高效的文件内容比较方法,通过MD5哈希值避免不必要的IO操作。
这种重构提高了代码的可读性、可维护性,并增强了错误处理能力。同时,代码库从 `os.path` 迁移到了现代的 `pathlib`,以实现更简洁、更面向对象的路径操作。
2025-08-30 20:57:00 +08:00
minecraft1024a
589638200f
紧急修复一下我写出来的问题,修复同步插件配置文件时配置文件路径错误的问题
2025-08-30 20:43:31 +08:00
Windpicker-owo
6601bbe76a
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-30 19:59:59 +08:00
Windpicker-owo
7b765d5726
ruff
2025-08-30 19:59:54 +08:00
tt-P607
fa3d09db63
feat(maizone): 新增按时段禁用自动说说功能
...
将原有的活动黑名单机制替换为更灵活的按小时禁用功能。
现在可以配置一个时间段(例如凌晨2点到6点),在此期间插件将不会根据日程活动自动发送说说,以避免在休息时间造成打扰。
原有的 `activity_blacklist` 配置项已被移除。
2025-08-30 19:49:14 +08:00
tt-P607
9c2e9af78c
feat(video): 引入Python降级抽帧并重构视频分析逻辑
...
- 当Rust视频处理模块不可用时,自动降级使用基于OpenCV的Python传统抽帧实现,确保视频分析功能在不同环境下均可用。
- 重构`extract_frames`方法,使其能够根据配置的抽帧模式(keyframe, time_interval, fixed_number)和可用的模块(Rust, Python)智能选择最佳的实现路径。
- 增强了初始化检查逻辑,现在会同时检测Rust和OpenCV的可用性,并根据检测结果提供更准确的日志警告或错误信息。
- 更新了`is_video_analysis_available`和`get_video_analysis_status`函数,以准确反映当前可用的视频处理实现和支持的抽帧模式。
2025-08-30 19:34:35 +08:00
tt-P607
60a558d95f
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-30 19:09:05 +08:00
tt-P607
a7b16cae0b
refactor(llm_models): 优化反截断机制并迁移配置
...
将反截断功能的启用配置从API服务商级别迁移到单个模型级别,提供了更细粒度的控制。
主要变更:
- 在`LLMRequest`中,将硬编码的结束标记`[done]`替换为可配置的`self.end_marker`。
- 反截断检查逻辑从`api_provider`配置改为读取`model_info`中的`use_anti_truncation`布尔值。
- 更新了`model_config_template.toml`,移除了全局的反截断开关,并为每个模型增加了可选的`use_anti_truncation`配置项。
2025-08-30 19:08:43 +08:00
Windpicker-owo
03969b4a82
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-30 17:57:05 +08:00
Windpicker-owo
142e72ba6c
feat(napcat): 补充全部群事件处理与事件定义
...
新增近 30 个群相关事件处理器,覆盖群信息、成员管理、禁言、公告、精华消息等功能;修正合并转发消息事件常量拼写;补全事件类型注解与详细文档。所有群事件统一使用 `NapcatEvent.GROUP.*` 枚举值与对应 Handler。
2025-08-30 17:55:13 +08:00
minecraft1024a
5fe3a5e6aa
refactor(chat): 优化日程活动提示以减少群聊干扰
...
修改了日程活动提示的措辞,明确指出当前活动与群聊无关,以防止在群聊场景下产生不相关的联想或干扰。
2025-08-30 17:36:55 +08:00
minecraft1024a
4285046f38
chore(plugin): 更新 set_typing_status 插件元数据
2025-08-30 14:43:39 +08:00
minecraft1024a
a33e323927
docs: 简化 README 中的安装说明
...
将详细的安装和配置步骤移至官方文档,并在 README 中提供直接链接。这使得 README 更加简洁,并引导用户访问最新的、更全面的部署指南。
2025-08-30 14:41:33 +08:00
minecraft1024a
0e73b2643e
ruff ci
2025-08-30 14:21:59 +08:00
minecraft1024a
91d1efcd1f
docs: 重构并简化隐私条款
...
将隐私条款(PRIVACY.md)的语言风格从法律化、复杂的格式重构为更易于普通用户理解的口语化说明。
- 使用更清晰的标题和项目符号来组织内容。
- 简化了关于数据处理、第三方插件和责任的措辞。
- 更新了文档的更新日期和版权年份。
2025-08-30 14:15:39 +08:00
minecraft1024a
9b64b190e0
docs: overhaul EULA and README for clarity and user-friendliness
...
The End User License Agreement (EULA) has been completely rewritten from a formal legal document into a user-friendly Q&A format. This change aims to make the terms of use more accessible and understandable for end-users, clearly outlining their rights and responsibilities.
The README.md has been significantly updated to improve structure, readability, and visual appeal. Key changes include:
- Restructuring the layout for a more logical flow.
- Adding clear, concise tables for system requirements.
- Simplifying the quick start and configuration instructions.
- Enhancing visual elements with better-formatted badges and centered sections.
- Clarifying the project's status as a third-party fork and warning about potential migration issues.
2025-08-30 14:07:30 +08:00
minecraft1024a
6b2e2d6373
refactor(schedule): 异步化月度计划生成以避免阻塞
...
将月度计划的生成过程从同步阻塞模式重构为异步非阻塞模式。
在 `ScheduleManager` 中,当月度计划耗尽时,现在会通过调用新的 `trigger_generate_monthly_plans` 方法来启动一个后台生成任务,而不是 `await` 其完成。这可以防止在生成新计划时(可能耗时较长)阻塞日常任务的调度流程。
同时,修复了 `MonthlyPlanManager` 中一个排序逻辑错误,确保在计划数量超出上限时,正确删除最旧的计划而不是最新的。
2025-08-30 12:01:04 +08:00
minecraft1024a
ec82f2b4e7
refactor(db): 优化ChromaDB查询参数处理
...
将查询参数动态构建,仅在`where`条件存在时才将其添加到查询中。此举增强了代码的健壮性和灵活性,避免了传入空的`where`字典可能引发的潜在问题。
2025-08-30 11:26:21 +08:00
minecraft1024a
7cb5c3844e
refactor(plugin): 优化插件配置加载与同步机制
...
- 移除全局插件配置开关 `plugins.centralized_config`。
- 简化 `PluginBase` 的配置加载逻辑,不再使用模板文件,而是直接在中央配置目录生成默认配置。
- 在 `PluginManager` 中增加配置同步逻辑,在加载插件时,实现插件目录与中央配置目录之间的双向同步,确保配置一致性。
- 更新 `bot_config_template.toml`,移除已废弃的 `[plugins]` 配置项并提升版本号。
2025-08-30 11:21:26 +08:00
Windpicker-owo
c6a0522316
feat(napcat): 增加消息与交互相关事件处理模块
...
新增多个事件处理器,支持私聊/群聊消息管理、历史记录、戳一戳、合并转发、表情点赞、AI语音等丰富消息功能,统一通过 napcat 接口发送并标准化返回 HandlerResult。
新增事件类型及其文档化注释,涵盖:
- SEND_PRIVATE_MSG / SEND_POKE / DELETE_MSG
- GET_GROUP_MSG_HISTORY / GET_MSG / GET_FORWARD_MSG
- SET_MSG_EMOJI_LIKE / GET_FRIEND_MSG_HISTORY / FETCH_EMOJI_LIKE
- SEND_FORWARD_MSG / SEND_GROUP_AI_RECORD
移除冗余空行并修正枚举名称拼写(FORWARF_MSG → FORWARD_MSG),为使用者提供完整入参和返回值说明。
2025-08-30 02:15:12 +08:00
雅诺狐
cb93b38162
Add Bilibili video analysis plugin
...
Introduced a new 'bilibli' plugin for Bilibili video parsing and AI-based content analysis. Added plugin manifest, base module for video info retrieval and analysis, and plugin integration with tool registration. Updated .gitignore to include the new plugin directory.
2025-08-30 00:26:44 +08:00
雅诺狐
18a739dc2b
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-30 00:10:18 +08:00
雅诺狐
562fe90adb
Add rust_video: Rust keyframe extraction Python module
...
Introduce the rust_video package, a Rust-based ultra-fast video keyframe extraction tool with SIMD and parallel optimizations. Includes Cargo.toml and pyproject.toml for Rust and Python packaging, Python type hints (rust_video.pyi), and the main Rust library (lib.rs) with PyO3 bindings, performance benchmarking, and system info utilities.
2025-08-30 00:09:22 +08:00
Windpicker-owo
38212bd351
rust_video依赖检测
2025-08-29 23:35:01 +08:00
minecraft1024a
88f7ea4d8b
refactor(llm_models): 优化并发请求的返回值处理
...
修改了`execute_concurrently`的返回逻辑,将其解包以分别返回`content`和包含`reasoning_content`, `model_name`, `tool_calls`的元组。这使得调用方能更清晰地处理并发请求的结果。
2025-08-29 20:34:23 +08:00
minecraft1024a
65fee5458a
refactor(energy): 移除is_sleeping方法对wakeup_manager的依赖
...
将`schedule_manager.is_sleeping`的调用从`is_sleeping(self.context.wakeup_manager)`修改为`is_sleeping()`,以解耦对`wakeup_manager`的直接依赖。
同时,在`napcat_adapter_plugin`中将`enable_plugin`的默认值修改为`False`。
2025-08-29 20:04:05 +08:00
雅诺狐
16a1568f65
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-29 19:15:04 +08:00
雅诺狐
0a647376f7
Remove rust-video keyframe extraction API and related files
...
Deleted the entire src/chat/utils/rust-video directory, including Rust and Python source files, configuration, and documentation. Updated utils_video.py, official_configs.py, and bot_config_template.toml to remove or adjust references to the removed rust-video module. This cleans up the codebase by removing the integrated Rust-based keyframe extraction API and its supporting infrastructure.
2025-08-29 19:13:42 +08:00
minecraft1024a
1bad63fcbd
ruff ci
2025-08-29 18:34:13 +08:00
minecraft1024a
35db4c5d91
refactor(schedule): 将睡眠状态管理逻辑重构并迁移到SleepManager
...
将原先分散在 `ScheduleManager` 中的睡眠状态机逻辑(包括状态判断、转换、持久化等)抽取并封装到一个新的 `SleepManager` 类中。
这次重构的主要目的如下:
- **职责分离**: `ScheduleManager` 的核心职责是管理日程的生成和查询,而睡眠状态的管理是一个独立的、复杂的逻辑单元。将其分离可以使两个类的职责更单一、代码更清晰。
- **可维护性**: 将所有与睡眠相关的状态和逻辑集中到 `SleepManager` 中,使得未来对睡眠功能的修改和扩展更加容易,减少了对 `ScheduleManager` 的影响。
- **代码简化**: `ScheduleManager` 不再需要管理内部的睡眠状态变量(如 `_current_state`, `_sleep_buffer_end_time` 等),而是通过委托 `sleep_manager` 实例来处理,简化了其内部实现。
相应的,`HfcContext` 中冗余的睡眠相关状态(如 `is_in_insomnia`)也被移除,统一由 `SleepManager` 管理。其他模块(如 `HeartFChatting`, `WakeUpManager`)对睡眠状态的调用也已更新为通过 `schedule_manager.sleep_manager` 或其代理方法进行。
2025-08-29 18:17:16 +08:00
minecraft1024a
e1fb3d7a3e
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-29 17:40:26 +08:00
minecraft1024a
41565eb144
refactor(schedule): 重构睡眠系统为状态机模型
...
将原有的睡眠、失眠、唤醒等分散的布尔标记逻辑重构为一个统一的睡眠状态机(SleepState),以提高代码的可读性、可维护性和可扩展性。
主要变更:
- 引入 `SleepState` 枚举,包含 `AWAKE`, `INSOMNIA`, `PREPARING_SLEEP`, `SLEEPING`, `WOKEN_UP` 状态。
- 在 `ScheduleManager` 中实现 `_update_sleep_state` 作为核心状态机,统一管理所有状态转换。
- 将原有的失眠判断逻辑从 `WakeUpManager` 移至 `ScheduleManager` 的状态机内部,与弹性睡眠决策合并,简化了模块职责。
- `heartFC_chat.py` 中的聊天循环现在直接查询 `ScheduleManager` 的当前状态,而不是处理多个独立的布尔值,使逻辑更清晰。
- 删除了 `WakeUpManager` 中与失眠相关的配置和方法,因为它现在由 `ScheduleManager` 统一管理。
- 删除了配置中已废弃的 `enable_is_sleep` 选项。
2025-08-29 17:40:22 +08:00
Windpicker-owo
c0033c4acc
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-29 16:58:55 +08:00
Windpicker-owo
edc7b36724
移除测试
2025-08-29 16:58:52 +08:00
minecraft1024a
01455156a7
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-29 16:23:12 +08:00
minecraft1024a
aa3ecfb63a
feat:重写了hello_world
2025-08-29 16:23:08 +08:00
Windpicker-owo
925604a708
feat(napcat): 新增18个账号相关事件处理器与完善文档
...
为NapCat适配器添加完整的账号操作功能:
- 在线客户端查询、在线状态设置、最近联系人
- 好友列表、分组列表、删除好友、点赞
- 头像设置、个性签名、自定义在线状态
- 小程序卡片生成、用户信息/状态查询
并同步补充事件类型注解
BREAKING CHANGE: BaseEvent构造函数不再接受可变默认实参
2025-08-29 16:20:19 +08:00
Windpicker-owo
288a686022
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-29 14:16:30 +08:00
Windpicker-owo
ad18af3c99
feat(napcat): 添加账号设置处理器和事件类型注解
...
为napcat插件增加SetProfileHandler来处理账号信息设置事件
- 实现参数解析和napcat API调用逻辑
- 添加详细的事件类型文档注解,包含参数说明和返回格式
- 扩展事件枚举类,新增多个群组相关操作事件
- 在插件初始化时自动注册所有事件处理器
- 为HandlerResultsCollection添加获取消息结果的方法
同时添加接口测试处理器用于验证事件系统的正常工作
2025-08-29 14:16:24 +08:00
minecraft1024a
74863fb914
chore(config): update bot_config_template version and remove unused option
...
- Bumps the config version from 6.5.7 to 6.5.8.
- Removes the `prompt_before_install` option which was not implemented.
2025-08-29 13:59:34 +08:00
minecraft1024a
e0a5e8e2d3
Merge branch 'master' of https://github.com/MoFox-Studio/MoFox_Bot
2025-08-29 13:56:27 +08:00