Skip to content

Commit 3131792

Browse files
authored
UX improvement for how command (#2561)
1 parent bb08140 commit 3131792

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

general/ai/cli.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ func HowCmd(c *cli.Context) error {
4747
return cliutils.WrongNumberOfArgumentsHandler(c)
4848
}
4949
log.Output(coreutils.PrintTitle("This AI-based interface converts your natural language inputs into fully functional JFrog CLI commands.\n" +
50-
"NOTE: This is a beta version and it supports mostly Artifactory and Xray commands.\n"))
50+
"NOTE: This is an experimental version and it supports mostly Artifactory and Xray commands.\n"))
5151

5252
for {
5353
var question string
5454
scanner := bufio.NewScanner(os.Stdin)
55-
fmt.Print("🐸 Your request: ")
55+
fmt.Print("🐸 Your request:\n ")
5656
for {
5757
// Ask the user for a question
5858
scanner.Scan()
@@ -62,13 +62,15 @@ func HowCmd(c *cli.Context) error {
6262
break
6363
}
6464
}
65+
fmt.Print("\n🤖 Generated command:\n ")
6566
questionBody := QuestionBody{Question: question}
6667
llmAnswer, err := askQuestion(questionBody)
6768
if err != nil {
6869
return err
6970
}
71+
log.Output(coreutils.PrintLink(llmAnswer) + "\n")
7072

71-
log.Output("🤖 Generated command: " + coreutils.PrintLink(llmAnswer) + "\n")
73+
// Ask the user for feedback
7274
feedback := FeedbackBody{QuestionBody: questionBody, LlmAnswer: llmAnswer}
7375
feedback.getUserFeedback()
7476
if err = sendFeedback(feedback); err != nil {

0 commit comments

Comments
 (0)