Skip to content

Commit

Permalink
Remove redundant log
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Sep 26, 2024
1 parent 174045e commit b4593b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions general/ai/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ func HowCmd(c *cli.Context) error {
if err != nil {
return err
}
validResponse := strings.HasPrefix(llmAnswer, "jf")
// Print the generated command within a styled table frame.
coreutils.PrintMessageInsideFrame(coreutils.PrintBoldTitle(llmAnswer), " ")
if validResponse {
coreutils.PrintMessageInsideFrame(coreutils.PrintBoldTitle(llmAnswer), " ")
} else {
log.Output(" " + coreutils.PrintYellow(llmAnswer))
}

// If the response is a valid JFrog CLI command, ask the user for feedback.
if strings.HasPrefix(llmAnswer, "jf") {
if validResponse {
log.Output()
if err = sendFeedback(); err != nil {
return err
Expand Down

0 comments on commit b4593b1

Please sign in to comment.