Commit 70d0f85
SidQin-cyber
fix(gateway): filter NO_REPLY messages from chat history endpoint
The streaming path (emitChatDelta/emitChatFinal) already suppresses
assistant messages containing NO_REPLY tokens, but the chat.history
endpoint returned them unfiltered. When users refresh webchat or open
a new connection, historical NO_REPLY messages appeared in the UI.
Add extractAssistantText() to pull text from various message formats
and filter out matching messages in sanitizeChatHistoryMessages(),
bringing the history path in line with the streaming path.
Closes #272381 parent e35fe78 commit 70d0f85
1 file changed
+29
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
188 | 208 | | |
189 | 209 | | |
190 | 210 | | |
191 | 211 | | |
192 | 212 | | |
193 | | - | |
| 213 | + | |
| 214 | + | |
194 | 215 | | |
195 | 216 | | |
196 | | - | |
197 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
198 | 224 | | |
199 | 225 | | |
200 | 226 | | |
| |||
0 commit comments