支持鸿蒙OSNEXT_HDC
This commit is contained in:
@@ -7,8 +7,8 @@ from typing import Any, Callable
|
||||
|
||||
from phone_agent.actions import ActionHandler
|
||||
from phone_agent.actions.handler import do, finish, parse_action
|
||||
from phone_agent.adb import get_current_app, get_screenshot
|
||||
from phone_agent.config import get_messages, get_system_prompt
|
||||
from phone_agent.device_factory import get_device_factory
|
||||
from phone_agent.model import ModelClient, ModelConfig
|
||||
from phone_agent.model.client import MessageBuilder
|
||||
|
||||
@@ -140,8 +140,9 @@ class PhoneAgent:
|
||||
self._step_count += 1
|
||||
|
||||
# Capture current screen state
|
||||
screenshot = get_screenshot(self.agent_config.device_id)
|
||||
current_app = get_current_app(self.agent_config.device_id)
|
||||
device_factory = get_device_factory()
|
||||
screenshot = device_factory.get_screenshot(self.agent_config.device_id)
|
||||
current_app = device_factory.get_current_app(self.agent_config.device_id)
|
||||
|
||||
# Build messages
|
||||
if is_first:
|
||||
|
||||
Reference in New Issue
Block a user