-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat: allow GOOSE_CLI_SHOW_THINKING to be set in config.yaml #8097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,6 @@ use std::cell::RefCell; | |
| use std::collections::HashMap; | ||
| use std::io::{Error, IsTerminal, Write}; | ||
| use std::path::Path; | ||
| use std::sync::LazyLock; | ||
| use std::time::Duration; | ||
|
|
||
| use super::streaming_buffer::MarkdownBuffer; | ||
|
|
@@ -446,12 +445,11 @@ pub fn goose_mode_message(text: &str) { | |
| println!("\n{}", style(text).yellow(),); | ||
| } | ||
|
|
||
| static SHOW_THINKING: LazyLock<bool> = LazyLock::new(|| { | ||
| std::env::var("GOOSE_CLI_SHOW_THINKING").is_ok() && std::io::stdout().is_terminal() | ||
| }); | ||
|
|
||
| fn should_show_thinking() -> bool { | ||
| *SHOW_THINKING | ||
| Config::global() | ||
| .get_param::<bool>("GOOSE_CLI_SHOW_THINKING") | ||
| .unwrap_or(false) | ||
|
Comment on lines
+449
to
+451
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||
| && std::io::stdout().is_terminal() | ||
| } | ||
|
|
||
| fn render_thinking(text: &str, theme: Theme) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching to
get_param::<bool>("GOOSE_CLI_SHOW_THINKING")changes the environment-variable contract from “set means enabled” to “must parse as boolean”. In this path, values likeGOOSE_CLI_SHOW_THINKING=1deserialize as a number and then fail bool deserialization, sounwrap_or(false)silently disables thinking output for existing users who followed current docs/examples. This is a behavior regression introduced by this change.Useful? React with 👍 / 👎.