fix: use deployed /api/tools endpoint with client-side filtering and streamline git hooks

- Change search-registry to use /api/tools instead of /api/tools/search (not deployed yet)
- Add client-side filtering for search queries since deployed API doesn't support search
- Handle both deployed (/api/tools) and local dev (/api/tools/search) response formats
- Remove lint from pre-commit hooks to speed up commits (keep format + type-check)
- Fixes 404 errors when playground tries to search tools in production

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-12-04 13:43:19 +10:00
parent 45b477397f
commit 9f85898937
7 changed files with 41 additions and 11 deletions

View file

@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View file

@ -65,7 +65,11 @@ export function ToolsSidebar(): React.ReactElement {
<p className="text-sm text-foreground-secondary">No tools found</p>
) : (
filteredTools.map((tool) => (
<Card key={`${tool.packageName}-${tool.exportName}`} variant="outline" className="cursor-pointer hover:bg-background">
<Card
key={`${tool.packageName}-${tool.exportName}`}
variant="outline"
className="cursor-pointer hover:bg-background"
>
<CardHeader>
<CardTitle className="text-sm">{tool.exportName}</CardTitle>
</CardHeader>

View file

@ -1,4 +1,4 @@
import { tool, jsonSchema } from 'ai';
import { jsonSchema, tool } from 'ai';
// Cache for tool wrappers (process-level)
const moduleCache = new Map<string, any>();