feat(controller): Add current_provider property to AppController
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user