fix: Fix memory system persistence and consolidate language prefs

- Replace separate bot-crypto/bot-memories volumes with single bot-data:/data
  volume so user_keys.json and language_prefs.json persist across restarts
- Remove redundant language_prefs.json infrastructure (constant, load/save,
  dict) — language preference now read from memories (last match wins)
- Add robust JSON extraction in _extract_memories (regex fallback for
  markdown fences, embedded arrays, non-array responses)
- Add info-level logging throughout memory extraction pipeline
- Add asyncio.wait_for timeout (15s) on memory extraction to prevent hangs
- Add !ai memory <fact> command for explicit, reliable memory storage
- Update _get_preferred_language to return last match (most recent wins)
- Update !ai forget to clear in-memory caches (pending translate/reply)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-02-19 09:49:05 +02:00
parent 2fd5806654
commit b5c33f4701
2 changed files with 50 additions and 46 deletions

View File

@@ -18,9 +18,7 @@ services:
- WILDFILES_BASE_URL
- WILDFILES_ORG
volumes:
- bot-crypto:/data/crypto_store
- bot-memories:/data/memories
- bot-data:/data
volumes:
bot-crypto:
bot-memories:
bot-data: