Fix compile warnings and tweak error message format

Warnings fixed:
- Remove unused 'warn' import from retry.rs
- Prefix unused 'output' param with underscore
- Prefix unused 'rel_start' with underscore
- Add #[allow(dead_code)] to G3Status::info()

Message format tweaked per feedback:
- 'g3: model overloaded [error]' (no attempt info)
- 'g3: retrying in 2.2s (1/3) ... [done]' (attempt info moved here)
- Handle empty error message in Status::Error to show just '[error]'
This commit is contained in:
Dhanji R. Prasanna
2026-01-20 22:49:55 +05:30
parent 60578e310c
commit 38b0019ad4
4 changed files with 16 additions and 11 deletions

View File

@@ -164,6 +164,7 @@ impl G3Status {
/// Print an info message in dimmed/grey text.
/// Format: "... <message>"
#[allow(dead_code)]
pub fn info(message: &str) {
println!(
"{}... {}{}",
@@ -202,9 +203,13 @@ impl G3Status {
ResetColor
),
Status::Error(msg) => format!(
"{}[error: {}]{}",
"{}{}{}",
SetForegroundColor(Color::Red),
msg,
if msg.is_empty() {
"[error]".to_string()
} else {
format!("[error: {}]", msg)
},
ResetColor
),
Status::Resolved => format!(