```
feat(AI): 集成MNN推理引擎替换MLX作为主AI运行时 - 引入MNN(alibaba) + Arm SME2 + CPU作为主AI运行时,支持A19/iPhone17的 SME2和A17的NEON加速 - 添加MLX Swift作为兜底GPU推理方案,实现双后端切换机制 - 使用单一Qwen3.5-2B多模态模型(1.2GB),替代原有的LLM+VL分离架构 - 实现InferenceEngine.current引擎选择逻辑,真机默认MNN,模拟器回退MLX - 更新AIAgent架构,通过MNNLLMBridge(ObjC++) → MNNBackend进行推理 - 修改队列机制防止并发推理导致OOM,使用信号量闸门控制显存占用 - 更新文档中的技术栈说明、模块边界和周次交付计划 ```
This commit is contained in:
@@ -53,6 +53,8 @@ struct RootView: View {
|
||||
@State private var showVoiceCommand = false
|
||||
/// 语音直达「拍药盒」:RootView 层直接弹 MedicationScanFlow,不绕日记 sheet。
|
||||
@State private var showMedicationScan = false
|
||||
/// 「记录 · 药品库」:sheet + NavigationStack 形态的药品清单管理页。
|
||||
@State private var showMedicationLibrary = false
|
||||
|
||||
/// 语音意图 → 打开对应新建入口(与 RecordSheet onPick 的路由一一对应)。
|
||||
private func route(_ intent: VoiceIntent) {
|
||||
@@ -112,6 +114,7 @@ struct RootView: View {
|
||||
case .indicator: showIndicator = true
|
||||
case .reminder: showReminders = true
|
||||
case .healthExport: showHealthExport = true
|
||||
case .medicationLibrary: showMedicationLibrary = true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,6 +138,9 @@ struct RootView: View {
|
||||
// 列表页依赖外层 NavigationStack 提供标题栏;sheet 形态补「完成」按钮。
|
||||
NavigationStack { RemindersListView(presentedAsSheet: true) }
|
||||
}
|
||||
.sheet(isPresented: $showMedicationLibrary) {
|
||||
NavigationStack { MedicationLibraryView(presentedAsSheet: true) }
|
||||
}
|
||||
.fullScreenCover(isPresented: $showHealthExport) {
|
||||
HealthExportSheet()
|
||||
}
|
||||
@@ -156,8 +162,8 @@ struct RootView: View {
|
||||
}
|
||||
.fullScreenCover(isPresented: $showMedicationScan) {
|
||||
MedicationScanFlow(
|
||||
onSave: { entries in
|
||||
MedicationArchiver.archive(entries: entries, in: ctx)
|
||||
onSave: { meds, images in
|
||||
MedicationArchiver.archive(medications: meds, images: images, in: ctx)
|
||||
},
|
||||
onClose: { showMedicationScan = false }
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user