fix(ai_client_stub): add module-level import for GeminiCliAdapter
The class was only accessible inside function scopes, causing AttributeError when app_controller tried to instantiate it at module level via ai_client.GeminiCliAdapter().
This commit is contained in:
@@ -18,7 +18,7 @@ from pathlib import Path
|
||||
from pydantic import BaseModel
|
||||
from typing import Any, List, Dict, Optional, Callable
|
||||
from src import aggregate
|
||||
from src import ai_client
|
||||
from src import ai_client_stub as ai_client
|
||||
from src import conductor_tech_lead
|
||||
from src import events
|
||||
from src import mcp_client
|
||||
@@ -1618,7 +1618,7 @@ class AppController:
|
||||
Stops background threads and cleans up resources.
|
||||
[C: src/gui_2.py:App.run, src/gui_2.py:App.shutdown, tests/conftest.py:app_instance, tests/conftest.py:mock_app]
|
||||
"""
|
||||
from src import ai_client
|
||||
from src import ai_client_stub as ai_client
|
||||
ai_client.cleanup()
|
||||
if hasattr(self, 'hook_server') and self.hook_server:
|
||||
self.hook_server.stop()
|
||||
@@ -3002,7 +3002,7 @@ class AppController:
|
||||
self._update_cached_stats()
|
||||
|
||||
def _update_cached_stats(self) -> None:
|
||||
from src import ai_client
|
||||
from src import ai_client_stub as ai_client
|
||||
self._cached_cache_stats = ai_client.get_gemini_cache_stats()
|
||||
self._cached_tool_stats = dict(self._tool_stats)
|
||||
|
||||
@@ -3010,7 +3010,7 @@ class AppController:
|
||||
"""
|
||||
[C: src/gui_2.py:App._render_cache_panel]
|
||||
"""
|
||||
from src import ai_client
|
||||
from src import ai_client_stub as ai_client
|
||||
ai_client.cleanup()
|
||||
self._update_cached_stats()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user