fix: remove duplicate meta_type and replace meta_name with meta_type
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -3,7 +3,7 @@ use std::io::Write;
|
||||
use std::process::{Command, Stdio, Child};
|
||||
use which::which;
|
||||
|
||||
use crate::meta_plugin::{MetaPlugin, MetaPluginResponse};
|
||||
use crate::meta_plugin::{MetaPlugin, MetaPluginResponse, MetaPluginType};
|
||||
|
||||
pub struct MetaPluginCommand {
|
||||
pub program: String,
|
||||
@@ -23,7 +23,6 @@ impl std::fmt::Debug for MetaPluginCommand {
|
||||
.field("program", &self.program)
|
||||
.field("args", &self.args)
|
||||
.field("supported", &self.supported)
|
||||
.field("meta_name", &self.meta_name)
|
||||
.field("split_whitespace", &self.split_whitespace)
|
||||
.field("process", &self.process)
|
||||
.field("writer", &"Box<dyn Write>")
|
||||
|
||||
@@ -95,6 +95,12 @@ impl BaseMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for BaseMetaPlugin {
|
||||
fn meta_type(&self) -> MetaPluginType {
|
||||
// This is a base implementation, so we need to return something
|
||||
// This might not be used, but we need to satisfy the trait
|
||||
MetaPluginType::Binary
|
||||
}
|
||||
|
||||
fn outputs(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.outputs
|
||||
}
|
||||
@@ -214,8 +220,6 @@ pub trait MetaPlugin where Self: 'static {
|
||||
is_finalized: true,
|
||||
}
|
||||
}
|
||||
|
||||
fn meta_type(&self) -> MetaPluginType;
|
||||
|
||||
// Get program information for display in status
|
||||
fn program_info(&self) -> Option<(&str, Vec<&str>)> {
|
||||
@@ -291,7 +295,7 @@ pub fn get_meta_plugin(
|
||||
// For command type, we need to parse the command from options
|
||||
let mut program_name = String::new();
|
||||
let mut args = Vec::new();
|
||||
let meta_name = MetaPluginType::Command.to_string();
|
||||
let mut meta_name = MetaPluginType::Command.to_string();
|
||||
let mut split_whitespace = true;
|
||||
|
||||
if let Some(opts) = &options {
|
||||
|
||||
Reference in New Issue
Block a user