From 3f31352427784ad0b5bb3f2c1d213cae18ddf431 Mon Sep 17 00:00:00 2001 From: g0xu Date: Fri, 12 Jul 2024 16:56:14 +0900 Subject: [PATCH] Update/subcommands (#4) * Implementation of ask command * Corrected error handling of Issue information retrieval * Updated description of argument /command/ --------- Co-authored-by: PacificBelt30 <57101176+pacificbelt30@users.noreply.github.com> --- cmd/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 8b8f647..1c6c1f3 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -17,7 +17,11 @@ func main() { owner = flag.String("owner", "", "Repository owner") issueNumber = flag.Int("issue", 0, "Issue number") intent = flag.String("intent", "", "Question or intent for the 'ask' command") - command = flag.String("command", "", "Command to be executed by AI") + command = flag.String("command", "", `Command to be executed by AI + describe: Generate a detailed description of the Issue. + analyze: Perform a root cause analysis based on the contents of the Issue. + suggest: Provide suggestions for improvement based on the contents of the Issue. + ask: Answer free-text questions.`) configFile = flag.String("config", "./internal/config/config.yaml", "Configuration file") gh_token = flag.String("github-token", "", "GitHub token") oai_key = flag.String("api-key", "", "OpenAI api key") @@ -83,7 +87,7 @@ func main() { if *command == "ask" { if *intent == "" { log.SetOutput(os.Stdout) - logger.Println("Error: intent is required for 'ask' command") + logger.Println("Error: intent is required for 'ask' command") flag.PrintDefaults() os.Exit(1) }