refactor: unify digest plugin type handling
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -141,18 +141,9 @@ pub fn mode_status(
|
||||
let mut meta_plugin_types: Vec<MetaPluginType> = crate::modes::common::settings_meta_plugin_types(_cmd, settings);
|
||||
log::debug!("STATUS: Got {} meta plugin types", meta_plugin_types.len());
|
||||
|
||||
// Add digest type if specified
|
||||
let digest_type = crate::modes::common::settings_digest_type(_cmd, settings);
|
||||
let digest_meta_plugin_type = match digest_type {
|
||||
crate::meta_plugin::MetaPluginType::DigestSha256 => Some(MetaPluginType::DigestSha256),
|
||||
crate::meta_plugin::MetaPluginType::DigestMd5 => Some(MetaPluginType::DigestMd5),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
if let Some(digest_plugin_type) = digest_meta_plugin_type {
|
||||
if !meta_plugin_types.contains(&digest_plugin_type) {
|
||||
meta_plugin_types.push(digest_plugin_type);
|
||||
}
|
||||
// Always add the Digest plugin if not present
|
||||
if !meta_plugin_types.contains(&MetaPluginType::Digest) {
|
||||
meta_plugin_types.push(MetaPluginType::Digest);
|
||||
}
|
||||
|
||||
// Determine which compression type would be enabled for a save operation
|
||||
|
||||
Reference in New Issue
Block a user