tpmjs/apps/playground
Ajax Davis 6e7c75dd14 fix: use function body in DefaultChatTransport to send latest env vars
PROBLEM:
DefaultChatTransport body is cloned ONCE on mount, so env vars
were always empty {} even after localStorage loaded them.

SOLUTION:
Use a function for body instead of an object. AI SDK v6 calls
body() on each request, ensuring latest env vars are sent.

Changes:
- useChat.ts: body: { env } → body: () => ({ env: buildEnvObject() })
- buildEnvObject() is called fresh on each request
- Env vars now sent correctly to /api/chat

Credit: ChatGPT for identifying the exact AI SDK v6 pattern

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 14:25:59 +10:00
..
src fix: use function body in DefaultChatTransport to send latest env vars 2025-12-04 14:25:59 +10:00
.env.local.example feat: implement playground app with AI SDK v6 tool execution 2025-12-04 02:51:02 +10:00
next-env.d.ts fix: use deployed /api/tools endpoint with client-side filtering and streamline git hooks 2025-12-04 13:43:19 +10:00
next.config.ts feat: add dynamic tool loading system with Railway executor 2025-12-04 08:25:53 +10:00
package.json fix: migrate playground to AI SDK v6 beta and resolve TypeScript errors 2025-12-04 13:15:21 +10:00
postcss.config.mjs feat: implement playground app with AI SDK v6 tool execution 2025-12-04 02:51:02 +10:00
tailwind.config.ts feat: implement playground app with AI SDK v6 tool execution 2025-12-04 02:51:02 +10:00
tsconfig.json feat: implement playground app with AI SDK v6 tool execution 2025-12-04 02:51:02 +10:00