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
+8 -1
View File
@@ -16,6 +16,7 @@ type updateOptions struct {
status string
summary string
body string
bodyFile string
payloadJSON string
}
@@ -36,6 +37,11 @@ func newUpdateCmd(root *rootOptions) *cobra.Command {
return fmt.Errorf("agent is required")
}
body, err := resolveBodyValue(opts.body, opts.bodyFile)
if err != nil {
return err
}
sqlDB, err := db.Open(ctx, root.dbPath)
if err != nil {
return err
@@ -48,7 +54,7 @@ func newUpdateCmd(root *rootOptions) *cobra.Command {
Agent: agent,
Status: opts.status,
Summary: opts.summary,
Body: opts.body,
Body: body,
PayloadJSON: opts.payloadJSON,
})
if err != nil {
@@ -78,6 +84,7 @@ func newUpdateCmd(root *rootOptions) *cobra.Command {
cmd.Flags().StringVar(&opts.status, "status", "", "New status: in_progress or blocked")
cmd.Flags().StringVar(&opts.summary, "summary", "", "Short update summary")
cmd.Flags().StringVar(&opts.body, "body", "", "Update body")
cmd.Flags().StringVar(&opts.bodyFile, "body-file", "", "Read update body from file")
cmd.Flags().StringVar(&opts.payloadJSON, "payload-json", "", "Structured payload JSON string")
_ = cmd.MarkFlagRequired("thread")