fix: Use FromStr trait for MetaPluginType parsing
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use clap::*;
|
||||
use is_terminal::IsTerminal;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
use log::debug;
|
||||
|
||||
use crate::modes::common::OutputFormat;
|
||||
@@ -39,7 +40,7 @@ fn build_meta_plugins_configured_table(settings: &config::Settings) -> Option<Ta
|
||||
|
||||
for plugin_config in sorted_meta_plugins {
|
||||
// Create the plugin to get its default options
|
||||
let meta_plugin_type = match plugin_config.name.parse() {
|
||||
let meta_plugin_type = match MetaPluginType::from_str(&plugin_config.name) {
|
||||
Ok(plugin_type) => plugin_type,
|
||||
Err(_) => continue,
|
||||
};
|
||||
@@ -176,7 +177,7 @@ fn build_meta_plugin_table(meta_plugin_info: &std::collections::HashMap<String,
|
||||
|
||||
for info in sorted_meta_plugin_info {
|
||||
// Get default options for the meta plugin
|
||||
let meta_plugin_type = match info.meta_name.parse() {
|
||||
let meta_plugin_type = match MetaPluginType::from_str(&info.meta_name) {
|
||||
Ok(plugin_type) => plugin_type,
|
||||
Err(_) => continue,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user