fix: Correct MetaPluginType conversion and remove unused imports

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-03 08:50:57 -03:00
parent 618c164d2d
commit 3a90c12dc2
2 changed files with 10 additions and 12 deletions

View File

@@ -1,11 +1,11 @@
use clap::*;
use is_terminal::IsTerminal;
use std::path::PathBuf;
use std::str::FromStr;
use log::debug;
use crate::modes::common::{get_format_box_chars_no_border_line_separator, OutputFormat};
use crate::modes::common::OutputFormat;
use crate::config;
use prettytable::color;
use serde_json;
use serde_yaml;
use prettytable::row;
@@ -40,9 +40,9 @@ 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 MetaPluginType::from_str(&plugin_config.name) {
Ok(plugin_type) => plugin_type,
Err(_) => continue,
let meta_plugin_type = match MetaPluginType::from(&plugin_config.name) {
Some(plugin_type) => plugin_type,
None => continue,
};
// First, create a default plugin to get its default options
@@ -177,9 +177,9 @@ 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 MetaPluginType::from_str(&info.meta_name) {
Ok(plugin_type) => plugin_type,
Err(_) => continue,
let meta_plugin_type = match MetaPluginType::from(&info.meta_name) {
Some(plugin_type) => plugin_type,
None => continue,
};
// Create a default plugin to get its default options