refactor: remove initialize() call and use plugin outputs directly
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -161,31 +161,19 @@ impl MetaPlugin for DigestMetaPlugin {
|
||||
|
||||
let mut metadata = Vec::new();
|
||||
|
||||
// Compute the selected hash
|
||||
// Update outputs based on the selected hash method
|
||||
if let Some(hasher) = &mut self.hasher {
|
||||
let hash_value = hasher.finalize();
|
||||
let output_name = hasher.output_name();
|
||||
|
||||
// Add the selected hash output
|
||||
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
||||
output_name,
|
||||
serde_yaml::Value::String(hash_value),
|
||||
&self.outputs
|
||||
) {
|
||||
metadata.push(meta_data);
|
||||
}
|
||||
// Set the selected hash output
|
||||
self.outputs.insert(output_name.to_string(), serde_yaml::Value::String(hash_value));
|
||||
|
||||
// Set all other digest outputs to None
|
||||
let all_outputs = vec!["digest_md5", "digest_sha256", "digest_sha512"];
|
||||
for output_name in all_outputs {
|
||||
if output_name != hasher.output_name() {
|
||||
if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs(
|
||||
output_name,
|
||||
serde_yaml::Value::Null,
|
||||
&self.outputs
|
||||
) {
|
||||
metadata.push(meta_data);
|
||||
}
|
||||
self.outputs.insert(output_name.to_string(), serde_yaml::Value::Null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user