Commit c046d20
Sanitize chat titles to strip newlines and control characters
LLM-generated titles sometimes contain leading newlines, markdown
header prefixes, or other control characters that display as ^J in
Emacs and similar editors. Add a sanitize-title helper that takes
the first meaningful line, strips control chars and markdown headers,
collapses whitespace, and truncates to 40 chars. Applied at both
write points: LLM title generation and manual title update.
🤖 Generated with [eca](https://eca.dev)
Co-Authored-By: eca-agent <git@eca.dev>1 parent 309348f commit c046d20
2 files changed
+28
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
480 | 496 | | |
481 | 497 | | |
482 | 498 | | |
| |||
579 | 595 | | |
580 | 596 | | |
581 | 597 | | |
582 | | - | |
| 598 | + | |
583 | 599 | | |
584 | 600 | | |
585 | 601 | | |
| |||
1198 | 1214 | | |
1199 | 1215 | | |
1200 | 1216 | | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1208 | 1225 | | |
1209 | 1226 | | |
1210 | 1227 | | |
| |||
1244 | 1261 | | |
1245 | 1262 | | |
1246 | 1263 | | |
| 1264 | + | |
1247 | 1265 | | |
1248 | 1266 | | |
1249 | 1267 | | |
| |||
1319 | 1337 | | |
1320 | 1338 | | |
1321 | 1339 | | |
1322 | | - | |
| 1340 | + | |
0 commit comments