feat(speech): offer the speech model update once after the engine change

A card in the notification corner tells people whose selected on-device
model needs the new download, or whose retired model was replaced, and
starts the same download as Settings > Voice. After a replacement it
offers to delete the retired model's files.
This commit is contained in:
Kelvin Amoaba
2026-11-09 17:22:40 +00:00
parent 8596c0d547
commit 5b60d934e5
22 changed files with 693 additions and 1 deletions
@@ -4,6 +4,7 @@ import { lazyWithRetry as lazy } from '@/lib/lazy-with-retry'
import { CodexSharedSettingsNoticeCard } from '../components/CodexSharedSettingsNoticeCard'
import { NotificationCardStack } from '../components/NotificationCardStack'
import { StarNagCard } from '../components/StarNagCard'
import { SpeechModelUpdateCard } from '../components/dictation/SpeechModelUpdateCard'
import { OverlayBoundary } from './app-root-surface-boundaries'
const ChatUiHereCornerCard = lazy(() =>
@@ -59,6 +60,9 @@ export function AppNotificationCards({
<OverlayBoundary boundaryId="overlay.codex-shared-settings-notice" resetKey={activeView}>
<CodexSharedSettingsNoticeCard />
</OverlayBoundary>
<OverlayBoundary boundaryId="overlay.speech-model-update" resetKey={activeView}>
<SpeechModelUpdateCard />
</OverlayBoundary>
</NotificationCardStack>
)
}
@@ -0,0 +1,285 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { Check, CircleAlert, Download, Mic, X } from 'lucide-react'
import { toast } from 'sonner'
import { useAppStore } from '@/store'
import { useTranslate } from '@/i18n/use-translate'
import { isPairedWebClientWindow } from '@/lib/desktop-window-chrome'
import { Card } from '../ui/card'
import { Button } from '../ui/button'
import { Progress } from '../ui/progress'
import {
findSpeechModelUpdateTarget,
type SpeechModelUpdateTarget
} from './speech-model-update-target'
const DONE_AUTO_HIDE_MS = 4000
function useSpeechModelUpdateTarget(): SpeechModelUpdateTarget | null {
// Why no hydration check: the flag defaults to true until the persisted value arrives.
const seen = useAppStore((s) => s.speechModelUpdateNoticeSeen)
const voice = useAppStore((s) => s.settings?.voice)
const [target, setTarget] = useState<SpeechModelUpdateTarget | null>(null)
useEffect(() => {
// Why skip paired web clients: the models live on the host, whose own window shows this.
if (seen || !voice || isPairedWebClientWindow()) {
return
}
let cancelled = false
void Promise.all([window.api.speech.getCatalog(), window.api.speech.getModelStates()])
.then(([catalog, states]) => {
if (cancelled) {
return
}
const store = useAppStore.getState()
store.setModelStates(states)
setTarget(findSpeechModelUpdateTarget(voice, catalog, states))
// Why mark on the first check, shown or not: the card is for the first launch after the engine change.
store.markSpeechModelUpdateNoticeSeen()
})
.catch(() => {})
return () => {
cancelled = true
}
}, [seen, voice])
return target
}
/** One-time card offering the download the transcribe-cpp engine needs for the selected model. */
export function SpeechModelUpdateCard(): React.JSX.Element | null {
const target = useSpeechModelUpdateTarget()
const [closed, setClosed] = useState(false)
const close = useCallback(() => setClosed(true), [])
if (!target || closed) {
return null
}
return <SpeechModelUpdateCardBody target={target} onClose={close} />
}
function SpeechModelUpdateCardBody({
target: { model, retired },
onClose
}: {
target: SpeechModelUpdateTarget
onClose: () => void
}): React.JSX.Element {
const t = useTranslate()
const state = useAppStore((s) => s.modelStates.find((m) => m.id === model.id))
const refreshModelStates = useAppStore((s) => s.refreshModelStates)
const [failedAtMb, setFailedAtMb] = useState<number | null>(null)
const [deleting, setDeleting] = useState(false)
const lastMbRef = useRef(0)
// The Settings row starts the same download, so both follow the shared model states.
useEffect(
() => window.api.speech.onDownloadProgress(() => void refreshModelStates()),
[refreshModelStates]
)
const totalMb = Math.round((model.sizeBytes ?? 0) / 1_000_000)
const downloading = state?.status === 'downloading' || state?.status === 'extracting'
const percent = Math.round((state?.progress ?? 0) * 100)
const doneMb = Math.round((state?.progress ?? 0) * totalMb)
const phase = downloading
? 'downloading'
: state?.status === 'ready'
? 'done'
: failedAtMb !== null
? 'failed'
: 'notice'
useEffect(() => {
if (downloading) {
lastMbRef.current = doneMb
}
}, [downloading, doneMb])
useEffect(() => {
if (phase !== 'done' || retired) {
return
}
const timer = window.setTimeout(onClose, DONE_AUTO_HIDE_MS)
return () => window.clearTimeout(timer)
}, [phase, retired, onClose])
const startDownload = (): void => {
setFailedAtMb(null)
lastMbRef.current = 0
void window.api.speech
.downloadModel(model.id)
.catch(() => setFailedAtMb(lastMbRef.current))
.finally(() => void refreshModelStates())
}
const deleteRetired = (): void => {
if (!retired) {
return
}
setDeleting(true)
void window.api.speech
.deleteModel(retired.id)
.then(() => {
void refreshModelStates()
onClose()
})
.catch(() => {
setDeleting(false)
toast.error(
t('speechModelUpdate.deleteFailed', 'Failed to delete {{model}}.', {
model: retired.label
})
)
})
}
const names = { model: model.label, old: retired?.label ?? '', size: totalMb }
const later = (
<Button variant="ghost" size="sm" onClick={onClose}>
{t('speechModelUpdate.later', 'Later')}
</Button>
)
let icon = <Mic className="size-4" />
let title: string
let description: string
let actions: React.ReactNode = null
if (phase === 'downloading') {
icon = <Download className="size-4" />
title = retired
? t('speechModelUpdate.downloadingTitle', 'Downloading {{model}}', names)
: t('speechModelUpdate.updatingTitle', 'Updating {{model}}', names)
description = t(
'speechModelUpdate.downloadingDescription',
'You can keep working. Dictation is back when this finishes.'
)
actions = (
<Button
variant="ghost"
size="sm"
onClick={() => void window.api.speech.cancelDownload(model.id)}
>
{t('speechModelUpdate.cancel', 'Cancel')}
</Button>
)
} else if (phase === 'done') {
icon = <Check className="size-4 text-status-success" />
title = t('speechModelUpdate.doneTitle', 'Dictation is ready')
description = retired
? t(
'speechModelUpdate.doneRetiredDescription',
'{{model}} is set up. The old {{old}} files are still on disk.',
names
)
: t(
'speechModelUpdate.doneDescription',
'{{model}} is updated. The old files were removed.',
names
)
actions = retired ? (
<>
<Button variant="ghost" size="sm" onClick={onClose}>
{t('speechModelUpdate.keep', 'Keep')}
</Button>
<Button
variant="outline"
size="sm"
disabled={deleting}
onClick={deleteRetired}
>
{t('speechModelUpdate.deleteOld', 'Delete old model')}
</Button>
</>
) : null
} else if (phase === 'failed') {
icon = <CircleAlert className="size-4 text-destructive" />
title = retired
? t('speechModelUpdate.downloadFailedTitle', "Couldn't download {{model}}", names)
: t('speechModelUpdate.updateFailedTitle', "Couldn't update {{model}}", names)
description = failedAtMb
? t(
'speechModelUpdate.failedAtDescription',
'The download stopped at {{mb}} MB. Check your connection and try again.',
{ mb: failedAtMb }
)
: t(
'speechModelUpdate.failedDescription',
'The download stopped. Check your connection and try again.'
)
actions = (
<>
{later}
<Button size="sm" onClick={startDownload}>
{t('speechModelUpdate.tryAgain', 'Try again')}
</Button>
</>
)
} else {
title = retired
? t('speechModelUpdate.replacedTitle', 'Your speech model was replaced')
: t('speechModelUpdate.updateTitle', 'Update your speech model')
description = retired
? t(
'speechModelUpdate.replacedDescription',
"{{old}} can't run on the new speech engine. {{model}} replaces it ({{size}} MB).",
names
)
: t(
'speechModelUpdate.updateDescription',
'Dictation now runs on a faster engine. {{model}} needs a one-time download ({{size}} MB) before you can dictate again.',
names
)
actions = (
<>
{later}
<Button size="sm" onClick={startDownload}>
{retired
? t('speechModelUpdate.downloadReplacement', 'Download {{model}}', names)
: t('speechModelUpdate.update', 'Update')}
</Button>
</>
)
}
return (
<Card size="sm" role="complementary" aria-labelledby="speech-model-update-title">
<div className="flex flex-col gap-2.5 px-3 py-0.5">
<div className="flex items-start gap-2.5">
<div className="grid size-7 shrink-0 place-items-center rounded-md bg-muted">{icon}</div>
<div className="flex min-w-0 flex-1 flex-col gap-0.5 pt-0.5">
<h3 id="speech-model-update-title" className="text-sm font-semibold">
{title}
</h3>
<p className="text-xs text-muted-foreground">{description}</p>
</div>
<Button
variant="ghost"
size="icon-xs"
className="shrink-0"
onClick={onClose}
aria-label={t('speechModelUpdate.dismiss', 'Dismiss')}
>
<X />
</Button>
</div>
{phase === 'downloading' && (
<div className="flex flex-col gap-1.5">
<Progress value={percent} className="h-1" />
<div className="flex justify-between text-[11px] text-muted-foreground tabular-nums">
<span>
{t('speechModelUpdate.progress', '{{done}} of {{total}} MB', {
done: doneMb,
total: totalMb
})}
</span>
<span>{percent}%</span>
</div>
</div>
)}
{actions && <div className="flex flex-wrap justify-end gap-1.5">{actions}</div>}
</div>
</Card>
)
}
@@ -0,0 +1,58 @@
import { describe, expect, it } from 'vitest'
import type { SpeechModelManifest, SpeechModelState } from '../../../../shared/speech-types'
import { findSpeechModelUpdateTarget } from './speech-model-update-target'
function model(id: string, extra: Partial<SpeechModelManifest> = {}): SpeechModelManifest {
return {
id,
label: id,
description: '',
type: 'transducer',
provider: 'local',
language: 'en',
sampleRate: 16000,
streaming: false,
...extra
}
}
const catalog = [
model('parakeet'),
model('nemotron'),
model('zipformer-ko', { replacedBy: 'nemotron' }),
model('gpt', { provider: 'openai' })
]
function target(sttModel: string, states: SpeechModelState[], enabled = true) {
const found = findSpeechModelUpdateTarget({ enabled, sttModel }, catalog, states)
return found && { model: found.model.id, retired: found.retired?.id }
}
describe('findSpeechModelUpdateTarget', () => {
it('offers the update when only the old files of the selected model are on disk', () => {
const states: SpeechModelState[] = [
{ id: 'parakeet', status: 'not-downloaded', needsUpdate: true }
]
expect(target('parakeet', states)).toEqual({ model: 'parakeet', retired: undefined })
expect(target('parakeet', states, false)).toBeNull()
})
it('offers the replacement when the retired model it replaced is still downloaded', () => {
const states: SpeechModelState[] = [
{ id: 'nemotron', status: 'not-downloaded' },
{ id: 'zipformer-ko', status: 'ready' }
]
expect(target('nemotron', states)).toEqual({ model: 'nemotron', retired: 'zipformer-ko' })
expect(
target('nemotron', [
{ id: 'nemotron', status: 'ready' },
{ id: 'zipformer-ko', status: 'ready' }
])
).toBeNull()
})
it('stays hidden for cloud models and for people who never downloaded one', () => {
expect(target('gpt', [{ id: 'zipformer-ko', status: 'ready' }])).toBeNull()
expect(target('nemotron', [{ id: 'nemotron', status: 'not-downloaded' }])).toBeNull()
})
})
@@ -0,0 +1,37 @@
import type {
SpeechModelManifest,
SpeechModelState,
VoiceSettings
} from '../../../../shared/speech-types'
export type SpeechModelUpdateTarget = {
/** The model to download: the selection itself. */
model: SpeechModelManifest
/** The retired model the selection replaced on load, still on disk. */
retired?: SpeechModelManifest
}
/** Whether the engine change left the selected local model needing a download, and why. */
export function findSpeechModelUpdateTarget(
voice: Pick<VoiceSettings, 'enabled' | 'sttModel'>,
catalog: readonly SpeechModelManifest[],
states: readonly SpeechModelState[]
): SpeechModelUpdateTarget | null {
const model = catalog.find((m) => m.id === voice.sttModel)
if (!voice.enabled || !model || model.provider !== 'local') {
return null
}
const stateOf = (id: string): SpeechModelState | undefined => states.find((s) => s.id === id)
const selected = stateOf(model.id)
if (selected?.needsUpdate) {
return { model }
}
if (selected?.status === 'ready') {
return null
}
// Settings load already moved the selection off the retired id, so find it by its files.
const retired = catalog.find(
(m) => m.replacedBy === model.id && stateOf(m.id)?.status === 'ready'
)
return retired ? { model, retired } : null
}
+26
View File
@@ -23593,5 +23593,31 @@
},
"checks": {
"gitlabAllowedFailure": "Fehlschlag erlaubt"
},
"speechModelUpdate": {
"updateTitle": "Sprachmodell aktualisieren",
"updateDescription": "Die Diktierfunktion läuft jetzt mit einer schnelleren Engine. {{model}} muss einmalig heruntergeladen werden ({{size}} MB), bevor Sie wieder diktieren können.",
"update": "Aktualisieren",
"replacedTitle": "Ihr Sprachmodell wurde ersetzt",
"replacedDescription": "{{old}} läuft nicht mit der neuen Spracherkennung. {{model}} ersetzt es ({{size}} MB).",
"downloadReplacement": "{{model}} herunterladen",
"later": "Später",
"dismiss": "Schließen",
"updatingTitle": "{{model}} wird aktualisiert",
"downloadingTitle": "{{model}} wird heruntergeladen",
"downloadingDescription": "Sie können weiterarbeiten. Die Diktierfunktion ist wieder da, sobald dies abgeschlossen ist.",
"progress": "{{done}} von {{total}} MB",
"cancel": "Abbrechen",
"doneTitle": "Diktieren ist bereit",
"doneDescription": "{{model}} ist aktualisiert. Die alten Dateien wurden entfernt.",
"doneRetiredDescription": "{{model}} ist eingerichtet. Die alten Dateien von {{old}} sind noch auf dem Datenträger.",
"keep": "Behalten",
"deleteOld": "Altes Modell löschen",
"deleteFailed": "{{model}} konnte nicht gelöscht werden.",
"updateFailedTitle": "{{model}} konnte nicht aktualisiert werden",
"downloadFailedTitle": "{{model}} konnte nicht heruntergeladen werden",
"failedAtDescription": "Der Download wurde bei {{mb}} MB unterbrochen. Prüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
"failedDescription": "Der Download wurde unterbrochen. Prüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
"tryAgain": "Erneut versuchen"
}
}
+26
View File
@@ -24545,5 +24545,31 @@
"stopped": "{{host}} stopped controlling browser tabs until Orca restarts.",
"disallowed": "{{host}} can no longer control browser tabs. Turn it back on in Settings > SSH.",
"failed": "Couldn’t stop {{host}}. Turn off its browser control in Settings > SSH."
},
"speechModelUpdate": {
"updateTitle": "Update your speech model",
"updateDescription": "Dictation now runs on a faster engine. {{model}} needs a one-time download ({{size}} MB) before you can dictate again.",
"update": "Update",
"replacedTitle": "Your speech model was replaced",
"replacedDescription": "{{old}} can't run on the new speech engine. {{model}} replaces it ({{size}} MB).",
"downloadReplacement": "Download {{model}}",
"later": "Later",
"dismiss": "Dismiss",
"updatingTitle": "Updating {{model}}",
"downloadingTitle": "Downloading {{model}}",
"downloadingDescription": "You can keep working. Dictation is back when this finishes.",
"progress": "{{done}} of {{total}} MB",
"cancel": "Cancel",
"doneTitle": "Dictation is ready",
"doneDescription": "{{model}} is updated. The old files were removed.",
"doneRetiredDescription": "{{model}} is set up. The old {{old}} files are still on disk.",
"keep": "Keep",
"deleteOld": "Delete old model",
"deleteFailed": "Failed to delete {{model}}.",
"updateFailedTitle": "Couldn't update {{model}}",
"downloadFailedTitle": "Couldn't download {{model}}",
"failedAtDescription": "The download stopped at {{mb}} MB. Check your connection and try again.",
"failedDescription": "The download stopped. Check your connection and try again.",
"tryAgain": "Try again"
}
}
+26
View File
@@ -23997,5 +23997,31 @@
"branchName": "Nombre de la rama",
"invalidBranchName": "Este nombre de rama no es válido. Elige otro nombre.",
"createBranchFailed": "Orca no pudo crear la rama. Revisa este repositorio en una terminal e inténtalo de nuevo."
},
"speechModelUpdate": {
"updateTitle": "Actualiza tu modelo de voz",
"updateDescription": "El dictado ahora usa un motor más rápido. {{model}} necesita una descarga única ({{size}} MB) antes de que puedas volver a dictar.",
"update": "Actualizar",
"replacedTitle": "Tu modelo de voz se ha sustituido",
"replacedDescription": "{{old}} no funciona con el nuevo motor de voz. {{model}} lo sustituye ({{size}} MB).",
"downloadReplacement": "Descargar {{model}}",
"later": "Más tarde",
"dismiss": "Cerrar",
"updatingTitle": "Actualizando {{model}}",
"downloadingTitle": "Descargando {{model}}",
"downloadingDescription": "Puedes seguir trabajando. El dictado vuelve cuando termine.",
"progress": "{{done}} de {{total}} MB",
"cancel": "Cancelar",
"doneTitle": "El dictado está listo",
"doneDescription": "{{model}} está actualizado. Se eliminaron los archivos antiguos.",
"doneRetiredDescription": "{{model}} está listo. Los archivos antiguos de {{old}} siguen en el disco.",
"keep": "Conservar",
"deleteOld": "Eliminar modelo antiguo",
"deleteFailed": "No se pudo eliminar {{model}}.",
"updateFailedTitle": "No se pudo actualizar {{model}}",
"downloadFailedTitle": "No se pudo descargar {{model}}",
"failedAtDescription": "La descarga se detuvo en {{mb}} MB. Comprueba tu conexión e inténtalo de nuevo.",
"failedDescription": "La descarga se detuvo. Comprueba tu conexión e inténtalo de nuevo.",
"tryAgain": "Reintentar"
}
}
+26
View File
@@ -24000,5 +24000,31 @@
},
"checks": {
"gitlabAllowedFailure": "Échec autorisé"
},
"speechModelUpdate": {
"updateTitle": "Mettez à jour votre modèle vocal",
"updateDescription": "La dictée utilise désormais un moteur plus rapide. {{model}} doit être téléchargé une seule fois ({{size}} Mo) avant que vous puissiez dicter à nouveau.",
"update": "Mettre à jour",
"replacedTitle": "Votre modèle vocal a été remplacé",
"replacedDescription": "{{old}} ne fonctionne pas avec le nouveau moteur vocal. {{model}} le remplace ({{size}} Mo).",
"downloadReplacement": "Télécharger {{model}}",
"later": "Plus tard",
"dismiss": "Fermer",
"updatingTitle": "Mise à jour de {{model}}",
"downloadingTitle": "Téléchargement de {{model}}",
"downloadingDescription": "Vous pouvez continuer à travailler. La dictée revient une fois l’opération terminée.",
"progress": "{{done}} sur {{total}} Mo",
"cancel": "Annuler",
"doneTitle": "La dictée est prête",
"doneDescription": "{{model}} est à jour. Les anciens fichiers ont été supprimés.",
"doneRetiredDescription": "{{model}} est prêt. Les anciens fichiers de {{old}} sont toujours sur le disque.",
"keep": "Conserver",
"deleteOld": "Supprimer l’ancien modèle",
"deleteFailed": "Impossible de supprimer {{model}}.",
"updateFailedTitle": "Impossible de mettre à jour {{model}}",
"downloadFailedTitle": "Impossible de télécharger {{model}}",
"failedAtDescription": "Le téléchargement s’est arrêté à {{mb}} Mo. Vérifiez votre connexion et réessayez.",
"failedDescription": "Le téléchargement s’est arrêté. Vérifiez votre connexion et réessayez.",
"tryAgain": "Réessayer"
}
}
+26
View File
@@ -23307,5 +23307,31 @@
"branchName": "ブランチ名",
"invalidBranchName": "このブランチ名は無効です。別の名前を選んでください。",
"createBranchFailed": "Orca はブランチを作成できませんでした。ターミナルでこのリポジトリを確認してから、もう一度お試しください。"
},
"speechModelUpdate": {
"updateTitle": "音声モデルを更新してください",
"updateDescription": "音声入力がより高速なエンジンで動作するようになりました。再び音声入力するには、{{model}} を一度だけダウンロードする必要があります({{size}} MB)。",
"update": "更新",
"replacedTitle": "音声モデルが置き換えられました",
"replacedDescription": "{{old}} は新しい音声エンジンでは動作しません。代わりに {{model}} を使用します({{size}} MB)。",
"downloadReplacement": "{{model}} をダウンロード",
"later": "後で",
"dismiss": "閉じる",
"updatingTitle": "{{model}} を更新中",
"downloadingTitle": "{{model}} をダウンロード中",
"downloadingDescription": "作業を続けられます。完了すると音声入力が使えるようになります。",
"progress": "{{done}} / {{total}} MB",
"cancel": "キャンセル",
"doneTitle": "音声入力の準備ができました",
"doneDescription": "{{model}} を更新しました。古いファイルは削除されました。",
"doneRetiredDescription": "{{model}} の準備ができました。{{old}} の古いファイルはまだディスクに残っています。",
"keep": "残す",
"deleteOld": "古いモデルを削除",
"deleteFailed": "{{model}} を削除できませんでした。",
"updateFailedTitle": "{{model}} を更新できませんでした",
"downloadFailedTitle": "{{model}} をダウンロードできませんでした",
"failedAtDescription": "ダウンロードが {{mb}} MB で止まりました。接続を確認して、もう一度お試しください。",
"failedDescription": "ダウンロードが止まりました。接続を確認して、もう一度お試しください。",
"tryAgain": "再試行"
}
}
+26
View File
@@ -23307,5 +23307,31 @@
"branchName": "브랜치 이름",
"invalidBranchName": "이 브랜치 이름은 유효하지 않습니다. 다른 이름을 선택하세요.",
"createBranchFailed": "Orca가 브랜치를 만들지 못했습니다. 터미널에서 이 저장소를 확인한 후 다시 시도하세요."
},
"speechModelUpdate": {
"updateTitle": "음성 모델을 업데이트하세요",
"updateDescription": "이제 받아쓰기가 더 빠른 엔진에서 실행됩니다. 다시 받아쓰려면 {{model}}을(를) 한 번 다운로드해야 합니다({{size}} MB).",
"update": "업데이트",
"replacedTitle": "음성 모델이 교체되었습니다",
"replacedDescription": "{{old}}은(는) 새 음성 엔진에서 실행할 수 없습니다. {{model}}이(가) 대신합니다({{size}} MB).",
"downloadReplacement": "{{model}} 다운로드",
"later": "나중에",
"dismiss": "닫기",
"updatingTitle": "{{model}} 업데이트 중",
"downloadingTitle": "{{model}} 다운로드 중",
"downloadingDescription": "계속 작업하셔도 됩니다. 완료되면 받아쓰기를 다시 사용할 수 있습니다.",
"progress": "{{done}} / {{total}} MB",
"cancel": "취소",
"doneTitle": "받아쓰기 준비 완료",
"doneDescription": "{{model}}이(가) 업데이트되었습니다. 이전 파일은 삭제되었습니다.",
"doneRetiredDescription": "{{model}} 설정이 완료되었습니다. 이전 {{old}} 파일은 아직 디스크에 있습니다.",
"keep": "유지",
"deleteOld": "이전 모델 삭제",
"deleteFailed": "{{model}}을(를) 삭제하지 못했습니다.",
"updateFailedTitle": "{{model}}을(를) 업데이트하지 못했습니다",
"downloadFailedTitle": "{{model}}을(를) 다운로드하지 못했습니다",
"failedAtDescription": "다운로드가 {{mb}} MB에서 중단되었습니다. 연결을 확인하고 다시 시도하세요.",
"failedDescription": "다운로드가 중단되었습니다. 연결을 확인하고 다시 시도하세요.",
"tryAgain": "다시 시도"
}
}
+26
View File
@@ -23970,5 +23970,31 @@
"branchName": "Nome da branch",
"invalidBranchName": "Este nome de branch é inválido. Escolha outro nome.",
"createBranchFailed": "O Orca não conseguiu criar a branch. Verifique este repositório em um terminal e tente novamente."
},
"speechModelUpdate": {
"updateTitle": "Atualize seu modelo de voz",
"updateDescription": "O ditado agora usa um mecanismo mais rápido. {{model}} precisa de um download único ({{size}} MB) antes que você possa ditar novamente.",
"update": "Atualizar",
"replacedTitle": "Seu modelo de voz foi substituído",
"replacedDescription": "{{old}} não funciona no novo mecanismo de voz. {{model}} o substitui ({{size}} MB).",
"downloadReplacement": "Baixar {{model}}",
"later": "Mais tarde",
"dismiss": "Fechar",
"updatingTitle": "Atualizando {{model}}",
"downloadingTitle": "Baixando {{model}}",
"downloadingDescription": "Você pode continuar trabalhando. O ditado volta quando isso terminar.",
"progress": "{{done}} de {{total}} MB",
"cancel": "Cancelar",
"doneTitle": "O ditado está pronto",
"doneDescription": "{{model}} foi atualizado. Os arquivos antigos foram removidos.",
"doneRetiredDescription": "{{model}} está pronto. Os arquivos antigos de {{old}} ainda estão no disco.",
"keep": "Manter",
"deleteOld": "Excluir modelo antigo",
"deleteFailed": "Não foi possível excluir {{model}}.",
"updateFailedTitle": "Não foi possível atualizar {{model}}",
"downloadFailedTitle": "Não foi possível baixar {{model}}",
"failedAtDescription": "O download parou em {{mb}} MB. Verifique sua conexão e tente novamente.",
"failedDescription": "O download parou. Verifique sua conexão e tente novamente.",
"tryAgain": "Tentar novamente"
}
}
+26
View File
@@ -24344,5 +24344,31 @@
"branchName": "Название ветки",
"invalidBranchName": "Это имя ветки недопустимо. Выберите другое имя.",
"createBranchFailed": "Orca не удалось создать ветку. Проверьте этот репозиторий в терминале и повторите попытку."
},
"speechModelUpdate": {
"updateTitle": "Обновите модель распознавания речи",
"updateDescription": "Диктовка теперь работает на более быстром движке. Чтобы снова диктовать, нужно один раз скачать {{model}} ({{size}} МБ).",
"update": "Обновить",
"replacedTitle": "Ваша модель распознавания речи заменена",
"replacedDescription": "{{old}} не работает с новым движком распознавания речи. Вместо неё будет {{model}} ({{size}} МБ).",
"downloadReplacement": "Скачать {{model}}",
"later": "Позже",
"dismiss": "Закрыть",
"updatingTitle": "Обновление {{model}}",
"downloadingTitle": "Загрузка {{model}}",
"downloadingDescription": "Можно продолжать работу. Диктовка вернётся, когда загрузка завершится.",
"progress": "{{done}} из {{total}} МБ",
"cancel": "Отмена",
"doneTitle": "Диктовка готова",
"doneDescription": "{{model}} обновлена. Старые файлы удалены.",
"doneRetiredDescription": "{{model}} установлена. Старые файлы {{old}} всё ещё на диске.",
"keep": "Оставить",
"deleteOld": "Удалить старую модель",
"deleteFailed": "Не удалось удалить {{model}}.",
"updateFailedTitle": "Не удалось обновить {{model}}",
"downloadFailedTitle": "Не удалось скачать {{model}}",
"failedAtDescription": "Загрузка остановилась на {{mb}} МБ. Проверьте подключение и повторите попытку.",
"failedDescription": "Загрузка остановилась. Проверьте подключение и повторите попытку.",
"tryAgain": "Повторить"
}
}
+26
View File
@@ -23571,5 +23571,31 @@
"branchName": "Dal adı",
"invalidBranchName": "Bu dal adı geçersiz. Farklı bir ad seçin.",
"createBranchFailed": "Orca dalı oluşturamadı. Bu depoyu terminalde kontrol edip yeniden deneyin."
},
"speechModelUpdate": {
"updateTitle": "Konuşma modelinizi güncelleyin",
"updateDescription": "Dikte artık daha hızlı bir motorla çalışıyor. Yeniden dikte edebilmeniz için {{model}} modelinin bir kez indirilmesi gerekiyor ({{size}} MB).",
"update": "Güncelle",
"replacedTitle": "Konuşma modeliniz değiştirildi",
"replacedDescription": "{{old}} yeni konuşma motorunda çalışamıyor. Yerine {{model}} kullanılacak ({{size}} MB).",
"downloadReplacement": "{{model}} indir",
"later": "Daha sonra",
"dismiss": "Kapat",
"updatingTitle": "{{model}} güncelleniyor",
"downloadingTitle": "{{model}} indiriliyor",
"downloadingDescription": "Çalışmaya devam edebilirsiniz. Bu bittiğinde dikte geri gelir.",
"progress": "{{done}} / {{total}} MB",
"cancel": "İptal",
"doneTitle": "Dikte hazır",
"doneDescription": "{{model}} güncellendi. Eski dosyalar kaldırıldı.",
"doneRetiredDescription": "{{model}} kuruldu. Eski {{old}} dosyaları hâlâ diskte.",
"keep": "Sakla",
"deleteOld": "Eski modeli sil",
"deleteFailed": "{{model}} silinemedi.",
"updateFailedTitle": "{{model}} güncellenemedi",
"downloadFailedTitle": "{{model}} indirilemedi",
"failedAtDescription": "İndirme {{mb}} MB'de durdu. Bağlantınızı kontrol edip yeniden deneyin.",
"failedDescription": "İndirme durdu. Bağlantınızı kontrol edip yeniden deneyin.",
"tryAgain": "Yeniden dene"
}
}
@@ -23256,5 +23256,31 @@
"branchName": "分支名稱",
"invalidBranchName": "此分支名稱無效。請選擇其他名稱。",
"createBranchFailed": "Orca 無法建立分支。請在終端機中檢查此儲存庫,然後重試。"
},
"speechModelUpdate": {
"updateTitle": "更新你的語音模型",
"updateDescription": "聽寫現在使用更快的引擎。{{model}} 需要下載一次({{size}} MB)才能再次聽寫。",
"update": "更新",
"replacedTitle": "你的語音模型已被取代",
"replacedDescription": "{{old}} 無法在新的語音引擎上執行。{{model}} 將取代它({{size}} MB)。",
"downloadReplacement": "下載 {{model}}",
"later": "稍後",
"dismiss": "關閉",
"updatingTitle": "正在更新 {{model}}",
"downloadingTitle": "正在下載 {{model}}",
"downloadingDescription": "你可以繼續工作。完成後即可再次使用聽寫。",
"progress": "{{done}} / {{total}} MB",
"cancel": "取消",
"doneTitle": "聽寫已就緒",
"doneDescription": "{{model}} 已更新。舊檔案已移除。",
"doneRetiredDescription": "{{model}} 已設定完成。舊的 {{old}} 檔案仍在磁碟上。",
"keep": "保留",
"deleteOld": "刪除舊模型",
"deleteFailed": "無法刪除 {{model}}。",
"updateFailedTitle": "無法更新 {{model}}",
"downloadFailedTitle": "無法下載 {{model}}",
"failedAtDescription": "下載在 {{mb}} MB 時中斷。請檢查連線後再試一次。",
"failedDescription": "下載已中斷。請檢查連線後再試一次。",
"tryAgain": "再試一次"
}
}
+26
View File
@@ -23307,5 +23307,31 @@
"branchName": "分支名称",
"invalidBranchName": "此分支名称无效。请选择其他名称。",
"createBranchFailed": "Orca 无法创建分支。请在终端中检查此仓库,然后重试。"
},
"speechModelUpdate": {
"updateTitle": "更新你的语音模型",
"updateDescription": "听写现在使用更快的引擎。{{model}} 需要下载一次({{size}} MB)才能再次听写。",
"update": "更新",
"replacedTitle": "你的语音模型已被替换",
"replacedDescription": "{{old}} 无法在新的语音引擎上运行。{{model}} 将替换它({{size}} MB)。",
"downloadReplacement": "下载 {{model}}",
"later": "稍后",
"dismiss": "关闭",
"updatingTitle": "正在更新 {{model}}",
"downloadingTitle": "正在下载 {{model}}",
"downloadingDescription": "你可以继续工作。完成后即可再次使用听写。",
"progress": "{{done}} / {{total}} MB",
"cancel": "取消",
"doneTitle": "听写已就绪",
"doneDescription": "{{model}} 已更新。旧文件已删除。",
"doneRetiredDescription": "{{model}} 已设置完成。旧的 {{old}} 文件仍在磁盘上。",
"keep": "保留",
"deleteOld": "删除旧模型",
"deleteFailed": "无法删除 {{model}}。",
"updateFailedTitle": "无法更新 {{model}}",
"downloadFailedTitle": "无法下载 {{model}}",
"failedAtDescription": "下载在 {{mb}} MB 时中断。请检查网络连接后重试。",
"failedDescription": "下载已中断。请检查网络连接后重试。",
"tryAgain": "重试"
}
}
@@ -21,7 +21,13 @@ export type DictationSlice = {
}
function sameSpeechModelState(a: SpeechModelState, b: SpeechModelState): boolean {
return a.id === b.id && a.status === b.status && a.progress === b.progress && a.error === b.error
return (
a.id === b.id &&
a.status === b.status &&
a.progress === b.progress &&
a.error === b.error &&
a.needsUpdate === b.needsUpdate
)
}
// Replies allocate fresh arrays; preserve unchanged identity or every model refresh rerenders subscribers/menu.
@@ -133,6 +133,8 @@ export type UISliceContextual = {
markCodexTerminalServerIsolationNoticeSeen: () => void
codexSharedSettingsNoticeSeen: boolean
markCodexSharedSettingsNoticeSeen: () => void
speechModelUpdateNoticeSeen: boolean
markSpeechModelUpdateNoticeSeen: () => void
claudeDiffPanelNoticeSeen: boolean
markClaudeDiffPanelNoticeSeen: () => void
}
@@ -264,6 +264,7 @@ export function createUiHydrationActions(set: UISliceSet, _get: UISliceGet): Par
codexTerminalServerIsolationNoticeSeen:
ui.codexTerminalServerIsolationNoticeSeen === true,
codexSharedSettingsNoticeSeen: ui.codexSharedSettingsNoticeSeen === true,
speechModelUpdateNoticeSeen: ui.speechModelUpdateNoticeSeen === true,
claudeDiffPanelNoticeSeen: ui.claudeDiffPanelNoticeSeen === true,
...hydrateAgentReadState(ui),
workspaceCleanupDismissals: sanitizeWorkspaceCleanupDismissals(
@@ -167,6 +167,15 @@ export function createUiTrustActions(set: UISliceSet, _get: UISliceGet): Partial
window.api.ui.set({ codexSharedSettingsNoticeSeen: true }).catch(console.error)
return { codexSharedSettingsNoticeSeen: true }
}),
speechModelUpdateNoticeSeen: true,
markSpeechModelUpdateNoticeSeen: () =>
set((s) => {
if (s.speechModelUpdateNoticeSeen) {
return s
}
window.api.ui.set({ speechModelUpdateNoticeSeen: true }).catch(console.error)
return { speechModelUpdateNoticeSeen: true }
}),
claudeDiffPanelNoticeSeen: true,
markClaudeDiffPanelNoticeSeen: () =>
set((s) => {
+2
View File
@@ -198,6 +198,8 @@ export type PersistedUIState = {
codexTerminalServerIsolationNoticeSeen?: boolean
/** Windows one-shot toast for Codex moving onto ~/.codex; set when shown, so absent means not yet seen. */
codexSharedSettingsNoticeSeen?: boolean
/** One-shot card offering the speech model download the transcribe-cpp engine needs; set on the first check. */
speechModelUpdateNoticeSeen?: boolean
/** One-shot pane banner explaining Claude Code's own diff panel; set when the user closes it. */
claudeDiffPanelNoticeSeen?: boolean
/** Retired one-shot Claude sign-in toast; kept because a paired client from that build still sends it. */
@@ -259,6 +259,7 @@ export const UiUpdateFields = z
pluginsAlphaNoticeDismissed: z.boolean().optional(),
codexTerminalServerIsolationNoticeSeen: z.boolean().optional(),
codexSharedSettingsNoticeSeen: z.boolean().optional(),
speechModelUpdateNoticeSeen: z.boolean().optional(),
claudeDiffPanelNoticeSeen: z.boolean().optional(),
claudeAccountSignInNoticeSeen: z.boolean().optional(),
petVisible: z.boolean().optional(),
@@ -144,6 +144,7 @@ export const UI_STATE_GLOBAL_FIELDS = [
'pluginsAlphaNoticeDismissed',
'codexTerminalServerIsolationNoticeSeen',
'codexSharedSettingsNoticeSeen',
'speechModelUpdateNoticeSeen',
'claudeDiffPanelNoticeSeen',
'claudeAccountSignInNoticeSeen',
'browserDefaultUrl',