Commit 1fb531e
committed
fix: add missing type discriminators to storybook chat messages
The MarkdownTables story was emitting messages without the required
`type: "message"` field. The `as WorkspaceChatMessage` type casts
hid this from TypeScript, causing messages to not be recognized
by the chat processor and rendering "No Messages Yet" instead.
Also fix ChatEventProcessor tests that had invalid event shapes:
- Remove invalid `role`/`timestamp` from stream-start events
- Add missing `workspaceId`/`tokens` to delta events1 parent d136f35 commit 1fb531e
File tree
2 files changed
+30
-22
lines changed- src/browser
- utils/messages
2 files changed
+30
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1140 | 1140 | | |
1141 | 1141 | | |
1142 | 1142 | | |
| 1143 | + | |
1143 | 1144 | | |
1144 | 1145 | | |
1145 | 1146 | | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
1150 | | - | |
| 1147 | + | |
| 1148 | + | |
1151 | 1149 | | |
1152 | 1150 | | |
1153 | 1151 | | |
| 1152 | + | |
1154 | 1153 | | |
1155 | 1154 | | |
1156 | 1155 | | |
| |||
1226 | 1225 | | |
1227 | 1226 | | |
1228 | 1227 | | |
1229 | | - | |
| 1228 | + | |
1230 | 1229 | | |
1231 | 1230 | | |
1232 | | - | |
| 1231 | + | |
1233 | 1232 | | |
1234 | 1233 | | |
1235 | 1234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | | - | |
17 | 15 | | |
18 | | - | |
| 16 | + | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
33 | | - | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
39 | 43 | | |
40 | | - | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
63 | | - | |
| 68 | + | |
64 | 69 | | |
65 | | - | |
66 | 70 | | |
67 | | - | |
68 | 71 | | |
69 | | - | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
| 80 | + | |
76 | 81 | | |
77 | | - | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
| 90 | + | |
84 | 91 | | |
85 | | - | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
| 100 | + | |
92 | 101 | | |
93 | | - | |
| 102 | + | |
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
| |||
0 commit comments