GUI: upload, live progress + ETA, delete; report thinking; docs twg fix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
edb8ee3731
commit
cbe111bc34
@@ -17,6 +17,10 @@ def _twg(*args, timeout=120):
|
||||
if "-o" in args and "json" in args:
|
||||
try: return json.loads(r.stdout) # rovo exits 3 on partial results but still prints JSON
|
||||
except ValueError: out = None
|
||||
# twg >= 1.3 spools large results to a file and prints a YAML envelope: output_files: stdout: "<path>"
|
||||
if (m := re.search(r'^\s*stdout:\s*"(.+?\.json)"', r.stdout, re.M)):
|
||||
try: return json.loads(open(m[1].replace("\\\\", "\\"), encoding="utf-8").read())
|
||||
except (OSError, ValueError): pass
|
||||
else: out = r.stdout if r.returncode == 0 else None
|
||||
if out is not None or attempt or not re.search(r"(?i)ECONN|ETIMEDOUT|network|certificate|proxy", r.stderr): return out
|
||||
env = {**env, "HTTPS_PROXY": PROXY, "HTTP_PROXY": PROXY}
|
||||
|
||||
Reference in New Issue
Block a user