refactor: remove redundant meta_name field and simplify default outputs
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -48,7 +48,6 @@ pub struct MetaPluginResponse {
|
||||
pub struct BaseMetaPlugin {
|
||||
pub outputs: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
pub options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
pub meta_name: String,
|
||||
pub is_finalized: bool,
|
||||
}
|
||||
|
||||
@@ -96,10 +95,6 @@ impl BaseMetaPlugin {
|
||||
}
|
||||
|
||||
impl MetaPlugin for BaseMetaPlugin {
|
||||
fn meta_name(&self) -> String {
|
||||
self.meta_name.clone()
|
||||
}
|
||||
|
||||
fn outputs(&self) -> &std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&self.outputs
|
||||
}
|
||||
@@ -187,11 +182,6 @@ pub fn process_metadata_outputs(internal_name: &str, value: serde_yaml::Value, o
|
||||
pub trait MetaPlugin where Self: 'static {
|
||||
fn meta_type(&self) -> MetaPluginType;
|
||||
|
||||
// For backward compatibility, provide meta_name() that uses meta_type()
|
||||
fn meta_name(&self) -> String {
|
||||
self.meta_type().to_string()
|
||||
}
|
||||
|
||||
fn is_supported(&self) -> bool {
|
||||
true
|
||||
}
|
||||
@@ -267,8 +257,8 @@ pub trait MetaPlugin where Self: 'static {
|
||||
|
||||
// Get the default output names this plugin can produce
|
||||
fn default_outputs(&self) -> Vec<String> {
|
||||
// Default implementation returns empty - plugins should override this
|
||||
Vec::new()
|
||||
// Default implementation returns the meta type as a string
|
||||
vec![self.meta_type().to_string()]
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user