From f14811c47e1da8027fce5d1f88c503b16934bb7b Mon Sep 17 00:00:00 2001 From: Cooper-X-Oak Date: Fri, 1 May 2026 19:24:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(asr):=20=E9=80=82=E9=85=8D=E7=81=AB?= =?UTF-8?q?=E5=B1=B1=202.0=20=E8=B5=84=E6=BA=90=20ID=20=E5=B9=B6=E7=A8=B3?= =?UTF-8?q?=E5=AE=9A=E4=BF=9D=E5=AD=98=E5=87=AD=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openless-all/app/src-tauri/src/asr/volcengine.rs | 4 ++-- openless-all/app/src/pages/Settings.tsx | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openless-all/app/src-tauri/src/asr/volcengine.rs b/openless-all/app/src-tauri/src/asr/volcengine.rs index f212dca9..7a28bc5e 100644 --- a/openless-all/app/src-tauri/src/asr/volcengine.rs +++ b/openless-all/app/src-tauri/src/asr/volcengine.rs @@ -39,7 +39,7 @@ pub struct VolcengineCredentials { impl VolcengineCredentials { pub fn default_resource_id() -> &'static str { - "volc.bigasr.sauc.duration" + "volc.seedasr.sauc.duration" } } @@ -700,7 +700,7 @@ mod tests { fn default_resource_id_is_sauc_duration() { assert_eq!( VolcengineCredentials::default_resource_id(), - "volc.bigasr.sauc.duration" + "volc.seedasr.sauc.duration" ); } } diff --git a/openless-all/app/src/pages/Settings.tsx b/openless-all/app/src/pages/Settings.tsx index b0f7bc04..4516f66e 100644 --- a/openless-all/app/src/pages/Settings.tsx +++ b/openless-all/app/src/pages/Settings.tsx @@ -272,7 +272,7 @@ const LLM_PRESETS = [ type LlmPresetId = typeof LLM_PRESETS[number]['id']; -const ASR_DEFAULT_RESOURCE_ID = 'volc.bigasr.sauc.duration'; +const ASR_DEFAULT_RESOURCE_ID = 'volc.seedasr.sauc.duration'; // SiliconFlow ASR 暂未在后端实现(coordinator.rs 只路由 whisper / volcengine)。 // 在后端接入前不暴露给用户,避免选了之后必然失败。重新启用见 issue #58 的 follow-up。 @@ -550,8 +550,8 @@ function CredentialField({ label, account, placeholder, mono, mask, defaultValue statusRef.current = window.setTimeout(() => setStatus('idle'), 1600); }; - const save = async (v: string) => { - if (!loaded || !dirty) return; + const save = async (v: string, force = false) => { + if (!loaded || (!dirty && !force)) return; setStatus('saving'); try { await setCredential(account, v); @@ -569,7 +569,7 @@ function CredentialField({ label, account, placeholder, mono, mask, defaultValue if (!loaded) return; setDirty(true); if (debounceRef.current) clearTimeout(debounceRef.current); - debounceRef.current = setTimeout(() => save(v), 300); + debounceRef.current = setTimeout(() => save(v, true), 300); }; const onBlur = () => { @@ -578,14 +578,14 @@ function CredentialField({ label, account, placeholder, mono, mask, defaultValue clearTimeout(debounceRef.current); debounceRef.current = null; } - save(value); + save(value, true); }; const fillDefault = async () => { if (!loaded || !defaultValue) return; setValue(defaultValue); setDirty(true); - await save(defaultValue); + await save(defaultValue, true); }; const onCopy = async () => {