robustness: vision/depth render off the event loop (deepcopy snapshot), chat auto-reconnect + friendly errors, demo catches connection failures
This commit is contained in:
+11
-2
@@ -152,7 +152,9 @@ async def run_llm_agent(
|
||||
log=lambda role, msg: print(f"[{role}] {msg}"),
|
||||
)
|
||||
try:
|
||||
return await run_llm_agent_loop(controller, max_steps, log=print_log, recorder=recorder)
|
||||
return await run_llm_agent_loop(
|
||||
controller, max_steps, log=print_log, recorder=recorder
|
||||
)
|
||||
except RuntimeError as exc:
|
||||
return {"steps": 0, "tool_calls": 0, "result": str(exc), "interacted": False}
|
||||
|
||||
@@ -398,7 +400,14 @@ def main() -> int:
|
||||
"into this directory, plus demo.gif animation and demo_summary.png",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
summary = asyncio.run(run_demo(args))
|
||||
try:
|
||||
summary = asyncio.run(run_demo(args))
|
||||
except KeyboardInterrupt:
|
||||
return 2
|
||||
except Exception as exc: # noqa: BLE001 - friendly failure instead of a traceback
|
||||
print(f"\n[demo] failed: {type(exc).__name__}: {exc}")
|
||||
print("[demo] is the bridge running? scripts/run_bridge.sh")
|
||||
return 1
|
||||
return 0 if summary.get("interacted") else 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user