diff --git a/src/lib/components/chat/MessageInput/IntegrationsMenu.svelte b/src/lib/components/chat/MessageInput/IntegrationsMenu.svelte
index 98494e8b58..39452ddc37 100644
--- a/src/lib/components/chat/MessageInput/IntegrationsMenu.svelte
+++ b/src/lib/components/chat/MessageInput/IntegrationsMenu.svelte
@@ -35,6 +35,7 @@
import ChevronRight from '$lib/components/icons/ChevronRight.svelte';
import ChevronLeft from '$lib/components/icons/ChevronLeft.svelte';
import LinkSlash from '$lib/components/icons/LinkSlash.svelte';
+ import SearchInput from './InputMenu/SearchInput.svelte';
const i18n = getContext('i18n');
@@ -66,6 +67,34 @@
let tools = null;
let skills = null;
+ let toolsQuery = '';
+ let skillsQuery = '';
+
+ const matchesQuery = (item, query: string) => {
+ const q = query.trim().toLowerCase();
+ if (!q) {
+ return true;
+ }
+ return (
+ (item?.name ?? '').toLowerCase().includes(q) ||
+ (item?.description ?? '').toLowerCase().includes(q)
+ );
+ };
+
+ $: filteredToolIds = tools
+ ? Object.keys(tools).filter((id) => matchesQuery(tools[id], toolsQuery))
+ : [];
+ $: filteredSkillIds = skills
+ ? Object.keys(skills).filter((id) => matchesQuery(skills[id], skillsQuery))
+ : [];
+
+ $: if (tab !== 'tools') {
+ toolsQuery = '';
+ }
+ $: if (tab !== 'skills') {
+ skillsQuery = '';
+ }
+
$: if (show) {
init();
}
@@ -391,7 +420,13 @@
- {#each Object.keys(tools) as toolId}
+