fix: implement debug for MetaPluginCommand
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -5,7 +5,6 @@ use which::which;
|
||||
|
||||
use crate::meta_plugin::{MetaPlugin, MetaPluginResponse, MetaPluginType};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MetaPluginCommand {
|
||||
pub program: String,
|
||||
pub args: Vec<String>,
|
||||
@@ -18,6 +17,23 @@ pub struct MetaPluginCommand {
|
||||
options: std::collections::HashMap<String, serde_yaml::Value>,
|
||||
}
|
||||
|
||||
// Manual Debug implementation because Box<dyn Write> doesn't implement Debug
|
||||
impl std::fmt::Debug for MetaPluginCommand {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("MetaPluginCommand")
|
||||
.field("program", &self.program)
|
||||
.field("args", &self.args)
|
||||
.field("supported", &self.supported)
|
||||
.field("split_whitespace", &self.split_whitespace)
|
||||
.field("process", &self.process)
|
||||
.field("writer", &self.writer.as_ref().map(|_| "Box<dyn Write>"))
|
||||
.field("result", &self.result)
|
||||
.field("outputs", &self.outputs)
|
||||
.field("options", &self.options)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl MetaPluginCommand {
|
||||
pub fn new(
|
||||
|
||||
Reference in New Issue
Block a user