diff --git a/suggest/cli.go b/suggest/cli.go index 0cec528..305ecbd 100644 --- a/suggest/cli.go +++ b/suggest/cli.go @@ -67,6 +67,11 @@ func (s *Suggest) action(c *cli.Context) error { } fmt.Printf(shell.SuccessMessage("┃ >")+" Thinking... (%s)\n", t2.Sub(t1).String()) + if len(s.extractCommandsFromResponse(responseText)) == 0 { + fmt.Println(shell.WarnMessage("┃ >") + " No command found for given prompt..." + "\n") + return nil + } + form := NewCommandForm(s.extractCommandsFromResponse(responseText)[0]) err = form.Run()