diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 481c822..75517ff 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -3,6 +3,7 @@ import type { NextConfig } from 'next'; const nextConfig: NextConfig = { transpilePackages: ['@tpmjs/ui', '@tpmjs/utils', '@tpmjs/db', '@tpmjs/types', '@tpmjs/env'], reactStrictMode: true, + serverExternalPackages: ['vm2', '@tpmjs/package-executor'], }; export default nextConfig; diff --git a/apps/web/src/app/api/tools/[...slug]/execute/route.ts b/apps/web/src/app/api/tools/execute/[...slug]/route.ts similarity index 100% rename from apps/web/src/app/api/tools/[...slug]/execute/route.ts rename to apps/web/src/app/api/tools/execute/[...slug]/route.ts diff --git a/apps/web/src/app/api/tools/[...slug]/simulations/route.ts b/apps/web/src/app/api/tools/simulations/[...slug]/route.ts similarity index 100% rename from apps/web/src/app/api/tools/[...slug]/simulations/route.ts rename to apps/web/src/app/api/tools/simulations/[...slug]/route.ts diff --git a/apps/web/src/components/ToolPlayground.tsx b/apps/web/src/components/ToolPlayground.tsx index a04685f..0cacc3b 100644 --- a/apps/web/src/components/ToolPlayground.tsx +++ b/apps/web/src/components/ToolPlayground.tsx @@ -32,6 +32,7 @@ export function ToolPlayground({ tool }: ToolPlaygroundProps): React.ReactElemen const [error, setError] = useState(null); const [rateLimitInfo, setRateLimitInfo] = useState<{ remaining: number } | null>(null); + // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: SSE stream handling requires sequential logic const handleExecute = async () => { if (!prompt.trim() || isExecuting) return; @@ -44,7 +45,7 @@ export function ToolPlayground({ tool }: ToolPlaygroundProps): React.ReactElemen try { const response = await fetch( - `/api/tools/${encodeURIComponent(tool.npmPackageName)}/execute`, + `/api/tools/execute/${encodeURIComponent(tool.npmPackageName)}`, { method: 'POST', headers: { @@ -253,6 +254,7 @@ export function ToolPlayground({ tool }: ToolPlaygroundProps): React.ReactElemen > {isExecuting ? ( + {/* biome-ignore lint/a11y/noSvgWithoutTitle: decorative loading spinner */}
+ {/* biome-ignore lint/a11y/noSvgWithoutTitle: decorative loading spinner */}