mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-07 19:55:22 +00:00
use stdout fd for terminal size (#1125)
This commit is contained in:
parent
6e0f686afa
commit
4e612a2e92
@ -398,7 +398,7 @@ func generate(cmd *cobra.Command, model, prompt string, wordWrap bool, format st
|
|||||||
generateContext = []int{}
|
generateContext = []int{}
|
||||||
}
|
}
|
||||||
|
|
||||||
termWidth, _, err := term.GetSize(int(0))
|
termWidth, _, err := term.GetSize(int(os.Stdout.Fd()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
wordWrap = false
|
wordWrap = false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user