Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

fix(cli): preserve component status profile output (#2215)

Qin Haojie3c876407a203
diff --git a/crates/ov_cli/src/output.rs b/crates/ov_cli/src/output.rs
index 6348af1fd..b8776d964 100644
--- a/crates/ov_cli/src/output.rs
+++ b/crates/ov_cli/src/output.rs
@@ -101,11 +101,6 @@ fn print_table<T: Serialize>(result: T, compact: bool) {
return;
}
- if let Some(rendered) = value_to_table_with_profile(&value, compact) {
- println!("{}", rendered);
- return;
- }
-
// Rule 5: ComponentStatus (name + is_healthy + status)
if obj.contains_key("name")
&& obj.contains_key("is_healthy")
@@ -118,7 +113,10 @@ fn print_table<T: Serialize>(result: T, compact: bool) {
};
let name = obj["name"].as_str().unwrap_or("");
let status = obj["status"].as_str().unwrap_or("");
- println!("[{}] ({})\n{}", name, health, status);
+ println!(
+ "{}",
+ append_profile_section(format!("[{}] ({})\n{}", name, health, status), obj)
+ );
return;
}
@@ -154,6 +152,11 @@ fn print_table<T: Serialize>(result: T, compact: bool) {
return;
}
+ if let Some(rendered) = value_to_table_with_profile(&value, compact) {
+ println!("{}", rendered);
+ return;
+ }
+
// Extract list fields
let mut dict_lists: Vec<(String, &Vec<serde_json::Value>)> = Vec::new();
let mut prim_lists: Vec<(String, &Vec<serde_json::Value>)> = Vec::new();