fix: add non-null assertion for searchTpmjsToolsTool.execute

TypeScript was complaining that execute might be undefined, but tools created
with tool() from AI SDK always have an execute method. Added non-null assertion
with biome-ignore comment to fix the TypeScript build error.

🤖 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 12:38:39 +10:00
parent 8454452476
commit 323c7496f0

View file

@ -81,7 +81,8 @@ export async function POST(request: NextRequest) {
console.log('🔎 Searching for relevant tools...');
try {
const searchResult = await searchTpmjsToolsTool.execute(
// biome-ignore lint/style/noNonNullAssertion: Tool created with tool() always has execute
const searchResult = await searchTpmjsToolsTool.execute!(
{
query: userQuery,
limit: 5, // Get top 5 relevant tools