| 17 | |
| 18 | type draftsCommand struct { |
| 19 | cmd *cobra.Command |
| 20 | limit int |
| 21 | all bool |
| 22 | page string |
| 23 | } |
| 24 | |
| 25 | func newDraftCommand() *cobra.Command { |
| 26 | draft := &cobra.Command{ |
| 27 | Use: "draft", |
| 28 | Short: "Manage unsent drafts", |
| 29 | Annotations: map[string]string{ |
| 30 | "agent_notes": "Subcommands: list, show, edit, send, delete. Draft IDs come from `hey draft list` or from `hey compose --draft`/`hey reply --draft`. list's --page continues from the next_page cursor of an earlier listing.", |
| 31 | }, |
| 32 | } |
| 33 | draft.AddCommand(newDraftsCommand().cmd) |
| 34 | draft.AddCommand(newDraftShowCommand().cmd) |
| 35 | draft.AddCommand(newDraftEditCommand().cmd) |
| 36 | draft.AddCommand(newDraftSendCommand().cmd) |
| 37 | draft.AddCommand(newDraftDeleteCommand().cmd) |
| 38 | return draft |
| 39 | } |
| 40 | |