feat(controller): Add current_provider property to AppController

This commit is contained in:
2026-03-04 16:47:02 -05:00
parent bc93c20ee4
commit 2d041eef86

View File

@@ -659,7 +659,18 @@ class AppController:
dialog._condition.notify_all()
return True
return False
@property
def current_provider(self) -> str:
return self._current_provider
@current_provider.setter
def current_provider(self, value: str) -> None:
if value != self._current_provider:
self._current_provider = value
ai_client.reset_session()
ai_client.set_provider(value, self.current_model)
self._token_stats = {}
self._token_stats_dirty = True
@property
def current_model(self) -> str: