Skip to content

Commit cdf91ea

Browse files
dale-lakesclaudeDouwe Osinga
authored
feat: allow GOOSE_CLI_SHOW_THINKING to be set in config.yaml (#8097)
Signed-off-by: Dale Lakes <6843636+spitfire55@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Douwe Osinga <douwe@squareup.com>
1 parent 11f46dc commit cdf91ea

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

crates/goose-cli/src/session/output.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use std::cell::RefCell;
1717
use std::collections::HashMap;
1818
use std::io::{Error, IsTerminal, Write};
1919
use std::path::Path;
20-
use std::sync::LazyLock;
2120
use std::time::Duration;
2221

2322
use super::streaming_buffer::MarkdownBuffer;
@@ -448,12 +447,11 @@ pub fn goose_mode_message(text: &str) {
448447
println!("\n{}", style(text).yellow(),);
449448
}
450449

451-
static SHOW_THINKING: LazyLock<bool> = LazyLock::new(|| {
452-
std::env::var("GOOSE_CLI_SHOW_THINKING").is_ok() && std::io::stdout().is_terminal()
453-
});
454-
455450
fn should_show_thinking() -> bool {
456-
*SHOW_THINKING
451+
Config::global()
452+
.get_param::<bool>("GOOSE_CLI_SHOW_THINKING")
453+
.unwrap_or(false)
454+
&& std::io::stdout().is_terminal()
457455
}
458456

459457
fn render_thinking(text: &str, theme: Theme) {

0 commit comments

Comments
 (0)