Improve tool output formatting
1. str_replace: Show insertion/deletion counts with colors "✅ +N insertions | -M deletions" (green/red) 2. write_file: Compact format with human-readable sizes "✅ wrote N lines | Xk chars" 3. read_file: Cleaner format "🔍 N lines read" instead of "📄 File content (N lines)" 4. webdriver_quit: Show correct driver name (safaridriver vs chromedriver) 5. read_file: When start position exceeds file length, read last 100 chars with explanation instead of failing 6. shell: Remove redundant "Command failed:" prefix from error messages
This commit is contained in:
@@ -61,7 +61,7 @@ pub async fn execute_shell<W: UiWriter>(tool_call: &ToolCall, ctx: &ToolContext<
|
||||
result.stdout.trim().to_string()
|
||||
})
|
||||
} else {
|
||||
Ok(format!("❌ Command failed: {}", result.stderr.trim()))
|
||||
Ok(format!("❌ {}", result.stderr.trim()))
|
||||
}
|
||||
}
|
||||
Err(e) => Ok(format!("❌ Execution error: {}", e)),
|
||||
|
||||
Reference in New Issue
Block a user