From 3150acd5743118025928fb66162c3c3f5b1aa7d7 Mon Sep 17 00:00:00 2001 From: xuyongliang <478439790@qq.com> Date: Tue, 24 Mar 2026 23:28:06 +0800 Subject: [PATCH] fix: console command returns only Done due to JSON field name mismatch (#986) The get_console_json() method produced JSON with key 'entries' containing objects with 'level' field, but the output formatter in output.rs expected key 'messages' with 'type' field. This mismatch caused console output to fall through all format checks and print only '[Done]'. Changed get_console_json() to use 'messages' and 'type' to match the output formatter expectations. Co-authored-by: xuyongliang --- cli/src/native/network.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/src/native/network.rs b/cli/src/native/network.rs index 48226e2..6827f63 100644 --- a/cli/src/native/network.rs +++ b/cli/src/native/network.rs @@ -321,12 +321,12 @@ impl EventTracker { } pub fn get_console_json(&self) -> Value { - let entries: Vec = self + let messages: Vec = self .console_entries .iter() - .map(|e| json!({ "level": e.level, "text": e.text })) + .map(|e| json!({ "type": e.level, "text": e.text })) .collect(); - json!({ "entries": entries }) + json!({ "messages": messages }) } pub fn get_errors_json(&self) -> Value {