Commit f58bfeb
Fix Anthropic empty/garbled chat titles on 3rd message retitle
The retitle feature passed the full chat history (including assistant
messages) as user-messages to sync-prompt!. Anthropic's handler
detected assistant messages without thinking blocks and converted all
roles to user, producing a malformed conversation that yielded
empty or nonsensical titles.
Fix: pass chat history as past-messages (which bypasses the
fix-non-thinking-assistant-messages transform) and keep only the
current user message as user-messages.
🤖 Generated with [eca](https://eca.dev)
Co-Authored-By: eca-agent <git@eca.dev>1 parent b88567c commit f58bfeb
File tree
3 files changed
+27
-8
lines changed- src/eca/features
- test/eca/features
3 files changed
+27
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
| 577 | + | |
| 578 | + | |
581 | 579 | | |
582 | 580 | | |
583 | 581 | | |
584 | 582 | | |
585 | 583 | | |
586 | 584 | | |
587 | 585 | | |
588 | | - | |
| 586 | + | |
| 587 | + | |
589 | 588 | | |
590 | 589 | | |
591 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
225 | 242 | | |
226 | 243 | | |
227 | 244 | | |
| |||
251 | 268 | | |
252 | 269 | | |
253 | 270 | | |
254 | | - | |
255 | | - | |
256 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
257 | 276 | | |
258 | 277 | | |
259 | 278 | | |
| |||
0 commit comments