Commit 16032e4
authored
fix(autocompact): resolve NameError and naming bug (#792)
- Add missing Log runtime import in autocompact_hook (fixes NameError at line 472)
- Update backup name regex to handle any alphanumeric suffix (not just 4 hex chars)
- Fixes Issue #75 auto-compact bugs
The naming bug occurred when conversation names had non-hex suffixes
(e.g., -before-compact-test), causing the regex to fail matching and
resulting in duplicate suffixes like 'conv-before-compact-test-before-compact-a7b9'.
Updated regex now uses \w+ to match any alphanumeric suffix, handling:
- Manual renames (e.g., -before-compact-test)
- Different suffix formats beyond 4 hex characters
- Multiple repeated compact operations correctly
All 14 autocompact tests passing.1 parent 7c67616 commit 16032e4
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
312 | 317 | | |
313 | 318 | | |
314 | 319 | | |
| |||
344 | 349 | | |
345 | 350 | | |
346 | 351 | | |
| 352 | + | |
347 | 353 | | |
348 | 354 | | |
349 | 355 | | |
| |||
0 commit comments