feat: 更新对话内容处理逻辑及新增用户回忆整理脚本

- 修改 get_narrative_prompt 函数,优化对话内容的叙述生成逻辑,确保新内容与已有内容自然衔接。
- 在 api/scripts 中新增 reprocess_user_memoir.py 脚本,用于整理用户历史对话为回忆录章节,支持远程预览和确认写入。
- 更新 .gitignore,添加对 certs/ 和 scripts/output/ 目录的忽略规则,确保不必要的文件不被跟踪。
- 在 memoir_tasks.py 中添加章节锁机制,防止并发写入同一章节,提升数据一致性和安全性。
This commit is contained in:
penghanyuan
2026-02-21 09:33:31 +01:00
parent d9e010ef70
commit 99a1660d03
5 changed files with 804 additions and 99 deletions

5
.gitignore vendored
View File

@@ -52,6 +52,9 @@ dist/
*.egg-info/
# 本地 ASR 模型缓存Whisper 每次启动从该目录加载)
api/models/
api/models/certs/
# 脚本输出(预览 JSON/Markdown
api/scripts/output/
certs/