Private
Public Access
0
0

fix(reset): clear mma_tier_usage and RAG state in _handle_reset_session

This commit is contained in:
2026-06-09 19:44:10 -04:00
parent 9128db5e48
commit fe240db410
3 changed files with 92 additions and 2 deletions
+10
View File
@@ -3378,6 +3378,16 @@ class AppController:
self.active_tickets = []
self.engines.clear()
self.mma_streams.clear()
# Reset mma_tier_usage to pre-populated default (prior tests pollute it)
self.mma_tier_usage = {'Tier 1': {}, 'Tier 2': {}, 'Tier 3': {}, 'Tier 4': {}}
# Reset RAG engine state so the chroma collection from a prior test
# doesn't leak into the next session. The next _sync_rag_engine will
# rebuild the engine with the new active_project_root.
self.rag_engine = None
self.rag_config = None
self.rag_status = 'idle'
self._rag_sync_token = 0
self._rag_sync_dirty = False
self._worker_status.clear()
self._current_provider = "gemini"
self._current_model = "gemini-2.5-flash-lite"