feat(debug): DebugAIRunner DEBUG 自检入口挂到 MeView

按 W2 plan Task 7 落地,实现胜过 plan 原稿(强化 UX 减少 Xcode console
依赖):
- 卡片显示 Application Support 路径 + 模型预期完整路径
- 一键复制路径到剪贴板,方便 `cp -R` 拷模型
- 模型就绪状态徽章(✓ 就绪 / ⚠ 未就绪),依赖 ModelStore.isReady
- 跑一段 prompt 流式输出,顶部 tok/s 速率显示
- 全文件 #if DEBUG 包裹,Release 不打包

MeView 在 DEBUG 时挂 DebugAIRunner 在 placeholder 下方。

下一步用户手动:把 ~/tiji-models/Qwen3-1.7B-4bit 拷到模拟器沙盒
Application Support/Models/ 下,然后跑 App → Me 页点按钮验收。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
link2026
2026-05-25 16:50:07 +08:00
parent a02679a623
commit 9fbd31458c
2 changed files with 140 additions and 9 deletions

View File

@@ -2,16 +2,17 @@ import SwiftUI
struct MeView: View {
var body: some View {
VStack(spacing: 12) {
Spacer()
TjPlaceholder(label: "me · 设置 / 模型 / 档案管理\n(尚未实现")
.frame(width: 280, height: 180)
Text("我的")
.font(.tjH2())
.foregroundStyle(Tj.Palette.text2)
Spacer()
ScrollView {
VStack(spacing: 16) {
TjPlaceholder(label: "我的 · 模型管理 / Face ID / 关于\n(W6 实现)")
.frame(width: 280, height: 180)
#if DEBUG
DebugAIRunner()
#endif
}
.padding(.vertical, 24)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Tj.Palette.sand.ignoresSafeArea())
}
}