diff --git a/cmd/g/s.go b/cmd/g/s.go index 9f8aa503ea10a5560f2c0d4ed664d981d4800241..c5bd6e81ea0c68fb14d0a5c347c209bee12d1a76 100644 --- a/cmd/g/s.go +++ b/cmd/g/s.go @@ -106,8 +106,10 @@ func runSetGoal(cmd *cobra.Command, _ []string) error { _, _ = fmt.Fprintln(out, "Study the goal and its description carefully.") _, _ = fmt.Fprintln(out, "Review referenced tickets and files to gather context before planning changes.") _, _ = fmt.Fprintln(out, "Add tasks once you understand the approach:") + _, _ = fmt.Fprintln(out, " Prefer batch: `np t a -t \"first\" -d \"details\" -t \"second\" -d \"more details\"`") _, _ = fmt.Fprintln(out, " Single task: `np t a -t \"task title\" -d \"details\"`") - _, _ = fmt.Fprintln(out, " Multiple tasks: `np t a -t \"first\" -d \"details\" -t \"second\" -d \"more details\"`") + _, _ = fmt.Fprintln(out, "") + _, _ = fmt.Fprintln(out, "If adding tasks one at a time, run `np t` after the batch to see the resulting list.") return nil } diff --git a/cmd/t/a.go b/cmd/t/a.go index 7d784cfc5efd9b6b2beb52b5d1f283e266af59d9..690f7e996d02b2ba0511aef23c23d8c9b0922112 100644 --- a/cmd/t/a.go +++ b/cmd/t/a.go @@ -148,18 +148,26 @@ func runAddTasks(cmd *cobra.Command, _ []string) error { return err } + if addedCount == 0 { + return nil + } + + if addedCount == 1 { + _, _ = fmt.Fprintln(cmd.OutOrStdout(), "Added") + return nil + } + + // Multiple tasks added, show full plan if _, err := shared.PrintPlan(cmd, env, sessionDoc.SID); err != nil { return err } - if addedCount > 0 { - out := cmd.OutOrStdout() - _, _ = fmt.Fprintln(out, "") - _, _ = fmt.Fprintf(out, "Added %d task(s).\n", addedCount) - _, _ = fmt.Fprintln(out, "Update task statuses as you work:") - _, _ = fmt.Fprintln(out, " Single: `np t u -i task-id -s in_progress|completed|failed|cancelled`") - _, _ = fmt.Fprintln(out, " Batch: `np t u -i abc123 -s completed -i def456 -s in_progress`") - } + out := cmd.OutOrStdout() + _, _ = fmt.Fprintln(out, "") + _, _ = fmt.Fprintf(out, "Added %d task(s).\n", addedCount) + _, _ = fmt.Fprintln(out, "Update task statuses as you work:") + _, _ = fmt.Fprintln(out, " Single: `np t u -i task-id -s in_progress|completed|failed|cancelled`") + _, _ = fmt.Fprintln(out, " Batch: `np t u -i abc123 -s completed -i def456 -s in_progress`") return nil }