Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openless-all/app/src-tauri/src/asr/volcengine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct VolcengineCredentials {

impl VolcengineCredentials {
pub fn default_resource_id() -> &'static str {
"volc.bigasr.sauc.duration"
"volc.seedasr.sauc.duration"
}
}

Expand Down Expand Up @@ -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"
);
}
}
12 changes: 6 additions & 6 deletions openless-all/app/src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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。
Expand Down Expand 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);
Expand All @@ -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 = () => {
Expand All @@ -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 () => {
Expand Down
Loading