tpmjs/apps
Ajax Davis c6b4456baf 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
..
playground fix: use function body in DefaultChatTransport to send latest env vars 2025-12-04 14:25:59 +10:00
railway-executor fix: use function body in DefaultChatTransport to send latest env vars 2025-12-04 14:25:59 +10:00
web feat: implement BM25 search with context from last 3 user messages 2025-12-04 13:59:22 +10:00