feat: wire AgentLoop to DisplayAdapter and async permissions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ from app.services.llm import LLMClient
|
||||
from app.services.permissions import PermissionsService
|
||||
from app.services.streaming import StreamHandler
|
||||
from app.tools.registry import ToolRegistry, create_default_registry
|
||||
from app.utils.display import DisplayAdapter
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -76,6 +77,11 @@ def permissions(config: AppConfig) -> PermissionsService:
|
||||
return PermissionsService(config.permissions)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def display() -> MagicMock:
|
||||
return MagicMock(spec=DisplayAdapter)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def agent(
|
||||
config: AppConfig,
|
||||
@@ -84,8 +90,9 @@ def agent(
|
||||
handler: MagicMock,
|
||||
registry: ToolRegistry,
|
||||
permissions: PermissionsService,
|
||||
display: MagicMock,
|
||||
) -> AgentLoop:
|
||||
return AgentLoop(config, ctx, client, handler, registry, permissions)
|
||||
return AgentLoop(config, ctx, client, handler, registry, permissions, display)
|
||||
|
||||
|
||||
def _make_text_message(content: str) -> Message:
|
||||
|
||||
Reference in New Issue
Block a user