feat(规划): 引入统一的规划系统并重构组件

本次提交引入了一个全新的统一规划系统,取代了独立的日程和月度计划模块。这一变更集中了配置并解耦了职责,以提高可维护性和清晰度。

核心逻辑现在被分解为专门的组件:

- PlanManager: 处理日常日程和月度目标的所有数据库交互,取代了已-删除的 monthly_plan_db.py。
- ScheduleLLMGenerator: 封装了与 LLM 交互以生成日程的逻辑,将此职责从 ScheduleManager 中移除。
- MonthlyPlanManager: 现在作为核心 PlanManager 的简化接口。
这次架构性的大修通过将数据持久化和 LLM 生成逻辑从主调度逻辑中抽象出来,简化了整体设计。

重大变更: bot_config.toml 中的配置已被迁移。移除了 [schedule] 和 [monthly_plan_system] 部分。所有相关设置现在必须在新的 [planning_system] 部分下进行配置。
This commit is contained in:
minecraft1024a
2025-09-06 11:41:42 +08:00
committed by Windpicker-owo
parent 03d1f7c57c
commit 2e6fc99224
13 changed files with 564 additions and 714 deletions

View File

@@ -271,7 +271,7 @@ MoFox_Bot(第三方修改版)
await self.individuality.initialize()
# 初始化月度计划管理器
if global_config.monthly_plan_system.enable:
if global_config.planning_system.monthly_plan_enable:
logger.info("正在初始化月度计划管理器...")
try:
await monthly_plan_manager.start_monthly_plan_generation()
@@ -280,7 +280,7 @@ MoFox_Bot(第三方修改版)
logger.error(f"月度计划管理器初始化失败: {e}")
# 初始化日程管理器
if global_config.schedule.enable:
if global_config.planning_system.schedule_enable:
logger.info("日程表功能已启用,正在初始化管理器...")
await schedule_manager.load_or_generate_today_schedule()
await schedule_manager.start_daily_schedule_generation()