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:
Stefano Zini
2026-11-02 17:23:40 +01:00
co-authored by Claude Opus 5.5
parent edb8ee3731
commit cbe111bc34
9 changed files with 309 additions and 29 deletions
+4
View File
@@ -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}