Commit Graph

216 Commits

Author SHA1 Message Date
Kevin
1aa3d8593c Merge origin/development: 整合 TTS(远端结构为主)+ memoir-cover,保留本地环境配置
Made-with: Cursor
2026-03-19 10:30:54 +08:00
Kevin
15512834d2 feat/ 添加app-expo三种环境切换,待测试 调整tts 2026-03-19 09:58:02 +08:00
Sully
b73370a9b5 feat/ memoir-cover (#16)
Co-authored-by: Kevin <kevin@brighteng.org>
2026-03-19 09:11:54 +08:00
Sully
92b7848c48 feat/tts (#15)
Co-authored-by: Kevin <kevin@brighteng.org>
2026-03-19 09:11:25 +08:00
yangshilin
48b70e1350 Merge branch 'refactor/backend-architecture' into development 2026-03-18 17:18:23 +08:00
yangshilin
2070a03d35 fix: 用户开始录音5s后ai反馈“我在认真听” 2026-03-16 11:24:40 +08:00
Sully
c2ce4c61f1 修复版本1.0.7的若干问题 (#11)
* fix/ 0:00 audio ui

* fix/ persist memoir image state and collapse voice history

Keep generated chapter images from staying in processing after successful uploads, and restore segmented voice recordings as a single audio message when reopening conversations.

Made-with: Cursor

* fix/ persist local conversation state and stabilize voice UI

Keep CreateMemory conversations driven by Room so recent text and audio survive page exits, and prevent stale 0:00 voice bubbles while list ordering follows the latest local message time.

Made-with: Cursor

* fix/ server-side root cause for conversation list time and message timestamps

- Add Conversation.last_message_at column with migration and index
- Update last_message_at on text message, audio segment, and AI response
- Sort conversation list by COALESCE(last_message_at, started_at) DESC
- Return real per-message timestamps from Redis history instead of now()
- Pass user_message_timestamp through agent pipeline to avoid LLM delay skew
- Remove all debug logging from server, client, and CI workflow
- Restore import json in conversation_agent (was broken by debug removal)
- Client: remove DebugRuntimeLogger, stop sending transcript as text message

Made-with: Cursor

---------

Co-authored-by: Kevin <kevin@brighteng.org>
2026-03-14 23:58:46 +08:00
Sully
9636c059d0 更新docker构建cd (#10)
* update github actions

* update github actions

* update github actions

* update github actions

* update github actions

* update github actions

* update github actions

---------

Co-authored-by: Kevin <kevin@brighteng.org>
2026-03-13 23:41:56 +08:00
yangshilin
a2b2b6eb76 fix: 语音消息暂存本地 修复显示异常 2026-03-13 17:11:59 +08:00
yangshilin
c0906723ac fix: 减少图片生成数量(当前3个section对应一张图) 2026-03-13 16:24:28 +08:00
yangshilin
672abf5ec7 fix: 图片生成失败后重试 前端一直显示生成中 2026-03-13 16:23:51 +08:00
yangshilin
043a89add6 docs: 更新数据迁移指南 2026-03-13 15:15:40 +08:00
yangshilin
ab4fb46c0d fix: 修复打个招呼的bug 2026-03-13 14:50:04 +08:00
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
Kevin
1cb804fa37 fix: 1.修复图片闪烁 2.增大图片轮询间隔 2026-03-13 10:53:42 +08:00
Sully
e2d7f7e28c Merge branch 'development' into fixUi2026-03-11 2026-03-12 16:07:49 +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
2e6f997f04 chore: 新增上线检查单与脱敏 env 模板 2026-03-11 16:31:16 +08:00
Kevin
201dedb84c fix: 完善 Liblib 图片尺寸兼容处理并补充安全排查记录
- 调整 Liblib 图片生成参数,优先使用官方 aspectRatio 预设,非预设尺寸回退为 imageSize 显式宽高。\n- 新增尺寸解析与边界钳制逻辑,并补充对 undocumented 状态 7 的防御性处理说明。\n- 新增密钥排查备忘,记录 .env 中腾讯 COS 凭证硬编码问题,便于后续安全整改。
2026-03-11 15:36:58 +08:00
Kevin
3bf79da540 Merge remote-tracking branch 'origin/development' into development 2026-03-11 15:23:58 +08:00
Kevin
305e5dcde9 修复回忆录图片重试状态透传与前端展示 2026-03-11 15:23:58 +08:00
yangshilin
4d2c31b5a6 feat & fix: 新增打个招呼选项 创建新会话;修复ai重复性提问的问题;修复输入键盘覆盖对话气泡的问题 2026-03-11 14:48:59 +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
f7d95c4c9a Fix dynamic memoir image limits 2026-03-11 14:07:02 +08:00
Kevin
822aefe54b Reuse memoir JSON payload parsing 2026-03-11 13:46:07 +08:00
Kevin
32954d4b3f Fix memoir image prompt parsing and host allowlist 2026-03-11 13:18:20 +08:00
Kevin
1f98b8bfd6 fix: fix various issues before merging 2026-03-11 11:27:32 +08:00
Kevin
00092d34c9 fix: harden memoir image generation flow 2026-03-11 11:26:42 +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
Kevin
0970cb7408 fix: 修复 Liblib provider 认证和多个图片生成关键缺陷
- 重写 LiblibImageProvider:Bearer token 改为 HMAC-SHA1 签名认证,
  适配 Liblib 真实 API(Star-3 Alpha 文生图端点)
- 修复 chapter.images JSON 列原地修改不持久化(深拷贝+整列重赋值)
- 修复 generate_chapter_images 在事务提交前派发(改为 commit 后统一 delay)
- 修复 initialize_chapter_images 覆盖已完成图片(新增 merge 去重逻辑)
- 修复 Android failed 图片渲染为错误卡片(改为隐藏,保持正文连续)
- 模型模板 UUID 改为环境变量配置(LIBLIB_TEMPLATE_UUID)
- 更新 .env 凭证格式为 ACCESS_KEY/SECRET_KEY
- 补充 test_memoir_image_bootstrap 缺失的 unittest.mock 导入

Made-with: Cursor
2026-03-10 17:02:50 +08:00
Kevin
f5afeb39ef feat(api): embed memoir chapter images in PDF export and strip placeholders
Made-with: Cursor
2026-03-10 16:06:09 +08:00
Kevin
879466fde1 feat(api): generate memoir chapter images asynchronously via Celery
Made-with: Cursor
2026-03-10 16:05:13 +08:00
Kevin
d5ed2940aa feat(api): initialize memoir chapter image assets on creation
Made-with: Cursor
2026-03-10 16:03:49 +08:00
Kevin
67a469f380 feat(api): add tencent cos storage for memoir images
Made-with: Cursor
2026-03-10 16:02:12 +08:00
Kevin
cf460dd2a4 feat(api): add liblib memoir image provider adapter
Made-with: Cursor
2026-03-10 16:00:59 +08:00
Kevin
f8283b398e feat(api): add memoir image prompt settings and optimization service
Made-with: Cursor
2026-03-10 16:00:25 +08:00
Kevin
5b51d104b4 feat(api): add memoir image placeholder parsing
Made-with: Cursor
2026-03-10 15:59:36 +08:00
Kevin
8b9ccd4926 fix: 优化长语音上传交互并修复输入框高度跳变 2026-03-10 11:44:16 +08:00
Kevin
6ffe96d7a9 feat: 支持长语音分段上传与断线补传 2026-03-09 15:36:44 +08:00
Kevin
a23a71c7a4 feat: 新增开发环境一键启动脚本并优化退出流程
提供 development.sh 用于一键启动本地依赖与服务,并在退出时按顺序停止 FastAPI、Celery 和开发用 Docker 容器,减少残留进程与端口占用。
2026-03-09 13:02:04 +08:00
iammm0
9cdd2bdf2f test: 在重构前补充 WebSocket 基线测试
补齐 WebSocket 关键流程的基线测试,为后续长语音重构提供回归保护。
2026-03-09 09:05:21 +08:00
penghanyuan
8b4a058640 feat: 优化回忆录内容处理和章节分类逻辑
- 更新 get_system_prompt 函数,增强对话内容的核心信息提炼和分类能力,确保只保留与人生经历相关的实质内容。
- 修改 _classify_chapter_category 函数,增加对无实质回忆录价值内容的处理,返回 None 以跳过无效段落。
- 在 Android 客户端中,更新章节阅读视图以移除内嵌章节标题,提升排版一致性。
- 新增 TextUtils 工具函数,专门用于移除 LLM 生成的内嵌章节标题,确保正文内容的流畅性。
2026-03-02 19:47:32 +01:00
penghanyuan
4a331428f7 feat: 优化部署流程和数据库迁移
- 更新 GitHub Actions 工作流,调整部署步骤,先启动数据库服务以确保迁移顺利进行。
- 新增启动所有服务的步骤,确保在迁移完成后启动全部服务。
- 在 SQL 脚本中添加锁定超时设置,提升数据库操作的稳定性。
2026-03-01 11:12:04 +01:00
penghanyuan
5125ee1564 feat: 修正章节排序和分类逻辑
- 新增 SQL 脚本以修正章节排序索引,确保与 8 个分类体系对齐。
- 更新 API 章节获取逻辑,始终返回所有 8 个预定义类别,未填充内容的类别使用占位符。
- 引入章节分类功能,支持从 5-stage 关键词映射到 8 个章节类别,提升内容分类准确性。
- 更新 Android 客户端以适应新的章节定义和占位逻辑,确保用户界面一致性。
2026-03-01 10:50:58 +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
d9e010ef70 feat: 更新 API 主页路由及 FastAPI 配置
- 将主页路由从 "/home" 更新为根路径 "/",以简化访问。
- 在 FastAPI 实例中禁用文档和 OpenAPI 相关的 URL,提升 API 安全性。
2026-02-14 21:25:37 +01:00
penghanyuan
6f19429aa4 chore: 移除主页底部法律信息部分
- 从主页 HTML 文件中删除法律相关链接和标题,简化页面内容。
2026-02-14 21:07:09 +01:00