@@ -503,6 +503,7 @@ its current mode.`, wallpaperFormatNames(), maxWallpaperMB, strings.Join(wallpap
503503 }
504504
505505 app := appctx .FromContext (cmd .Context ())
506+ scope := newFollowUpScope (app )
506507 projectID , err := wallpaperProjectID (cmd , app )
507508 if err != nil {
508509 return err
@@ -524,7 +525,7 @@ its current mode.`, wallpaperFormatNames(), maxWallpaperMB, strings.Join(wallpap
524525 if mode != "" {
525526 summary += " (" + mode + ")"
526527 }
527- return respondWithWallpaperProject (cmd , app , projectID , map [string ]any {"id" : projectID }, summary ,
528+ return respondWithWallpaperProject (cmd , app , projectID , scope , map [string ]any {"id" : projectID }, summary ,
528529 output.Breadcrumb {
529530 Action : "mode" ,
530531 Cmd : fmt .Sprintf ("basecamp projects wallpaper mode <fill|tile> --project %d" , projectID ),
@@ -567,6 +568,7 @@ A project with no wallpaper keeps the mode for the next one uploaded.`,
567568 }
568569
569570 app := appctx .FromContext (cmd .Context ())
571+ scope := newFollowUpScope (app )
570572 projectID , err := wallpaperProjectID (cmd , app )
571573 if err != nil {
572574 return err
@@ -583,7 +585,7 @@ A project with no wallpaper keeps the mode for the next one uploaded.`,
583585 return convertSDKError (err )
584586 }
585587
586- return respondWithWallpaperProject (cmd , app , projectID , project , "Wallpaper mode set to " + mode ,
588+ return respondWithWallpaperProject (cmd , app , projectID , scope , project , "Wallpaper mode set to " + mode ,
587589 output.Breadcrumb {
588590 Action : "set" ,
589591 Cmd : fmt .Sprintf ("basecamp projects wallpaper set <file> --project %d" , projectID ),
@@ -604,6 +606,7 @@ func newProjectsWallpaperRemoveCmd() *cobra.Command {
604606 Args : cobra .NoArgs ,
605607 RunE : func (cmd * cobra.Command , args []string ) error {
606608 app := appctx .FromContext (cmd .Context ())
609+ scope := newFollowUpScope (app )
607610 projectID , err := wallpaperProjectID (cmd , app )
608611 if err != nil {
609612 return err
@@ -613,7 +616,7 @@ func newProjectsWallpaperRemoveCmd() *cobra.Command {
613616 return convertSDKError (err )
614617 }
615618
616- return respondWithWallpaperProject (cmd , app , projectID , map [string ]any {"id" : projectID }, "Wallpaper removed" ,
619+ return respondWithWallpaperProject (cmd , app , projectID , scope , map [string ]any {"id" : projectID }, "Wallpaper removed" ,
617620 output.Breadcrumb {
618621 Action : "set" ,
619622 Cmd : fmt .Sprintf ("basecamp projects wallpaper set <file> --project %d" , projectID ),
@@ -683,15 +686,20 @@ func wallpaperProjectID(cmd *cobra.Command, app *appctx.App) (int64, error) {
683686// the output carries its wallpaper. The change has already happened, so a
684687// failed read falls back to what the caller has, with a diagnostic, rather
685688// than failing the command.
686- func respondWithWallpaperProject (cmd * cobra.Command , app * appctx.App , projectID int64 , fallback any , summary string , crumbs ... output.Breadcrumb ) error {
689+ func respondWithWallpaperProject (cmd * cobra.Command , app * appctx.App , projectID int64 , scope followUpScope , fallback any , summary string , crumbs ... output.Breadcrumb ) error {
690+ crumbs = append ([]output.Breadcrumb {{
691+ Action : "show" ,
692+ Cmd : fmt .Sprintf ("basecamp projects show %d" , projectID ),
693+ Description : "View the project" ,
694+ }}, crumbs ... )
695+ scopeArgs := scope .args (app .Config .AccountID )
696+ for i := range crumbs {
697+ crumbs [i ].Cmd += scopeArgs
698+ }
687699 opts := []output.ResponseOption {
688700 output .WithEntity ("project" ),
689701 output .WithSummary (summary ),
690- output .WithBreadcrumbs (append ([]output.Breadcrumb {{
691- Action : "show" ,
692- Cmd : fmt .Sprintf ("basecamp projects show %d" , projectID ),
693- Description : "View the project" ,
694- }}, crumbs ... )... ),
702+ output .WithBreadcrumbs (crumbs ... ),
695703 }
696704 data := fallback
697705 project , err := app .Account ().Projects ().Get (cmd .Context (), projectID )
0 commit comments