fix: remove engine dropdown filtering — profile grid handles it

This commit is contained in:
James Pine
2026-03-19 10:14:33 -07:00
parent 3584283d84
commit 9e726ad048
@@ -41,26 +41,11 @@ const ENGLISH_ONLY_ENGINES = new Set(['luxtts', 'chatterbox_turbo']);
/** Engines that support cloned (reference audio) profiles. */ /** Engines that support cloned (reference audio) profiles. */
const CLONING_ENGINES = new Set(['qwen', 'luxtts', 'chatterbox', 'chatterbox_turbo', 'tada']); const CLONING_ENGINES = new Set(['qwen', 'luxtts', 'chatterbox', 'chatterbox_turbo', 'tada']);
/** Engines that are preset-only (no cloning). */
const PRESET_ONLY_ENGINES = new Set(['kokoro']);
/** /**
* Get which engine options are available for the selected profile. * All engine options are always available. The profile grid already
* * filters by engine, so the dropdown doesn't need to restrict options.
* - Preset profiles: locked to their preset engine
* - All other profiles: all engines available
*/ */
function getAvailableOptions(selectedProfile?: VoiceProfileResponse | null) { function getAvailableOptions(_selectedProfile?: VoiceProfileResponse | null) {
if (!selectedProfile) return ENGINE_OPTIONS;
const voiceType = selectedProfile.voice_type || 'cloned';
if (voiceType === 'preset') {
// Preset profiles lock to their specific engine
const presetEngine = selectedProfile.preset_engine;
return ENGINE_OPTIONS.filter((opt) => opt.engine === presetEngine);
}
return ENGINE_OPTIONS; return ENGINE_OPTIONS;
} }
@@ -169,5 +154,5 @@ export function isProfileCompatibleWithEngine(
const voiceType = profile.voice_type || 'cloned'; const voiceType = profile.voice_type || 'cloned';
if (voiceType === 'preset') return profile.preset_engine === engine; if (voiceType === 'preset') return profile.preset_engine === engine;
if (voiceType === 'cloned') return CLONING_ENGINES.has(engine); if (voiceType === 'cloned') return CLONING_ENGINES.has(engine);
return !PRESET_ONLY_ENGINES.has(engine); // designed — future return true; // designed — future
} }