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:
parent
8454452476
commit
323c7496f0
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue