fix: AI Suggestion shows only Rearrange presets when MIDI item selected
When hasSelItem is true, suggestions filtered to only Rearrange / Variation category + favorites.
This commit is contained in:
@@ -16109,7 +16109,7 @@ const App = () => {
|
||||
const selMidiInfo = getSelectedMidiItemInfo();
|
||||
const hasSelItem = !!selMidiInfo;
|
||||
const promptMgr = window.PromptTemplateManager ? new window.PromptTemplateManager() : null;
|
||||
const suggestions = promptMgr ? promptMgr.presets : [];
|
||||
const suggestions = promptMgr ? (hasSelItem ? promptMgr.presets.filter(function(p) { return p.category === 'Rearrange / Variation' || p.is_favorite; }) : promptMgr.presets) : [];
|
||||
const handleApplySuggestion = (preset) => {
|
||||
if (hasSelItem) {
|
||||
setAiPrompt(`Rearrange this melody line in ${preset.name} style`);
|
||||
|
||||
Reference in New Issue
Block a user