Fix Turbopack build errors for Cloudflare deployment#103
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09ed97ca00
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| chatId: editingMessageId ?? undefined, | ||
| researchMode, | ||
| chatMode: inferChatMode(tool, researchMode) | ||
| chatMode: outgoingChatMode, |
There was a problem hiding this comment.
Send backend chatMode enum instead of UI mode values
processMessage now always sends chatMode: outgoingChatMode, which is a UI mode (ask/study/image) rather than the API enum expected by POST /api/generate. In app/api/generate/route.ts, isGenerateProps only accepts general|learn|research|build for body.chatMode, so requests from this component are rejected as 400 Invalid message request whenever chatMode is present. This regression was introduced when the inferChatMode(...) field was removed from the payload, so normal chat submissions can fail before generation runs.
Useful? React with 👍 / 👎.
Fixes