fix: respect GOOSE_CLI_MIN_PRIORITY for shell streaming output (#6558)
Signed-off-by: rabi <ramishra@redhat.com>
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user