link2026
d2c77d5c51
feat: 国际化(i18n) en/ja/ko + App 内语言切换
...
主体:多语言支持(简体中文源 + 英/日/韩)
- 基础设施:Localizable.xcstrings(String Catalog,sourceLanguage=zh-Hans)
+ pbxproj developmentRegion/knownRegions 注册 en/ja/ko
- 全部硬编码 Locale("zh_CN") → Locale.current;中文 dateFormat → Date.FormatStyle(跟随系统)
- UI 中文字面量统一为 String(appLoc:)(显式绑定所选语言 bundle+locale,即时切换)
Text 字面量走环境 \.locale + Bundle 重定向
- 549 个 catalog key 全部 en/ja/ko 翻译完成(0 未翻译)
- App 内语言切换:我的 → 语言(LanguageManager + 即时生效,无需重启)
- 双用预设(症状/监测指标/慢病)本地化:static→computed 避免缓存
注:本提交为 WIP,一并打包了并行进行的功能模块
(HealthExport 健康导出、Security/Face ID 锁、DiaryAssist 日记 AI 辅助)
及 App 图标、CLAUDE.md、docs/scripts。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-05-30 10:28:24 +08:00
link2026
062c027c77
feat(models): 模型自动下载(我的·模型管理) + 断点续传 + 旁路导入
...
实现 spec(2026-05-29-model-download-design)的模型分发功能:
- ModelManifest: 硬编码功能文件清单 + base URL https://file.myv0.com/
- FileDownloader: URLSessionDataDelegate 分块写盘,HTTP Range 断点续传 + 大小校验
(根因修复:URL.resourceValues 会缓存文件大小,续传时先读 offset 再读 finalSize
会拿到下载前的陈旧值导致校验误判;改用 FileManager.attributesOfItem)
- ModelDownloadService: @MainActor @Observable 编排逐文件下载,聚合进度/速度,
支持下载全部/暂停/重试,以及旁路文件导入
- ModelStore: 新增 fileURL/localBytes/isComplete(可注入清单)/importModel(补 VL)
- ModelManagementView: 分模型卡片(状态/进度/速度) + 下载全部/暂停
+ NWPathMonitor 蜂窝提示 + 从文件导入(离线兜底)
- MeView: 模型管理卡改 NavigationLink + 动态状态(已就绪/下载中/N就绪)
测试(Swift Testing): Manifest 清单/字节数、Store 路径/校验/导入、
DownloadState、FileDownloader(URLProtocol mock:下载/Range续传/大小校验)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-05-29 23:19:51 +08:00
link2026
1b01923c8e
feat(capture): 统一报告捕获流程并集成视觉语言模型识别
...
- 替换 QuickCaptureFlow 和 ArchiveFlow 为 UnifiedCaptureFlow 统一流程
- 新增 VLSession 封装 Qwen2.5-VL 模型进行图像文本推理
- 实现 AIRuntime 中 VL 模型的准备和分析功能
- 添加 VLPrompts 定义体检化验单识别的 JSON 输出模板
- 创建 CaptureReviewForm 提供 VL 解析结果的可编辑表单界面
- 集成 VisionKit 文档扫描器支持真机多页文档扫描
- 为模拟器实现 PhotosPicker 回退方案选择已有照片
- 在 RootView 中统一使用 UnifiedCaptureFlow 处理快速和归档流程
- 添加 CustomMetricEditor 支持自定义监测指标的创建编辑删除
- 扩展 KangkangApp 模型配置以支持新数据类型
- 实现档案列表中症状结束功能通过时间线行点击触发
2026-05-26 11:18:00 +08:00
link2026
39edc25dc1
refactor(profile,monitor): move height/weight from MonitorMetric to UserProfile
...
身高/体重对成人变化慢,作为 Profile 静态字段比每次录入 Indicator 更合适。
- MonitorMetric:6 case(从 8 减),删 .height / .weight
- UserProfile:加 weightKG: Double?(支持小数),加 bmi computed
- summaryLine 加体重段:'175cm · 68.5kg'(整数省小数)
- ProfileEditView basics 加 weight 行 + footer 显示 BMI + 分类(偏瘦/正常/超重/肥胖)
- IndicatorQuickSheet:删 .height 回写 Profile 的特殊逻辑
- UserProfileTests:+5 个(weight 字段、summaryLine 含 weight、BMI 计算)
兼容性:老 Indicator 里的 seriesKey 'weight' / 'height' 数据保留(SwiftData String?
不变),只是新录入路径走 Profile 不走 Indicator;Trends 仍能用 String seriesKey
查询历史(如果将来要展示老数据)。
测试:60 case pass / 0 fail / 0 warning。
2026-05-26 07:58:47 +08:00
link2026
e2fb631b96
feat(timeline): merge bp.systolic + bp.diastolic into single entry
...
- TimelineEntry.from(indicators:) 批处理:找 bp.systolic 配对同 capturedAt
(±5s)的 bp.diastolic,合并成 '血压 120/80 mmHg' 一行
- 未配对的 systolic 单独退回 from(indicator:)
- 非 bp.* series 不动
- ArchiveListView + HomeView 改用 from(indicators:) 批处理
- 6 个新测试覆盖配对/未配对/异常标记/非 bp 不动/不同时间不合并
2026-05-26 07:50:00 +08:00
link2026
9a6d21100b
feat(monitor): add UserProfile + MonitorMetric catalog + Indicator.seriesKey
...
数据层(spec 2026-05-26):
- UserProfile @Model:核心 4 项 + 健康背景 + 用药,SwiftData 单例(loadOrCreate)
- Indicator 加 seriesKey: String?,标识长期指标分组('bp.systolic' 等)
- MonitorMetric enum 8 case:血压(2 field 拆 2 Indicator)/ 空腹+餐后血糖 /
体重 / 体温 / 心率 / SpO2 / 身高
- effectiveRange(for:profile:) 实现 1 条 Profile-aware 规则:
age >= 65 时 bp.systolic 上限 140→150
- KangkangApp schema 加 UserProfile.self
测试 17 个全绿(UserProfile 6 + MonitorMetric 11);schema 烟测扩 2(seriesKey roundtrip + UserProfile persist)。
UI 层 + Timeline 合并下个 commit。
2026-05-26 07:40:42 +08:00
link2026
e3ad24ac0e
test(ai): add LLMSession/AIRuntime smoke tests (no real inference)
...
iOS Simulator sandbox 看不到 host ~/tiji-models;Mac Designed for iPad
卡 code signing。真实推理验证由 DebugAIRunner 手动跑,结果记 W2 retro。
W3 把核心 LLM 接口拆独立 SPM target 后,可在 Mac 原生跑真实推理。
烟测覆盖:
- TokenChunk 值字段
- AIRuntimeError 3 case 都有 errorDescription
- AIRuntime actor status 可异步读取
2026-05-25 23:33:04 +08:00
link2026
b63b26bce5
feat(timeline): TimelineRow + DateSection + grouping tests + Diary sheet
...
- TimelineRow: 时间线条目单行视图
- DateSection + TimelineGrouping: 今日/昨日/本周/更早分组
- DiaryQuickSheet: 文字日记快速记录入口
- TimelineGroupingTests: 分组逻辑烟测
- SymptomEndSheet / RootView: 配套微调
2026-05-25 23:23:21 +08:00
link2026
46b69cf8e1
feat(symptom): add Symptom @Model + start/end sheets + ongoing card
...
- Symptom @Model with severity 1-5 clamp, isOngoing, duration helpers
- SymptomStartSheet / SymptomEndSheet / OngoingSymptomsCard
- RecordSheet 加 .symptom kind 入口
- RootView 增加 'records' tab + ArchiveListView placeholder
- HomeView 顶部加 OngoingSymptomsCard
- ModelsSchemaTests: 2 个 Symptom 烟测(ongoing predicate + severity clamp)
Note: Symptom 是 CLAUDE.md §10 清单外的新功能,由产品负责人决定加入。
ArchiveListView 仍是 placeholder,真实 C1 实现按计划在 W4。
2026-05-25 23:18:21 +08:00
link2026
53da442424
chore: rename Tiji→Kangkang test imports + scheme + sync docs
...
Rename @testable imports across all test/UI test files after the Tiji→Kangkang
project rename in 44ed01a . Add shared scheme. Sync CLAUDE.md / W2 plan / spec
v1.0 to current scope (Symptom feature noted, C1/C2 flow lockdown).
2026-05-25 23:18:00 +08:00
link2026
44ed01acf4
```
...
refactor: 重命名项目名称从"体己"到"康康"
将整个项目的目录结构从"体己"重命名为"康康",包括所有源代码文件、
资源文件、测试文件以及Xcode项目配置文件。此更改涉及项目中所有的
文件路径和应用入口点(App/TijiApp.swift → App/KangkangApp.swift)。
```
2026-05-25 19:01:16 +08:00