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
+9 -1
View File
@@ -1595,7 +1595,7 @@ fn format_logging_notification(
let min_priority = config let min_priority = config
.get_param::<f32>("GOOSE_CLI_MIN_PRIORITY") .get_param::<f32>("GOOSE_CLI_MIN_PRIORITY")
.ok() .ok()
.unwrap_or(0.5); .unwrap_or(output::DEFAULT_MIN_PRIORITY);
if min_priority > 0.1 && !debug { if min_priority > 0.1 && !debug {
if let Some(response_content) = msg.strip_prefix("Responded: ") { if let Some(response_content) = msg.strip_prefix("Responded: ") {
@@ -1655,6 +1655,13 @@ fn display_log_notification(
std::io::stdout().flush().unwrap(); std::io::stdout().flush().unwrap();
} }
} else if ntype == "shell_output" { } else if ntype == "shell_output" {
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 { if interactive {
let _ = progress_bars.hide(); let _ = progress_bars.hide();
} }
@@ -1662,6 +1669,7 @@ fn display_log_notification(
println!("{}", formatted_message); println!("{}", formatted_message);
} }
} }
}
} else if output::is_showing_thinking() { } else if output::is_showing_thinking() {
output::set_thinking_message(&formatted_message.to_string()); output::set_thinking_message(&formatted_message.to_string());
} else { } else {
+3 -1
View File
@@ -17,6 +17,8 @@ use std::path::Path;
use std::sync::Arc; use std::sync::Arc;
use std::time::Duration; use std::time::Duration;
pub const DEFAULT_MIN_PRIORITY: f32 = 0.0;
// Re-export theme for use in main // Re-export theme for use in main
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub enum Theme { pub enum Theme {
@@ -308,7 +310,7 @@ fn render_tool_response(resp: &ToolResponse, theme: Theme, debug: bool) {
let min_priority = config let min_priority = config
.get_param::<f32>("GOOSE_CLI_MIN_PRIORITY") .get_param::<f32>("GOOSE_CLI_MIN_PRIORITY")
.ok() .ok()
.unwrap_or(0.5); .unwrap_or(DEFAULT_MIN_PRIORITY);
if content if content
.priority() .priority()