feat: add chain tools workflow

This commit is contained in:
2026-08-24 05:52:07 +05:00
parent c93a8e493e
commit 306c26a360
7 changed files with 386 additions and 55 deletions
@@ -2,11 +2,10 @@
import { isChainable, TOOLS } from '$lib/registry';
interface Props {
size?: 'hero' | 'compact';
onSelect: (toolId: string) => void;
}
let { size = 'hero', onSelect }: Props = $props();
let { onSelect }: Props = $props();
const candidates = TOOLS.filter(isChainable);
@@ -51,7 +50,7 @@
}
}
found.sort((a, b) => b.score - a.score || a.title.localeCompare(b.title));
return found.slice(0, size === 'hero' ? 12 : 8);
return found.slice(0, 12);
});
function choose(id: string) {
@@ -79,7 +78,7 @@
}
</script>
<div class="search {size}">
<div class="search">
<input
type="search"
bind:value={query}
@@ -120,25 +119,16 @@
.search {
position: relative;
width: 100%;
max-width: var(--control-max-width);
}
.hero {
max-width: 36rem;
margin: 0 auto;
}
input {
width: 100%;
padding: var(--space-2) var(--space-3);
padding: var(--space-3) var(--space-4);
border: 1px solid var(--border);
border-radius: var(--radius-m);
background: var(--surface);
font-size: var(--text-l);
}
.hero input {
padding: var(--space-3) var(--space-4);
font-size: var(--text-xl);
text-align: center;
}
@@ -163,6 +153,7 @@
box-shadow: var(--shadow-card);
max-height: 24rem;
overflow-y: auto;
text-align: left;
}
li button {