fix(speech): prevent speech provider config reset on startup by removing premature immediate watcher (#1340)
This commit is contained in:
@@ -136,6 +136,10 @@ export const useSpeechStore = defineStore('speech', () => {
|
||||
|
||||
// NOTICE: clear stale selection when the currently selected speech provider
|
||||
// is no longer configured to avoid implicit fallback behavior from persisted state.
|
||||
// NOTE: Do NOT use { immediate: true } here — providers.ts validates credentials
|
||||
// asynchronously on startup, so firing immediately would see an empty
|
||||
// configuredSpeechProvidersMetadata and incorrectly reset activeSpeechProvider
|
||||
// to 'speech-noop', permanently wiping the persisted selection from localStorage.
|
||||
if (!configuredProviderIds.includes(activeSpeechProvider.value)) {
|
||||
activeSpeechProvider.value = 'speech-noop'
|
||||
activeSpeechModel.value = ''
|
||||
@@ -143,8 +147,6 @@ export const useSpeechStore = defineStore('speech', () => {
|
||||
activeSpeechVoice.value = undefined
|
||||
}
|
||||
},
|
||||
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user