fix: correct task scheduling and simplify agent internals
Fix queue cancellation, concurrency limits and worker status updates. Use direct Explorer imports, split the Diagnoser loop into helpers and remove unused tool registration and prompt-builder code. Correct model caching, endpoint selection and retry handling.
This commit is contained in:
1 parent
67248c887e
commit
12d7902a82
92 files changed
+1085
-1763
No files matched your search
@@ -436,7 +436,15 @@ class DevicePool:
|
||||
selects the first ready device so the task will queue on it.
|
||||
Returns None if no devices are attached.
|
||||
"""
|
||||
all_devs = self.list_devices()
|
||||
return self._pick_device(self.list_devices(), preferred_serial)
|
||||
|
||||
async def select_device_async(self, preferred_serial: str | None = None) -> str | None:
|
||||
"""Select a device without blocking the caller on ADB enumeration."""
|
||||
return self._pick_device(await self.list_devices_async(), preferred_serial)
|
||||
|
||||
def _pick_device(
|
||||
self, all_devs: list[DeviceStatus], preferred_serial: str | None
|
||||
) -> str | None:
|
||||
ready_devs = [d for d in all_devs if d.state == "device"]
|
||||
|
||||
if preferred_serial:
|
||||
|
||||
Reference in new issue
Block a user