Commit 053739d1 authored by Michael Yang's avatar Michael Yang
Browse files

no prompt on empty line

parent 3d73ad0c
......@@ -9,6 +9,7 @@ import (
"net"
"os"
"path"
"strings"
"time"
"github.com/schollz/progressbar/v3"
......@@ -79,6 +80,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,
......@@ -111,6 +113,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