fix(voices): clonedList 移到 useMemo 回调内避免 react-hooks/exhaustive-deps warning
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m39s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m39s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m48s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m53s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 3m49s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 4m19s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 4m40s
AI Code Review / AI Code Review (pull_request) Successful in 6m24s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 11m14s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 10m6s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 11s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 39s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 37h38m30s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 37h49m39s
CI/CD Pipeline / PR Build Worker Image (pull_request) Failing after 37h49m45s
CI/CD Pipeline / PR Build API Image (pull_request) Failing after 37h49m12s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 37h37m59s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 37h49m2s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 37h49m6s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 37h49m6s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 37h49m11s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 37h49m11s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 37h48m57s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 37h49m13s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 37h49m17s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 37h48m57s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 37h37m59s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 37h37m57s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 37h37m59s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 37h48m57s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 37h49m13s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 38h24m41s

This commit is contained in:
2026-09-15 01:33:54 +08:00
parent 70b0aded28
commit eac3b79b7b
@@ -34,10 +34,9 @@ const TtsModal: React.FC<TtsModalProps> = ({
onSave,
}) => {
// 预置音色(含空默认)仅支持 zh/en;克隆音色支持全语言列表
const clonedList = clonedVoices ?? []
const isCloneVoice = useMemo(
() => !!ttsVoiceId && clonedList.some((v) => v.id === ttsVoiceId),
[ttsVoiceId, clonedList],
() => !!ttsVoiceId && (clonedVoices ?? []).some((v) => v.id === ttsVoiceId),
[ttsVoiceId, clonedVoices],
)
const languageOptions = isCloneVoice ? CLONE_TTS_LANGUAGE_OPTIONS : PRESET_TTS_LANGUAGE_OPTIONS