feat: AI Copilot suggestion chips + typeahead dropdown
- Suggestion chips bar: context-aware (amber for rearrange, indigo for creation) - Typeahead dropdown: keyword matching on ≥2 chars, Tab to select - getSelectedMidiItemInfo helper for context detection - Backend: 4 rearrange presets in ai_presets.py - PromptTemplateManager: getContextualSuggestions(hasSelectedItem)
This commit is contained in:
@@ -236,6 +236,14 @@ const PromptTemplateManager = (function() {
|
||||
this.savePresets();
|
||||
};
|
||||
|
||||
PromptTemplateManager.prototype.getContextualSuggestions = function(hasSelectedItem) {
|
||||
if (hasSelectedItem) {
|
||||
return this.presets.filter(p => p.category === 'Rearrange / Variation' || p.is_favorite);
|
||||
} else {
|
||||
return this.presets.filter(p => p.category !== 'Rearrange / Variation');
|
||||
}
|
||||
};
|
||||
|
||||
PromptTemplateManager.prototype.toggleFavorite = function(id) {
|
||||
const preset = this.presets.find(p => p.id === id);
|
||||
if (preset) {
|
||||
|
||||
Reference in New Issue
Block a user