refactor: remove binary plugin and its references

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-28 13:10:52 -03:00
parent f6220eb16e
commit 40e4fcc74a

View File

@@ -41,7 +41,7 @@ impl TextMetaPlugin {
// Initialize with helper function // Initialize with helper function
base.initialize_plugin( base.initialize_plugin(
&["text", "binary", "text_word_count", "text_line_count", &["text", "text_word_count", "text_line_count",
"text_line_max_len", "text_line_mean_len", "text_line_median_len"], "text_line_max_len", "text_line_mean_len", "text_line_median_len"],
options, options,
outputs, outputs,
@@ -224,9 +224,8 @@ impl TextMetaPlugin {
let is_binary_result = is_binary(buffer); let is_binary_result = is_binary(buffer);
self.is_binary_content = Some(is_binary_result); self.is_binary_content = Some(is_binary_result);
// Output text and binary status // Output text status
let text_value = if is_binary_result { "false".to_string() } else { "true".to_string() }; let text_value = if is_binary_result { "false".to_string() } else { "true".to_string() };
let binary_value = if is_binary_result { "true".to_string() } else { "false".to_string() };
// Use process_metadata_outputs to handle output mapping // Use process_metadata_outputs to handle output mapping
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs( if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
@@ -237,14 +236,6 @@ impl TextMetaPlugin {
metadata.push(meta_data); metadata.push(meta_data);
} }
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
"binary",
serde_yaml::Value::String(binary_value),
self.base.outputs()
) {
metadata.push(meta_data);
}
// If content is binary, set all text-related outputs to None // If content is binary, set all text-related outputs to None
if is_binary_result { if is_binary_result {
let text_outputs = vec![ let text_outputs = vec![
@@ -597,7 +588,6 @@ impl MetaPlugin for TextMetaPlugin {
fn default_outputs(&self) -> Vec<String> { fn default_outputs(&self) -> Vec<String> {
vec![ vec![
"text".to_string(), "text".to_string(),
"binary".to_string(),
"text_word_count".to_string(), "text_word_count".to_string(),
"text_line_count".to_string(), "text_line_count".to_string(),
"text_line_max_len".to_string(), "text_line_max_len".to_string(),