refactor: standardize plugin implementation using base meta plugin
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -45,16 +45,17 @@ impl BinaryMetaPlugin {
|
||||
.and_then(|v| v.as_u64())
|
||||
.unwrap_or(PIPESIZE as u64) as usize;
|
||||
|
||||
let mut base = crate::meta_plugin::BaseMetaPlugin::new();
|
||||
base.outputs = final_outputs;
|
||||
base.options = final_options;
|
||||
|
||||
BinaryMetaPlugin {
|
||||
meta_name: "binary".to_string(),
|
||||
buffer: Vec::new(),
|
||||
max_buffer_size,
|
||||
is_saved: false,
|
||||
item_id: None,
|
||||
base: crate::meta_plugin::BaseMetaPlugin {
|
||||
outputs: final_outputs,
|
||||
options: final_options,
|
||||
},
|
||||
base,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,10 +146,6 @@ impl MetaPlugin for BinaryMetaPlugin {
|
||||
self.base.options_mut()
|
||||
}
|
||||
|
||||
fn options_mut(&mut self) -> &mut std::collections::HashMap<String, serde_yaml::Value> {
|
||||
&mut self.base.options
|
||||
}
|
||||
|
||||
fn configure_options(&mut self, options: &std::collections::HashMap<String, serde_yaml::Value>) -> Result<()> {
|
||||
if let Some(max_buffer_size) = options.get("max_buffer_size") {
|
||||
if let Some(size) = max_buffer_size.as_u64() {
|
||||
|
||||
Reference in New Issue
Block a user