Commit 15973af
fix: resolve ChatMessage type export issue in server actions
Removed type re-export from server action file which was causing
Next.js to incorrectly bundle types into the runtime server actions
bundle. Updated all imports to reference types directly from the
types file.
This fixes the "ReferenceError: ChatMessage is not defined" error
that was occurring during E2E tests when the server tried to load
the actions module.
Changes:
- Removed `export type { ChatMessage, ChatResponse }` from actions/chatbot/index.ts
- Updated imports in components and tests to use @/actions/chatbot/types
- All type imports now correctly use the type modifier
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent cfdf638 commit 15973af
File tree
4 files changed
+6
-5
lines changed- __tests__/actions
- actions/chatbot
- components
- __tests__/admin/chatbot
- admin/chatbot
4 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
0 commit comments