From e688d3b29fdc136c80502bcb3f82f118c521ffa3 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Fri, 26 Dec 2025 11:24:13 +1100 Subject: [PATCH] Simplify read_image imgcat output formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove │ prefix before image preview, use single space instead - Keep info line on its own line with │ prefix - Keep blank line spacing between images --- crates/g3-core/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/g3-core/src/lib.rs b/crates/g3-core/src/lib.rs index 1f3e95b..015a1d5 100644 --- a/crates/g3-core/src/lib.rs +++ b/crates/g3-core/src/lib.rs @@ -6760,12 +6760,9 @@ impl Agent { fn print_imgcat(bytes: &[u8], name: &str, dimensions: &str, media_type: &str, size: &str, max_height: u32) { use base64::Engine; let encoded = base64::engine::general_purpose::STANDARD.encode(bytes); - // Print 3 lines of │ prefix before image for visual alignment - println!("│"); - println!("│"); - // iTerm2 inline image protocol - print!("│ \x1b]1337;File=inline=1;height={};name={}:{}\x07", max_height, name, encoded); - // Print dimmed info line (no checkmark) + // iTerm2 inline image protocol (single space prefix) + print!(" \x1b]1337;File=inline=1;height={};name={}:{}\x07\n", max_height, name, encoded); + // Print dimmed info line on its own line println!("│ \x1b[2m{} | {} | {} | {}\x1b[0m", name, dimensions, media_type, size); // Blank line before next image println!("│");