From cd2cfe25cf2efbe801092d23cd52f1a29438f872 Mon Sep 17 00:00:00 2001 From: Ajax Davis Date: Thu, 4 Dec 2025 12:31:11 +1000 Subject: [PATCH] fix: remove unused NextResponse import in playground chat route MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed unused NextResponse import that was causing TypeScript build error. The error handler already uses native Response constructor directly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/playground/src/app/api/chat/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/playground/src/app/api/chat/route.ts b/apps/playground/src/app/api/chat/route.ts index 97a3ef4..6a8a56e 100644 --- a/apps/playground/src/app/api/chat/route.ts +++ b/apps/playground/src/app/api/chat/route.ts @@ -2,7 +2,6 @@ import { createOpenAI } from '@ai-sdk/openai'; import { searchTpmjsToolsTool } from '@tpmjs/search-registry'; import { type UIMessage, convertToModelMessages, stepCountIs, streamText } from 'ai'; import type { NextRequest } from 'next/server'; -import { NextResponse } from 'next/server'; import { env } from '~/env'; import { addConversationTools, loadToolsBatch } from '~/lib/dynamic-tool-loader'; import { loadAllTools, sanitizeToolName } from '~/lib/tool-loader'; @@ -41,6 +40,7 @@ export async function POST(request: NextRequest) { console.log('✨ Creating new conversation state'); conversationStates.set(conversationId, { loadedTools: {} }); } + // biome-ignore lint/style/noNonNullAssertion: We just ensured the value exists above const state = conversationStates.get(conversationId)!; console.log( `📊 Current loaded tools in conversation: ${Object.keys(state.loadedTools).length}` @@ -93,7 +93,7 @@ export async function POST(request: NextRequest) { if (searchResult.tools && searchResult.tools.length > 0) { console.log( - `🔧 Tools found:`, + '🔧 Tools found:', searchResult.tools.map((t: any) => `${t.packageName}/${t.exportName}`) );