fix: Correctly parse MetaPluginType from string and remove unused import
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 clap::*;
|
||||||
use is_terminal::IsTerminal;
|
use is_terminal::IsTerminal;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
use std::str::FromStr;
|
||||||
use log::debug;
|
use log::debug;
|
||||||
|
|
||||||
use crate::modes::common::{get_format_box_chars_no_border_line_separator, OutputFormat};
|
use crate::modes::common::{get_format_box_chars_no_border_line_separator, OutputFormat};
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use clap::*;
|
use clap::*;
|
||||||
use is_terminal::IsTerminal;
|
use is_terminal::IsTerminal;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
|
||||||
use log::debug;
|
use log::debug;
|
||||||
|
|
||||||
use crate::modes::common::OutputFormat;
|
use crate::modes::common::OutputFormat;
|
||||||
@@ -40,9 +39,9 @@ fn build_meta_plugins_configured_table(settings: &config::Settings) -> Option<Ta
|
|||||||
|
|
||||||
for plugin_config in sorted_meta_plugins {
|
for plugin_config in sorted_meta_plugins {
|
||||||
// Create the plugin to get its default options
|
// Create the plugin to get its default options
|
||||||
let meta_plugin_type = match MetaPluginType::from(&plugin_config.name) {
|
let meta_plugin_type = match plugin_config.name.parse() {
|
||||||
Some(plugin_type) => plugin_type,
|
Ok(plugin_type) => plugin_type,
|
||||||
None => continue,
|
Err(_) => continue,
|
||||||
};
|
};
|
||||||
|
|
||||||
// First, create a default plugin to get its default options
|
// First, create a default plugin to get its default options
|
||||||
@@ -177,9 +176,9 @@ fn build_meta_plugin_table(meta_plugin_info: &std::collections::HashMap<String,
|
|||||||
|
|
||||||
for info in sorted_meta_plugin_info {
|
for info in sorted_meta_plugin_info {
|
||||||
// Get default options for the meta plugin
|
// Get default options for the meta plugin
|
||||||
let meta_plugin_type = match MetaPluginType::from(&info.meta_name) {
|
let meta_plugin_type = match info.meta_name.parse() {
|
||||||
Some(plugin_type) => plugin_type,
|
Ok(plugin_type) => plugin_type,
|
||||||
None => continue,
|
Err(_) => continue,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a default plugin to get its default options
|
// Create a default plugin to get its default options
|
||||||
|
|||||||
Reference in New Issue
Block a user