From 45d0d3c5f431688aa9dfbd6a4214256d6fe64122 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 18 Nov 2026 12:34:33 +0100 Subject: 0.9.2: doc accuracy and UX fixes from the review - missing key exits 1, consistent with --doctor - HTML error bodies get a one-line message - no unapprovable diff printed on a non-terminal - weak GLIBC_2.39 fix covers x86_64 gnu as well as i686 - README/PLAN/CHANGELOG brought in line with the actual binary --- src/main.rs | 3 ++- src/provider.rs | 4 ++++ src/ui.rs | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 0e5d49a..b17359b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,6 +29,7 @@ OPTIONS: -m, --model model id (default: deepseek-v4.1-flash) --base-url provider base URL --session resume a session, creating it if the id is new + (alias: --resume) -c, --continue resume the most recent session --list list sessions and exit --show [ID] print a transcript (most recent if no ID) and exit @@ -220,7 +221,7 @@ fn run(args: Args) { Ok(cfg) => cfg, Err(message) => { eprintln!("agent686: {message}"); - std::process::exit(2); + std::process::exit(1); } }; diff --git a/src/provider.rs b/src/provider.rs index 0973e8c..b08d1f2 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -484,6 +484,10 @@ fn accumulate_tool_call( } fn error_message(body: &str) -> String { + let trimmed = body.trim_start(); + if trimmed.starts_with('<') { + return "the provider returned an HTML error page rather than JSON".to_string(); + } if let Ok(v) = serde_json::from_str::(body) { if let Some(err) = v.get("error") { if let Some(message) = err.get("message").and_then(|m| m.as_str()) { diff --git a/src/ui.rs b/src/ui.rs index fe0264b..1d59ac4 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -269,6 +269,10 @@ impl Approver { if self.yolo || self.edits_allowed { return true; } + // No point showing a diff that no one is present to approve. + if !self.interactive { + return false; + } println!("{preview}"); // The path is already on the tool line above. let _ = path; -- cgit v1.2.3