Commit Graph

31 Commits

Author SHA1 Message Date
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
yangshilin
a2b2b6eb76 fix: 语音消息暂存本地 修复显示异常 2026-03-13 17:11:59 +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
Kevin
201dedb84c fix: 完善 Liblib 图片尺寸兼容处理并补充安全排查记录
- 调整 Liblib 图片生成参数,优先使用官方 aspectRatio 预设,非预设尺寸回退为 imageSize 显式宽高。\n- 新增尺寸解析与边界钳制逻辑,并补充对 undocumented 状态 7 的防御性处理说明。\n- 新增密钥排查备忘,记录 .env 中腾讯 COS 凭证硬编码问题,便于后续安全整改。
2026-03-11 15:36:58 +08:00
Kevin
305e5dcde9 修复回忆录图片重试状态透传与前端展示 2026-03-11 15:23:58 +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
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
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
iammm0
240a184da8 feat: 新增腾讯云ASR服务,支持按配置切换ASR提供商
- 新增tencent_asr_service.py腾讯云一句话识别
- 优化asr_service.py
- 更新services/__init__.py按ASR_PROVIDER切换whisper/tencent
- 更新requirements.txt

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-11 16:06:06 +08:00
iammm0
0b7bd37d5d feat: Docker 构建预置 ASR 模型,支持离线使用
- Dockerfile 构建时预下载 faster-whisper 模型到镜像
- docker-compose 增加 ASR_MODEL_CACHE_DIR 环境变量
- asr_service 支持从缓存目录加载本地模型,无需运行时联网下载

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 15:08:00 +08:00
iammm0
76fd7da3c9 feat: 扩展后端WebSocket和语音识别功能
- 扩展websocket.py支持语音消息
- 优化asr_service.py语音识别服务
- 更新main.py和requirements.txt
- 更新.env.production配置

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-03 11:29:38 +08:00
iammm0
32fdc066dd refactor: 优化后端认证和路由功能
- 优化auth.py认证路由
- 优化books.py书籍路由
- 优化sms_service.py短信服务
2026-01-29 10:57:05 +08:00
iammm0
0925c6f15a refactor: 优化短信验证服务
- 优化sms_service.py短信验证服务实现
- 更新.env.production配置
2026-01-27 14:30:12 +08:00
iammm0
9c39df62bc feat: 新增短信验证码服务
- 新增sms_service.py短信验证服务
- 新增test_sms_verification.py短信验证测试
- 更新requirements.txt添加短信服务依赖
- 更新.env.production添加短信服务配置
2026-01-27 11:35:54 +08:00
penghanyuan
3f899aa16c feat: 新增任务状态管理和API支持
- 添加任务状态API路由,支持获取当前用户的任务状态和待处理任务列表
- 实现任务追踪服务,使用Redis存储任务状态
- 更新回忆录处理逻辑,集成Celery任务提交和状态更新
- 增强测试用例,支持任务状态的获取和清除功能
- 优化代码结构,提升可读性和维护性
2026-01-21 23:37:00 +01:00
penghanyuan
dbbb924625 feat: 添加Redis支持和Celery任务处理
- 新增Redis服务模块用于会话状态存储和缓存
- 集成Celery用于后台任务处理
- 更新Docker Compose配置以支持开发环境
- 优化API以支持异步调用和Redis会话存储
- 更新文档以反映新的开发环境配置和使用方法
2026-01-21 23:06:47 +01:00
penghanyuan
44bd478c1e agent init 2026-01-21 22:31:09 +01:00
徐在坤
82f64da7d0 feat: 添加LLM服务模块
- 添加LLM服务以支持DeepSeek和其他兼容OpenAI的LLM
- 支持通过环境变量配置API密钥、基础URL和模型名称
- 提供LLM实例获取和可用性检查功能
2026-01-18 15:58:11 +08:00
徐在坤
f426a9db5d refactor: 更新服务模块
- 更新ASR服务配置
- 更新服务模块导出
2026-01-18 15:57:54 +08:00
徐在坤
347fd43b35 feat: 添加用户认证功能
- 添加认证路由(注册、登录、刷新令牌、登出、获取用户信息)
- 添加认证服务(密码哈希、JWT令牌生成和验证)
- 添加认证中间件(获取当前用户)
- 支持手机号和密码登录
- 支持访问令牌和刷新令牌机制
2026-01-18 15:57:40 +08:00
iammm0
c634cb2daa 添加API服务模块 2026-01-07 11:56:46 +08:00