feat: AI 周报摘要提示词自定义设置

- system_config 新增 ai_summary_prompt 配置键
- generate_summary 从数据库加载自定义提示词,为空则使用默认 SUMMARY_SYSTEM_PROMPT
- 系统设置新增「AI 周报提示词」卡片,支持编辑和清空恢复默认

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-12 14:20:20 +08:00
parent 7dcb22f573
commit e7c3081070
3 changed files with 54 additions and 2 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ async def update_config(
):
"""Update a single config key. Only directors can change settings."""
value = body.get("value", "")
valid_keys = {"notification_time", "holidays"}
valid_keys = {"notification_time", "holidays", "ai_summary_prompt"}
if key not in valid_keys:
raise HTTPException(status_code=400, detail=f"不支持的配置项: {key}")