Fix active modes not necessarily being set in activate_project_from_path_or_name during init

Ref #1107
This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-03-01 01:04:09 +01:00
1 parent be618a4653
commit 5333ea809f
1 file changed
+2 -3
+2 -3
View File
@@ -343,11 +343,10 @@ class SerenaAgent:
self._mode_overrides = modes
if project is not None:
try:
self.activate_project_from_path_or_name(project, update_active_modes=True, update_active_tools=False)
self.activate_project_from_path_or_name(project, update_active_modes=False, update_active_tools=False)
except Exception as e:
log.error(f"Error activating project '{project}' at startup: {e}", exc_info=e)
else:
self._update_active_modes()
self._update_active_modes()
# determine the base toolset defining the set of exposed tools (which e.g. the MCP shall see),
self._base_toolset = self._create_base_toolset(