refactor(agent): prompt_builder/plugin_llm/process_bootstrap pass-2 — inline _normalize_ref, fold snapshot read, proxy-env scan

This commit is contained in:
Teknium
2026-09-02 22:32:12 -07:00
parent a5858a9e98
commit 123d962dc7
3 changed files with 14 additions and 35 deletions
+2 -5
View File
@@ -269,11 +269,8 @@ class _SafeWriter:
def _get_proxy_from_env() -> Optional[str]:
"""First configured proxy URL from HTTPS_PROXY / HTTP_PROXY / ALL_PROXY (any case), or None."""
for key in ("HTTPS_PROXY", "HTTP_PROXY", "ALL_PROXY", "https_proxy", "http_proxy", "all_proxy"):
value = os.environ.get(key, "").strip()
if value:
return normalize_proxy_url(value)
return None
keys = ("HTTPS_PROXY", "HTTP_PROXY", "ALL_PROXY", "https_proxy", "http_proxy", "all_proxy")
return next((normalize_proxy_url(v) for k in keys if (v := os.environ.get(k, "").strip())), None)
def _get_proxy_for_base_url(base_url: Optional[str]) -> Optional[str]: