fix: display shell output as static text instead of spinner (#6041)
Signed-off-by: Hugues Clouâtre <hugues@linux.com>
This commit is contained in:
@@ -1085,8 +1085,12 @@ impl CliSession {
|
|||||||
};
|
};
|
||||||
(formatted, subagent_id.map(str::to_string), notification_type.map(str::to_string))
|
(formatted, subagent_id.map(str::to_string), notification_type.map(str::to_string))
|
||||||
} else if let Some(Value::String(output)) = o.get("output") {
|
} else if let Some(Value::String(output)) = o.get("output") {
|
||||||
// Fallback for other MCP notification types
|
// Extract type if present (e.g., "shell_output")
|
||||||
(output.to_owned(), None, None)
|
let notification_type = o.get("type")
|
||||||
|
.and_then(|v| v.as_str())
|
||||||
|
.map(str::to_string);
|
||||||
|
|
||||||
|
(output.to_owned(), None, notification_type)
|
||||||
} else if let Some(result) = format_task_execution_notification(data) {
|
} else if let Some(result) = format_task_execution_notification(data) {
|
||||||
result
|
result
|
||||||
} else {
|
} else {
|
||||||
@@ -1121,6 +1125,14 @@ impl CliSession {
|
|||||||
print!("{}", formatted_message);
|
print!("{}", formatted_message);
|
||||||
std::io::stdout().flush().unwrap();
|
std::io::stdout().flush().unwrap();
|
||||||
}
|
}
|
||||||
|
} else if notification_type == "shell_output" {
|
||||||
|
// Hide spinner, print shell output, spinner will resume
|
||||||
|
if interactive {
|
||||||
|
let _ = progress_bars.hide();
|
||||||
|
}
|
||||||
|
if !is_json_mode {
|
||||||
|
println!("{}", formatted_message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if output::is_showing_thinking() {
|
else if output::is_showing_thinking() {
|
||||||
|
|||||||
Reference in New Issue
Block a user