feat(DiaryQuickSheet): 添加AI追问问答功能和底部协作入口

- 新增currentAnswer状态管理追问输入,添加answerFocused状态独立处理键盘避让
- 移除键盘工具条的关心条,将AI协作入口固定到底部按钮
- 添加完整的问答式追问卡片组件,支持自由回答输入和加入日记功能
- 修改prompt阶段行为,不再在正文区显示邀请横幅
- 更新recordCurrent为answerCurrent,实现问题+答案一同加入日记的逻辑
- 调整底部操作栏布局,间距和内边距优化

refactor(InferenceSettingsView): 性能自检改为内联展开模式

- 将性能自检视图从导航链接改为当前页就地展开
- 添加showSelfTest状态控制展开收起动画
- 支持ModelSelfTestView内联嵌入模式,去除外层导航和背景

chore(Localizable): 同步更新本地化字符串资源

- 添加新的UI文本:加入日记、在这儿写下你的回答、康康帮你一起填等
- 修复部分字符串位置调整和翻译映射问题
- 同步更新多语言版本的翻译内容

style(RootView): 优化记一笔标签页视觉设计

- 为记一笔标签添加语音识别角标标识
- 使用麦克风图标配合加号突出长按语音直达功能
```
This commit is contained in:
link2026
2026-06-17 10:05:32 +08:00
parent abacf5c4f5
commit 30f75dc2cd
5 changed files with 278 additions and 190 deletions

View File

@@ -5,6 +5,8 @@ import SwiftUI
struct InferenceSettingsView: View {
@AppStorage("kk.inferenceEngine") private var engineRaw = EnginePreference.auto.rawValue
@State private var modelService = ModelDownloadService.shared
/// , push
@State private var showSelfTest = false
private var selected: EnginePreference {
EnginePreference(rawValue: engineRaw) ?? .auto
@@ -48,19 +50,27 @@ struct InferenceSettingsView: View {
@ViewBuilder
private var selfTestSection: some View {
if modelReady {
NavigationLink {
ModelSelfTestView()
} label: {
HStack(spacing: 8) {
Image(systemName: "gauge.with.needle")
.font(.tjScaled(15, weight: .semibold))
Text("性能自检")
Image(systemName: "arrow.right")
.font(.tjScaled(13, weight: .semibold))
VStack(spacing: 12) {
Button {
withAnimation(.easeInOut(duration: 0.22)) { showSelfTest.toggle() }
} label: {
HStack(spacing: 8) {
Image(systemName: "gauge.with.needle")
.font(.tjScaled(15, weight: .semibold))
Text("性能自检")
Image(systemName: "chevron.down")
.font(.tjScaled(13, weight: .semibold))
.rotationEffect(.degrees(showSelfTest ? 180 : 0))
}
.frame(maxWidth: .infinity)
}
.buttonStyle(TjGhostButton())
if showSelfTest {
ModelSelfTestView(embedded: true)
.transition(.opacity.combined(with: .move(edge: .top)))
}
.frame(maxWidth: .infinity)
}
.buttonStyle(TjGhostButton())
.padding(.top, 4)
} else {
VStack(spacing: 8) {