refactor(gui): redesign ai settings layout and fix model fetching sync

This commit is contained in:
2026-03-11 00:18:45 -04:00
parent 747b810fe1
commit 3870bf086c
2 changed files with 42 additions and 27 deletions

View File

@@ -883,6 +883,8 @@ class AppController:
self.persona_manager = PersonaManager(Path(self.active_project_path).parent if self.active_project_path else None)
self.personas = self.persona_manager.load_all()
self._fetch_models(self.current_provider)
self.ui_active_tool_preset = os.environ.get('SLOP_TOOL_PRESET') or ai_cfg.get("active_tool_preset")
self.ui_active_bias_profile = ai_cfg.get("active_bias_profile")
ai_client.set_tool_preset(self.ui_active_tool_preset)
@@ -1496,6 +1498,9 @@ class AppController:
self._current_provider = value
ai_client.reset_session()
ai_client.set_provider(value, self.current_model)
self.available_models = self.all_available_models.get(value, [])
if not self.available_models:
self._fetch_models(value)
self._token_stats = {}
self._token_stats_dirty = True