From 1bae19abd4f1eeee50ca28542417dd3fbd718cf9 Mon Sep 17 00:00:00 2001 From: Dhanji Prasanna Date: Fri, 10 Oct 2025 15:04:22 +1100 Subject: [PATCH] Revert "fix for tool args and missing msgs" This reverts commit 1e9ff972d98efa74a51b3f2974f6b1ea9985c27e. --- crates/g3-cli/src/ui_writer_impl.rs | 10 +++------- crates/g3-core/src/lib.rs | 7 ++----- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/crates/g3-cli/src/ui_writer_impl.rs b/crates/g3-cli/src/ui_writer_impl.rs index 16ba00f..70a9e01 100644 --- a/crates/g3-cli/src/ui_writer_impl.rs +++ b/crates/g3-cli/src/ui_writer_impl.rs @@ -71,19 +71,15 @@ impl UiWriter for ConsoleUiWriter { .find(|(k, _)| k == "command" || k == "file_path" || k == "path" || k == "diff") .or_else(|| args.first()); - if let Some((key, value)) = important_arg { + if let Some((_, value)) = important_arg { // Truncate long values for display let display_value = if value.len() > 80 { format!("{}...", &value[..77]) } else { value.clone() }; - // Print with bold green formatting using ANSI escape codes - // Always show the key name to make it clear what the argument is - println!("┌─\x1b[1;32m {} | {}: {}\x1b[0m", - tool_name, - key, - display_value); + // Print with bold green formatting using ANSI escape codes + println!("┌─\x1b[1;32m {} | {}\x1b[0m", tool_name, display_value); } else { // Print with bold green formatting using ANSI escape codes println!("┌─\x1b[1;32m {}\x1b[0m", tool_name); diff --git a/crates/g3-core/src/lib.rs b/crates/g3-core/src/lib.rs index f5dbe8f..555f983 100644 --- a/crates/g3-core/src/lib.rs +++ b/crates/g3-core/src/lib.rs @@ -1401,11 +1401,8 @@ The tool will execute immediately and you'll receive the result (success or erro self.ui_writer.flush(); } - // Execute the tool with formatted output - // Only add newline if we printed some text content - if !new_content.trim().is_empty() { - self.ui_writer.println(""); // New line before tool execution - } + // Execute the tool with formatted output + self.ui_writer.println(""); // New line before tool execution // Skip printing tool call details for final_output if tool_call.tool != "final_output" {