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:
@@ -169,22 +169,9 @@ pub fn settings_meta_plugin_types(cmd: &mut Command, settings: &config::Settings
|
||||
meta_plugin_types
|
||||
}
|
||||
|
||||
pub fn settings_digest_type(cmd: &mut Command, settings: &config::Settings) -> MetaPluginType {
|
||||
let digest_name = settings
|
||||
.digest
|
||||
.clone()
|
||||
.unwrap_or(MetaPluginType::DigestSha256.to_string());
|
||||
|
||||
let digest_type_opt = MetaPluginType::from_str(&digest_name);
|
||||
if digest_type_opt.is_err() {
|
||||
cmd.error(
|
||||
ErrorKind::InvalidValue,
|
||||
format!("Invalid digest algorithm '{}'. Use 'sha256' or 'md5'", digest_name),
|
||||
)
|
||||
.exit();
|
||||
}
|
||||
|
||||
digest_type_opt.unwrap()
|
||||
pub fn settings_digest_type(_cmd: &mut Command, _settings: &config::Settings) -> MetaPluginType {
|
||||
// The digest plugin is now unified, always return Digest
|
||||
MetaPluginType::Digest
|
||||
}
|
||||
|
||||
pub fn settings_compression_type(cmd: &mut Command, settings: &config::Settings) -> CompressionType {
|
||||
|
||||
Reference in New Issue
Block a user