MCPcopy Index your code
hub / github.com/docker/docker-agent / newDebugCmd

Function newDebugCmd

cmd/root/debug.go:27–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27func newDebugCmd() *cobra.Command {
28 var flags debugFlags
29
30 cmd := &cobra.Command{
31 Use: "debug",
32 Short: "Debug tools",
33 GroupID: "advanced",
34 }
35 cmd.Hidden = true
36
37 cmd.AddCommand(&cobra.Command{
38 Use: "config <agent-file>|<registry-ref>",
39 Short: "Print the canonical form of an agent's configuration file",
40 Args: cobra.ExactArgs(1),
41 RunE: flags.runDebugConfigCommand,
42 })
43 cmd.AddCommand(&cobra.Command{
44 Use: "toolsets <agent-file>|<registry-ref>",
45 Short: "Debug the toolsets of an agent",
46 Args: cobra.ExactArgs(1),
47 RunE: flags.runDebugToolsetsCommand,
48 })
49 cmd.AddCommand(&cobra.Command{
50 Use: "skills <agent-file>|<registry-ref>",
51 Short: "Debug the skills of an agent",
52 Args: cobra.ExactArgs(1),
53 RunE: flags.runDebugSkillsCommand,
54 })
55 titleCmd := &cobra.Command{
56 Use: "title <agent-file>|<registry-ref> <question>",
57 Short: "Generate a session title from a question",
58 Args: cobra.ExactArgs(2),
59 RunE: flags.runDebugTitleCommand,
60 }
61 titleCmd.Flags().StringArrayVar(&flags.modelOverrides, "model", nil, "Override agent model: [agent=]provider/model (repeatable)")
62 cmd.AddCommand(titleCmd)
63
64 addRuntimeConfigFlags(cmd, &flags.runConfig)
65
66 cmd.AddCommand(newDebugAuthCmd())
67 cmd.AddCommand(newDebugOAuthCmd())
68
69 return cmd
70}
71
72// loadTeam loads an agent team from the given agent file.
73// Callers should defer stopToolSets(ctx, t) to clean up.

Callers 1

NewRootCmdFunction · 0.85

Calls 3

addRuntimeConfigFlagsFunction · 0.85
newDebugAuthCmdFunction · 0.85
newDebugOAuthCmdFunction · 0.85

Tested by

no test coverage detected