From f2d340e77862e7cb08d154b62c276a3bc2c4c22d Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 11 Sep 2025 10:58:19 -0300 Subject: [PATCH] refactor: Use `is_internal` instead of comparing against empty string for compression engine Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) --- src/common/status.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/common/status.rs b/src/common/status.rs index 2bc08bb..f6e0a60 100644 --- a/src/common/status.rs +++ b/src/common/status.rs @@ -74,8 +74,18 @@ pub fn generate_status_info( for compression_type in sorted_compression_types { let (binary, compress, decompress, supported) = match get_compression_engine(compression_type.clone()) { - Ok(engine) if engine.is_supported() => engine.get_status_info(), - _ => ("".to_string(), "".to_string(), "".to_string(), false), + Ok(engine) => { + let supp = engine.is_supported(); + if supp && engine.is_internal() { + ("".to_string(), "".to_string(), "".to_string(), supp) + } else if supp { + let (b, c, d) = engine.get_status_info(); + (b, c, d, supp) + } else { + ("".to_string(), "".to_string(), "".to_string(), supp) + } + } + Err(_) => ("".to_string(), "".to_string(), "".to_string(), false), }; let is_enabled = enabled_compression_type.as_ref().map_or(false, |ct| *ct == compression_type);