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() {
|
let outputs_str = if actual_plugin.outputs().is_empty() {
|
||||||
"{}".to_string()
|
"{}".to_string()
|
||||||
} else {
|
} else {
|
||||||
serde_yaml::to_string(actual_plugin.outputs())
|
let mut output_pairs = Vec::new();
|
||||||
.unwrap_or_else(|_| "Unable to serialize outputs".to_string())
|
for (key, value) in actual_plugin.outputs() {
|
||||||
.trim()
|
// Convert serde_yaml::Value to string for comparison
|
||||||
.to_string()
|
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![
|
config_table.add_row(Row::new(vec![
|
||||||
Cell::new(" Outputs"),
|
Cell::new(" Outputs"),
|
||||||
|
|||||||
Reference in New Issue
Block a user