fix(cli): align console output field name with daemon response (#133)
The CLI expected a 'logs' field but the daemon returns 'messages'. This caused 'agent-browser console' to display nothing. Changed cli/src/output.rs to read 'messages' instead of 'logs', matching the actual response from handleConsole in src/actions.ts.
This commit is contained in:
+1
-1
@@ -91,7 +91,7 @@ pub fn print_response(resp: &Response, json_mode: bool) {
|
||||
return;
|
||||
}
|
||||
// Console logs
|
||||
if let Some(logs) = data.get("logs").and_then(|v| v.as_array()) {
|
||||
if let Some(logs) = data.get("messages").and_then(|v| v.as_array()) {
|
||||
for log in logs {
|
||||
let level = log.get("type").and_then(|v| v.as_str()).unwrap_or("log");
|
||||
let text = log.get("text").and_then(|v| v.as_str()).unwrap_or("");
|
||||
|
||||
Reference in New Issue
Block a user