tpmjs/apps/web
Ajax Davis 295199d43f fix: use dynamic import for AI SDK to resolve tiktoken WASM build error
Convert static import of executeToolWithAgent to dynamic import inside the
POST handler. This prevents the AI SDK (and its tiktoken dependency) from
being loaded at build time, which was causing WASM loading errors.

**Why this fix works:**
- Next.js 16 + Turbopack tries to analyze routes at build time
- tiktoken requires tiktoken_bg.wasm which can't load during static analysis
- Dynamic imports defer loading until runtime, avoiding build-time WASM issues

**Changes:**
- Remove: `import { executeToolWithAgent } from '@/lib/ai-agent/tool-executor-agent'`
- Add: `const { executeToolWithAgent } = await import('@/lib/ai-agent/tool-executor-agent')`
  inside the stream start() handler

Build now completes successfully. Route is properly marked as dynamic (ƒ).

Resolves: "Error: Missing tiktoken_bg.wasm" during Next.js build

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 01:50:49 +10:00
..
src fix: use dynamic import for AI SDK to resolve tiktoken WASM build error 2025-11-30 01:50:49 +10:00
eslint.config.mjs fix(lint): configure Biome to properly ignore build directories 2025-11-26 22:49:45 +10:00
next-env.d.ts fix(ui): make RadioGroup SSR-compatible while preserving runtime validation 2025-11-27 02:38:55 +10:00
next.config.ts fix: remove VM2 sandboxing to resolve Next.js build errors 2025-11-30 00:57:32 +10:00
package.json feat: add interactive tool playground with AI-powered execution 2025-11-30 00:36:05 +10:00
postcss.config.js feat: add complete monorepo structure and all packages 2025-11-25 21:59:40 +10:00
tailwind.config.ts fix(lint): configure Biome to properly ignore build directories 2025-11-26 22:49:45 +10:00
tsconfig.json feat(sync): implement Phase 3 Sync Workers with Vercel Cron integration 2025-11-28 02:57:54 +10:00
vercel.json fix(vercel): configure Turborepo monorepo build for apps/web 2025-11-28 21:15:18 +10:00