Commit Graph

12 Commits

Author SHA1 Message Date
Sully
2eb066dbec 把“章节正文 + 图片”从 chapters 单表/JSON 结构,重构为“章节 chapter + 段落 section + 图片 memoir_images 独立表”的新数据模型,同时联动修改接口、PDF 导出、异步任务、迁移脚本、测试,以及修复 Android 端聊天列表显示问题。 (#9)
* refactor: 表结构重构,新增段落section和图片image新表

* fix: fix android app import error

* refactor: 重构文件名

* fix: 优化提示词

* fix: 消息气泡显示位置异常问题

---------

Co-authored-by: yangshilin <2157598560@qq.com>
2026-03-13 11:12:10 +08:00
yangshilin
0ad253fde5 fix: 优化生图提示词 2026-03-12 13:47:12 +08:00
yangshilin
e4555cb73a fix: 修复花括号显示异常问题 2026-03-12 10:13:40 +08:00
Kevin
4b4dea8a45 Merge remote-tracking branch 'origin/development' into development
# Conflicts:
#	api/agents/prompts/memory_prompts.py
2026-03-11 14:29:48 +08:00
Kevin
a76cf8da18 Fix memoir image delivery and Android rendering 2026-03-11 10:06:12 +08:00
yangshilin
4ae68394c5 feat: 新增图片占位符提示词固定模板 入库时拼接 2026-03-11 09:48:06 +08:00
penghanyuan
8b4a058640 feat: 优化回忆录内容处理和章节分类逻辑
- 更新 get_system_prompt 函数,增强对话内容的核心信息提炼和分类能力,确保只保留与人生经历相关的实质内容。
- 修改 _classify_chapter_category 函数,增加对无实质回忆录价值内容的处理,返回 None 以跳过无效段落。
- 在 Android 客户端中,更新章节阅读视图以移除内嵌章节标题,提升排版一致性。
- 新增 TextUtils 工具函数,专门用于移除 LLM 生成的内嵌章节标题,确保正文内容的流畅性。
2026-03-02 19:47:32 +01:00
penghanyuan
c1e2fb31a0 Merge branch 'feat/improve-agent-prompt' 2026-03-01 10:12:23 +01:00
penghanyuan
99a1660d03 feat: 更新对话内容处理逻辑及新增用户回忆整理脚本
- 修改 get_narrative_prompt 函数,优化对话内容的叙述生成逻辑,确保新内容与已有内容自然衔接。
- 在 api/scripts 中新增 reprocess_user_memoir.py 脚本,用于整理用户历史对话为回忆录章节,支持远程预览和确认写入。
- 更新 .gitignore,添加对 certs/ 和 scripts/output/ 目录的忽略规则,确保不必要的文件不被跟踪。
- 在 memoir_tasks.py 中添加章节锁机制,防止并发写入同一章节,提升数据一致性和安全性。
2026-02-21 09:33:31 +01:00
penghanyuan
7fe0b70d5c feat: 增强对话代理以检测用户阶段并更新章节排序
- 在 api/agents/conversation_agent.py 中添加 _detect_user_stage 方法,以通过关键词检测用户谈论的人生阶段。
- 在 api/agents/memory_agent.py 中更新章节排序逻辑,使用 STAGE_TO_ORDER 替代 CHAPTER_ORDER。
- 在 api/agents/state_schema.py 中添加方法以获取各阶段的填充情况。
- 在 api/agents/prompts/conversation_prompts.py 中更新对话提示,包含用户阶段检测和整体进度信息。
- 在 api/migrations/fix_chapter_order_index.sql 中添加 SQL 脚本以修复章节 order_index 的问题。
- 更新相关文档和提示以反映新功能。
2026-02-13 21:45:56 +01:00
penghanyuan
44bd478c1e agent init 2026-01-21 22:31:09 +01:00
iammm0
d51c65a580 添加AI代理模块 2026-01-07 11:56:53 +08:00