File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,9 +20,6 @@ func NewCatalogCmd() *cobra.Command {
2020 cmd := & cobra.Command {
2121 Use : "catalog" ,
2222 Short : "Manage the agent catalog" ,
23- RunE : func (cmd * cobra.Command , args []string ) error {
24- return cmd .Help ()
25- },
2623 }
2724
2825 cmd .AddCommand (newCatalogListCmd ())
@@ -31,7 +28,7 @@ func NewCatalogCmd() *cobra.Command {
3128}
3229
3330func newCatalogListCmd () * cobra.Command {
34- cmd := & cobra.Command {
31+ return & cobra.Command {
3532 Use : "list [org]" ,
3633 Short : "List catalog entries" ,
3734 Args : cobra .MaximumNArgs (1 ),
@@ -49,8 +46,6 @@ func newCatalogListCmd() *cobra.Command {
4946 return listCatalog (cmd .Context (), org )
5047 },
5148 }
52-
53- return cmd
5449}
5550
5651type hubRepoList struct {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import (
1515)
1616
1717func NewPullCmd () * cobra.Command {
18- cmd := & cobra.Command {
18+ return & cobra.Command {
1919 Use : "pull <registry-ref>" ,
2020 Short : "Pull an artifact from Docker Hub" ,
2121 Long : `Pull an artifact from Docker Hub` ,
@@ -25,8 +25,6 @@ func NewPullCmd() *cobra.Command {
2525 return runPullCommand (args [0 ])
2626 },
2727 }
28-
29- return cmd
3028}
3129
3230func runPullCommand (registryRef string ) error {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import (
1414)
1515
1616func NewPushCmd () * cobra.Command {
17- cmd := & cobra.Command {
17+ return & cobra.Command {
1818 Use : "push <agent file> <reference>" ,
1919 Short : "Push an agent to an OCI registry" ,
2020 Long : `Push an agent to an OCI registry.
@@ -27,8 +27,6 @@ from the build command.`,
2727 return runPushCommand (args [0 ], args [1 ])
2828 },
2929 }
30-
31- return cmd
3230}
3331
3432func runPushCommand (filePath , tag string ) error {
Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ func NewRootCmd() *cobra.Command {
109109 cmd .AddCommand (NewVersionCmd ())
110110 cmd .AddCommand (NewRunCmd ())
111111 cmd .AddCommand (NewExecCmd ())
112- cmd .AddCommand (NewTuiCmd ())
113112 cmd .AddCommand (NewNewCmd ())
114113 cmd .AddCommand (NewAPICmd ())
115114 cmd .AddCommand (NewEvalCmd ())
Original file line number Diff line number Diff line change @@ -80,18 +80,6 @@ func NewRunCmd() *cobra.Command {
8080 return cmd
8181}
8282
83- func NewTuiCmd () * cobra.Command {
84- return & cobra.Command {
85- Use : "tui" ,
86- Short : "Deprecated. Use `cagent run` instead." ,
87- Hidden : true ,
88- RunE : func (cmd * cobra.Command , args []string ) error {
89- fmt .Fprintln (os .Stderr , "'cagent tui' is deprecated. Please use 'cagent run' instead." )
90- return nil
91- },
92- }
93- }
94-
9583func runCommand (cmd * cobra.Command , args []string ) error {
9684 telemetry .TrackCommand ("run" , args )
9785 return doRunCommand (cmd .Context (), args , false )
You can’t perform that action at this time.
0 commit comments