Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
4e612a2e
Unverified
Commit
4e612a2e
authored
Nov 14, 2023
by
Jeffrey Morgan
Committed by
GitHub
Nov 14, 2023
Browse files
use stdout fd for terminal size (#1125)
parent
6e0f686a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
cmd/cmd.go
cmd/cmd.go
+1
-1
No files found.
cmd/cmd.go
View file @
4e612a2e
...
...
@@ -398,7 +398,7 @@ func generate(cmd *cobra.Command, model, prompt string, wordWrap bool, format st
generateContext
=
[]
int
{}
}
termWidth
,
_
,
err
:=
term
.
GetSize
(
int
(
0
))
termWidth
,
_
,
err
:=
term
.
GetSize
(
int
(
os
.
Stdout
.
Fd
()
))
if
err
!=
nil
{
wordWrap
=
false
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment