Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

Be quiet when redirecting output (#7360)

Daniel Hiltgend88972ea48cf
diff --git a/cmd/cmd.go b/cmd/cmd.go
index 91819c8e0..97e821c76 100644
--- a/cmd/cmd.go
+++ b/cmd/cmd.go
@@ -456,6 +456,10 @@ func RunHandler(cmd *cobra.Command, args []string) error {
if len(prompts) > 0 {
interactive = false
}
+ // Be quiet if we're redirecting to a pipe or file
+ if !term.IsTerminal(int(os.Stdout.Fd())) {
+ interactive = false
+ }
nowrap, err := cmd.Flags().GetBool("nowordwrap")
if err != nil {