Merge AI caches and add cache key helper

This commit is contained in:
Jordan Wages 2025-06-28 15:46:30 -05:00
commit d69d0cae66
5 changed files with 95 additions and 100 deletions

View file

@ -59,3 +59,10 @@ base64 data should be replaced with placeholders showing the byte size. The
final string should have the headers, a brief attachment section, then the plain
text extracted from all text parts.
### Cache Strategy
`aiCache` persists classification results. Each key is the SHA256 hex of
`"<message id>|<criterion>"` and maps to an object with `matched` and `reason`
properties. Any legacy `aiReasonCache` data is merged into `aiCache` the first
time the add-on loads after an update.