fix(rag): reset rag_config to default RAGConfig() (not None) in _handle_reset_session
This commit is contained in:
@@ -3393,8 +3393,14 @@ class AppController:
|
||||
# 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.
|
||||
# NOTE: rag_config is reset to a fresh default (not None) so the rag_*
|
||||
# setters can still mutate it. Setting it to None was a bug — setters
|
||||
# check `if self.rag_config:` and become no-ops, leaving the engine
|
||||
# unsynced forever (test_rag_phase4_final_verify regression on
|
||||
# 2026-06-10).
|
||||
self.rag_engine = None
|
||||
self.rag_config = None
|
||||
from src import models as _rag_models
|
||||
self.rag_config = _rag_models.RAGConfig()
|
||||
self.rag_status = 'idle'
|
||||
self._rag_sync_token = 0
|
||||
self._rag_sync_dirty = False
|
||||
|
||||
Reference in New Issue
Block a user