Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing JFrog CLI AI commands assistant #2703

Merged
merged 21 commits into from
Sep 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove redundant log
Signed-off-by: Michael Sverdlov <[email protected]>
sverdlov93 committed Sep 22, 2024
commit d0a1173c4fa09be0352bb1e26ec4206822f4c47d
6 changes: 3 additions & 3 deletions general/ai/cli.go
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ type ApiCommand string
const (
cliAiAppApiUrl = "https://cli-ai-app-stg.jfrog.info/api/"
askRateLimitHeader = "X-JFrog-CLI-AI"
// The latest version of the terms and conditions for using the AI interface. (TODO: add the link to terms here)
// The latest version of the terms and conditions for using the AI interface. (https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-ai/terms)
aiTermsRevision = 1
)

@@ -44,7 +44,7 @@ func HowCmd(c *cli.Context) error {
return cliutils.WrongNumberOfArgumentsHandler(c)
}
log.Output(coreutils.PrintLink("This AI-based interface converts natural language inputs into AI-generated JFrog CLI commands.\n" +
"For more information about this interface, see [link to CLI AI Documentation].\n" +
"For more information about this interface, see https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-ai\n" +
"NOTE: This is an experimental version and it supports mostly Artifactory and Xray commands.\n"))

// Ask the user to agree to the terms and conditions. If the user does not agree, the command will not proceed.
@@ -193,7 +193,7 @@ func handleAiTermsAgreement() (bool, error) {
}
if latestTermsVer == nil || *latestTermsVer < aiTermsRevision {
if !coreutils.AskYesNo("By using this interface, you agree to the terms of JFrog's AI Addendum on behalf of your organization as an active JFrog customer.\n"+
"Review these terms at "+coreutils.PrintLink("https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/ai.")+
"Review these terms at "+coreutils.PrintLink("https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-ai/terms")+
"\nDo you agree?", false) {
return false, nil
}