fix: update search flow - first tool search

This commit is contained in:
2026-08-26 12:34:41 +05:00
parent 84cc56cc6c
commit 3c1c5b2b3a
3 changed files with 29 additions and 3 deletions
@@ -9,11 +9,13 @@
interface Props {
onSelect: (toolId: string) => void;
/** true — только инструменты, пригодные в шаг цепочки (слот добавления шага). */
chainableOnly?: boolean;
}
let { onSelect }: Props = $props();
let { onSelect, chainableOnly = false }: Props = $props();
const candidates = TOOLS.filter(isChainable);
const candidates = chainableOnly ? TOOLS.filter(isChainable) : TOOLS;
let query = $state('');
let activeIndex = $state(0);