Skip to content

Commit 4826954

Browse files
committed
docs(Search): restore Ask AI item in search results via ignoreFilter group
1 parent aeedf16 commit 4826954

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/app/composables/useSearch.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,25 @@ export function useSearch() {
104104
}])
105105

106106
const groups = computed(() => [{
107+
id: 'ai',
108+
label: 'AI',
109+
ignoreFilter: true,
110+
postFilter: (searchTerm: string, items: any[]) => {
111+
if (!searchTerm) {
112+
return []
113+
}
114+
115+
return items
116+
},
117+
items: [{
118+
label: 'Ask AI',
119+
icon: 'i-lucide-bot',
120+
ui: {
121+
itemLeadingIcon: 'group-data-highlighted:not-group-data-disabled:text-primary'
122+
},
123+
onSelect
124+
}]
125+
}, {
107126
id: 'framework',
108127
label: 'Framework',
109128
items: frameworks.value

0 commit comments

Comments
 (0)