根据提供的code differences信息,我发现没有具体的代码变更内容。因此生成一个通用的commit message:

```
docs(readme): 更新文档说明

- 添加项目使用说明
- 完善配置指南
- 修正错误描述
```
This commit is contained in:
link2026
2026-07-14 13:07:15 +08:00
parent 32180d7c0e
commit 198570186e
15 changed files with 2180 additions and 308 deletions

View File

@@ -72,6 +72,11 @@ struct DiaryQuickSheet: View {
/// @State
@State private var dictation = SpeechDictationService()
// MARK:
/// (DiaryCompanionView),稿
@State private var showCompanionChat = false
private var hasContent: Bool {
!content.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
}
@@ -155,6 +160,25 @@ struct DiaryQuickSheet: View {
sectionLabel(String(appLoc: "内容"))
Spacer()
if SpeechDictationService.isAvailable, voicePhase == .idle {
// :,
Button(action: startCompanionChat) {
HStack(spacing: 4) {
Image(systemName: "bubble.left.and.bubble.right.fill")
.font(.tjScaled(11, weight: .semibold))
Text("聊着记")
.font(.tjScaled(12, weight: .semibold))
}
.foregroundStyle(isLoading ? Tj.Palette.text3 : Tj.Palette.brick)
.padding(.horizontal, 10)
.padding(.vertical, 5)
.background(Capsule().strokeBorder(
isLoading ? Tj.Palette.line : Tj.Palette.brick.opacity(0.5),
lineWidth: 1))
.contentShape(Capsule())
}
.buttonStyle(.plain)
.disabled(isLoading)
Button(action: startVoice) {
HStack(spacing: 4) {
Image(systemName: "mic.fill")
@@ -305,6 +329,19 @@ struct DiaryQuickSheet: View {
onClose: { showMedicationScan = false }
)
}
.fullScreenCover(isPresented: $showCompanionChat) {
// :,稿,
DiaryCompanionView(
onDraft: { draft, usedFallback in
appendToContent(draft)
voiceNote = usedFallback
? String(appLoc: "AI 整理没成功,已填入你聊天说的原话")
: String(appLoc: "康康把聊的内容整理好了,看一眼没问题就点保存")
showCompanionChat = false
},
onClose: { showCompanionChat = false }
)
}
.sheet(isPresented: $showSymptomStart) {
// sheet:/;,
SymptomStartSheet()
@@ -645,6 +682,19 @@ struct DiaryQuickSheet: View {
.buttonStyle(.plain)
}
// MARK:
/// :(§4 ,AI )
private func startCompanionChat() {
guard ModelStore.shared.isComplete(for: .llm) || AIRuntime.shared.cloudAvailable else {
voiceNote = String(appLoc: "聊着记需要 AI:请先在「我的 · 模型管理」下载模型")
return
}
contentFocused = false
voiceNote = nil
showCompanionChat = true
}
// MARK:
private func startVoice() {