fix(mcp): properly initialize preset_managers before refresh

_load_active_project() now creates preset_manager and tool_preset_manager
before calling _refresh_from_project(), which needs them
This commit is contained in:
2026-05-10 23:38:52 -04:00
parent 8d8c6ab0ac
commit a1343eebe6
+3
View File
@@ -1544,6 +1544,9 @@ class AppController:
self.active_project_path = fallback_path self.active_project_path = fallback_path
if fallback_path not in self.project_paths: if fallback_path not in self.project_paths:
self.project_paths.append(fallback_path) self.project_paths.append(fallback_path)
self.preset_manager = presets.PresetManager(Path(self.active_project_path).parent if self.active_project_path else None)
self.tool_preset_manager = tool_presets.ToolPresetManager(Path(self.active_project_path).parent if self.active_project_path else None)
self._refresh_from_project()
self._configure_mcp_for_project() self._configure_mcp_for_project()
def _prune_old_logs(self) -> None: def _prune_old_logs(self) -> None: