Windpicker-owo
d089972fac
refactor: 完成数据库重构 - 批量更新导入路径
...
- 更新35个文件的导入路径 (共65处修改)
- sqlalchemy_models core.models (模型类)
- sqlalchemy_database_api compatibility (兼容函数)
- database.database core (初始化/关闭函数)
- 添加自动化导入更新工具 (scripts/update_database_imports.py)
- 所有兼容性层测试通过 (26/26)
- 数据库核心功能测试通过 (18/21)
2025-11-19 23:30:51 +08:00
minecraft1024a
e03ff2883f
refactor(schedule): centralize schedule and monthly plan prompts
...
Extracts the prompt templates for daily schedule and monthly plan generation from `llm_generator.py` into a new `prompts.py` module. This change centralizes prompt management and improves code readability and maintainability by separating prompt logic from the generation workflow.
The `ScheduleLLMGenerator` and `MonthlyPlanLLMGenerator` classes now use the `global_prompt_manager` to format and retrieve the necessary prompts, simplifying the generator code.
2025-11-19 23:30:34 +08:00
minecraft1024a
12c2b806a2
ruff
2025-11-19 23:30:34 +08:00
minecraft1024a
4a0bd5845e
docs(schedule): 日程表管理器补上了注释
2025-11-19 23:30:32 +08:00
John Richard
a79253c714
re-style: 格式化代码
2025-11-19 23:13:20 +08:00
Windpicker-owo
df3c616d09
ruff,私聊视为提及了bot
2025-11-19 23:07:30 +08:00
minecraft1024a
b171dc5847
fix(schedule): 修复日程生成在连续失败时无限重试的问题
...
先前的日程生成逻辑使用无限循环进行重试。在 LLM 服务持续失败或返回无效数据的情况下,这可能导致程序陷入死循环。
本次修改将重试机制改为有固定上限(3次)的循环。如果所有尝试均失败,将记录错误并返回 None,从而确保程序的健壮性。
2025-11-19 23:05:35 +08:00
雅诺狐
93542cadef
perf(methods): 通过移除不必要的 self 参数优化方法签名
...
在包括 chat、plugin_system、schedule 和 mais4u 在内的多个模块中,消除冗余的实例引用。此次改动将无需访问实例状态的实用函数转换为静态方法,从而提升了内存效率,并使方法依赖关系更加清晰。
2025-11-19 23:05:00 +08:00
minecraft1024a
2e6fc99224
feat(规划): 引入统一的规划系统并重构组件
...
本次提交引入了一个全新的统一规划系统,取代了独立的日程和月度计划模块。这一变更集中了配置并解耦了职责,以提高可维护性和清晰度。
核心逻辑现在被分解为专门的组件:
- PlanManager: 处理日常日程和月度目标的所有数据库交互,取代了已-删除的 monthly_plan_db.py。
- ScheduleLLMGenerator: 封装了与 LLM 交互以生成日程的逻辑,将此职责从 ScheduleManager 中移除。
- MonthlyPlanManager: 现在作为核心 PlanManager 的简化接口。
这次架构性的大修通过将数据持久化和 LLM 生成逻辑从主调度逻辑中抽象出来,简化了整体设计。
重大变更: bot_config.toml 中的配置已被迁移。移除了 [schedule] 和 [monthly_plan_system] 部分。所有相关设置现在必须在新的 [planning_system] 部分下进行配置。
2025-11-19 22:58:36 +08:00