From 323c7496f0ef8c9d31375690eb90ef5af47c1f68 Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Thu, 4 Dec 2025 12:38:39 +1000 Subject: [PATCH] fix: add non-null assertion for searchTpmjsToolsTool.execute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/playground/src/app/api/chat/route.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/playground/src/app/api/chat/route.ts b/apps/playground/src/app/api/chat/route.ts index 77cca9a..608004a 100644 --- a/apps/playground/src/app/api/chat/route.ts +++ b/apps/playground/src/app/api/chat/route.ts @@ -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