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
|
48594a20ea
|
fix: fix import path
|
2026-03-13 09:59:04 +08:00 |
|
Sully
|
e2d7f7e28c
|
Merge branch 'development' into fixUi2026-03-11
|
2026-03-12 16:07:49 +08:00 |
|
Kevin
|
f15046c1c1
|
feat: 客户端语音回放 长录音客户端切片,并行转录
|
2026-03-12 15:57:45 +08:00 |
|
Kevin
|
ec7107cbf0
|
修复: 处理审查反馈,修复线程安全问题、清理架构并集成 RecordingCoordinator
阻塞问题:
- 修复 uploadAvatar multipart body 为空(AuthService)
- 修复 VoiceRecorder 协程作用域泄漏(release 时调用 cancel)
- 修复 AudioSegmenter/VoiceRecorder 中 MediaMetadataRetriever 泄漏(try-finally)
线程安全:
- WebSocketClient 所有可变状态添加 @Volatile + synchronized(stateLock)
- close() 后 connect() 自动重建协程作用域
- reconnectWithBackoff 从递归改为 while 循环
架构清理:
- DTO 从 network.models 迁移到 model 包,Port 不再依赖 network 命名空间
- ApiService 移除可空回退路径,统一走 RestClientProvider
- AppContainer.apiService 改为 private
- PaymentApiPort 拆分出 TestPaymentApiPort
- 提取 TaskApiPort,ConversationApiPort 继承它,MemoirApiPort 移除重复方法
- TokenManager: mutableStateOf -> MutableStateFlow,runBlocking 增加 Dispatchers.IO
- RestClientProvider.invalidate() 合并 synchronized 块
- 修复 Adapter 文件的 KDoc/import 顺序
- ConversationRealtimeAdapter 用 import 替代全限定类名
视图模型相关:
- CreateMemoryViewModel 集成 RecordingCoordinator(替代直接使用 VoiceRecorder)
- 提取 ensureConnected(),用基于状态的等待替代硬编码 delay()
- handleConversationEnded 轮询 Job 去重
- 移除三处硬编码的 delay(300)/delay(500) 等待
测试:
- 修复 ApiServiceProviderTest 构造函数适配
- 解除 RecordingCoordinator 集成测试的 @Ignore(保留 4 个待处理分段测试)
- 更新 WarmupTest/MyMemoirViewModelTest 以适配新构造函数
- 补充 AudioSegmenter 和 WebSocketClient 测试
|
2026-03-12 15:36:32 +08:00 |
|
Kevin
|
42441c205c
|
修复: 加固实时通信与录音生命周期
|
2026-03-12 14:48:40 +08:00 |
|
Kevin
|
b09f1e8125
|
文档: 添加注释
|
2026-03-12 10:55:33 +08:00 |
|
Kevin
|
c573882f3e
|
重构: 完成网络端口迁移
|
2026-03-12 10:50:46 +08:00 |
|
Kevin
|
cfccaf3a9d
|
新增: 抽取 Memoir、Profile、Payment REST 端口
按功能划分的 API 端口接口将仓库和 ViewModel 与 ApiService 解耦。
适配器在底层委托给 ApiService;所有依赖由 AppContainer 统一装配。
|
2026-03-12 10:36:12 +08:00 |
|
Kevin
|
493dedda47
|
重构: 将 CreateMemoryViewModel 迁移到对话端口
ViewModel 现在依赖 ConversationApiPort 和 ConversationRealtimePort,而不是 ApiService/WebSocketClient。
ViewModelFactory 从 AppContainer 装配这些适配器。
|
2026-03-12 10:36:05 +08:00 |
|
Kevin
|
7e59c65602
|
新增: 添加 ConversationApiPort 和 ConversationRealtimePort
为对话流程定义按能力划分的端口,并提供委托给 ApiService 和 WebSocketClient 的适配器。
|
2026-03-12 10:35:58 +08:00 |
|
Kevin
|
e3f370a22f
|
重构: 将 AuthService、ApiService、WebSocketClient 改为适配器
各服务现在通过主构造函数接收各自的客户端提供器;
为在迁移期间保持现有调用点可编译,保留了向后兼容的次构造函数。
|
2026-03-12 10:35:52 +08:00 |
|
Kevin
|
0f53d7ce34
|
重构: 添加网络客户端提供器
引入由组合根持有的 RestClientProvider 和 RealtimeTransportProvider,并显式跟踪就绪状态。
AppContainer 负责提供器生命周期;LifeEchoApp 在 Application.onCreate 中完成装配。
|
2026-03-12 10:35:45 +08:00 |
|
Kevin
|
f24232d9cd
|
refactor: 取消实时录音分段,改为录音结束后客户端分段。移除skills-lock.json
|
2026-03-12 10:13:25 +08:00 |
|
yangshilin
|
0cf1d295a4
|
fix: 进入对话之后默认展示最新消息
|
2026-03-11 17:08:42 +08:00 |
|
yangshilin
|
f3d26c9d0e
|
fix: 修复回忆录序号问题;隐藏图片提示词,增加缩放和保存功能
|
2026-03-11 16:09:21 +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
|
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
|
830b6efc39
|
feat(android): render memoir images in reading views with loading and failure states
Made-with: Cursor
|
2026-03-10 16:09:32 +08:00 |
|
Kevin
|
2cecbd84ce
|
feat(android): add memoir chapter image models and content block parsing
Made-with: Cursor
|
2026-03-10 16:07:46 +08:00 |
|
yangshilin
|
c700b7a67c
|
fix: 修复光标bug;移除输入框表情按钮;修复章节回退动画;部分页面大字模式优化
|
2026-03-10 15:24:48 +08:00 |
|
yangshilin
|
462880960e
|
fix: 大字模式优化
|
2026-03-10 14:03:27 +08:00 |
|
Kevin
|
1a4c65e414
|
Merge remote-tracking branch 'origin/development' into development
# Conflicts:
# app-android/app/src/main/AndroidManifest.xml
# app-android/app/src/main/java/com/huaga/life_echo/ui/components/chat/ChatInputField.kt
# app-android/app/src/main/java/com/huaga/life_echo/ui/components/chat/VoiceRecordButton.kt
|
2026-03-10 11:52:29 +08:00 |
|
Kevin
|
8b9ccd4926
|
fix: 优化长语音上传交互并修复输入框高度跳变
|
2026-03-10 11:44:16 +08:00 |
|
yangshilin
|
c932cb53c6
|
fix: 1. 修复输入框位置异常问题;2. 修复异常创建多个空对话的问题;3. 移除菜单切换动画;4. 大字模式ui调整;5. 章节段落首行缩进;
Made-with: Cursor
|
2026-03-10 11:16:26 +08:00 |
|
Kevin
|
6ffe96d7a9
|
feat: 支持长语音分段上传与断线补传
|
2026-03-09 15:36:44 +08:00 |
|
Kevin
|
440f5be07f
|
chore(android): debug build use local dev server (USE_PROD_SERVER=false)
|
2026-03-09 13:54:43 +08:00 |
|
Kevin
|
d560d47306
|
chore: 调整 Android Studio 本地文件忽略规则
补充 app-android 下本地 Gradle 与 Kotlin 缓存忽略项,并停止跟踪会引发机器差异的 Android Studio 本地配置文件,减少无关变更噪音。
|
2026-03-09 11:16:17 +08:00 |
|
penghanyuan
|
8b4a058640
|
feat: 优化回忆录内容处理和章节分类逻辑
- 更新 get_system_prompt 函数,增强对话内容的核心信息提炼和分类能力,确保只保留与人生经历相关的实质内容。
- 修改 _classify_chapter_category 函数,增加对无实质回忆录价值内容的处理,返回 None 以跳过无效段落。
- 在 Android 客户端中,更新章节阅读视图以移除内嵌章节标题,提升排版一致性。
- 新增 TextUtils 工具函数,专门用于移除 LLM 生成的内嵌章节标题,确保正文内容的流畅性。
|
2026-03-02 19:47:32 +01:00 |
|
penghanyuan
|
50831003c7
|
fix: 更新额度提示信息并隐藏套餐与付费部分
- 修改 QuotaIndicator 组件中的额度提示信息,简化为“额度已用完”。
- 暂时隐藏 ProfileScreen 中的套餐与付费部分,待支付功能上线后恢复显示。
|
2026-03-01 11:00:15 +01:00 |
|
penghanyuan
|
5125ee1564
|
feat: 修正章节排序和分类逻辑
- 新增 SQL 脚本以修正章节排序索引,确保与 8 个分类体系对齐。
- 更新 API 章节获取逻辑,始终返回所有 8 个预定义类别,未填充内容的类别使用占位符。
- 引入章节分类功能,支持从 5-stage 关键词映射到 8 个章节类别,提升内容分类准确性。
- 更新 Android 客户端以适应新的章节定义和占位逻辑,确保用户界面一致性。
|
2026-03-01 10:50:58 +01:00 |
|
penghanyuan
|
80fa0be8f6
|
feat: 添加 Ktor 客户端认证插件以增强 API 安全性
- 在 build.gradle.kts 中新增 Ktor 客户端认证依赖。
- 更新 ApiService 类,使用 Ktor 内置的 Auth 插件实现 Bearer token 自动管理和刷新逻辑,提升 API 调用的安全性和稳定性。
|
2026-02-14 14:07:21 +01:00 |
|
penghanyuan
|
39736a2ae2
|
feat: 添加章节管理功能以支持清除回忆
- 在数据库模型中新增 is_active 字段,用于标记章节是否启用。
- 添加数据库迁移脚本以更新现有章节,确保默认值为 TRUE。
- 更新章节相关的 API 以仅返回 active 章节,并实现清除章节的功能。
- 在 Android 客户端中实现清除章节的确认弹窗和相应的 API 调用,提升用户体验。
|
2026-02-14 10:57:51 +01:00 |
|
penghanyuan
|
df91719a2f
|
feat: 添加 Android 构建脚本以简化版本管理
- 新增 Makefile,提供构建、清理和安装命令,支持指定版本号和版本代码。
- 更新 build.gradle.kts,支持从命令行参数读取版本号和版本代码,增强构建灵活性。
|
2026-02-14 10:44:56 +01:00 |
|
penghanyuan
|
aa20ce3039
|
fix: 优化登录状态管理与界面提示
- 在 MainActivity.kt 中调整登录状态管理逻辑,确保实时同步 TokenManager 的状态,并根据登录状态自动导航至主界面或登录页。
- 更新 NicknameSetupScreen.kt 中的图标描述文本,以提升用户体验。
- 在 AuthViewModel.kt 中重构 token 刷新逻辑,采用静默刷新策略,确保用户状态的稳定性而不影响当前登录状态。
|
2026-02-14 10:39:00 +01:00 |
|
penghanyuan
|
5b178b64d7
|
feat: 增强登录与录音功能以改善用户体验
- 在 MainActivity.kt 中添加自动导航功能,用户登录后可直接跳转至主界面。
- 更新 TokenManager.kt 以同步检查登录状态,确保首次加载时 isLoggedIn 的准确性。
- 修改 VoiceRecordButton.kt 和 CreateMemoryScreen.kt,简化录音浮层逻辑,取消/发送操作由上滑手势决定。
- 在 LoginScreen.kt 中移除密码登录选项,仅保留验证码登录,优化用户登录流程。
- 在 AuthViewModel.kt 中增强 token 刷新逻辑,确保用户状态的准确性与稳定性。
|
2026-02-13 23:21:52 +01:00 |
|
penghanyuan
|
0030ea4a42
|
refactor: 更新应用名称与对话提示以增强用户体验
- 将应用名称从“岁月时书”更改为“岁月留书”,并在多个文件中更新相关文本。
- 在对话提示中将“回忆录助手”替换为“岁月知己”,以统一用户体验。
- 添加新的头像资源以匹配更新后的助手名称。
- 更新多个界面和文档中的文本,以反映新的品牌形象和功能。
|
2026-02-13 23:04:24 +01:00 |
|
penghanyuan
|
3d3e224374
|
refactor: 更新 VoiceRecorder 以支持低版本 API
- 修改 VoiceRecorder.kt 中的 MediaRecorder 初始化逻辑,支持 API 31 以下的版本。
- 移除不必要的条件判断,简化代码结构。
|
2026-02-13 21:29:43 +01:00 |
|
iammm0
|
f2a204de98
|
refactor: 优化 Android 配置与界面
- 更新 AppConfig、build.gradle.kts
- 优化 AboutScreen、ConversationListScreen、NicknameSetupScreen、AuthViewModel
- 更新 strings 资源,移除 ic_launcher_foreground.webp
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-13 10:05:14 +08:00 |
|
iammm0
|
4fea23204c
|
docs: 更新项目 README
- 更新根目录 README.md
- 更新 app-android/README.md
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-13 10:05:04 +08:00 |
|
iammm0
|
67787971e3
|
refactor: 优化语音录制按钮
- 优化 VoiceRecordButton.kt
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-12 13:33:29 +08:00 |
|
iammm0
|
80259f111a
|
chore: 更新MainActivity与AndroidManifest
- 更新MainActivity.kt
- 更新AndroidManifest.xml
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-11 16:06:38 +08:00 |
|
iammm0
|
762a27326b
|
refactor: 优化前端支付与套餐相关
- 优化PaymentRepository、ApiService、PaymentModels
- 优化PlanDetailsCard、PersonalInfoScreen、PlanBalanceScreen、ProfileScreen、UpgradePlanScreen
- 优化PaymentViewModel
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-11 16:06:32 +08:00 |
|
iammm0
|
550de8d157
|
feat: 新增套餐余额页面与个人资料入口
- 新增PlanBalanceScreen套餐余额屏幕
- 更新ProfileScreen个人资料页面入口
Co-authored-by: Cursor <cursoragent@cursor.com>
|
2026-02-10 17:10:17 +08:00 |
|