-
Notifications
You must be signed in to change notification settings - Fork 364
Fixes ios #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes ios #514
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -561,22 +561,47 @@ final class VoiceAgentViewModel: ObservableObject { | |||||||||||
| case let .error(err): | ||||||||||||
| logger.error("Voice agent error: \(err.message)") | ||||||||||||
| errorMessage = err.message | ||||||||||||
| sessionState = .error(err.message) | ||||||||||||
| currentStatus = "Error" | ||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Turn error ends active UIMedium Severity Every Reviewed by Cursor Bugbot for commit 6bf113c. Configure here. |
||||||||||||
|
|
||||||||||||
| case let .sessionError(err): | ||||||||||||
| logger.error("Voice session error: \(err.message)") | ||||||||||||
| errorMessage = err.message | ||||||||||||
| if !err.recoverable { | ||||||||||||
| sessionState = .error(err.message) | ||||||||||||
| currentStatus = "Error" | ||||||||||||
| } | ||||||||||||
|
|
||||||||||||
| case .sessionStopped: | ||||||||||||
| sessionState = .disconnected | ||||||||||||
| currentStatus = "Ready" | ||||||||||||
| audioLevel = 0 | ||||||||||||
| isSpeechDetected = false | ||||||||||||
|
|
||||||||||||
| case .sessionStarted: | ||||||||||||
| sessionState = .listening | ||||||||||||
| currentStatus = "Listening..." | ||||||||||||
|
|
||||||||||||
| case .agentResponseStarted: | ||||||||||||
| assistantResponse = "" | ||||||||||||
| currentTranscript = "" | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+585
to
+588
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Don’t clear the finalized user transcript when the response starts.
Proposed fix case .agentResponseStarted:
assistantResponse = ""
- currentTranscript = ""📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| case .agentResponseCompleted: | ||||||||||||
| sessionState = .listening | ||||||||||||
| currentStatus = "Listening..." | ||||||||||||
|
|
||||||||||||
| case let .audioLevel(level): | ||||||||||||
| audioLevel = min(max(level.rms, 0), 1) | ||||||||||||
|
|
||||||||||||
| case .wakewordDetected: | ||||||||||||
| sessionState = .listening | ||||||||||||
| currentStatus = "Listening..." | ||||||||||||
| isSpeechDetected = false | ||||||||||||
|
|
||||||||||||
| case .interrupted, .metrics, .none: | ||||||||||||
| // No UX-visible effect for these arms today. | ||||||||||||
| break | ||||||||||||
|
|
||||||||||||
| // The regenerated RAVoiceEvent payload added new arms; we do not | ||||||||||||
| // surface them in the UI yet, so they are intentionally folded into | ||||||||||||
| // the same no-op bucket as .interrupted / .metrics. | ||||||||||||
| case .componentStateChanged, .sessionError, .sessionStarted, | ||||||||||||
| .sessionStopped, .agentResponseStarted, .agentResponseCompleted, | ||||||||||||
| .speechTurnDetection, .turnLifecycle: | ||||||||||||
| case .componentStateChanged, .speechTurnDetection, .turnLifecycle: | ||||||||||||
| break | ||||||||||||
| default: | ||||||||||||
| break | ||||||||||||
|
|
||||||||||||
This file was deleted.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Mark
Voice Keyboardas iOS-only in the navigation table.Line 67 currently reads like
MoreHubViewexposesVoice Keyboardon every platform, but the runtime view gates that entry behind#if os(iOS). The doc is inaccurate for macOS.✏️ Suggested doc fix
📝 Committable suggestion
🤖 Prompt for AI Agents