loadTeam loads an agent team from the given agent file. Callers should defer stopToolSets(ctx, t) to clean up.
(ctx context.Context, agentFilename string, opts ...teamloader.Opt)
| 72 | // loadTeam loads an agent team from the given agent file. |
| 73 | // Callers should defer stopToolSets(ctx, t) to clean up. |
| 74 | func (f *debugFlags) loadTeam(ctx context.Context, agentFilename string, opts ...teamloader.Opt) (*team.Team, error) { |
| 75 | agentSource, err := config.Resolve(agentFilename, f.runConfig.EnvProvider()) |
| 76 | if err != nil { |
| 77 | return nil, err |
| 78 | } |
| 79 | |
| 80 | opts = append(loaderdefaults.Opts(), opts...) |
| 81 | t, err := teamloader.Load(ctx, agentSource, &f.runConfig, opts...) |
| 82 | if err != nil { |
| 83 | return nil, err |
| 84 | } |
| 85 | |
| 86 | return t, nil |
| 87 | } |
| 88 | |
| 89 | func (f *debugFlags) runDebugConfigCommand(cmd *cobra.Command, args []string) (commandErr error) { |
| 90 | telemetry.TrackCommand(cmd.Context(), "debug", append([]string{"config"}, args...)) |
no test coverage detected