File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -71,12 +71,20 @@ func HowCmd(c *cli.Context) error {
71
71
if err != nil {
72
72
return err
73
73
}
74
+ validResponse := strings .HasPrefix (llmAnswer , "jf" )
74
75
// Print the generated command within a styled table frame.
75
- coreutils .PrintMessageInsideFrame (coreutils .PrintBoldTitle (llmAnswer ), " " )
76
+ if validResponse {
77
+ coreutils .PrintMessageInsideFrame (coreutils .PrintBoldTitle (llmAnswer ), " " )
78
+ } else {
79
+ log .Output (" " + coreutils .PrintYellow (llmAnswer ))
80
+ }
76
81
77
- log .Output ()
78
- if err = sendFeedback (); err != nil {
79
- return err
82
+ // If the response is a valid JFrog CLI command, ask the user for feedback.
83
+ if validResponse {
84
+ log .Output ()
85
+ if err = sendFeedback (); err != nil {
86
+ return err
87
+ }
80
88
}
81
89
82
90
log .Output ("\n " + coreutils .PrintComment ("-------------------" ) + "\n " )
You can’t perform that action at this time.
0 commit comments