MCPcopy Index your code
hub / github.com/coder/coder / NewSubAgentClientFromAPI

Function NewSubAgentClientFromAPI

agent/agentcontainers/subagent.go:156–164  ·  view source on GitHub ↗
(logger slog.Logger, agentAPI agentproto.DRPCAgentClient28)

Source from the content-addressed store, hash-verified

154var _ SubAgentClient = (*subAgentAPIClient)(nil)
155
156func NewSubAgentClientFromAPI(logger slog.Logger, agentAPI agentproto.DRPCAgentClient28) SubAgentClient {
157 if agentAPI == nil {
158 panic("developer error: agentAPI cannot be nil")
159 }
160 return &subAgentAPIClient{
161 logger: logger.Named("subagentclient"),
162 api: agentAPI,
163 }
164}
165
166func (a *subAgentAPIClient) List(ctx context.Context) ([]SubAgent, error) {
167 a.logger.Debug(ctx, "listing sub agents")

Calls 1

NamedMethod · 0.80