Skip to content

"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/

Python

refactor(browser): DRY _extract_lane_id (Resolves #327) (#380)

Rāna(Bass Ver.)c6d1858a7951
diff --git a/browser/agent-harness/cli_anything/browser/utils/domshell_backend.py b/browser/agent-harness/cli_anything/browser/utils/domshell_backend.py
index 674f63809..0b8c2a17f 100644
--- a/browser/agent-harness/cli_anything/browser/utils/domshell_backend.py
+++ b/browser/agent-harness/cli_anything/browser/utils/domshell_backend.py
@@ -196,13 +196,7 @@ def _extract_lane_id(result: Any) -> Optional[str]:
empty, or the marker reports the default "shared" lane (which is
DOMShell's no-isolation sentinel and not something we want to pin to).
"""
- text = ""
- content = getattr(result, "content", None)
- if content:
- for c in content:
- piece = getattr(c, "text", None)
- if piece:
- text += piece
+ text = _extract_text(result)
if not text:
return None
m = _LANE_LINE.search(text.strip())