feat: simplify meta plugin outputs display to show key or key->value
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -188,10 +188,24 @@ fn build_config_table(settings: &config::Settings) -> Table {
|
||||
let outputs_str = if actual_plugin.outputs().is_empty() {
|
||||
"{}".to_string()
|
||||
} else {
|
||||
serde_yaml::to_string(actual_plugin.outputs())
|
||||
.unwrap_or_else(|_| "Unable to serialize outputs".to_string())
|
||||
.trim()
|
||||
.to_string()
|
||||
let mut output_pairs = Vec::new();
|
||||
for (key, value) in actual_plugin.outputs() {
|
||||
// Convert serde_yaml::Value to string for comparison
|
||||
let value_str = match value {
|
||||
serde_yaml::Value::String(s) => s.clone(),
|
||||
_ => value.to_string(),
|
||||
};
|
||||
if key == &value_str {
|
||||
output_pairs.push(key.clone());
|
||||
} else {
|
||||
output_pairs.push(format!("{}->{}", key, value_str));
|
||||
}
|
||||
}
|
||||
if output_pairs.is_empty() {
|
||||
"{}".to_string()
|
||||
} else {
|
||||
output_pairs.join(", ")
|
||||
}
|
||||
};
|
||||
config_table.add_row(Row::new(vec![
|
||||
Cell::new(" Outputs"),
|
||||
|
||||
Reference in New Issue
Block a user