fix: filter excludes non-rearrange presets in AI suggestion list

Remove || p.is_favorite from filter when MIDI item selected.
Only presets with category === 'Rearrange / Variation' appear.
This commit is contained in:
2026-07-29 10:17:36 +07:00
parent 895ad0b7d9
commit 614d83b971
3 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -16181,7 +16181,7 @@ const App = () => {
aiPromptMgrRef.current = new window.PromptTemplateManager();
}
const promptMgr = aiPromptMgrRef.current;
const suggestions = promptMgr ? (hasSelItem ? promptMgr.presets.filter(function(p) { return p.category === 'Rearrange / Variation' || p.is_favorite; }) : promptMgr.presets) : [];
const suggestions = promptMgr ? (hasSelItem ? promptMgr.presets.filter(function(p) { return p.category === 'Rearrange / Variation'; }) : promptMgr.presets) : [];
const handleApplySuggestion = (preset) => {
if (hasSelItem) {
setAiPrompt(`Rearrange this melody line in ${preset.name} style`);
File diff suppressed because one or more lines are too long