deploy
This commit is contained in:
9
agent.py
9
agent.py
@@ -129,7 +129,7 @@ class BrowserToApiAgent(A2AAgent[BrowserToApiConfig, NoAuth]):
|
||||
"SeleniumBase-style browser agent that turns observed website traffic "
|
||||
"into OpenAPI specs, coverage reports, samples, and a replay client."
|
||||
)
|
||||
version = "0.2.6"
|
||||
version = "0.2.7"
|
||||
|
||||
config_model = BrowserToApiConfig
|
||||
auth_model = NoAuth
|
||||
@@ -1641,6 +1641,13 @@ def _try_json_object(text: str) -> dict[str, Any] | None:
|
||||
return parsed if isinstance(parsed, dict) else None
|
||||
|
||||
|
||||
def _truncate_text(value: Any, limit: int = 240) -> str:
|
||||
text = str(value or "").replace("\n", " ").strip()
|
||||
if len(text) <= limit:
|
||||
return text
|
||||
return f"{text[: max(0, limit - 3)]}..."
|
||||
|
||||
|
||||
def _json_loads(line: str) -> Any:
|
||||
try:
|
||||
return json.loads(line)
|
||||
|
||||
Reference in New Issue
Block a user