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

@@ -34,17 +34,16 @@ from src.config.official_configs import (
VoiceConfig,
DebugConfig,
CustomPromptConfig,
ScheduleConfig,
VideoAnalysisConfig,
DependencyManagementConfig,
WebSearchConfig,
AntiPromptInjectionConfig,
SleepSystemConfig,
MonthlyPlanSystemConfig,
CrossContextConfig,
PermissionConfig,
CommandConfig,
MaizoneIntercomConfig,
PlanningSystemConfig,
)
from .api_ada_configs import (
@@ -393,7 +392,6 @@ class Config(ValidatedConfigBase):
debug: DebugConfig = Field(..., description="调试配置")
custom_prompt: CustomPromptConfig = Field(..., description="自定义提示配置")
voice: VoiceConfig = Field(..., description="语音配置")
schedule: ScheduleConfig = Field(..., description="调度配置")
permission: PermissionConfig = Field(..., description="权限配置")
command: CommandConfig = Field(..., description="命令系统配置")
@@ -409,8 +407,8 @@ class Config(ValidatedConfigBase):
)
web_search: WebSearchConfig = Field(default_factory=lambda: WebSearchConfig(), description="网络搜索配置")
sleep_system: SleepSystemConfig = Field(default_factory=lambda: SleepSystemConfig(), description="睡眠系统配置")
monthly_plan_system: MonthlyPlanSystemConfig = Field(
default_factory=lambda: MonthlyPlanSystemConfig(), description="月层计划系统配置"
planning_system: PlanningSystemConfig = Field(
default_factory=lambda: PlanningSystemConfig(), description="划系统配置"
)
cross_context: CrossContextConfig = Field(
default_factory=lambda: CrossContextConfig(), description="跨群聊上下文共享配置"