mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
fix(dictation): keep phone mode segments typed and clear hold-to-record when a phone picks Hold
This commit is contained in:
@@ -28,10 +28,13 @@ const POLL_INTERVAL_MS = 1500
|
||||
|
||||
// Hosts that report hold-to-record have Auto; older ones only Toggle and Hold.
|
||||
function dictationModes(t: Translate, offersAuto: boolean) {
|
||||
const toggle = { value: 'toggle', label: t('settings.voiceSettingsScreen.toggleMode', 'Toggle') }
|
||||
const hold = { value: 'hold', label: t('settings.voiceSettingsScreen.holdMode', 'Hold') }
|
||||
const auto = { value: 'auto', label: t('settings.voiceSettingsScreen.autoMode', 'Auto') }
|
||||
return offersAuto ? ([auto, hold, toggle] as const) : ([toggle, hold] as const)
|
||||
const toggle = {
|
||||
value: 'toggle',
|
||||
label: t('settings.voiceSettingsScreen.toggleMode', 'Toggle')
|
||||
} as const
|
||||
const hold = { value: 'hold', label: t('settings.voiceSettingsScreen.holdMode', 'Hold') } as const
|
||||
const auto = { value: 'auto', label: t('settings.voiceSettingsScreen.autoMode', 'Auto') } as const
|
||||
return offersAuto ? [auto, hold, toggle] : [toggle, hold]
|
||||
}
|
||||
|
||||
type ModelBusyAction = { modelId: string; type: 'download' | 'select' | 'delete' }
|
||||
|
||||
@@ -119,7 +119,10 @@ export class RuntimeMobileSpeechCatalog {
|
||||
...(params.dictationMode !== undefined ? { dictationMode: params.dictationMode } : {}),
|
||||
...(params.dictationHoldToRecord !== undefined
|
||||
? { dictationHoldToRecord: params.dictationHoldToRecord }
|
||||
: {})
|
||||
: // A phone without Auto that picks Hold leaves no hold-to-record behind for a later Toggle.
|
||||
params.dictationMode === 'hold'
|
||||
? { dictationHoldToRecord: false }
|
||||
: {})
|
||||
}
|
||||
store.updateSettings?.({ voice: nextVoice }, { notifyListeners: true })
|
||||
return this.list()
|
||||
|
||||
Reference in New Issue
Block a user