Complete inbox CLI implementation

This commit is contained in:
2026-03-19 03:15:17 +08:00
parent 11bee52ff4
commit c3314cd9cf
15 changed files with 1524 additions and 43 deletions
+3
View File
@@ -15,6 +15,7 @@ type fetchOptions struct {
agent string
statuses string
limit int
unread bool
}
func newFetchCmd(root *rootOptions) *cobra.Command {
@@ -42,6 +43,7 @@ func newFetchCmd(root *rootOptions) *cobra.Command {
Agent: agent,
Statuses: parseCSV(opts.statuses),
Limit: opts.limit,
Unread: opts.unread,
})
if err != nil {
return err
@@ -71,6 +73,7 @@ func newFetchCmd(root *rootOptions) *cobra.Command {
cmd.Flags().StringVar(&opts.agent, "agent", "", "Assigned agent filter")
cmd.Flags().StringVar(&opts.statuses, "status", "pending", "Comma-separated status filter")
cmd.Flags().IntVar(&opts.limit, "limit", 20, "Maximum number of threads")
cmd.Flags().BoolVar(&opts.unread, "unread", false, "Only return threads whose latest message is unread by the agent")
return cmd
}