## ADDED Requirements ### Requirement: 互动自动化函数迁移至独立模块 系统 SHALL 将评论、点赞、收藏、回复等互动自动化函数从 `main.py` 提取至 `services/engagement.py`,包括:`load_note_for_comment`、`ai_generate_comment`、`send_comment`、`fetch_my_notes`、`on_my_note_selected`、`fetch_my_note_comments`、`ai_reply_comment`、`send_reply`、`auto_comment_once`、`_auto_comment_with_log`、`auto_like_once`、`_auto_like_with_log`、`auto_favorite_once`、`_auto_favorite_with_log`、`auto_reply_once`、`_auto_reply_with_log`、`_auto_publish_with_log`。 #### Scenario: 模块导入成功 - **WHEN** `main.py` 执行 `from services.engagement import auto_comment_once, auto_like_once` 等导入 - **THEN** 所有函数可正常调用 #### Scenario: 日志回调参数化 - **WHEN** `engagement.py` 中的 `_with_log` 函数需要追加日志时 - **THEN** 函数 SHALL 接收 `log_fn` 参数(callable)用于写入日志,不直接依赖外部 `_auto_log` 列表 #### Scenario: 频率限制集成 - **WHEN** `auto_comment_once` 等函数执行前需要检查每日限额和冷却状态 - **THEN** 通过调用 `rate_limiter` 模块中的函数实现,不在 `engagement.py` 内复制限流逻辑