fix: respect GOOSE_CLI_MIN_PRIORITY for shell streaming output (#6558)

Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
Rabi Mishra
2026-01-28 22:35:57 +05:30
committed by GitHub
parent 2673e8acca
commit c2f5889ae5
2 changed files with 17 additions and 7 deletions
+14 -6
View File
@@ -1595,7 +1595,7 @@ fn format_logging_notification(
let min_priority = config
.get_param::<f32>("GOOSE_CLI_MIN_PRIORITY")
.ok()
.unwrap_or(0.5);
.unwrap_or(output::DEFAULT_MIN_PRIORITY);
if min_priority > 0.1 && !debug {
if let Some(response_content) = msg.strip_prefix("Responded: ") {
@@ -1655,11 +1655,19 @@ fn display_log_notification(
std::io::stdout().flush().unwrap();
}
} else if ntype == "shell_output" {
if interactive {
let _ = progress_bars.hide();
}
if !is_json_mode {
println!("{}", formatted_message);
let config = Config::global();
let min_priority = config
.get_param::<f32>("GOOSE_CLI_MIN_PRIORITY")
.ok()
.unwrap_or(output::DEFAULT_MIN_PRIORITY);
if min_priority < 0.1 {
if interactive {
let _ = progress_bars.hide();
}
if !is_json_mode {
println!("{}", formatted_message);
}
}
}
} else if output::is_showing_thinking() {
+3 -1
View File
@@ -17,6 +17,8 @@ use std::path::Path;
use std::sync::Arc;
use std::time::Duration;
pub const DEFAULT_MIN_PRIORITY: f32 = 0.0;
// Re-export theme for use in main
#[derive(Clone, Copy)]
pub enum Theme {
@@ -308,7 +310,7 @@ fn render_tool_response(resp: &ToolResponse, theme: Theme, debug: bool) {
let min_priority = config
.get_param::<f32>("GOOSE_CLI_MIN_PRIORITY")
.ok()
.unwrap_or(0.5);
.unwrap_or(DEFAULT_MIN_PRIORITY);
if content
.priority()