Unverified Commit 0fea50cd authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

Merge pull request #54 from jmorganca/empty-line

no prompt on empty line
parents c3168935 053739d1
......@@ -9,6 +9,7 @@ import (
"net"
"os"
"path"
"strings"
"time"
"github.com/schollz/progressbar/v3"
......@@ -75,6 +76,7 @@ func RunGenerate(_ *cobra.Command, args []string) error {
}
func generate(model, prompt string) error {
if len(strings.TrimSpace(prompt)) > 0 {
client := api.NewClient()
spinner := progressbar.NewOptions(-1,
......@@ -107,6 +109,8 @@ func generate(model, prompt string) error {
fmt.Println()
fmt.Println()
}
return nil
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment