Adjust help messages

This commit is contained in:
Matt Low 2024-01-03 17:22:43 +00:00
parent 242ed886ec
commit db788760a3

View File

@ -184,8 +184,8 @@ var rootCmd = &cobra.Command{
var lsCmd = &cobra.Command{ var lsCmd = &cobra.Command{
Use: "ls", Use: "ls",
Short: "List existing conversations", Short: "List conversations",
Long: `List all existing conversations in descending order of recent activity.`, Long: `List conversations in order of recent activity`,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
conversations, err := store.Conversations() conversations, err := store.Conversations()
if err != nil { if err != nil {
@ -330,7 +330,7 @@ var rmCmd = &cobra.Command{
var cloneCmd = &cobra.Command{ var cloneCmd = &cobra.Command{
Use: "clone <conversation>", Use: "clone <conversation>",
Short: "Clone conversations.", Short: "Clone conversations",
Long: `Clones the provided conversation.`, Long: `Clones the provided conversation.`,
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
argCount := 1 argCount := 1
@ -376,7 +376,6 @@ var cloneCmd = &cobra.Command{
} }
fmt.Printf("Cloned %d messages to: %s\n", messageCnt, clone.Title) fmt.Printf("Cloned %d messages to: %s\n", messageCnt, clone.Title)
return nil return nil
}, },
ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
@ -466,7 +465,7 @@ var renameCmd = &cobra.Command{
var replyCmd = &cobra.Command{ var replyCmd = &cobra.Command{
Use: "reply <conversation> [message]", Use: "reply <conversation> [message]",
Short: "Send a reply to a conversation", Short: "Reply to a conversation",
Long: `Sends a reply to conversation and writes the response to stdout.`, Long: `Sends a reply to conversation and writes the response to stdout.`,
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
argCount := 1 argCount := 1
@ -574,7 +573,7 @@ var promptCmd = &cobra.Command{
var retryCmd = &cobra.Command{ var retryCmd = &cobra.Command{
Use: "retry <conversation>", Use: "retry <conversation>",
Short: "Retries the last conversation prompt.", Short: "Retry the last user reply in a conversation",
Long: `Re-prompt the conversation up to the last user response. Can be used to regenerate the last assistant reply, or simply generate one if an error occurred.`, Long: `Re-prompt the conversation up to the last user response. Can be used to regenerate the last assistant reply, or simply generate one if an error occurred.`,
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
argCount := 1 argCount := 1
@ -618,7 +617,7 @@ var retryCmd = &cobra.Command{
var continueCmd = &cobra.Command{ var continueCmd = &cobra.Command{
Use: "continue <conversation>", Use: "continue <conversation>",
Short: "Continues where the previous prompt left off.", Short: "Continue a conversation from the last message",
Long: `Re-prompt the conversation with all existing prompts. Useful if a reply was cut short.`, Long: `Re-prompt the conversation with all existing prompts. Useful if a reply was cut short.`,
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
argCount := 1 argCount := 1
@ -643,7 +642,7 @@ var continueCmd = &cobra.Command{
var editCmd = &cobra.Command{ var editCmd = &cobra.Command{
Use: "edit <conversation>", Use: "edit <conversation>",
Short: "Edit the last user message in a conversation.", Short: "Edit the last user reply in a conversation",
Args: func(cmd *cobra.Command, args []string) error { Args: func(cmd *cobra.Command, args []string) error {
argCount := 1 argCount := 1
if err := cobra.MinimumNArgs(argCount)(cmd, args); err != nil { if err := cobra.MinimumNArgs(argCount)(cmd, args); err != nil {